ip over gre 数据包的 RSS 哈希

RSS hash for ip over gre packet

我正在使用 Mellanox Technologies MT27800 系列 [ConnectX-5],使用带有 rss 的 dpdk 多 rx 队列“ETH_RSS_IP | ETH_RSS_UDP | ETH_RSS_TCP”

我收到数据包 ETH:IP:GRE:ETH:IP:UDP

我希望负载均衡根据内部 ip+port 而不是 gre ip

我尝试将 ETH_RSS_LEVEL_INNERMOST 添加到 rss_hf 但我收到关于 rss 无效值 0x800000003afbc 应该是 0xf00000000003afbc

的错误

我正在使用 dpdk 21.11.0 - 是否可以使用以及如何使用?不然怎么办

dpdk 19.11也支持吗?

 ethtool -i ens2
driver: mlx5_core
version: 5.5-1.0.3
firmware-version: 16.31.1014 (HPE0000000014)
expansion-rom-version:
bus-info: 0000:03:00.0
supports-statistics: yes
supports-test: yes
supports-eeprom-access: no
supports-register-dump: no
supports-priv-flags: yes

但是当我尝试用我自己的代码进行测试时它不起作用,testpmd 很复杂而且我不知道我做错了什么

这是我写的 link 代码 https://coliru.stacked-crooked.com/a/cdeefd58b08063be

我运行它用下面的命令: ./testReceiver --log-level='.*',8 -l 7,8-23 -w 0000:03:00.0

这是我的代码 运行 的输出,具有高日志级别

