09 2020 档案

katka-container搭建
摘要:https://www.cnblogs.com/xiaochina/p/12805936.html katka-container搭建 kata-container架构# https://katacontainers.io/ https://katacontainers.io/baidu //百度在 阅读全文

posted @ 2020-09-30 11:52 tycoon3 阅读(195) 评论(0) 推荐(0) 编辑

git切换分支
摘要:root@ubuntu:~/kata/qemu# git branch * master root@ubuntu:~/kata/qemu# git branch all root@ubuntu:~/kata/qemu# git branch --all all * master remotes/or 阅读全文

posted @ 2020-09-30 11:03 tycoon3 阅读(320) 评论(0) 推荐(0) 编辑

Running Kata Containers with Docker on IBM Power Systems
摘要:Containers have taken off for good reason — they’re light, they’re performant, and they’re easy to integrate. The problem is, the traditional containe 阅读全文

posted @ 2020-09-30 09:11 tycoon3 阅读(234) 评论(0) 推荐(0) 编辑

kata container + qemu
摘要:https://www.jianshu.com/p/80c11180ef96 root@ubuntu:~/kata# /usr/bin/qemu-system-aarch64 --version QEMU emulator version 2.11.1(Debian 1:2.11+dfsg-1ubu 阅读全文

posted @ 2020-09-30 09:04 tycoon3 阅读(532) 评论(0) 推荐(0) 编辑

Kata Containers with NEMU
摘要:https://github.com/kata-containers/documentation/blob/master/how-to/how-to-use-kata-containers-with-nemu.md#aarch64 root@ubuntu:~/kata# git clone http 阅读全文

posted @ 2020-09-29 20:52 tycoon3 阅读(144) 评论(0) 推荐(0) 编辑

qemu-lite
摘要:https://kayhaw.github.io/2019/09/30/QemuLiteInstallation.html clone源码仓库:git clone git@github.com:intel/qemu-lite.git子模块初始化:git submodule update --init 阅读全文

posted @ 2020-09-29 20:13 tycoon3 阅读(612) 评论(0) 推荐(0) 编辑

kata镜像
摘要:kata-containers/osbuilder root@ubuntu:/opt/gopath/src/github.com/kata-containers/osbuilder# cd rootfs-builder/ root@ubuntu:/opt/gopath/src/github.com/ 阅读全文

posted @ 2020-09-29 19:45 tycoon3 阅读(223) 评论(0) 推荐(0) 编辑

golang no Go files
摘要:root@ubuntu:~/kata/images# go get github.com/kata-containers/agent github.com/kata-containers/osbuilder package github.com/kata-containers/osbuilder: 阅读全文

posted @ 2020-09-29 19:26 tycoon3 阅读(1614) 评论(0) 推荐(0) 编辑

docker命令
摘要:root@ubuntu:~# docker info --format "{{json .Runtimes}}" {"kata-runtime":{"path":"/usr/local/bin/kata-runtime"},"runc":{"path":"runc"}} root@ubuntu:~# 阅读全文

posted @ 2020-09-29 18:10 tycoon3 阅读(198) 评论(0) 推荐(0) 编辑

golang 编译安装kata container (二)
摘要:https://remimin.github.io/2018/09/12/kata-container-01/ kata-runtime kata-proxy kata-shim go get -d -u github.com/kata-containers/runtime github.com/k 阅读全文

posted @ 2020-09-29 17:59 tycoon3 阅读(455) 评论(0) 推荐(0) 编辑

golang代理
摘要:root@ubuntu:~/kata/kata_package# go env -w GOPROXY=https://goproxy.cn,direct warning: go env -w GOPROXY=... does not override conflicting OS environme 阅读全文

posted @ 2020-09-29 17:55 tycoon3 阅读(239) 评论(0) 推荐(0) 编辑

golang 安装依赖
摘要:go get -d -v ./... 以下载grpc为例 grpc官方提供的下载命令是: go get google.golang.org/grpc 因为无法访问,所以我们需要在$GOPATH/src目录下面创建一个google.golang.org的目录。 在github上找到对应的grpc的包, 阅读全文

posted @ 2020-09-29 17:44 tycoon3 阅读(2847) 评论(0) 推荐(0) 编辑

golang
摘要:root@ubuntu:~/kata# go get -d -u github.com/kata-containers/runtime Command 'go' not found, but can be installed with: snap install go # version 1.15. 阅读全文

posted @ 2020-09-29 16:59 tycoon3 阅读(570) 评论(0) 推荐(0) 编辑

Install Kata Containers for docker and Kubernetes
摘要:0. Operating System and Distribution The article is using ubuntu 16.4 (xenial) as an example. Other distributions can be setup similarly. $ cat /etc/l 阅读全文

posted @ 2020-09-29 16:14 tycoon3 阅读(249) 评论(0) 推荐(0) 编辑

安装kata
摘要:echo "deb http://download.opensuse.org/repositories/home:/katacontainers:/release/xUbuntu_$(lsb_release -rs)/ /" > /etc/apt/sources.list.d/kata-contai 阅读全文

posted @ 2020-09-29 16:10 tycoon3 阅读(234) 评论(0) 推荐(0) 编辑

Malformed entry 55 in list file /etc/apt/sources.list ([option] no value)
摘要:root@ubuntu:~# sudo -E apt-get -y install apt-transport-https ca-certificates software-properties-common E: Malformed entry 55 in list file /etc/apt/s 阅读全文

posted @ 2020-09-29 14:25 tycoon3 阅读(1368) 评论(0) 推荐(0) 编辑

Firecracker + Kata +运行
摘要:https://qiita.com/hogehoge789/items/cfe004351273b94b59b2 https://github.com/kata-containers/documentation/blob/master/install/docker/ubuntu-docker-ins 阅读全文

posted @ 2020-09-29 14:12 tycoon3 阅读(656) 评论(0) 推荐(0) 编辑

UDP, bad length 1496 > 496
摘要:1496是总个报文的长度 [root@localhost ~]# tcpdump -i enp125s0f0 udp and host 10.10.16.81 -env tcpdump: listening on enp125s0f0, link-type EN10MB (Ethernet), ca 阅读全文

posted @ 2020-09-29 09:26 tycoon3 阅读(5343) 评论(0) 推荐(0) 编辑

Scapy 解析tcpdump
摘要:[root@bogon ~]# tcpdump -i enahisic2i3 ether src 44:A1:91:A4:9B:EB -env -X -A -w test.pap tcpdump: listening on enahisic2i3, link-type EN10MB (Etherne 阅读全文

posted @ 2020-09-28 21:18 tycoon3 阅读(740) 评论(0) 推荐(0) 编辑

ip报文和最小以太网报文填充
摘要:ipv4报文格式  版本(version):4比特(bit),4(二进制0100)代表ipv4,6(二进制0110)代表ipv6; 报文头长度(IHL,IP Header Length):4比特(bit),该值以4字节(Byte)为一个单位,因此最长可以表示15*4=60字节(Byte);最小为 阅读全文

posted @ 2020-09-28 16:21 tycoon3 阅读(2407) 评论(0) 推荐(0) 编辑

UDP (17), length 72, options (unknown 99 [bad length 99]), bad cksum 5f69
摘要:15:49:23.966752 44:a1:91:a4:9b:eb > 48:57:02:64:ea:1e, ethertype ARP (0x0806), length 60: Ethernet (len 6), IPv4 (len 4), Reply 10.10.103.229 is-at 44 阅读全文

posted @ 2020-09-28 16:02 tycoon3 阅读(537) 评论(0) 推荐(0) 编辑

