摘要:https://www.cnblogs.com/xiaochina/p/12805936.html katka-container搭建 kata-container架构# https://katacontainers.io/ https://katacontainers.io/baidu //百度在
阅读全文
摘要: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
阅读全文
摘要: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
阅读全文
摘要: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
阅读全文
摘要: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
阅读全文
摘要:https://kayhaw.github.io/2019/09/30/QemuLiteInstallation.html clone源码仓库:git clone git@github.com:intel/qemu-lite.git子模块初始化:git submodule update --init
阅读全文
摘要:kata-containers/osbuilder root@ubuntu:/opt/gopath/src/github.com/kata-containers/osbuilder# cd rootfs-builder/ root@ubuntu:/opt/gopath/src/github.com/
阅读全文
摘要:root@ubuntu:~/kata/images# go get github.com/kata-containers/agent github.com/kata-containers/osbuilder package github.com/kata-containers/osbuilder:
阅读全文
摘要:root@ubuntu:~# docker info --format "{{json .Runtimes}}" {"kata-runtime":{"path":"/usr/local/bin/kata-runtime"},"runc":{"path":"runc"}} root@ubuntu:~#
阅读全文
摘要: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
阅读全文
摘要:root@ubuntu:~/kata/kata_package# go env -w GOPROXY=https://goproxy.cn,direct warning: go env -w GOPROXY=... does not override conflicting OS environme
阅读全文
摘要:go get -d -v ./... 以下载grpc为例 grpc官方提供的下载命令是: go get google.golang.org/grpc 因为无法访问,所以我们需要在$GOPATH/src目录下面创建一个google.golang.org的目录。 在github上找到对应的grpc的包,
阅读全文
摘要: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.
阅读全文
摘要: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
阅读全文
摘要:echo "deb http://download.opensuse.org/repositories/home:/katacontainers:/release/xUbuntu_$(lsb_release -rs)/ /" > /etc/apt/sources.list.d/kata-contai
阅读全文
摘要: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
阅读全文
摘要:https://qiita.com/hogehoge789/items/cfe004351273b94b59b2 https://github.com/kata-containers/documentation/blob/master/install/docker/ubuntu-docker-ins
阅读全文
摘要:1496是总个报文的长度 [root@localhost ~]# tcpdump -i enp125s0f0 udp and host 10.10.16.81 -env tcpdump: listening on enp125s0f0, link-type EN10MB (Ethernet), ca
阅读全文
摘要:[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
阅读全文
摘要:ipv4报文格式 版本(version):4比特(bit),4(二进制0100)代表ipv4,6(二进制0110)代表ipv6; 报文头长度(IHL,IP Header Length):4比特(bit),该值以4字节(Byte)为一个单位,因此最长可以表示15*4=60字节(Byte);最小为
阅读全文
摘要: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
阅读全文
摘要:利用nc -ul xxx 在远程机器新建一个udp监听端口,应用程序所在机器,通过nc -u x.x.x.x xxx 连接后,通过输入一些字符,来看看远程机器是否有屏显,结果本次测试正常,说明网络是通的. echo "Hello World\!" | nc -4u 10.10.103.81 4444
阅读全文
摘要:/** * IPv4 Header */ struct rte_ipv4_hdr { uint8_t version_ihl; /**< version and header length */ uint8_t type_of_service; /**< type of service */ rte
阅读全文
摘要: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);
阅读全文
摘要:(gdb) bt #0 0x000000000058aab8 in __rte_ring_move_cons_head (entries=0xffffd9d6727c, new_head=0xffffd9d67280, old_head=0xffffd9d67284, behavior=RTE_RI
阅读全文
摘要:eth_hdr_seg->ether_type = ether_type; 原因是ether_type不是网络字节序
阅读全文
摘要:网卡或者驱动丢包 之前讲过,如果 ethtool -S eth0 中有 rx_***_errors 那么很可能是网卡有问题,导致系统丢包,需要联系服务器或者网卡供应商进行处理。 # ethtool -S eth0 | grep rx_ | grep errors rx_crc_errors: 0 r
阅读全文
摘要:Amazon hat auf der AWS re:Invent das Virtualisierungs-Tool Firecracker OpenSource gestellt. Hauptziel bei der Entwicklung war, kleine VMs schnell zu s
阅读全文
摘要:curl: (3) Illegal characters found in URL 在windows 中编辑的文件上传到 Linux 后,使用 curl 等工具调用时会报一个curl: (3) Illegal characters found in URL 的错误,这是因为 Linux 与 Wind
阅读全文
摘要: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
阅读全文
摘要:https://github.com/firecracker-microvm/firecracker/issues/711 https://medium.com/@Pawlrus/aws-firecracker-how-to-configure-production-worthy-networkin
阅读全文
摘要:https://github.com/firecracker-microvm/firecracker/blob/master/docs/getting-started.md https://aws.amazon.com/cn/blogs/china/firecracker-open-source-s
阅读全文
摘要:https://www.jianshu.com/p/491a14d414f6 第一种情况 : 撤销commit文件 我们先查看一下log日志: 两种查看方法: 1、git log 显示从近到远的日志记录,按向下键来查看更多,按 Q 键退出查看日志 2、git log --pretty=oneline
阅读全文
摘要:static inline int rte_pktmbuf_linearize(struct rte_mbuf *mbuf) { if (rte_pktmbuf_is_contiguous(mbuf)) return 0; return __rte_pktmbuf_linearize(mbuf);
阅读全文
摘要: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
阅读全文
摘要:https://www.codeleading.com/article/67454397455/ https://blog.csdn.net/weixin_43503508/article/details/107924027 static const struct dma_map_ops iommu
阅读全文
摘要:话说,盘古开天的时候,设备访问内存(DMA)就只接受物理地址,所以CPU要把一个地址告诉设备,就只能给物理地址。但设备的地址长度还比CPU的总线长度短,所以只能分配低地址来给设备用。所以CPU这边的接口就只有dma=dma_alloc(dev, size),分配了物理地址,然后映射为内核的va,然后
阅读全文
摘要:转载 吴斌的博客 » 【firecracker】时钟与中断 firecracker虚拟机的时钟与中断系统完全是由KVM模块和硬件实现的,这里仅简要说明其原理,更深入的分析需要结合KVM代码和内核代码进行。 时钟系统原理 时钟系统包含时间源和时钟事件源两部分: 时间源类似生活中的手表,系统通过它可以获
阅读全文
摘要: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
阅读全文
摘要: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
阅读全文
摘要:首先是内核中断的分类,这里只是根据proc/interrupts下显示的中断进行分类,主要包含外部中断和IPI中断 cat proc/interrupts CPU0 CPU1 CPU2 CPU3 CPU4 CPU5 CPU6 CPU7 1: 107049 104452 77919 106593 17
阅读全文
摘要: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
阅读全文
摘要:CentOs7中查看电量剩余电量 查看CentOs7中电量剩余电量:cat /sys/class/power_supply/BAT0/capacity [root@localhost ~]# cat /sys/class/power_supply/BAT0/capacity 100 [root@lo
阅读全文
摘要: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-
阅读全文
摘要:[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
阅读全文
摘要:https://rtodto.net/fragmented-ip-packet-forwarding/ IP分片只有第一个带有传输层或ICMP首部,其余的分片只有IP头。 分片报文的有效长度是8的倍数 分片需要解决的问题主要有两个:第一,如何判断是否需要分片(若报文的长度大于1500字节且在分片标志
阅读全文
摘要:The following lists scapy examples based on experiments performed on the below topology. The topology contains two PC’s , Ubuntu and Windows 7. Scapy
阅读全文
摘要: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
阅读全文
摘要: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
阅读全文
摘要:buf_addr 当前mbuf的虚拟地址,标准buf addr的指向的内存是在mbuf头部开始,偏移一个mbuf头加上一个私有数据的大小。如下所示:m->buf_addr = (char *)m + sizeof(struct rte_mbuf) + priv_size;初始化这个变量是在我们创建m
阅读全文
摘要:ethtool --show-offload enahisic2i3 ethtool --show-offload enahisic2i3 | grep checksum offload ethtool --show-offload enahisic2i3 | grep checksum ethto
阅读全文
摘要:https://seisman.github.io/how-to-write-makefile/invoke.html 有时候,我们不想让我们的makefile中的规则执行起来,我们只想检查一下我们的命令,或是执行的序列。于是我们可以使用make命令的下述参数: -n, --just-print,
阅读全文
摘要:(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
阅读全文
摘要: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
阅读全文
摘要: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
阅读全文
摘要:[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
阅读全文
摘要:tcpdump在启用了Checksum Offloading的网卡上抓包提示cksum incorrect https://huataihuang.gitbooks.io/cloud-atlas/content/network/packet_analysis/tcpdump/udp_tcp_chec
阅读全文
摘要: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
阅读全文
摘要: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:
阅读全文
摘要:https://chenghuiyu.gitbooks.io/neutron-vxlan-offload/content/doc/1-introduction/ https://decodezp.github.io/2019/07/16/test15-dpdk-vxlan-csum-offload/
阅读全文
摘要:共用体是一种特殊的数据类型,允许您在相同的内存位置存储不同的数据类型。您可以定义一个带有多成员的共用体,但是任何时候只能有一个成员带有值。共用体提供了一种使用相同的内存位置的有效方式。 定义共用体 为了定义共用体,您必须使用 union 语句,方式与定义结构类似。union 语句定义了一个新的数据类
阅读全文
摘要: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
阅读全文
摘要:个例子: 如果我们将0x1234abcd写入到以0x0000开始的内存中,则结果为 big-endian little-endian 0x0000 0x12 0xcd 0x0001 0x34 0xab 0x0002 0xab 0x34 0x0003 0xcd 0x12 除了moto的68K系列和de
阅读全文
摘要:(gdb) stop (gdb) b rte_pktmbuf_free thread all Junk after thread keyword. (gdb) c Continuing. break if 用法: break [break-args] if (condition) 例如: break
阅读全文
摘要:[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
阅读全文
摘要: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
阅读全文
摘要: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
阅读全文
摘要:/** * Calculate the size of the mempool header. * * @param mp * Pointer to the memory pool. * @param cs * Size of the per-lcore cache. */ #define MEMP
阅读全文
摘要:#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 *
阅读全文
摘要: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
阅读全文
摘要: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
阅读全文
摘要:te_atomic32_cmpset()称为CAS(compare and set)操作,是DPDK无锁队列实现的关键函数,代码如下: static inline intrte_atomic32_cmpset(volatile uint32_t *dst, uint32_t exp, uint32_
阅读全文
摘要:查看Cache的关联方式 在 /sys/devices/system/cpu/中查看相应的文件夹 如查看cpu0 的一级缓存中的有多少组, $ cat /sys/devices/system/cpu/cpu0/cache/index0/number_of_sets $64 如查看cpu0的一级缓存中
阅读全文
摘要:对比Intel和Kunpeng https://compare-intel-kunpeng.readthedocs.io/zh_CN/latest/index.html openEuler 20.03 LTS 使用指南 https://www.bookstack.cn/read/openeuler-
阅读全文
摘要:[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
阅读全文
摘要:/* 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 *
阅读全文
摘要:https://blog.csdn.net/Jmilk/article/details/106007926 打开 dpdk-18.08/drivers/bus/pci/linux/pci.c 可以看到以下内容: #define PCI_MAX_RESOURCE 6 /* * PCI 扫描文件系统下的
阅读全文
摘要:* * 用于映射 resource 资源,并获取 PCI BAR * @param dev:DPDK 中关于某一个 PCI 设备的抽象实例 * @param res_id:说明要获取第几个 BAR * @param uio_res:用来存放 PCI BAR 资源的结构 * @param map_id
阅读全文
摘要:使用的是全志H3的芯片,运行Debian Desktop系统的ARM版本Armbian,要控制外部几个IO口,能够使用不少种方法,若是对GPIO的操做速度有要求就须要使用直接操做内存寄存器的方式来控制GPIO口。AllWinner的官方数据手册文档上介绍了GPIO的寄存器内容:函数 GPIO寄存器映
阅读全文
摘要:https://developer.aliyun.com/article/374848 /dev/mem是物理内存的全映像,可以用来访问物理内存,用mmap来访问物理内存以及外设的IO资源,是实现用户空间驱动的一种方法 我们先用hexedit来看下/dev/mem,hexedit /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
阅读全文
摘要:http://blog.chinaunix.net/uid-28541347-id-5836399.html DMA重定向硬件一般位于Root Complex中,Root-Complex是PCIe系统中引入的概念,它将CPU、内存子系统和PCIe子系连接起来。如下图所示: 而Root Complex
阅读全文
摘要:DMA实际上是赋予了设备在CPU的控制下,对memory进行读写访问的的能力。所谓的“CPU的控制”,指的是控制路径,CPU/软件当然要对DMA的地址、长度进行设置,对不同的设备的DMA空间进行隔离等;而实际的DMA动作,则是by pass CPU的。 谈到DMA,不可避免的会涉及到不同的地址转换,
阅读全文
摘要:目的 对于不同的硬件设备,通过在BIOS中设置一些高级选项,可以有效提升服务器性能。 服务器上的SMMU一般用来完成设备的地址转换,并且可以实现设备隔离,在虚拟化中很实用,但是在物理机测试场景下,SMMU可能会导致性能下降,尤其对于小包网络场景,因此建议关闭该功能提升服务器性能。在虚拟机场景需要打开
阅读全文
摘要:本文将分析 PCI/PCIe 设备直接分配(Pass-through)和 SR-IOV, 以及三种 I/O 虚拟化方式的比较。 1. PCI/PCI-E 设备直接分配给虚机 (PCI Pass-through) 设备直接分配 (Device assignment)也称为 Device Pass-Th
阅读全文
摘要:检查 allow_unsafe_interrupts 设置 为了完全把带有分配设备的客户机与主机分离,需要平台对中断重映射功能的支持。如果不支持这个功能,主机可能会受到来自于恶意客户机上的中断注入攻击(interrupt injection attack)。而在一个客户端可以被完全信任的环境中,管理
阅读全文
摘要: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
阅读全文
摘要:华为 IN200 网卡 用户指南 10 https://support.huawei.com/enterprise/zh/doc/EDOC1100063070/9113fdd0 配置SR-IOV https://support.huawei.com/enterprise/zh/doc/EDOC110
阅读全文
摘要:[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
阅读全文
摘要:参考 https://www.cnblogs.com/shaohef/p/12227496.html smartnic 是一个网络接口卡(网络适配器),使用其自己的板载处理器(ASIC, FPGA, SOC),卸载HOST CPU的网络处理功能。smartNIC可以执行加密/解密,防火墙,TCP /
阅读全文
摘要:[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
阅读全文
摘要:https://doc.dpdk.org/dts/test_plans/vf_pf_reset_test_plan.html#test-case-3-vf-reset-create-one-vf-on-each-pf
阅读全文
摘要:[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
阅读全文
摘要:[root@localhost dpdk-19.11]# cat /proc/meminfo | grep -i huge AnonHugePages: 0 kB ShmemHugePages: 0 kB HugePages_Total: 0 HugePages_Free: 0 HugePages_
阅读全文
摘要:[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
阅读全文
摘要:#define RING_F_SP_ENQ 0x0001 /**< The default enqueue is "single-producer". */#define RING_F_SC_DEQ 0x0002 /**< The default dequeue is "single-consume
阅读全文
摘要:1、 main线程没有调用pthread_join 一、初始化 1、rte_eal_cpu_init()函数中,通过读取/sys/devices/system/cpu/cpuX/下的相关信息,确定当前系统有哪些CPU核,已经每个核属于哪个CPU Socket。 2、eal_parse_args()函
阅读全文
摘要:[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
阅读全文
摘要:[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
阅读全文
摘要:stats_lcore在main函数定义: 栈变量
阅读全文
摘要:CAS学习无锁队列前先看一个基本概念,CAS原子指令操作。 CAS(Compare and Swap,比较并替换)原子指令,用来保障数据的一致性。 指令有三个参数,当前内存值V、旧的预期值A、更新的值B,当且仅当预期值A和内存值V相同时,将内存值修改为B并返回true,否则什么都不做,并返回fals
阅读全文
摘要:原文:Making Containers More Isolated: An Overview of Sandboxed Container Technologies 摘要 既然主流 IT 工业都在采用基于容器的基础设施(云原生方案),那么了解这一技术的短板就很重要了。Docker、LXC 以及 R
阅读全文
摘要:cloudinit/sources/helpers/openstack.py else: if link['type'] not in KNOWN_PHYSICAL_TYPES: LOG.warning('Unknown network_data link type (%s); treating a
阅读全文
摘要:节点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
阅读全文
摘要:初始化分析 一个设备驱动要实现的功能根据实际需要可能千差万别,但是究其本质来说无非两件事情:一个是内存的操作,另外一个就是中断的处理。Igb_uio驱动和igb驱动都是网卡这个PCI设备的驱动,相同点就是要使能PCI设备,分配内存等,不同的就在于对内存和中断的处理方式的差异。 下面看下igb_uio
阅读全文
摘要:BAR寄存器: Base Address Register0~5:即BAR寄存器,保存PCI设备使用的地址空间的基地址,保存设备在PCI总线域中的地址,每个设备最多可以有6个基址空间; PCI设备复位之后,存放PCI设备需要使用的基地址空间大小,该空间是I /O空间还是存储器空间等信息; 软件对PC
阅读全文
摘要:[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
阅读全文
摘要:/* 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,
阅读全文
摘要:https://kernelgo.org/vtd_interrupt_remapping_code_analysis.html 本文中我们将一起来分析一下VT-d中断重映射的代码实现, 在看本文前建议先复习一下VT-d中断重映射的原理,可以参考VT-D Interrupt Remapping这篇文章
阅读全文
摘要:[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
阅读全文
摘要:修改收发包队列数 [[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
阅读全文
摘要:tr -s 删除所有重复出现字符序列,只保留第一个;即将重复出现字符串压缩为一个字符串。 cat /proc/interrupts | tr -s " " | more [root@localhost ixgbe]# cat /proc/interrupts |less -S CPU0 CPU1 C
阅读全文
摘要: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
阅读全文
摘要: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
阅读全文
摘要:msi中断初始化 1.什么是MSI中断 Message Signaled Interrupts 是pci2.2中提出来的一种新的中断形式。后续有msi-x扩展。 msi以及msi-x这种中断形式的一个最主要的特点就是,它在系统的特定地址做一个memory write transaction, 将一个
阅读全文
摘要:https://www.codenong.com/cs106676560/ MSI只支持32个中断向量,而MSI-X支持多达2048个中断向量,但是MSI-X的相关寄存器在配置空间中占用的空间却更小。这是因为中断向量信息并不直接存储在这里,而是在一款特殊的Memory(MIMO)中。并通过BIR(B
阅读全文
摘要:1、request_irq会去写mxi msg 普通网卡驱动申请中断 int ixgbe_init_interrupt_scheme(struct ixgbe_adapter *adapter) { err = ixgbe_alloc_q_vectors(adapter); } static int
阅读全文
摘要:本篇文档主要描述了网络数据包在二层的接收流程,主要包括以下三个部分: 1)、82599网卡和数据包接收相关的内容; 2)、ixgbe网卡驱动数据包接收相关的配置; 3)、ixgbe网卡驱动napi接口的处理。 82599网卡和数据包接收相关的内容 这一部分要介绍的是82599网卡中和数据包接收相关的
阅读全文
摘要: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
阅读全文
摘要:虚拟机 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
阅读全文
摘要:[root@compute28 instances]# cat compute_nodes {"compute28": 1599202145.125docker ps -a | grep nova c88c625ca0bf registryserver:4000/ -binary-nova-comp
阅读全文
摘要:[Unauthorized System] root@T920compute24:/var/lib/docker/volumes# cd /etc/kolla/nova-compute [Note] System unauthorized, Please contact the system sup
阅读全文
摘要:volumes:Docker管理宿主机文件系统的一部分,默认位于 /var/lib/docker/volumes 目录中;(最常用的方式) [root@compute28 volumes]# docker volume ls local kolla_logs local libvirtd local
阅读全文
摘要:大致思路就是这样: kvm宿主机上的虚拟机可以通过virsh list来查看,不过IP就没办法查看了,这里我们通过arp协议来将一个网段内可以ping通的ip添加到宿主机的arp缓存中,通过查询虚拟机的mac地址来和ip做匹配,这样就可以查到当前宿主机上正在运行的虚拟机和它们的IP了。 脚本实例:
阅读全文
摘要:#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
阅读全文
摘要:一般驱动 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
阅读全文
摘要: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);
阅读全文
摘要:标准的以太网帧,我们经常说的以太网帧长度是从图中 Destination MAC开始,FCS结束。网卡对网络层数据的操作是加以太网帧头、以太网帧尾FCS,很显然上层需要提供目的MAC地址,否则接口无从完成以太网帧的封装。这需要IP层需要事先完成和ARP的交互,解析出目的IP对应的目的MAC,这显然不
阅读全文
摘要:参考: 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
阅读全文
摘要: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
阅读全文
摘要:[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
阅读全文
摘要:-x 以十六进制显示 PCI 配置空间 (configuration space) 的前64个字节映像 (标准头部信息)。此参数对调试驱动和 lspci 本身很有用。 -xxx 以十六进制显示所有 PCI 配置空间的映像。此选项只有 root 可用,并且很多 PCI 设备在你试图读取配置空间的未定义
阅读全文
摘要: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
阅读全文
摘要:Igb_uio内核驱动 Igb_uio驱动主要做的就是注册一个pci设备。但是igbuio_pci_driver对应的保存pci设备信息的id_table指针为空,这样在内核注册此pci设备时,会找不到匹配的设备,就不会调用igb_uio驱动中的探测probe函数,只会在/sys目录下创建Igb_u
阅读全文
摘要:/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
阅读全文
摘要:build/app/TestMalloc -n 4 --proc-type=primary mz addr: 100012838, mz->addr :13febc780 , mz->addr_64 : 13febc780 arr addr: ffffe7739ad8 arr addr: 13feb
阅读全文
摘要:(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
阅读全文
摘要: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
阅读全文
摘要:转载 https://blog.csdn.net/jsh13417/article/details/107285384 两种数据结构体介绍 Malloc 库内部使用了两种数据结构类型(可以参考dpdk官方文档3.4.4章节介绍): struct malloc_heap:用于在每个 CPU Socke
阅读全文
摘要:[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/
阅读全文
摘要:#include <stdio.h> #include <string.h> #include <stdint.h> #include <errno.h> #include <sys/queue.h> #include <rte_memory.h> #include <rte_launch.h> #
阅读全文
摘要:更详细的内容见man page。这里举例说明: nm -u hello.o 显示hello.o 中的未定义符号,需要和其他对象文件进行链接. nm -A /usr/lib/* 2>/dev/null | grep "T memset" 在 /usr/lib/ 目录下找出哪个库文件定义了memset函
阅读全文
摘要:[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
阅读全文
摘要:nodes = rte_malloc(NULL, sizeof(struct node), 0); if (NULL == nodes) rte_exit(EXIT_FAILURE, "Cannot malloc memory \n"); printf("nodes addr %llx \n ",(
阅读全文
摘要:https://www.geek-share.com/detail/2586671676.html ABI_VERSION buildtools devtools GNUmakefile MAINTAINERS mk app config doc kernel Makefile README arm
阅读全文
摘要:[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
阅读全文
摘要:[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
阅读全文
摘要:[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
阅读全文
摘要:/* SPDX-License-Identifier: BSD-3-Clause * Copyright(c) 2010-2014 Intel Corporation */ #include <stdio.h> #include <string.h> #include <stdint.h> #inc
阅读全文
摘要:[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
阅读全文
摘要:/* SPDX-License-Identifier: BSD-3-Clause * Copyright(c) 2010-2014 Intel Corporation */ #include <stdio.h> #include <string.h> #include <stdint.h> #inc
阅读全文