[root@localhost testReceiver]# ./testReceiver   --log-level='.*',8 -l 7,8-23   -w 0000:03:00.0
EAL: Detected lcore 0 as core 0 on socket 0
...
EAL: Detected lcore 63 as core 63 on socket 3
EAL: Support maximum 128 logical core(s) by configuration.
EAL: Detected 64 lcore(s)
EAL: Detected 4 NUMA nodes
EAL: Ask a virtual area of 0x5000 bytes
EAL: Virtual area found at 0x100000000 (size = 0x5000)
EAL: Multi-process socket /var/run/dpdk/rte/mp_socket
EAL: VFIO PCI modules not loaded
EAL: Bus pci wants IOVA as 'DC'
EAL: Buses did not request a specific IOVA mode.
EAL: IOMMU is available, selecting IOVA as VA mode.
EAL: Module /sys/module/rte_kni not found! error 2 (No such file or directory)
EAL: Selected IOVA mode 'VA'
EAL: Probing VFIO support...
EAL:   IOMMU type 1 (Type 1) is supported
EAL:   IOMMU type 7 (sPAPR) is not supported
EAL:   IOMMU type 8 (No-IOMMU) is not supported
EAL: VFIO support initialized
EAL: Ask a virtual area of 0x2e000 bytes
EAL: Virtual area found at 0x100005000 (size = 0x2e000)
EAL: Setting up physically contiguous memory...
EAL: Setting maximum number of open files to 4096
EAL: Detected memory type: socket_id:0 hugepage_sz:1073741824
EAL: Detected memory type: socket_id:1 hugepage_sz:1073741824
EAL: Detected memory type: socket_id:2 hugepage_sz:1073741824
EAL: Detected memory type: socket_id:3 hugepage_sz:1073741824
EAL: Creating 4 segment lists: n_segs:32 socket_id:0 hugepage_sz:1073741824
EAL: Ask a virtual area of 0x1000 bytes
EAL: Virtual area found at 0x100033000 (size = 0x1000)
EAL: Memseg list allocated: 0x100000kB at socket 0
...
EAL: Ask a virtual area of 0x800000000 bytes
EAL: Virtual area found at 0x1a00000000 (size = 0x800000000)
EAL: Creating 4 segment lists: n_segs:32 socket_id:1 hugepage_sz:1073741824
EAL: Ask a virtual area of 0x1000 bytes
EAL: Virtual area found at 0x2200000000 (size = 0x1000)
EAL: Memseg list allocated: 0x100000kB at socket 1
EAL: Ask a virtual area of 0x800000000 bytes
EAL: Virtual area found at 0x2240000000 (size = 0x800000000)
EAL: Ask a virtual area of 0x1000 bytes
EAL: Virtual area found at 0x2a40000000 (size = 0x1000)
EAL: Memseg list allocated: 0x100000kB at socket 1
EAL: Ask a virtual area of 0x800000000 bytes
EAL: Virtual area found at 0x2a80000000 (size = 0x800000000)
EAL: Ask a virtual area of 0x1000 bytes
EAL: Virtual area found at 0x3280000000 (size = 0x1000)
EAL: Memseg list allocated: 0x100000kB at socket 1
EAL: Ask a virtual area of 0x800000000 bytes
EAL: Virtual area found at 0x32c0000000 (size = 0x800000000)
EAL: Ask a virtual area of 0x1000 bytes
EAL: Virtual area found at 0x3ac0000000 (size = 0x1000)
EAL: Memseg list allocated: 0x100000kB at socket 1
EAL: Ask a virtual area of 0x800000000 bytes
EAL: Virtual area found at 0x3b00000000 (size = 0x800000000)
EAL: Creating 4 segment lists: n_segs:32 socket_id:2 hugepage_sz:1073741824
EAL: Ask a virtual area of 0x1000 bytes
EAL: Virtual area found at 0x4300000000 (size = 0x1000)
EAL: Memseg list allocated: 0x100000kB at socket 2
EAL: Ask a virtual area of 0x800000000 bytes
EAL: Virtual area found at 0x4340000000 (size = 0x800000000)
EAL: Ask a virtual area of 0x1000 bytes
EAL: Virtual area found at 0x4b40000000 (size = 0x1000)
EAL: Memseg list allocated: 0x100000kB at socket 2
EAL: Ask a virtual area of 0x800000000 bytes
EAL: Virtual area found at 0x4b80000000 (size = 0x800000000)
EAL: Ask a virtual area of 0x1000 bytes
EAL: Virtual area found at 0x5380000000 (size = 0x1000)
EAL: Memseg list allocated: 0x100000kB at socket 2
EAL: Ask a virtual area of 0x800000000 bytes
EAL: Virtual area found at 0x53c0000000 (size = 0x800000000)
EAL: Ask a virtual area of 0x1000 bytes
EAL: Virtual area found at 0x5bc0000000 (size = 0x1000)
EAL: Memseg list allocated: 0x100000kB at socket 2
EAL: Ask a virtual area of 0x800000000 bytes
EAL: Virtual area found at 0x5c00000000 (size = 0x800000000)
EAL: Creating 4 segment lists: n_segs:32 socket_id:3 hugepage_sz:1073741824
EAL: Ask a virtual area of 0x1000 bytes
EAL: Virtual area found at 0x6400000000 (size = 0x1000)
EAL: Memseg list allocated: 0x100000kB at socket 3
EAL: Ask a virtual area of 0x800000000 bytes
EAL: Virtual area found at 0x6440000000 (size = 0x800000000)
EAL: Ask a virtual area of 0x1000 bytes
EAL: Virtual area found at 0x6c40000000 (size = 0x1000)
EAL: Memseg list allocated: 0x100000kB at socket 3
EAL: Ask a virtual area of 0x800000000 bytes
EAL: Virtual area found at 0x6c80000000 (size = 0x800000000)
EAL: Ask a virtual area of 0x1000 bytes
EAL: Virtual area found at 0x7480000000 (size = 0x1000)
EAL: Memseg list allocated: 0x100000kB at socket 3
EAL: Ask a virtual area of 0x800000000 bytes
EAL: Virtual area found at 0x74c0000000 (size = 0x800000000)
EAL: Ask a virtual area of 0x1000 bytes
EAL: Virtual area found at 0x7cc0000000 (size = 0x1000)
EAL: Memseg list allocated: 0x100000kB at socket 3
EAL: Ask a virtual area of 0x800000000 bytes
EAL: Virtual area found at 0x7d00000000 (size = 0x800000000)
EAL: TSC frequency is ~2000000 KHz
EAL: Master lcore 7 is ready (tid=7ffff7fe7900;cpuset=[7])
EAL: lcore 13 is ready (tid=7ffff247a700;cpuset=[13])
EAL: lcore 18 is ready (tid=7fffefc75700;cpuset=[18])
EAL: lcore 21 is ready (tid=7fffee472700;cpuset=[21])
EAL: lcore 10 is ready (tid=7ffff3c7d700;cpuset=[10])
EAL: lcore 11 is ready (tid=7ffff347c700;cpuset=[11])
EAL: lcore 8 is ready (tid=7ffff4c7f700;cpuset=[8])
EAL: lcore 22 is ready (tid=7fffedc71700;cpuset=[22])
EAL: lcore 23 is ready (tid=7fffed470700;cpuset=[23])
EAL: lcore 19 is ready (tid=7fffef474700;cpuset=[19])
EAL: lcore 14 is ready (tid=7ffff1c79700;cpuset=[14])
EAL: lcore 12 is ready (tid=7ffff2c7b700;cpuset=[12])
EAL: lcore 15 is ready (tid=7ffff1478700;cpuset=[15])
EAL: lcore 17 is ready (tid=7ffff0476700;cpuset=[17])
EAL: lcore 16 is ready (tid=7ffff0c77700;cpuset=[16])
EAL: lcore 9 is ready (tid=7ffff447e700;cpuset=[9])
EAL: lcore 20 is ready (tid=7fffeec73700;cpuset=[20])
EAL: Trying to obtain current memory policy.
EAL: Setting policy MPOL_PREFERRED for socket 0
EAL: Restoring previous memory policy: 0
EAL: request: mp_malloc_sync
EAL: Heap on socket 0 was expanded by 1024MB
EAL: PCI device 0000:03:00.0 on NUMA socket 3
EAL:   probe driver: 15b3:1017 net_mlx5
EAL: Mem event callback 'MLX5_MEM_EVENT_CB:(nil)' registered
net_mlx5: checking device "mlx5_0"
net_mlx5: PCI information matches for device "mlx5_0"
net_mlx5: no E-Switch support detected
net_mlx5: naming Ethernet device "0000:03:00.0"
net_mlx5: DevX is supported
EAL: Trying to obtain current memory policy.
EAL: Setting policy MPOL_PREFERRED for socket 3
EAL: Restoring previous memory policy: 0
EAL: Calling mem event callback 'MLX5_MEM_EVENT_CB:(nil)'
EAL: request: mp_malloc_sync
EAL: Heap on socket 3 was expanded by 1024MB
net_mlx5: enhanced MPW is supported
net_mlx5: SWP support: 7
net_mlx5:       min_single_stride_log_num_of_bytes: 6
net_mlx5:       max_single_stride_log_num_of_bytes: 13
net_mlx5:       min_single_wqe_log_num_of_strides: 3
net_mlx5:       max_single_wqe_log_num_of_strides: 16
net_mlx5:       supported_qpts: 256
net_mlx5: device supports Multi-Packet RQ
net_mlx5: tunnel offloading is supported
net_mlx5: MPLS over GRE/UDP tunnel offloading is not supported
net_mlx5: checksum offloading is supported
net_mlx5: maximum Rx indirection table size is 512
net_mlx5: VLAN stripping is supported
net_mlx5: FCS stripping configuration is supported
net_mlx5: enhanced MPS is enabled
net_mlx5: port 0 MAC address is b8:83:03:8f:4e:f0
net_mlx5: port 0 MTU is 2040
net_mlx5: port 0 forcing Ethernet interface up
net_mlx5: Tx VLAN insertion is supported
net_mlx5: min tx inline configured: 0
net_mlx5: Hash list with mlx5_0_flow_table size 0x1000 is created.
net_mlx5: Hash list with mlx5_0_tags size 0x2000 is created.
net_mlx5: port 0 flow maximum priority: 5
net_mlx5: metadata mode 0
net_mlx5: metadata MARK mask 00FFFFFF
net_mlx5: metadata META mask FFFFFFFF
net_mlx5: metadata reg_c0 mask FFFFFFFF
net_mlx5: port 0 extensive metadata register is not supported
net_mlx5: DR drop action is not supported in root table.
net_mlx5: port 0 Tx queues number update: 0 -> 1
net_mlx5: port 0 Rx queues number update: 0 -> 4
net_mlx5: port 0 adapter MTU set to 2040
net_mlx5: port 0 configuring Rx queue 0 for 512 descriptors
net_mlx5: port 0 maximum number of segments per packet: 1
net_mlx5: port 0 CRC stripping is disabled, 4 bytes will be subtracted from incoming frames to hide it
net_mlx5: port 0 adding Rx queue 0 to list
net_mlx5: port 0 configuring Rx queue 1 for 512 descriptors
net_mlx5: port 0 maximum number of segments per packet: 1
net_mlx5: port 0 CRC stripping is disabled, 4 bytes will be subtracted from incoming frames to hide it
net_mlx5: port 0 adding Rx queue 1 to list
net_mlx5: port 0 configuring Rx queue 2 for 512 descriptors
net_mlx5: port 0 maximum number of segments per packet: 1
net_mlx5: port 0 CRC stripping is disabled, 4 bytes will be subtracted from incoming frames to hide it
net_mlx5: port 0 adding Rx queue 2 to list
net_mlx5: port 0 configuring Rx queue 3 for 512 descriptors
net_mlx5: port 0 maximum number of segments per packet: 1
net_mlx5: port 0 CRC stripping is disabled, 4 bytes will be subtracted from incoming frames to hide it
net_mlx5: port 0 adding Rx queue 3 to list
testReceiver.cpp 94
net_mlx5: port 0 configuring queue 0 for 512 descriptors
net_mlx5: port 0 adding Tx queue 0 to list
net_mlx5: port 0 starting device
net_mlx5: port 0 Rx queues number update: 4 -> 4
net_mlx5: port 0 Tx queue 0 allocated and configured 512 WRs
net_mlx5: port 0 Tx queue 0 TIS number 9 transport domain 2
net_mlx5: port 0: uar_mmap_offset 0x306000
net_mlx5: port 0 Rx queue 0 registering mp pool having 1 chunks
net_mlx5: port 0 creating a MR using address (0x15aa07e80)
net_mlx5: device mlx5_0 inserting MR(0x15a9f7e00) to global cache
net_mlx5: inserted B-tree(0x17ffdcb60)[1], [0x140000000, 0x180000000) lkey=0xa3c41800
net_mlx5: inserted B-tree(0x15aa0686c)[1], [0x140000000, 0x180000000) lkey=0xa3c41800
net_mlx5: port 0 Rx queue 0 allocated and configured 512 segments (max 512 packets)
net_mlx5: port 0 device_attr.max_qp_wr is 32768
net_mlx5: port 0 device_attr.max_sge is 30
net_mlx5: port 0 rxq 0 updated with 0x7fffffffd578
net_mlx5: port 0 Rx queue 1 registering mp pool having 1 chunks
net_mlx5: inserted B-tree(0x15aa03fec)[1], [0x140000000, 0x180000000) lkey=0xa3c41800
net_mlx5: port 0 Rx queue 1 allocated and configured 512 segments (max 512 packets)
net_mlx5: port 0 device_attr.max_qp_wr is 32768
net_mlx5: port 0 device_attr.max_sge is 30
net_mlx5: port 0 rxq 1 updated with 0x7fffffffd578
net_mlx5: port 0 Rx queue 2 registering mp pool having 1 chunks
net_mlx5: inserted B-tree(0x15aa0176c)[1], [0x140000000, 0x180000000) lkey=0xa3c41800
net_mlx5: port 0 Rx queue 2 allocated and configured 512 segments (max 512 packets)
net_mlx5: port 0 device_attr.max_qp_wr is 32768
net_mlx5: port 0 device_attr.max_sge is 30
net_mlx5: port 0 rxq 2 updated with 0x7fffffffd578
net_mlx5: port 0 Rx queue 3 registering mp pool having 1 chunks
net_mlx5: inserted B-tree(0x15a9feeec)[1], [0x140000000, 0x180000000) lkey=0xa3c41800
net_mlx5: port 0 Rx queue 3 allocated and configured 512 segments (max 512 packets)
net_mlx5: port 0 device_attr.max_qp_wr is 32768
net_mlx5: port 0 device_attr.max_sge is 30
net_mlx5: port 0 rxq 3 updated with 0x7fffffffd578
net_mlx5: NIC group 0 priority 14 new rx matcher 0x15a9c1940: refcnt 1
net_mlx5: NIC group 0 priority 13 new rx matcher 0x15a9c1480: refcnt 1
net_mlx5: NIC group 0 priority 12 new rx matcher 0x15a9cae00: refcnt 1
net_mlx5: NIC group 0 priority 12 use rx matcher 0x15a9cae00: refcnt 1++
net_mlx5: NIC group 0 priority 13 use rx matcher 0x15a9c1480: refcnt 1++
net_mlx5: NIC group 0 priority 12 use rx matcher 0x15a9cae00: refcnt 2++
net_mlx5: NIC group 0 priority 12 use rx matcher 0x15a9cae00: refcnt 3++
net_mlx5: NIC group 0 priority 14 new rx matcher 0x15a9cd380: refcnt 1
net_mlx5: NIC group 0 priority 13 new rx matcher 0x15a9d6e00: refcnt 1
net_mlx5: NIC group 0 priority 12 new rx matcher 0x15a9d6940: refcnt 1
net_mlx5: NIC group 0 priority 12 use rx matcher 0x15a9d6940: refcnt 1++
net_mlx5: NIC group 0 priority 13 use rx matcher 0x15a9d6e00: refcnt 1++
net_mlx5: NIC group 0 priority 12 use rx matcher 0x15a9d6940: refcnt 2++
net_mlx5: NIC group 0 priority 12 use rx matcher 0x15a9d6940: refcnt 3++
net_mlx5: NIC group 0 priority 14 use rx matcher 0x15a9c1940: refcnt 1++
net_mlx5: NIC group 0 priority 13 use rx matcher 0x15a9c1480: refcnt 2++
net_mlx5: NIC group 0 priority 12 use rx matcher 0x15a9cae00: refcnt 4++
net_mlx5: NIC group 0 priority 12 use rx matcher 0x15a9cae00: refcnt 5++
net_mlx5: NIC group 0 priority 13 use rx matcher 0x15a9c1480: refcnt 3++
net_mlx5: NIC group 0 priority 12 use rx matcher 0x15a9cae00: refcnt 6++
net_mlx5: NIC group 0 priority 12 use rx matcher 0x15a9cae00: refcnt 7++
net_mlx5: port 0 has selected Tx function supporting offloads 0100/0100
net_mlx5:       EMPW  (Enhanced MPW)
net_mlx5: port 0 selected Rx vectorized function
net_mlx5: port 0 setting primary MAC address
net_mlx5: port 0 matcher 0x15a9cae00: refcnt 8--
net_mlx5: port 0 matcher 0x15a9cae00: refcnt 7--
net_mlx5: port 0 matcher 0x15a9c1480: refcnt 4--
net_mlx5: port 0 matcher 0x15a9cae00: refcnt 6--
net_mlx5: port 0 matcher 0x15a9cae00: refcnt 5--
net_mlx5: port 0 matcher 0x15a9c1480: refcnt 3--
net_mlx5: port 0 matcher 0x15a9c1940: refcnt 2--
net_mlx5: port 0 matcher 0x15a9d6940: refcnt 4--
net_mlx5: port 0 matcher 0x15a9d6940: refcnt 3--
net_mlx5: port 0 matcher 0x15a9d6e00: refcnt 2--
net_mlx5: port 0 matcher 0x15a9d6940: refcnt 2--
net_mlx5: port 0 matcher 0x15a9d6940: refcnt 1--
net_mlx5: port 0 matcher 0x15a9d6940: removed
net_mlx5: port 0 matcher 0x15a9d6e00: refcnt 1--
net_mlx5: port 0 matcher 0x15a9d6e00: removed
net_mlx5: port 0 matcher 0x15a9cd380: refcnt 1--
net_mlx5: port 0 matcher 0x15a9cd380: removed
net_mlx5: port 0 matcher 0x15a9cae00: refcnt 4--
net_mlx5: port 0 matcher 0x15a9cae00: refcnt 3--
net_mlx5: port 0 matcher 0x15a9c1480: refcnt 2--
net_mlx5: port 0 matcher 0x15a9cae00: refcnt 2--
net_mlx5: port 0 matcher 0x15a9cae00: refcnt 1--
net_mlx5: port 0 matcher 0x15a9cae00: removed
net_mlx5: port 0 matcher 0x15a9c1480: refcnt 1--
net_mlx5: port 0 matcher 0x15a9c1480: removed
net_mlx5: port 0 matcher 0x15a9c1940: refcnt 1--
net_mlx5: port 0 matcher 0x15a9c1940: removed
net_mlx5: NIC group 0 priority 14 new rx matcher 0x15a9d9880: refcnt 1
net_mlx5: NIC group 0 priority 13 new rx matcher 0x15a9d93c0: refcnt 1
net_mlx5: NIC group 0 priority 12 new rx matcher 0x15a9c1e00: refcnt 1
net_mlx5: NIC group 0 priority 12 use rx matcher 0x15a9c1e00: refcnt 1++
net_mlx5: NIC group 0 priority 13 use rx matcher 0x15a9d93c0: refcnt 1++
net_mlx5: NIC group 0 priority 12 use rx matcher 0x15a9c1e00: refcnt 2++
net_mlx5: NIC group 0 priority 12 use rx matcher 0x15a9c1e00: refcnt 3++
net_mlx5: NIC group 0 priority 14 new rx matcher 0x15a9ca400: refcnt 1
net_mlx5: NIC group 0 priority 13 new rx matcher 0x15a9e2e00: refcnt 1
net_mlx5: NIC group 0 priority 12 new rx matcher 0x15a9e2940: refcnt 1
net_mlx5: NIC group 0 priority 12 use rx matcher 0x15a9e2940: refcnt 1++
net_mlx5: NIC group 0 priority 13 use rx matcher 0x15a9e2e00: refcnt 1++
net_mlx5: NIC group 0 priority 12 use rx matcher 0x15a9e2940: refcnt 2++
net_mlx5: NIC group 0 priority 12 use rx matcher 0x15a9e2940: refcnt 3++
net_mlx5: NIC group 0 priority 14 use rx matcher 0x15a9d9880: refcnt 1++
net_mlx5: NIC group 0 priority 13 use rx matcher 0x15a9d93c0: refcnt 2++
net_mlx5: NIC group 0 priority 12 use rx matcher 0x15a9c1e00: refcnt 4++
net_mlx5: NIC group 0 priority 12 use rx matcher 0x15a9c1e00: refcnt 5++
net_mlx5: NIC group 0 priority 13 use rx matcher 0x15a9d93c0: refcnt 3++
net_mlx5: NIC group 0 priority 12 use rx matcher 0x15a9c1e00: refcnt 6++
net_mlx5: NIC group 0 priority 12 use rx matcher 0x15a9c1e00: refcnt 7++
net_mlx5: port 0 matcher 0x15a9c1e00: refcnt 8--
net_mlx5: port 0 matcher 0x15a9c1e00: refcnt 7--
net_mlx5: port 0 matcher 0x15a9d93c0: refcnt 4--
net_mlx5: port 0 matcher 0x15a9c1e00: refcnt 6--
net_mlx5: port 0 matcher 0x15a9c1e00: refcnt 5--
net_mlx5: port 0 matcher 0x15a9d93c0: refcnt 3--
net_mlx5: port 0 matcher 0x15a9d9880: refcnt 2--
net_mlx5: port 0 matcher 0x15a9e2940: refcnt 4--
net_mlx5: port 0 matcher 0x15a9e2940: refcnt 3--
net_mlx5: port 0 matcher 0x15a9e2e00: refcnt 2--
net_mlx5: port 0 matcher 0x15a9e2940: refcnt 2--
net_mlx5: port 0 matcher 0x15a9e2940: refcnt 1--
net_mlx5: port 0 matcher 0x15a9e2940: removed
net_mlx5: port 0 matcher 0x15a9e2e00: refcnt 1--
net_mlx5: port 0 matcher 0x15a9e2e00: removed
net_mlx5: port 0 matcher 0x15a9ca400: refcnt 1--
net_mlx5: port 0 matcher 0x15a9ca400: removed
net_mlx5: port 0 matcher 0x15a9c1e00: refcnt 4--
net_mlx5: port 0 matcher 0x15a9c1e00: refcnt 3--
net_mlx5: port 0 matcher 0x15a9d93c0: refcnt 2--
net_mlx5: port 0 matcher 0x15a9c1e00: refcnt 2--
net_mlx5: port 0 matcher 0x15a9c1e00: refcnt 1--
net_mlx5: port 0 matcher 0x15a9c1e00: removed
net_mlx5: port 0 matcher 0x15a9d93c0: refcnt 1--
net_mlx5: port 0 matcher 0x15a9d93c0: removed
net_mlx5: port 0 matcher 0x15a9d9880: refcnt 1--
net_mlx5: port 0 matcher 0x15a9d9880: removed
net_mlx5: NIC group 0 priority 14 new rx matcher 0x15a9cd880: refcnt 1
net_mlx5: NIC group 0 priority 13 new rx matcher 0x15a9cd3c0: refcnt 1
net_mlx5: NIC group 0 priority 12 new rx matcher 0x15a9d9d40: refcnt 1
net_mlx5: NIC group 0 priority 12 use rx matcher 0x15a9d9d40: refcnt 1++
net_mlx5: NIC group 0 priority 13 use rx matcher 0x15a9cd3c0: refcnt 1++
net_mlx5: NIC group 0 priority 12 use rx matcher 0x15a9d9d40: refcnt 2++
net_mlx5: NIC group 0 priority 12 use rx matcher 0x15a9d9d40: refcnt 3++
net_mlx5: NIC group 0 priority 14 new rx matcher 0x15a9c1340: refcnt 1
net_mlx5: NIC group 0 priority 13 new rx matcher 0x15a9d6e00: refcnt 1
net_mlx5: NIC group 0 priority 12 new rx matcher 0x15a9d6940: refcnt 1
net_mlx5: NIC group 0 priority 12 use rx matcher 0x15a9d6940: refcnt 1++
net_mlx5: NIC group 0 priority 13 use rx matcher 0x15a9d6e00: refcnt 1++
net_mlx5: NIC group 0 priority 12 use rx matcher 0x15a9d6940: refcnt 2++
net_mlx5: NIC group 0 priority 12 use rx matcher 0x15a9d6940: refcnt 3++
net_mlx5: NIC group 0 priority 14 use rx matcher 0x15a9cd880: refcnt 1++
net_mlx5: NIC group 0 priority 13 use rx matcher 0x15a9cd3c0: refcnt 2++
net_mlx5: NIC group 0 priority 12 use rx matcher 0x15a9d9d40: refcnt 4++
net_mlx5: NIC group 0 priority 12 use rx matcher 0x15a9d9d40: refcnt 5++
net_mlx5: NIC group 0 priority 13 use rx matcher 0x15a9cd3c0: refcnt 3++
net_mlx5: NIC group 0 priority 12 use rx matcher 0x15a9d9d40: refcnt 6++
net_mlx5: NIC group 0 priority 12 use rx matcher 0x15a9d9d40: refcnt 7++
net_mlx5: port 0 matcher 0x15a9d9d40: refcnt 8--
net_mlx5: port 0 matcher 0x15a9d9d40: refcnt 7--
net_mlx5: port 0 matcher 0x15a9cd3c0: refcnt 4--
net_mlx5: port 0 matcher 0x15a9d9d40: refcnt 6--
net_mlx5: port 0 matcher 0x15a9d9d40: refcnt 5--
net_mlx5: port 0 matcher 0x15a9cd3c0: refcnt 3--
net_mlx5: port 0 matcher 0x15a9cd880: refcnt 2--
net_mlx5: port 0 matcher 0x15a9d6940: refcnt 4--
net_mlx5: port 0 matcher 0x15a9d6940: refcnt 3--
net_mlx5: port 0 matcher 0x15a9d6e00: refcnt 2--
net_mlx5: port 0 matcher 0x15a9d6940: refcnt 2--
net_mlx5: port 0 matcher 0x15a9d6940: refcnt 1--
net_mlx5: port 0 matcher 0x15a9d6940: removed
net_mlx5: port 0 matcher 0x15a9d6e00: refcnt 1--
net_mlx5: port 0 matcher 0x15a9d6e00: removed
net_mlx5: port 0 matcher 0x15a9c1340: refcnt 1--
net_mlx5: port 0 matcher 0x15a9c1340: removed
net_mlx5: port 0 matcher 0x15a9d9d40: refcnt 4--
net_mlx5: port 0 matcher 0x15a9d9d40: refcnt 3--
net_mlx5: port 0 matcher 0x15a9cd3c0: refcnt 2--
net_mlx5: port 0 matcher 0x15a9d9d40: refcnt 2--
net_mlx5: port 0 matcher 0x15a9d9d40: refcnt 1--
net_mlx5: port 0 matcher 0x15a9d9d40: removed
net_mlx5: port 0 matcher 0x15a9cd3c0: refcnt 1--
net_mlx5: port 0 matcher 0x15a9cd3c0: removed
net_mlx5: port 0 matcher 0x15a9cd880: refcnt 1--
net_mlx5: port 0 matcher 0x15a9cd880: removed
net_mlx5: NIC group 0 priority 14 new rx matcher 0x15a9ca940: refcnt 1
net_mlx5: NIC group 0 priority 13 new rx matcher 0x15a9ca480: refcnt 1
net_mlx5: NIC group 0 priority 12 new rx matcher 0x15a9cdd40: refcnt 1
net_mlx5: NIC group 0 priority 12 use rx matcher 0x15a9cdd40: refcnt 1++
net_mlx5: NIC group 0 priority 13 use rx matcher 0x15a9ca480: refcnt 1++
net_mlx5: NIC group 0 priority 12 use rx matcher 0x15a9cdd40: refcnt 2++
net_mlx5: NIC group 0 priority 12 use rx matcher 0x15a9cdd40: refcnt 3++
net_mlx5: NIC group 0 priority 14 new rx matcher 0x15a9d9340: refcnt 1
net_mlx5: NIC group 0 priority 13 new rx matcher 0x15a9e2e00: refcnt 1
net_mlx5: NIC group 0 priority 12 new rx matcher 0x15a9e2940: refcnt 1
net_mlx5: NIC group 0 priority 12 use rx matcher 0x15a9e2940: refcnt 1++
net_mlx5: NIC group 0 priority 13 use rx matcher 0x15a9e2e00: refcnt 1++
net_mlx5: NIC group 0 priority 12 use rx matcher 0x15a9e2940: refcnt 2++
net_mlx5: NIC group 0 priority 12 use rx matcher 0x15a9e2940: refcnt 3++
net_mlx5: NIC group 0 priority 14 use rx matcher 0x15a9ca940: refcnt 1++
net_mlx5: NIC group 0 priority 13 use rx matcher 0x15a9ca480: refcnt 2++
net_mlx5: NIC group 0 priority 12 use rx matcher 0x15a9cdd40: refcnt 4++
net_mlx5: NIC group 0 priority 12 use rx matcher 0x15a9cdd40: refcnt 5++
net_mlx5: NIC group 0 priority 13 use rx matcher 0x15a9ca480: refcnt 3++
net_mlx5: NIC group 0 priority 12 use rx matcher 0x15a9cdd40: refcnt 6++
net_mlx5: NIC group 0 priority 12 use rx matcher 0x15a9cdd40: refcnt 7++
Succeeded to start port0
net_mlx5: port 0 matcher 0x15a9cdd40: refcnt 8--
net_mlx5: port 0 matcher 0x15a9cdd40: refcnt 7--
net_mlx5: port 0 matcher 0x15a9ca480: refcnt 4--
net_mlx5: port 0 matcher 0x15a9cdd40: refcnt 6--
net_mlx5: port 0 matcher 0x15a9cdd40: refcnt 5--
net_mlx5: port 0 matcher 0x15a9ca480: refcnt 3--
net_mlx5: port 0 matcher 0x15a9ca940: refcnt 2--
net_mlx5: port 0 matcher 0x15a9e2940: refcnt 4--
net_mlx5: port 0 matcher 0x15a9e2940: refcnt 3--
net_mlx5: port 0 matcher 0x15a9e2e00: refcnt 2--
net_mlx5: port 0 matcher 0x15a9e2940: refcnt 2--
net_mlx5: port 0 matcher 0x15a9e2940: refcnt 1--
net_mlx5: port 0 matcher 0x15a9e2940: removed
net_mlx5: port 0 matcher 0x15a9e2e00: refcnt 1--
net_mlx5: port 0 matcher 0x15a9e2e00: removed
net_mlx5: port 0 matcher 0x15a9d9340: refcnt 1--
net_mlx5: port 0 matcher 0x15a9d9340: removed
net_mlx5: port 0 matcher 0x15a9cdd40: refcnt 4--
net_mlx5: port 0 matcher 0x15a9cdd40: refcnt 3--
net_mlx5: port 0 matcher 0x15a9ca480: refcnt 2--
net_mlx5: port 0 matcher 0x15a9cdd40: refcnt 2--
net_mlx5: port 0 matcher 0x15a9cdd40: refcnt 1--
net_mlx5: port 0 matcher 0x15a9cdd40: removed
net_mlx5: port 0 matcher 0x15a9ca480: refcnt 1--
net_mlx5: port 0 matcher 0x15a9ca480: removed
net_mlx5: port 0 matcher 0x15a9ca940: refcnt 1--
net_mlx5: port 0 matcher 0x15a9ca940: removed
net_mlx5: NIC group 0 priority 14 new rx matcher 0x15a9c1940: refcnt 1
net_mlx5: NIC group 0 priority 13 new rx matcher 0x15a9c1480: refcnt 1
net_mlx5: NIC group 0 priority 12 new rx matcher 0x15a9cae00: refcnt 1
net_mlx5: NIC group 0 priority 12 use rx matcher 0x15a9cae00: refcnt 1++
net_mlx5: NIC group 0 priority 13 use rx matcher 0x15a9c1480: refcnt 1++
net_mlx5: NIC group 0 priority 12 use rx matcher 0x15a9cae00: refcnt 2++
net_mlx5: NIC group 0 priority 12 use rx matcher 0x15a9cae00: refcnt 3++
net_mlx5: NIC group 0 priority 14 new rx matcher 0x15a9cd380: refcnt 1
net_mlx5: NIC group 0 priority 13 new rx matcher 0x15a9d6e00: refcnt 1
net_mlx5: NIC group 0 priority 12 new rx matcher 0x15a9d6940: refcnt 1
net_mlx5: NIC group 0 priority 12 use rx matcher 0x15a9d6940: refcnt 1++
net_mlx5: NIC group 0 priority 13 use rx matcher 0x15a9d6e00: refcnt 1++
net_mlx5: NIC group 0 priority 12 use rx matcher 0x15a9d6940: refcnt 2++
net_mlx5: NIC group 0 priority 12 use rx matcher 0x15a9d6940: refcnt 3++
net_mlx5: NIC group 0 priority 14 new rx matcher 0x15a9d9680: refcnt 1
net_mlx5: NIC group 0 priority 13 new rx matcher 0x15a9d91c0: refcnt 1
net_mlx5: NIC group 0 priority 12 new rx matcher 0x15a9e2b40: refcnt 1
net_mlx5: NIC group 0 priority 12 use rx matcher 0x15a9e2b40: refcnt 1++
net_mlx5: NIC group 0 priority 13 use rx matcher 0x15a9d91c0: refcnt 1++
net_mlx5: NIC group 0 priority 12 use rx matcher 0x15a9e2b40: refcnt 2++
net_mlx5: NIC group 0 priority 12 use rx matcher 0x15a9e2b40: refcnt 3++
net_mlx5: NIC group 0 priority 14 use rx matcher 0x15a9cd380: refcnt 1++
net_mlx5: NIC group 0 priority 13 use rx matcher 0x15a9d6e00: refcnt 2++
net_mlx5: NIC group 0 priority 12 use rx matcher 0x15a9d6940: refcnt 4++
net_mlx5: NIC group 0 priority 12 use rx matcher 0x15a9d6940: refcnt 5++
net_mlx5: NIC group 0 priority 13 use rx matcher 0x15a9d6e00: refcnt 3++
net_mlx5: NIC group 0 priority 12 use rx matcher 0x15a9d6940: refcnt 6++
net_mlx5: NIC group 0 priority 12 use rx matcher 0x15a9d6940: refcnt 7++
Succeded to validate flow
net_mlx5: NIC group 0 priority 0 new rx matcher 0x15a9ee300: refcnt 1
Succeded to create flow