udp发包工具
摘要:利用nc -ul xxx 在远程机器新建一个udp监听端口,应用程序所在机器,通过nc -u x.x.x.x xxx 连接后,通过输入一些字符,来看看远程机器是否有屏显,结果本次测试正常,说明网络是通的. echo "Hello World\!" | nc -4u 10.10.103.81 4444 阅读全文

posted @ 2020-09-28 15:56 tycoon3 阅读(865) 评论(0) 推荐(0) 编辑

rte_tcp_hdr rte_ipv4_hdr
摘要:/** * IPv4 Header */ struct rte_ipv4_hdr { uint8_t version_ihl; /**< version and header length */ uint8_t type_of_service; /**< type of service */ rte 阅读全文

posted @ 2020-09-28 15:12 tycoon3 阅读(744) 评论(0) 推荐(0) 编辑

rte_pktmbuf_chain rte_pktmbuf_clone
摘要:https://www.yuque.com/zzqcn/opensource/oirzxh m = rte_pktmbuf_alloc(mpool); rte_pktmbuf_append(m, 1000); mbuf_dump(m); m2 = rte_pktmbuf_alloc(mpool); 阅读全文

posted @ 2020-09-28 12:09 tycoon3 阅读(942) 评论(0) 推荐(1) 编辑

hinic_rearm_rxq_mbuf + hinic_recv_pkts +hinic_rx_alloc_mbuf_bulk
摘要:(gdb) bt #0 0x000000000058aab8 in __rte_ring_move_cons_head (entries=0xffffd9d6727c, new_head=0xffffd9d67280, old_head=0xffffd9d67284, behavior=RTE_RI 阅读全文

posted @ 2020-09-28 10:35 tycoon3 阅读(247) 评论(0) 推荐(0) 编辑

dpdk 802.3, length 8: LLC, dsap
摘要:eth_hdr_seg->ether_type = ether_type; 原因是ether_type不是网络字节序 阅读全文

posted @ 2020-09-27 17:14 tycoon3 阅读(168) 评论(0) 推荐(0) 编辑

网卡或者驱动丢包 packet receive errors
摘要:网卡或者驱动丢包 之前讲过,如果 ethtool -S eth0 中有 rx_***_errors 那么很可能是网卡有问题,导致系统丢包,需要联系服务器或者网卡供应商进行处理。 # ethtool -S eth0 | grep rx_ | grep errors rx_crc_errors: 0 r 阅读全文

posted @ 2020-09-27 16:41 tycoon3 阅读(1301) 评论(0) 推荐(0) 编辑

Firecracker MicroVM
摘要:Amazon hat auf der AWS re:Invent das Virtualisierungs-Tool Firecracker OpenSource gestellt. Hauptziel bei der Entwicklung war, kleine VMs schnell zu s 阅读全文

posted @ 2020-09-27 15:32 tycoon3 阅读(129) 评论(0) 推荐(0) 编辑

curl: (3) Illegal characters found in URL
摘要:curl: (3) Illegal characters found in URL 在windows 中编辑的文件上传到 Linux 后,使用 curl 等工具调用时会报一个curl: (3) Illegal characters found in URL 的错误,这是因为 Linux 与 Wind 阅读全文

posted @ 2020-09-27 14:58 tycoon3 阅读(676) 评论(0) 推荐(0) 编辑

firecracker 重启
摘要:When you're done, issuing a reboot command inside the guest will actually shutdown Firecracker gracefully. This is due to the fact that Firecracker do 阅读全文

posted @ 2020-09-27 14:08 tycoon3 阅读(691) 评论(0) 推荐(0) 编辑

firecracker 添加 网卡
摘要:https://github.com/firecracker-microvm/firecracker/issues/711 https://medium.com/@Pawlrus/aws-firecracker-how-to-configure-production-worthy-networkin 阅读全文

posted @ 2020-09-27 14:04 tycoon3 阅读(410) 评论(0) 推荐(0) 编辑

arm64 + ubuntu18.04 安装firecracker
摘要:https://github.com/firecracker-microvm/firecracker/blob/master/docs/getting-started.md https://aws.amazon.com/cn/blogs/china/firecracker-open-source-s 阅读全文

posted @ 2020-09-27 11:22 tycoon3 阅读(2791) 评论(0) 推荐(0) 编辑

Git 撤销commit文件 和 回退push的文件
摘要:https://www.jianshu.com/p/491a14d414f6 第一种情况 : 撤销commit文件 我们先查看一下log日志: 两种查看方法: 1、git log 显示从近到远的日志记录,按向下键来查看更多,按 Q 键退出查看日志 2、git log --pretty=oneline 阅读全文

posted @ 2020-09-25 11:55 tycoon3 阅读(3280) 评论(0) 推荐(0) 编辑

rte_pktmbuf_linearize
摘要:static inline int rte_pktmbuf_linearize(struct rte_mbuf *mbuf) { if (rte_pktmbuf_is_contiguous(mbuf)) return 0; return __rte_pktmbuf_linearize(mbuf); 阅读全文

posted @ 2020-09-25 09:03 tycoon3 阅读(373) 评论(0) 推荐(0) 编辑

VFIO driver analysis
摘要:The VFIO driver is a framework for exposing direct device access to userspace. Virtual machine technology uses VFIO to assign physical device to VMs f 阅读全文

posted @ 2020-09-24 15:43 tycoon3 阅读(443) 评论(0) 推荐(0) 编辑

iommu_dma_mmap + mmap
摘要:https://www.codeleading.com/article/67454397455/ https://blog.csdn.net/weixin_43503508/article/details/107924027 static const struct dma_map_ops iommu 阅读全文

posted @ 2020-09-24 15:04 tycoon3 阅读(1984) 评论(0) 推荐(0) 编辑

DMAR表 + iommu
摘要:话说,盘古开天的时候,设备访问内存(DMA)就只接受物理地址,所以CPU要把一个地址告诉设备,就只能给物理地址。但设备的地址长度还比CPU的总线长度短,所以只能分配低地址来给设备用。所以CPU这边的接口就只有dma=dma_alloc(dev, size),分配了物理地址,然后映射为内核的va,然后 阅读全文

posted @ 2020-09-24 14:41 tycoon3 阅读(2126) 评论(0) 推荐(0) 编辑

【firecracker】时钟与中断
摘要:转载 吴斌的博客 » 【firecracker】时钟与中断 firecracker虚拟机的时钟与中断系统完全是由KVM模块和硬件实现的,这里仅简要说明其原理,更深入的分析需要结合KVM代码和内核代码进行。 时钟系统原理 时钟系统包含时间源和时钟事件源两部分: 时间源类似生活中的手表,系统通过它可以获 阅读全文

posted @ 2020-09-24 10:54 tycoon3 阅读(448) 评论(0) 推荐(0) 编辑

External Interrupts in the x86 system. Part 1. Interrupt controller evolution
摘要:https://habr.com/ru/post/446312/ This article is about the interrupt delivery process from external devices in the x86 system. It tries to answer ques 阅读全文

posted @ 2020-09-24 10:48 tycoon3 阅读(1633) 评论(0) 推荐(0) 编辑

虚拟机中断
摘要:root@srv6:~# cat /proc/interrupts CPU0 CPU1 CPU2 CPU3 CPU4 CPU5 CPU6 CPU7 1: 0 0 0 0 0 0 9 0 IO-APIC 1-edge i8042 4: 442 0 0 0 319 0 0 0 IO-APIC 4-edg 阅读全文

posted @ 2020-09-24 10:41 tycoon3 阅读(1052) 评论(0) 推荐(0) 编辑

内核中断
摘要:首先是内核中断的分类,这里只是根据proc/interrupts下显示的中断进行分类,主要包含外部中断和IPI中断 cat proc/interrupts CPU0 CPU1 CPU2 CPU3 CPU4 CPU5 CPU6 CPU7 1: 107049 104452 77919 106593 17 阅读全文

posted @ 2020-09-24 10:30 tycoon3 阅读(1034) 评论(0) 推荐(0) 编辑

交换机三层转发vlanif
摘要:switch1 switch2 swtich3 switch1上ping switch3上的地址 <AGG_CE6855_1>ping -a 10.10.16.254 10.10.30.249 PING 10.10.30.249: 56 data bytes, press CTRL_C to bre 阅读全文

posted @ 2020-09-23 20:18 tycoon3 阅读(362) 评论(0) 推荐(0) 编辑

centos 电池
摘要:CentOs7中查看电量剩余电量 查看CentOs7中电量剩余电量:cat /sys/class/power_supply/BAT0/capacity [root@localhost ~]# cat /sys/class/power_supply/BAT0/capacity 100 [root@lo 阅读全文

posted @ 2020-09-23 19:27 tycoon3 阅读(221) 评论(0) 推荐(0) 编辑

securecrt 连接串口
摘要: 阅读全文

posted @ 2020-09-23 08:59 tycoon3 阅读(308) 评论(0) 推荐(0) 编辑

ironic port + host_id +device id
摘要:root@controller1:~# neutron port-list | grep 10.10.19.207 | 977b01b2-6ead-4e4c-bb87-ef9105516fa5 | | f4:1d:6b:f7:be:fc | {"subnet_id": "f575285d-74ac- 阅读全文

posted @ 2020-09-22 14:06 tycoon3 阅读(183) 评论(0) 推荐(0) 编辑

arping
摘要:[root@bogon ~]# arping -I enahisic2i3 -c 1 10.10.103.229 ARPING 10.10.103.229 from 10.10.103.81 enahisic2i3 Unicast reply from 10.10.103.229 [44:A1:91 阅读全文

posted @ 2020-09-22 11:38 tycoon3 阅读(165) 评论(0) 推荐(0) 编辑

Fragmented IP packet forwarding ip分片
摘要:https://rtodto.net/fragmented-ip-packet-forwarding/ IP分片只有第一个带有传输层或ICMP首部,其余的分片只有IP头。 分片报文的有效长度是8的倍数 分片需要解决的问题主要有两个:第一,如何判断是否需要分片(若报文的长度大于1500字节且在分片标志 阅读全文

posted @ 2020-09-22 10:35 tycoon3 阅读(1843) 评论(0) 推荐(0) 编辑

scapy examples
摘要:The following lists scapy examples based on experiments performed on the below topology. The topology contains two PC’s , Ubuntu and Windows 7. Scapy 阅读全文

posted @ 2020-09-22 09:28 tycoon3 阅读(205) 评论(0) 推荐(0) 编辑

iptables rp filter
摘要:sysctl -w net.ipv4.conf.all.rp_filter=0 sysctl -w net.ipv4.conf.all.rp_filter=0 sysctl -w net.ipv4.conf.default.rp_filter=0 sysctl -w net.ipv4.conf.et 阅读全文

posted @ 2020-09-21 15:41 tycoon3 阅读(588) 评论(0) 推荐(0) 编辑

iptables -F & filter 丢包
摘要: 阅读全文

posted @ 2020-09-21 14:53 tycoon3 阅读(392) 评论(0) 推荐(0) 编辑

iptables NAT转发
摘要:Last login: Sun Sep 20 23:51:55 2020 from 192.168.117.59 [root@localhost ~]# cat /var/log/messages|grep conn [root@localhost ~]# dmesg | grep conntrac 阅读全文

posted @ 2020-09-21 13:06 tycoon3 阅读(335) 评论(0) 推荐(0) 编辑

struct rte_mbuf
摘要:buf_addr 当前mbuf的虚拟地址,标准buf addr的指向的内存是在mbuf头部开始,偏移一个mbuf头加上一个私有数据的大小。如下所示:m->buf_addr = (char *)m + sizeof(struct rte_mbuf) + priv_size;初始化这个变量是在我们创建m 阅读全文

posted @ 2020-09-21 10:21 tycoon3 阅读(2207) 评论(0) 推荐(0) 编辑

ethtool --offload
摘要:ethtool --show-offload enahisic2i3 ethtool --show-offload enahisic2i3 | grep checksum offload ethtool --show-offload enahisic2i3 | grep checksum ethto 阅读全文

posted @ 2020-09-18 17:27 tycoon3 阅读(794) 评论(0) 推荐(0) 编辑

makefile 调试
摘要:https://seisman.github.io/how-to-write-makefile/invoke.html 有时候,我们不想让我们的makefile中的规则执行起来,我们只想检查一下我们的命令,或是执行的序列。于是我们可以使用make命令的下述参数: -n, --just-print, 阅读全文

posted @ 2020-09-18 13:46 tycoon3 阅读(241) 评论(0) 推荐(0) 编辑

dpdk GDB Make breakpoint pending on future shared library load
摘要:(gdb) b hinic_tx_offload_pkt_prepare Function "hinic_tx_offload_pkt_prepare" not defined. Make breakpoint pending on future shared library load? (y or 阅读全文

posted @ 2020-09-18 11:21 tycoon3 阅读(1191) 评论(0) 推荐(0) 编辑

traceroute
摘要:root@srv6:~# traceroute -p 1053 10.10.16.82 traceroute to 10.10.16.82 (10.10.16.82), 30 hops max, 60 byte packets 1 _gateway (10.10.18.254) 6.265 ms 6 阅读全文

posted @ 2020-09-18 10:17 tycoon3 阅读(187) 评论(0) 推荐(0) 编辑

arm64-armv8a-linuxapp-gcc/.config tcpdump
摘要:arm64-armv8a-linuxapp-gcc/.config.orig:168:CONFIG_RTE_LIBRTE_HNS3_PMD=y arm64-armv8a-linuxapp-gcc/.config:168:CONFIG_RTE_LIBRTE_HNS3_PMD=y [root@local 阅读全文

posted @ 2020-09-17 15:50 tycoon3 阅读(1427) 评论(0) 推荐(1) 编辑

tcpdump tcp
摘要:[root@bogon ~]# tcpdump -i enahisic2i3 tcp and src host 10.10.103.229 and "tcp[tcpflags] & (tcp-syn|tcp-ack) != 0" -ee -nnn -vv tcpdump: listening on 阅读全文

posted @ 2020-09-17 14:16 tycoon3 阅读(153) 评论(0) 推荐(0) 编辑

tcpdump cksum incorrect
摘要:tcpdump在启用了Checksum Offloading的网卡上抓包提示cksum incorrect https://huataihuang.gitbooks.io/cloud-atlas/content/network/packet_analysis/tcpdump/udp_tcp_chec 阅读全文

posted @ 2020-09-17 13:53 tycoon3 阅读(5577) 评论(0) 推荐(0) 编辑

gdb attach + tcp fin + ack
摘要:tcp fin [root@localhost ~]# ps -elf | grep print 0 R root 10489 10488 99 80 0 - 8389208 - 22:32 pts/0 00:41:17 build/printreq -c1 -n1 -- 10.10.103.229 阅读全文

posted @ 2020-09-17 11:25 tycoon3 阅读(147) 评论(0) 推荐(0) 编辑

协议栈丢包
摘要:perf record -g -a -e skb:kfree_skb perf report -g -i perf.data perf script [root@bogon ~]# perf script swapper 0 [040] 5492213.051842: skb:kfree_skb: 阅读全文

posted @ 2020-09-17 10:15 tycoon3 阅读(320) 评论(0) 推荐(0) 编辑

IXGBE Offload
摘要:https://chenghuiyu.gitbooks.io/neutron-vxlan-offload/content/doc/1-introduction/ https://decodezp.github.io/2019/07/16/test15-dpdk-vxlan-csum-offload/ 阅读全文

posted @ 2020-09-16 14:19 tycoon3 阅读(248) 评论(0) 推荐(0) 编辑

C 共用体
摘要:共用体是一种特殊的数据类型,允许您在相同的内存位置存储不同的数据类型。您可以定义一个带有多成员的共用体,但是任何时候只能有一个成员带有值。共用体提供了一种使用相同的内存位置的有效方式。 定义共用体 为了定义共用体,您必须使用 union 语句,方式与定义结构类似。union 语句定义了一个新的数据类 阅读全文

posted @ 2020-09-16 11:31 tycoon3 阅读(131) 评论(0) 推荐(0) 编辑

mbufs multi segments + offload
摘要:DPDK技术栈在电信云中的最佳实践(三) https://kkutysllb.cn/2019/05/01/DPDK%E6%8A%80%E6%9C%AF%E6%A0%88%E5%9C%A8%E7%94%B5%E4%BF%A1%E4%BA%91%E4%B8%AD%E7%9A%84%E6%9C%80%E4 阅读全文

posted @ 2020-09-16 11:08 tycoon3 阅读(677) 评论(0) 推荐(0) 编辑

dpdk 大小端
摘要:个例子: 如果我们将0x1234abcd写入到以0x0000开始的内存中,则结果为 big-endian little-endian 0x0000 0x12 0xcd 0x0001 0x34 0xab 0x0002 0xab 0x34 0x0003 0xcd 0x12 除了moto的68K系列和de 阅读全文

posted @ 2020-09-16 10:49 tycoon3 阅读(769) 评论(0) 推荐(0) 编辑

rte_eth_dev_adjust_nb_rx_tx_desc 微调
摘要: 阅读全文

posted @ 2020-09-16 10:06 tycoon3 阅读(394) 评论(0) 推荐(0) 编辑

gdb 条件断点 + 多线程 +attach
摘要:(gdb) stop (gdb) b rte_pktmbuf_free thread all Junk after thread keyword. (gdb) c Continuing. break if 用法: break [break-args] if (condition) 例如: break 阅读全文

posted @ 2020-09-15 19:01 tycoon3 阅读(1497) 评论(0) 推荐(0) 编辑

dpdk tx_pkt_burst rte_pktmbuf_free mbuf释放
摘要:[root@localhost ixgbe]# grep tx_pkt_burst -rn * ixgbe_ethdev.c:1102: eth_dev->tx_pkt_burst = &ixgbe_xmit_pkts; ixgbe_ethdev.c:1582: eth_dev->tx_pkt_bu 阅读全文

posted @ 2020-09-15 18:08 tycoon3 阅读(1003) 评论(0) 推荐(0) 编辑

dpdk 网卡初始化 —— 收包
摘要:net_hinic: Disable vlan filter succeed, device: hinic-0000:05:00.0, port_id: 0 net_hinic: Disable vlan strip succeed, device: hinic-0000:05:00.0, port 阅读全文

posted @ 2020-09-15 11:56 tycoon3 阅读(617) 评论(0) 推荐(0) 编辑

dpdk 版本变动修改
摘要:My story As an IT engineer, part of my job is to design new networks, where I often find that the main bottleneck is the network switches. About a yea 阅读全文

posted @ 2020-09-15 10:52 tycoon3 阅读(526) 评论(0) 推荐(0) 编辑

rte_mempool_get_priv
摘要:/** * Calculate the size of the mempool header. * * @param mp * Pointer to the memory pool. * @param cs * Size of the per-lcore cache. */ #define MEMP 阅读全文

posted @ 2020-09-15 10:18 tycoon3 阅读(390) 评论(0) 推荐(0) 编辑

mempool + ring test
摘要:#include <stdio.h> #include <unistd.h> #include <rte_memory.h> #include <rte_ring.h> #include <rte_mempool.h> #define RING_SIZE 64 static const char * 阅读全文

posted @ 2020-09-14 20:08 tycoon3 阅读(320) 评论(0) 推荐(0) 编辑

dpdk mempool debug
摘要:common_ring_alloc [root@localhost mp_ring]# gdb build/app/test_ring GNU gdb (GDB) Red Hat Enterprise Linux 7.6.1-119.el7 Copyright (C) 2013 Free Softw 阅读全文

posted @ 2020-09-14 17:57 tycoon3 阅读(705) 评论(0) 推荐(0) 编辑

rte_mempool_get与ring enqueue/dequeue
摘要:rte_mempool_create if ((flags & MEMPOOL_F_SP_PUT) && (flags & MEMPOOL_F_SC_GET)) ret = rte_mempool_set_ops_byname(mp, "ring_sp_sc", NULL); else if (fl 阅读全文

posted @ 2020-09-14 17:28 tycoon3 阅读(829) 评论(0) 推荐(0) 编辑

DPDK 无锁操作
摘要:te_atomic32_cmpset()称为CAS(compare and set)操作,是DPDK无锁队列实现的关键函数,代码如下: static inline intrte_atomic32_cmpset(volatile uint32_t *dst, uint32_t exp, uint32_ 阅读全文

posted @ 2020-09-14 15:04 tycoon3 阅读(309) 评论(0) 推荐(0) 编辑

cache line
摘要:查看Cache的关联方式 在 /sys/devices/system/cpu/中查看相应的文件夹 如查看cpu0 的一级缓存中的有多少组, $ cat /sys/devices/system/cpu/cpu0/cache/index0/number_of_sets $64 如查看cpu0的一级缓存中 阅读全文

posted @ 2020-09-14 14:39 tycoon3 阅读(980) 评论(0) 推荐(0) 编辑

对比Intel和Kunpeng+ openEuler
摘要:对比Intel和Kunpeng https://compare-intel-kunpeng.readthedocs.io/zh_CN/latest/index.html openEuler 20.03 LTS 使用指南 https://www.bookstack.cn/read/openeuler- 阅读全文

posted @ 2020-09-14 10:25 tycoon3 阅读(179) 评论(0) 推荐(0) 编辑

pci config + resource
摘要:[root@localhost ~]# cd /sys/bus/pci/devices/0000:05:00.0 [root@localhost 0000:05:00.0]# ls broken_parity_status msi_bus class numa_node config power c 阅读全文

posted @ 2020-09-12 23:05 tycoon3 阅读(280) 评论(0) 推荐(0) 编辑

IORESOURCE_MEM IORESOURCE_IO
摘要:/* Get pci port io resources described by bar #pci_bar in uio resource n. */ static int igbuio_pci_setup_ioport(struct pci_dev *dev, struct uio_info * 阅读全文

posted @ 2020-09-12 22:51 tycoon3 阅读(713) 评论(0) 推荐(0) 编辑

PCIE的mmio内存映射访问机制+ 配置空间 +mmap + resource + /dev/mem
摘要:https://blog.csdn.net/Jmilk/article/details/106007926 打开 dpdk-18.08/drivers/bus/pci/linux/pci.c 可以看到以下内容: #define PCI_MAX_RESOURCE 6 /* * PCI 扫描文件系统下的 阅读全文

posted @ 2020-09-12 22:29 tycoon3 阅读(12057) 评论(1) 推荐(3) 编辑

mmap PROT_READ | PROT_WRITE
摘要:* * 用于映射 resource 资源,并获取 PCI BAR * @param dev:DPDK 中关于某一个 PCI 设备的抽象实例 * @param res_id:说明要获取第几个 BAR * @param uio_res:用来存放 PCI BAR 资源的结构 * @param map_id 阅读全文

posted @ 2020-09-12 22:23 tycoon3 阅读(1124) 评论(0) 推荐(0) 编辑

使用/dev/mem内存映射的方式操做GPIO口
摘要:使用的是全志H3的芯片,运行Debian Desktop系统的ARM版本Armbian,要控制外部几个IO口,能够使用不少种方法,若是对GPIO的操做速度有要求就须要使用直接操做内存寄存器的方式来控制GPIO口。AllWinner的官方数据手册文档上介绍了GPIO的寄存器内容:函数 GPIO寄存器映 阅读全文

posted @ 2020-09-12 22:19 tycoon3 阅读(783) 评论(0) 推荐(0) 编辑

Linux中通过/dev/mem操控物理地址
摘要:https://developer.aliyun.com/article/374848 /dev/mem是物理内存的全映像,可以用来访问物理内存,用mmap来访问物理内存以及外设的IO资源,是实现用户空间驱动的一种方法 我们先用hexedit来看下/dev/mem,hexedit /dev/mem 阅读全文

posted @ 2020-09-12 22:08 tycoon3 阅读(4876) 评论(0) 推荐(1) 编辑

/dev/mem
摘要:[root@localhost ~]# cat /dev/memcat: /dev/mem: No such file or directory[root@localhost ~]# dmidecode -s system-product-nameTaiShan 200 (Model 2280)[r 阅读全文

posted @ 2020-09-12 21:41 tycoon3 阅读(1837) 评论(0) 推荐(0) 编辑

Root-Complex pci pcie 设备透传
摘要:http://blog.chinaunix.net/uid-28541347-id-5836399.html DMA重定向硬件一般位于Root Complex中,Root-Complex是PCIe系统中引入的概念,它将CPU、内存子系统和PCIe子系连接起来。如下图所示: 而Root Complex 阅读全文

posted @ 2020-09-12 12:16 tycoon3 阅读(5717) 评论(0) 推荐(0) 编辑

Dynamic DMA mapping Guide
摘要:DMA实际上是赋予了设备在CPU的控制下,对memory进行读写访问的的能力。所谓的“CPU的控制”,指的是控制路径,CPU/软件当然要对DMA的地址、长度进行设置,对不同的设备的DMA空间进行隔离等;而实际的DMA动作,则是by pass CPU的。 谈到DMA,不可避免的会涉及到不同的地址转换, 阅读全文

posted @ 2020-09-12 12:00 tycoon3 阅读(2396) 评论(0) 推荐(0) 编辑

鲲鹏服务器 smmu iommu
摘要:目的 对于不同的硬件设备,通过在BIOS中设置一些高级选项,可以有效提升服务器性能。 服务器上的SMMU一般用来完成设备的地址转换,并且可以实现设备隔离,在虚拟化中很实用,但是在物理机测试场景下,SMMU可能会导致性能下降,尤其对于小包网络场景,因此建议关闭该功能提升服务器性能。在虚拟机场景需要打开 阅读全文

posted @ 2020-09-12 11:25 tycoon3 阅读(7193) 评论(0) 推荐(0) 编辑

PCI 和 PCI-E iommu
摘要:本文将分析 PCI/PCIe 设备直接分配(Pass-through)和 SR-IOV, 以及三种 I/O 虚拟化方式的比较。 1. PCI/PCI-E 设备直接分配给虚机 (PCI Pass-through) 设备直接分配 (Device assignment)也称为 Device Pass-Th 阅读全文

posted @ 2020-09-12 11:10 tycoon3 阅读(3384) 评论(0) 推荐(0) 编辑

中断重映射 dmesg | grep -e DMAR -e IOMMU
摘要:检查 allow_unsafe_interrupts 设置 为了完全把带有分配设备的客户机与主机分离,需要平台对中断重映射功能的支持。如果不支持这个功能,主机可能会受到来自于恶意客户机上的中断注入攻击(interrupt injection attack)。而在一个客户端可以被完全信任的环境中,管理 阅读全文

posted @ 2020-09-12 10:59 tycoon3 阅读(1495) 评论(0) 推荐(0) 编辑

insmod 内核依赖
摘要:modprobe uio.ko 内核模块名字错误insmod ./build/kmod/igb_uio.ko modprobe: FATAL: Module uio.ko not found.insmod: ERROR: could not insert module ./build/kmod/ig 阅读全文

posted @ 2020-09-12 10:45 tycoon3 阅读(543) 评论(0) 推荐(0) 编辑

driver doesn't support SRIOV configuration via sysfs
摘要:华为 IN200 网卡 用户指南 10 https://support.huawei.com/enterprise/zh/doc/EDOC1100063070/9113fdd0 配置SR-IOV https://support.huawei.com/enterprise/zh/doc/EDOC110 阅读全文

posted @ 2020-09-12 10:25 tycoon3 阅读(2060) 评论(1) 推荐(0) 编辑

modinfo
摘要:[root@localhost dpdk-19.11]# modinfo ./build/kmod/igb_uio.ko filename: /data1/dpdk-19.11/./build/kmod/igb_uio.ko author: Intel Corporation license: GP 阅读全文

posted @ 2020-09-12 10:21 tycoon3 阅读(333) 评论(0) 推荐(0) 编辑

设计一个smartnic
摘要:参考 https://www.cnblogs.com/shaohef/p/12227496.html smartnic 是一个网络接口卡(网络适配器),使用其自己的板载处理器(ASIC, FPGA, SOC),卸载HOST CPU的网络处理功能。smartNIC可以执行加密/解密,防火墙,TCP / 阅读全文

posted @ 2020-09-12 10:13 tycoon3 阅读(1915) 评论(0) 推荐(0) 编辑

lshw
摘要:[root@localhost dpdk-19.11]# lshw -c network -businfo Bus info Device Class Description pci@0000:05:00.0 enp5s0 network Hi1822 Family (2*25GE) pci@000 阅读全文

posted @ 2020-09-11 19:09 tycoon3 阅读(291) 评论(0) 推荐(0) 编辑

VF PF Reset Tests
摘要:https://doc.dpdk.org/dts/test_plans/vf_pf_reset_test_plan.html#test-case-3-vf-reset-create-one-vf-on-each-pf 阅读全文

posted @ 2020-09-11 18:06 tycoon3 阅读(178) 评论(0) 推荐(0) 编辑

iommu dmar 和虚拟机
摘要:[root@localhost ring]# ls -al /sys/kernel/iommu_groups total 0 drwxr-xr-x. 39 root root 0 Sep 11 05:11 . drwxr-xr-x. 10 root root 0 Sep 11 05:02 .. dr 阅读全文

posted @ 2020-09-11 17:40 tycoon3 阅读(541) 评论(0) 推荐(0) 编辑

大页内存
摘要:[root@localhost dpdk-19.11]# cat /proc/meminfo | grep -i huge AnonHugePages: 0 kB ShmemHugePages: 0 kB HugePages_Total: 0 HugePages_Free: 0 HugePages_ 阅读全文

posted @ 2020-09-11 17:20 tycoon3 阅读(331) 评论(0) 推荐(0) 编辑

鲲鹏服务器sriov
摘要:[root@localhost dpdk-19.11]# echo 5 > /sys/class/net/enp5s0/device/sriov_numvfs -bash: echo: write error: No such file or directory [root@localhost dp 阅读全文

posted @ 2020-09-11 16:58 tycoon3 阅读(1475) 评论(0) 推荐(0) 编辑

dpdk ring 多/单生产者、多/单消费者
摘要:#define RING_F_SP_ENQ 0x0001 /**< The default enqueue is "single-producer". */#define RING_F_SC_DEQ 0x0002 /**< The default dequeue is "single-consume 阅读全文

posted @ 2020-09-11 14:26 tycoon3 阅读(1147) 评论(0) 推荐(0) 编辑

dpdk 多线程 gdb + master
摘要:1、 main线程没有调用pthread_join 一、初始化 1、rte_eal_cpu_init()函数中,通过读取/sys/devices/system/cpu/cpuX/下的相关信息,确定当前系统有哪些CPU核,已经每个核属于哪个CPU Socket。 2、eal_parse_args()函 阅读全文

posted @ 2020-09-10 20:10 tycoon3 阅读(406) 评论(0) 推荐(0) 编辑

dpdk 编译 cp: cannot stat ‘.map’: No such file or directory
摘要:[root@localhost ring_test]# make clean all CC main.o cc1: error: argument to ‘-O’ should be a non-negative integer, ‘g’, ‘s’ or ‘fast’ cc1: warning: u 阅读全文

posted @ 2020-09-10 19:40 tycoon3 阅读(1187) 评论(0) 推荐(0) 编辑

dpsk strace stack
摘要:[root@localhost ring_test]# ps -Leo pid,tid,args:30,psr,comm | grep dpdk_test 47138 47138 ./build/app/dpdk_test -c 0x3f 0 dpdk_test 47138 47139 ./buil 阅读全文

posted @ 2020-09-10 17:40 tycoon3 阅读(279) 评论(0) 推荐(0) 编辑

dpdk main线程传参
摘要:stats_lcore在main函数定义: 栈变量 阅读全文

posted @ 2020-09-10 17:09 tycoon3 阅读(205) 评论(0) 推荐(0) 编辑

rte_atomic32_cmpset
摘要:CAS学习无锁队列前先看一个基本概念,CAS原子指令操作。 CAS(Compare and Swap,比较并替换)原子指令,用来保障数据的一致性。 指令有三个参数,当前内存值V、旧的预期值A、更新的值B,当且仅当预期值A和内存值V相同时,将内存值修改为B并返回true,否则什么都不做,并返回fals 阅读全文

posted @ 2020-09-10 16:24 tycoon3 阅读(1081) 评论(0) 推荐(0) 编辑

为容器提供更好的隔离:沙箱容器技术概览
摘要:原文:Making Containers More Isolated: An Overview of Sandboxed Container Technologies 摘要 既然主流 IT 工业都在采用基于容器的基础设施(云原生方案),那么了解这一技术的短板就很重要了。Docker、LXC 以及 R 阅读全文

posted @ 2020-09-10 15:42 tycoon3 阅读(3126) 评论(0) 推荐(0) 编辑

dpdk 读写pci地址
摘要: 阅读全文

posted @ 2020-09-09 19:40 tycoon3 阅读(408) 评论(0) 推荐(0) 编辑

cloud init network_data link type :other
摘要:cloudinit/sources/helpers/openstack.py else: if link['type'] not in KNOWN_PHYSICAL_TYPES: LOG.warning('Unknown network_data link type (%s); treating a 阅读全文

posted @ 2020-09-09 15:19 tycoon3 阅读(249) 评论(0) 推荐(0) 编辑

vxlan + 广播
摘要:节点1 ip netns add ns1 ip link add veth1 type veth peer name eth0 netns ns1 ip netns exec ns1 ip link set eth0 up ip netns exec ns1 ip link set lo up ip 阅读全文

posted @ 2020-09-09 09:50 tycoon3 阅读(232) 评论(0) 推荐(0) 编辑

dpdk ioport mmap
摘要:初始化分析 一个设备驱动要实现的功能根据实际需要可能千差万别,但是究其本质来说无非两件事情:一个是内存的操作,另外一个就是中断的处理。Igb_uio驱动和igb驱动都是网卡这个PCI设备的驱动,相同点就是要使能PCI设备,分配内存等,不同的就在于对内存和中断的处理方式的差异。 下面看下igb_uio 阅读全文

posted @ 2020-09-08 15:13 tycoon3 阅读(301) 评论(0) 推荐(0) 编辑

BAR寄存器 读写
摘要:BAR寄存器: Base Address Register0~5:即BAR寄存器,保存PCI设备使用的地址空间的基地址,保存设备在PCI总线域中的地址,每个设备最多可以有6个基址空间; PCI设备复位之后,存放PCI设备需要使用的基地址空间大小,该空间是I /O空间还是存储器空间等信息; 软件对PC 阅读全文

posted @ 2020-09-08 14:55 tycoon3 阅读(2920) 评论(0) 推荐(0) 编辑

dpdk 驱动初始化
摘要:[root@localhost memzone]# gdb build/app/TestMalloc GNU gdb (GDB) Red Hat Enterprise Linux 7.6.1-119.el7 Copyright (C) 2013 Free Software Foundation, I 阅读全文

posted @ 2020-09-08 10:21 tycoon3 阅读(535) 评论(0) 推荐(0) 编辑

dpdk 中断映射
摘要:/* set up interrupt support (but not enable interrupts) */ static int pci_vfio_setup_interrupts(struct rte_pci_device *dev, int vfio_dev_fd) { int i, 阅读全文

posted @ 2020-09-07 20:11 tycoon3 阅读(559) 评论(0) 推荐(0) 编辑

VT-d 中断重映射分析
摘要:https://kernelgo.org/vtd_interrupt_remapping_code_analysis.html 本文中我们将一起来分析一下VT-d中断重映射的代码实现, 在看本文前建议先复习一下VT-d中断重映射的原理,可以参考VT-D Interrupt Remapping这篇文章 阅读全文

posted @ 2020-09-07 19:59 tycoon3 阅读(2275) 评论(0) 推荐(0) 编辑

cpupower frequency-info
摘要:[root@localhost ixgbe]# cpupower frequency-info analyzing CPU 0: driver: cppc_cpufreq CPUs which run at the same hardware frequency: 0 1 2 3 4 5 6 7 8 阅读全文

posted @ 2020-09-07 19:03 tycoon3 阅读(1691) 评论(0) 推荐(0) 编辑

修改网卡收发包队列数
摘要:修改收发包队列数 [[email protected] tong]# ethtool -g eth0 Ring parameters for eth0: Pre-set maximums: RX: 4096 RX Mini: 0 RX Jumbo: 0 TX: 4096 Current hardwa 阅读全文

posted @ 2020-09-06 19:12 tycoon3 阅读(1118) 评论(0) 推荐(0) 编辑

/proc/interrupts + dpdk +pci
摘要:tr -s 删除所有重复出现字符序列,只保留第一个;即将重复出现字符串压缩为一个字符串。 cat /proc/interrupts | tr -s " " | more [root@localhost ixgbe]# cat /proc/interrupts |less -S CPU0 CPU1 C 阅读全文

posted @ 2020-09-06 18:43 tycoon3 阅读(432) 评论(0) 推荐(0) 编辑

中断 Interrupt Vector Allocation
摘要: 阅读全文

posted @ 2020-09-04 19:24 tycoon3 阅读(420) 评论(0) 推荐(0) 编辑

网卡关闭或打开接收中断
摘要:https://blog.csdn.net/hz5034/article/details/79794478 static irqreturn_t ixgbe_msix_clean_many(int irq, void *data) { struct ixgbe_q_vector *q_vector 阅读全文

posted @ 2020-09-04 17:35 tycoon3 阅读(450) 评论(0) 推荐(0) 编辑

ixgbe驱动初始化
摘要:http://abcdxyzk.github.io/blog/2020/05/21/ixgbe-init/ 首先模块加载insmod ixgbe.ko 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 module_init(ixgbe_in 阅读全文

posted @ 2020-09-04 17:11 tycoon3 阅读(780) 评论(0) 推荐(0) 编辑

msi中断初始化 和申请
摘要:msi中断初始化 1.什么是MSI中断 Message Signaled Interrupts 是pci2.2中提出来的一种新的中断形式。后续有msi-x扩展。 msi以及msi-x这种中断形式的一个最主要的特点就是,它在系统的特定地址做一个memory write transaction, 将一个 阅读全文

posted @ 2020-09-04 16:54 tycoon3 阅读(3383) 评论(0) 推荐(0) 编辑

MSI 中断
摘要:https://www.codenong.com/cs106676560/ MSI只支持32个中断向量,而MSI-X支持多达2048个中断向量,但是MSI-X的相关寄存器在配置空间中占用的空间却更小。这是因为中断向量信息并不直接存储在这里,而是在一款特殊的Memory(MIMO)中。并通过BIR(B 阅读全文

posted @ 2020-09-04 16:40 tycoon3 阅读(6765) 评论(0) 推荐(0) 编辑

dpdk +vfio 中断关和开
摘要:1、request_irq会去写mxi msg 普通网卡驱动申请中断 int ixgbe_init_interrupt_scheme(struct ixgbe_adapter *adapter) { err = ixgbe_alloc_q_vectors(adapter); } static int 阅读全文

posted @ 2020-09-04 16:29 tycoon3 阅读(959) 评论(0) 推荐(0) 编辑

基于82599网卡的二层网络数据包接收
摘要:本篇文档主要描述了网络数据包在二层的接收流程,主要包括以下三个部分: 1)、82599网卡和数据包接收相关的内容; 2)、ixgbe网卡驱动数据包接收相关的配置; 3)、ixgbe网卡驱动napi接口的处理。 82599网卡和数据包接收相关的内容 这一部分要介绍的是82599网卡中和数据包接收相关的 阅读全文

posted @ 2020-09-04 16:13 tycoon3 阅读(733) 评论(0) 推荐(0) 编辑

ixgb 中断
摘要:https://blog.csdn.net/hz5034/article/details/79794343?utm_medium=distribute.pc_aggpage_search_result.none-task-blog-2~all~first_rank_v2~rank_v25-1-797 阅读全文

posted @ 2020-09-04 16:11 tycoon3 阅读(304) 评论(0) 推荐(0) 编辑

libvirt
摘要:虚拟机 root@srv6:~# ip a 1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000 link/loopback 00:00:00:00:00:00 brd 阅读全文

posted @ 2020-09-04 15:42 tycoon3 阅读(215) 评论(0) 推荐(0) 编辑

docker 查看虚拟机xml
摘要:[root@compute28 instances]# cat compute_nodes {"compute28": 1599202145.125docker ps -a | grep nova c88c625ca0bf registryserver:4000/ -binary-nova-comp 阅读全文

posted @ 2020-09-04 15:09 tycoon3 阅读(923) 评论(0) 推荐(0) 编辑

kolla 配置文件
摘要:[Unauthorized System] root@T920compute24:/var/lib/docker/volumes# cd /etc/kolla/nova-compute [Note] System unauthorized, Please contact the system sup 阅读全文

posted @ 2020-09-04 15:00 tycoon3 阅读(1339) 评论(2) 推荐(1) 编辑

docker volume
摘要:volumes:Docker管理宿主机文件系统的一部分,默认位于 /var/lib/docker/volumes 目录中;(最常用的方式) [root@compute28 volumes]# docker volume ls local kolla_logs local libvirtd local 阅读全文

posted @ 2020-09-04 14:47 tycoon3 阅读(230) 评论(0) 推荐(0) 编辑

kolla KVM宿主机上查找到虚拟机IP地址
摘要:大致思路就是这样: kvm宿主机上的虚拟机可以通过virsh list来查看,不过IP就没办法查看了,这里我们通过arp协议来将一个网段内可以ping通的ip添加到宿主机的arp缓存中,通过查询虚拟机的mac地址来和ip做匹配,这样就可以查到当前宿主机上正在运行的虚拟机和它们的IP了。 脚本实例: 阅读全文

posted @ 2020-09-04 12:10 tycoon3 阅读(395) 评论(0) 推荐(0) 编辑

dpdk 网卡硬件配置 + max_rx_queues + max_tx_queues
摘要:#define IXGBE_MIN_RING_DESC 32 #define IXGBE_MAX_RING_DESC 4096 #define RTE_PMD_IXGBE_TX_MAX_BURST 32 #define RTE_PMD_IXGBE_RX_MAX_BURST 32 #define RT 阅读全文

posted @ 2020-09-03 20:33 tycoon3 阅读(1020) 评论(0) 推荐(0) 编辑

dpdk + ixgbe adater _ hw 通过pci_map_resource 读写dma寄存器 + 总线地址 + dma读写地址
摘要:一般驱动 https://www.cnblogs.com/codestack/p/12906441.html static int ixgbe_probe(struct pci_dev *pdev, const struct pci_device_id *ent) netdev = alloc_et 阅读全文

posted @ 2020-09-03 20:00 tycoon3 阅读(755) 评论(0) 推荐(0) 编辑

dpdk 网卡队列初始化 + 收发包
摘要:ixgbe_dev_rx_queue_start 设置好dma地址 IXGBE_WRITE_REG(hw, IXGBE_RDH(rxq->reg_idx), 0); IXGBE_WRITE_REG(hw, IXGBE_RDT(rxq->reg_idx), rxq->nb_rx_desc - 1); 阅读全文

posted @ 2020-09-03 17:30 tycoon3 阅读(3902) 评论(1) 推荐(0) 编辑

以太网帧:Ethernet Frame
摘要:标准的以太网帧,我们经常说的以太网帧长度是从图中 Destination MAC开始,FCS结束。网卡对网络层数据的操作是加以太网帧头、以太网帧尾FCS,很显然上层需要提供目的MAC地址,否则接口无从完成以太网帧的封装。这需要IP层需要事先完成和ARP的交互,解析出目的IP对应的目的MAC,这显然不 阅读全文

posted @ 2020-09-03 16:53 tycoon3 阅读(1511) 评论(0) 推荐(0) 编辑

dpdk driver probe
摘要:参考: https://blog.csdn.net/jeawayfox/article/details/105444104 net/hns3/hns3_ethdev.c:4918: return rte_eth_dev_pci_generic_probe(pci_dev, rte_eal_init 阅读全文

posted @ 2020-09-03 15:17 tycoon3 阅读(411) 评论(0) 推荐(0) 编辑

dpdk lcore 初始化
摘要:int rte_lcore_is_enabled(unsigned int lcore_id) { struct rte_config *cfg = rte_eal_get_configuration(); if (lcore_id >= RTE_MAX_LCORE) return 0; retur 阅读全文

posted @ 2020-09-03 14:19 tycoon3 阅读(530) 评论(0) 推荐(0) 编辑

lshw
摘要:[root@localhost ~]# lshw -c network -businfo Bus info Device Class Description pci@0000:05:00.0 network Hi1822 Family (2*25GE) pci@0000:06:00.0 networ 阅读全文

posted @ 2020-09-03 10:00 tycoon3 阅读(273) 评论(0) 推荐(0) 编辑

pci常用命令
摘要:-x 以十六进制显示 PCI 配置空间 (configuration space) 的前64个字节映像 (标准头部信息)。此参数对调试驱动和 lspci 本身很有用。 -xxx 以十六进制显示所有 PCI 配置空间的映像。此选项只有 root 可用,并且很多 PCI 设备在你试图读取配置空间的未定义 阅读全文

posted @ 2020-09-03 09:34 tycoon3 阅读(2568) 评论(0) 推荐(0) 编辑

pci 设备 vendor device subsystem 驱动
摘要:Then to get the ids, use: $ lspci -v -n -s 03:00.0 03:00.0 0280: 8086:0085 (rev 34) Subsystem: 8086:1311 Flags: bus master, fast devsel, latency 0, IR 阅读全文

posted @ 2020-09-02 20:20 tycoon3 阅读(1461) 评论(0) 推荐(0) 编辑

手动绑定驱动 + drivers_probe + rescan
摘要:Igb_uio内核驱动 Igb_uio驱动主要做的就是注册一个pci设备。但是igbuio_pci_driver对应的保存pci设备信息的id_table指针为空,这样在内核注册此pci设备时,会找不到匹配的设备,就不会调用igb_uio驱动中的探测probe函数,只会在/sys目录下创建Igb_u 阅读全文

posted @ 2020-09-02 19:57 tycoon3 阅读(3443) 评论(0) 推荐(0) 编辑

找不到网卡 pci probe function not called
摘要:/sys/class/net /sys/devices /sy/bus/pci https://access.redhat.com/discussions/895293 [root@localhost rules.d]# lspci -v | grep -i ether -B 4 Capabilit 阅读全文

posted @ 2020-09-02 17:00 tycoon3 阅读(513) 评论(0) 推荐(0) 编辑

primary + secondary + malloc + rte_memzone_reserve
摘要:build/app/TestMalloc -n 4 --proc-type=primary mz addr: 100012838, mz->addr :13febc780 , mz->addr_64 : 13febc780 arr addr: ffffe7739ad8 arr addr: 13feb 阅读全文

posted @ 2020-09-02 16:15 tycoon3 阅读(157) 评论(0) 推荐(0) 编辑

gdb 打印结构体
摘要:(gdb) p arr $8 = (struct rte_fbarray *) 0x1000000b0 (gdb) p *arr $9 = {name = '\000' <repeats 63 times>, count = 0, len = 0, elt_sz = 0, data = 0x0, r 阅读全文

posted @ 2020-09-02 15:31 tycoon3 阅读(4321) 评论(0) 推荐(0) 编辑

rte_fbarray_init
摘要:rte_fbarray_init eal_get_fbarray_path(path, sizeof(path), name); /* * Each fbarray is unique to process namespace, i.e. the * filename depends on proc 阅读全文

posted @ 2020-09-02 15:27 tycoon3 阅读(552) 评论(0) 推荐(0) 编辑

DPDK 内存管理---malloc_heap和malloc_elem
摘要:转载 https://blog.csdn.net/jsh13417/article/details/107285384 两种数据结构体介绍 Malloc 库内部使用了两种数据结构类型(可以参考dpdk官方文档3.4.4章节介绍): struct malloc_heap:用于在每个 CPU Socke 阅读全文

posted @ 2020-09-02 12:53 tycoon3 阅读(702) 评论(0) 推荐(0) 编辑

dpdk rte_memzone_reserve
摘要:[root@localhost dpdk-19.11]# cat /sys/devices/system/node/node*/hugepages/hugepages-2048kB/nr_hugepages 0 0 0 0 [root@localhost dpdk-19.11]# cat /sys/ 阅读全文

posted @ 2020-09-02 12:03 tycoon3 阅读(935) 评论(0) 推荐(0) 编辑

dpdk Segmentation fault
摘要:#include <stdio.h> #include <string.h> #include <stdint.h> #include <errno.h> #include <sys/queue.h> #include <rte_memory.h> #include <rte_launch.h> # 阅读全文

posted @ 2020-09-02 11:35 tycoon3 阅读(722) 评论(0) 推荐(0) 编辑

nm命令 查看一个可执行文件或者库的依赖库
摘要:更详细的内容见man page。这里举例说明: nm -u hello.o 显示hello.o 中的未定义符号,需要和其他对象文件进行链接. nm -A /usr/lib/* 2>/dev/null | grep "T memset" 在 /usr/lib/ 目录下找出哪个库文件定义了memset函 阅读全文

posted @ 2020-09-02 11:32 tycoon3 阅读(2048) 评论(0) 推荐(0) 编辑

debuginfo-install: command not found
摘要:[root@localhost yum.repos.d]# debuginfo-install glibc-2.17-307.el7.1.aarch64 libgcc-4.8.5-39.el7.aarch64 numactl-libs-2.0.12-5.el7.aarch64 -bash: debu 阅读全文

posted @ 2020-09-02 10:36 tycoon3 阅读(1650) 评论(0) 推荐(0) 编辑

rte_malloc_dump_heaps
摘要:nodes = rte_malloc(NULL, sizeof(struct node), 0); if (NULL == nodes) rte_exit(EXIT_FAILURE, "Cannot malloc memory \n"); printf("nodes addr %llx \n ",( 阅读全文

posted @ 2020-09-01 20:20 tycoon3 阅读(205) 评论(0) 推荐(0) 编辑

根据文件句柄查找文件名
摘要: 阅读全文

posted @ 2020-09-01 19:35 tycoon3 阅读(303) 评论(0) 推荐(0) 编辑

dpdk test + dpdk-procinfo
摘要:https://www.geek-share.com/detail/2586671676.html ABI_VERSION buildtools devtools GNUmakefile MAINTAINERS mk app config doc kernel Makefile README arm 阅读全文

posted @ 2020-09-01 19:05 tycoon3 阅读(876) 评论(0) 推荐(0) 编辑

numa节点大页
摘要:[root@localhost server]# cat /sys/devices/system/node/node*/meminfo | grep -i HugePage Node 0 AnonHugePages: 0 kB Node 0 ShmemHugePages: 0 kB Node 0 H 阅读全文

posted @ 2020-09-01 18:06 tycoon3 阅读(415) 评论(0) 推荐(0) 编辑

/var/run/dpdk/rte strings
摘要:[root@localhost rte]# ls config fbarray_memseg-2048k-1-2 fbarray_memseg-2048k-3-1 fbarray_memseg-524288k-2-0 fbarray_memseg-2048k-0-0 fbarray_memseg-2 阅读全文

posted @ 2020-09-01 17:46 tycoon3 阅读(303) 评论(0) 推荐(0) 编辑

but no mounted hugetlbfs found for that size
摘要:[root@localhost memzone]# build/app/helloworld -c 0xf -n 4 EAL: Detected 128 lcore(s) EAL: Detected 4 NUMA nodes EAL: Multi-process socket /var/run/dp 阅读全文

posted @ 2020-09-01 17:27 tycoon3 阅读(3591) 评论(0) 推荐(1) 编辑

dpdk rte_memzone_reserve
摘要:/* SPDX-License-Identifier: BSD-3-Clause * Copyright(c) 2010-2014 Intel Corporation */ #include <stdio.h> #include <string.h> #include <stdint.h> #inc 阅读全文

posted @ 2020-09-01 16:00 tycoon3 阅读(423) 评论(0) 推荐(0) 编辑

dpdk gdb debug 编译选项 export EXTRA_CFLAGS="-O0 -g"
摘要:[root@localhost memzone]# gdb build/app/helloworld /data1/core/corefile-helloworld-56592-1598942035 GNU gdb (GDB) Red Hat Enterprise Linux 7.6.1-119.e 阅读全文

posted @ 2020-09-01 14:39 tycoon3 阅读(1423) 评论(0) 推荐(0) 编辑

dpdk primary secondary
摘要:/* SPDX-License-Identifier: BSD-3-Clause * Copyright(c) 2010-2014 Intel Corporation */ #include <stdio.h> #include <string.h> #include <stdint.h> #inc 阅读全文

posted @ 2020-09-01 14:14 tycoon3 阅读(883) 评论(0) 推荐(0) 编辑

导航

< 2025年3月 >
23 24 25 26 27 28 1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30 31 1 2 3 4 5

统计

点击右上角即可分享
微信分享提示