支持 GRE and/or 内部 RSS 对许多 NIC 来说是轻而易举的,所以大多数 NIC 开箱即用。例如

  1. 对于 Intel Fortville(10gbps、25Gbps、40Gbps)NIC:需要更新固件和 DDP 配置文件以解析和计算内部 RSS。
  2. 对于 Intel Columbiaville(100Gbps、50Gbps、25Gbps)网卡:需要更新固件,然后更新驱动程序。我记得默认的 DDP 配置文件解析 GRE。
  3. 如果是 Mellanox MLX5(ConnectX-5 和 Connect-6 有多个变体),其中一些支持基于 GRE 的解析和 RSS,而其他则需要 ESWITCH 来执行此类操作。

因此使用 testpmd 需要

  1. 在端口和 RX 队列配置中启用 MQ_RSS
  2. 通过 RTE_FLOW API
  3. 启用特定(内部 RSS)

使用 MT2892 Family [ConnectX-6 Dx] 可以使用 testpmd 为 GRE 封装的数据包启用内部 5 元组 RSS。

  1. 启动数据包生成器(DPDK pktgen)使用sudo ./usr/local/bin/pktgen --file-prefix=3 -a81:00.0,txq_inline_mpw=128 -l 6-27 -- -P -m "[8-11:12-27].0" -N -s"0:rtp_balanced_gre.pcap"
  2. 使用dpdk-testpmd --socket-mem=1024 --file-prefix=2 -l 7,8-23 -a0000:41:00.1,mprq_en=1,rxqs_min_mprq=1,mprq_log_stride_num=9,txq_inline_mpw=128,rxq_pkt_pad_en=1,rxq_cqe_comp_en=4 -- --port-numa-config=0,0 --socket-num=0 --burst=128 --txd=8192 --rxd=8192 --mbcache=512 --rxq=16 --txq=16 --nb-cores=8 -a --forward-mode=io --numa --rss-udp --enable-rx-cksum --no-mlockall --no-lsc-interrupt -a --enable-rx-cksum --enable-drop-en --eth-link-speed=100000 --no-rmv-interrupt -i
  3. 以交互模式使用多个 RX 队列启动 testpmd
  4. 在交互式 shell 中将规则配置为 flow create 0 ingress pattern eth / ipv4 / gre / eth / ipv4 / udp / end actions rss level 2 types ip udp end queues 0 1 2 3 end / end

注:

  1. 确保在匹配字段中使用正确的格式 eth / ipv4 / gre / eth / ipv4 / udp /
  2. 如果未在设备上设置规则,则只有设备 RX queue0 将接收数据包。