I am using Mellanox Technologies MT27800 Family [ConnectX-5], using dpdk multi rx queue with rss "ETH_RSS_IP | ETH_RSS_UDP | ETH_RSS_TCP"
I receive packet with ETH:IP:GRE:ETH:IP:UDP
I want the load balancing to be according to inner ip+port and not with the gre ip
I tried adding ETH_RSS_LEVEL_INNERMOST to the rss_hf but i got an error about rss invalid value 0x800000003afbc should be 0xf00000000003afbc
I am using dpdk 21.11.0 - Is it possible to do it and how? If not how can i do it.
Is it also supported in 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
I have successfully run the testpmd with parameters you sent and i see spread between threads, with dpdk19 and with ip-udp traffic over gre
But when i try to test with my own code it doesn't work, testpmd is complex and i don't know what i am doing wrong
Here is a link to code that i wrote
https://coliru.stacked-crooked.com/a/cdeefd58b08063be
I run it with following command:
./testReceiver --log-level='.*',8 -l 7,8-23 -w 0000:03:00.0
Here is output of of my code run with high log level
[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
Support for GRE and/or Inner RSS is touch and go for many NIC, so most NIC does not work out of box. For example
For Intel Fortville (10gbps, 25Gbps, 40Gbps) NIC: one needs to update firmware and DDP profile to parse and compute inner RSS.
For Intel Columbiaville (100Gbps, 50Gbps, 25Gbps) NIC: one needs to update firmware and then update driver. As I recollect default DDP profile parses GRE.
In case of Mellanox MLX5 (there are multiple variant for ConnectX-5 and Connect-6), some of them support GRE based parsing and RSS, while other require ESWITCH to perform such actions.
Hence using testpmd one needs to
enable MQ_RSS in port and RX queue configuration
For specific (inner RSS) enable via RTE_FLOW API
With MT2892 Family [ConnectX-6 Dx] one can enable Inner 5 tuple RSS for GRE encapsulated packet with testpmd.
Start packet generator (DPDK pktgen) use 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"
Start testpmd in interactive mode with multiple RX queues using 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
In interactive shell configure the rule as 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.
Note:
Ensure to use the right format in match field eth / ipv4 / gre / eth / ipv4 / udp /
if the rule is not set on the device only device RX queue0 will be receiving the packets.
Related
The throughput of ip_reasseble is low, ip_reassembly example was used to test it. Another PC2 run iperf -c to send ip fragments packets, the maximum throughput is about 900Mbps.
Testing setups:
PC1(dpdk) --- PC1(iperf -c)
PC1: 10Gb/s NIC
PC2: 1Gb/s NIC, MTU: 1500
#./build/ip_reassembly -l 2 -- -p 0x1 &
EAL: Detected 4 lcore(s)
EAL: Detected 1 NUMA nodes
EAL: Multi-process socket /var/run/dpdk/rte/mp_socket
EAL: Selected IOVA mode 'PA'
EAL: No available hugepages reported in hugepages-1048576kB
EAL: Probing VFIO support...
EAL: VFIO support initialized
EAL: PCI device 0000:00:1f.6 on NUMA socket -1
EAL: Invalid NUMA socket, default to 0
EAL: probe driver: 8086:15b7 net_e1000_em
EAL: PCI device 0000:04:00.0 on NUMA socket -1
EAL: Invalid NUMA socket, default to 0
EAL: probe driver: 8086:10fb net_ixgbe
EAL: PCI device 0000:04:00.1 on NUMA socket -1
EAL: Invalid NUMA socket, default to 0
EAL: probe driver: 8086:10fb net_ixgbe
IP_RSMBL: Creating LPM table on socket 0
IP_RSMBL: Creating LPM6 table on socket 0
USER1: rte_ip_frag_table_create: allocated of 25165952 bytes at socket 0
Initializing port 0 ... Port 0 modified RSS hash function based on hardware support,requested:0xa38c configured:0x8104
Address:00:1B:21:C1:E9:C6
txq=2,0,0
IP_RSMBL: Socket 0: adding route 100.10.0.0/16 (port 0)
IP_RSMBL: Socket 0: adding route 100.20.0.0/16 (port 1)
IP_RSMBL: Socket 0: adding route 100.30.0.0/16 (port 2)
IP_RSMBL: Socket 0: adding route 100.40.0.0/16 (port 3)
IP_RSMBL: Socket 0: adding route 100.50.0.0/16 (port 4)
IP_RSMBL: Socket 0: adding route 100.60.0.0/16 (port 5)
IP_RSMBL: Socket 0: adding route 100.70.0.0/16 (port 6)
IP_RSMBL: Socket 0: adding route 100.80.0.0/16 (port 7)
IP_RSMBL: Socket 0: adding route 0101:0101:0101:0101:0101:0101:0101:0101/48 (port 0)
IP_RSMBL: Socket 0: adding route 0201:0101:0101:0101:0101:0101:0101:0101/48 (port 1)
IP_RSMBL: Socket 0: adding route 0301:0101:0101:0101:0101:0101:0101:0101/48 (port 2)
IP_RSMBL: Socket 0: adding route 0401:0101:0101:0101:0101:0101:0101:0101/48 (port 3)
IP_RSMBL: Socket 0: adding route 0501:0101:0101:0101:0101:0101:0101:0101/48 (port 4)
IP_RSMBL: Socket 0: adding route 0601:0101:0101:0101:0101:0101:0101:0101/48 (port 5)
IP_RSMBL: Socket 0: adding route 0701:0101:0101:0101:0101:0101:0101:0101/48 (port 6)
IP_RSMBL: Socket 0: adding route 0801:0101:0101:0101:0101:0101:0101:0101/48 (port 7)
Checking link status
done
Port0 Link Up. Speed 10000 Mbps - full-duplex
IP_RSMBL: entering main loop on lcore 2
IP_RSMBL: -- lcoreid=2 portid=0
run iperf -c on PC2
# iperf -c 192.168.10.157 -i 1 -u -t 30 -p 2152 -b 900M -l 1600
------------------------------------------------------------
Client connecting to 192.168.10.157, UDP port 2152
Sending 1600 byte datagrams, IPG target: 13.56 us (kalman adjust)
UDP buffer size: 958 MByte (default)
------------------------------------------------------------
[ 3] local 192.168.10.100 port 37771 connected with 192.168.10.157 port 2152
[ ID] Interval Transfer Bandwidth
[ 3] 0.0- 1.0 sec 113 MBytes 944 Mbits/sec
[ 3] 1.0- 2.0 sec 112 MBytes 944 Mbits/sec
[ 3] 2.0- 3.0 sec 112 MBytes 944 Mbits/sec
[ 3] 3.0- 4.0 sec 113 MBytes 944 Mbits/sec
[ 3] 4.0- 5.0 sec 112 MBytes 944 Mbits/sec
[ 3] 5.0- 6.0 sec 112 MBytes 944 Mbits/sec
[ 3] 6.0- 7.0 sec 113 MBytes 944 Mbits/sec
[ 3] 7.0- 8.0 sec 112 MBytes 944 Mbits/sec
[ 3] 8.0- 9.0 sec 113 MBytes 944 Mbits/sec
[ 3] 9.0-10.0 sec 112 MBytes 944 Mbits/sec
[ 3] 10.0-11.0 sec 112 MBytes 944 Mbits/sec
[ 3] 11.0-12.0 sec 112 MBytes 944 Mbits/sec
[ 3] 12.0-13.0 sec 112 MBytes 944 Mbits/sec
[ 3] 13.0-14.0 sec 112 MBytes 944 Mbits/sec
[ 3] 14.0-15.0 sec 113 MBytes 944 Mbits/sec
[ 3] 15.0-16.0 sec 112 MBytes 944 Mbits/sec
[ 3] 16.0-17.0 sec 113 MBytes 944 Mbits/sec
[ 3] 17.0-18.0 sec 112 MBytes 944 Mbits/sec
[ 3] 18.0-19.0 sec 112 MBytes 944 Mbits/sec
[ 3] 19.0-20.0 sec 112 MBytes 944 Mbits/sec
[ 3] 20.0-21.0 sec 113 MBytes 944 Mbits/sec
[ 3] 21.0-22.0 sec 112 MBytes 944 Mbits/sec
[ 3] 22.0-23.0 sec 112 MBytes 944 Mbits/sec
[ 3] 23.0-24.0 sec 112 MBytes 944 Mbits/sec
[ 3] 24.0-25.0 sec 112 MBytes 944 Mbits/sec
[ 3] 25.0-26.0 sec 113 MBytes 944 Mbits/sec
[ 3] 26.0-27.0 sec 112 MBytes 944 Mbits/sec
[ 3] 27.0-28.0 sec 112 MBytes 944 Mbits/sec
[ 3] 28.0-29.0 sec 113 MBytes 944 Mbits/sec
[ 3] 29.0-30.0 sec 113 MBytes 944 Mbits/sec
[ 3] WARNING: did not receive ack of last datagram after 10 tries.
[ 3] 0.0-30.0 sec 3.30 GBytes 944 Mbits/sec
[ 3] Sent 2211842 datagrams
the result of ip fragments reassembled:
# ps
PID TTY TIME CMD
335 pts/9 00:02:35 ip_reassembly
535 pts/9 00:00:00 ps
25304 pts/9 00:00:00 su
25306 pts/9 00:00:00 zsh
# kill -SIGUSR1 335
-- lcoreid=2 portid=0 frag tbl stat:
max entries: 4096;
entries in use: 4088;
finds/inserts: 4344078;
entries added: 883521;
entries deleted by timeout: 837;
entries reused by timeout: 0;
total add failures: 2581961;
add no-space failures: 2581961;
add hash-collisions failures: 0;
TX bursts: 0
TX packets _queued: 0
TX packets dropped: 0
TX packets send: 0
RX gtpu packets: 872727
I add some stats of udp port 2152 in example of ip_reassembly to show the successful reassembled
packets. According to the result, the PC2 send 2211842 datagrams while only 872727 packets were reassembled by ip_reassembly. When I low down the sending speed of iperf to 800Mbps, no drops print.
I don't find the throughput description in DPDK guide https://doc.dpdk.org/guides-22.07/prog_guide/ip_fragment_reassembly_lib.html
has anyone met the same questions?
I'm trying to write a regex that will find "Vlan20" and the word "up" after line protocol is in the first line. I wrote a regex below that will give me the group that the word "up" and "vlan20" are located in but is this the best way to achieve this? The regex just seems very long. The will use those values in a conditional statememt.
((^Vlan20)(\s\w+)(\s\w+),(\s\w+)(\s\w+)(\s\w+)(\s\w+))
Sample text:
Vlan20 is up, line protocol is up
Hardware is EtherSVI, address is 588d.0939.ffb4 (bia 588d.0939.ffb4)
Description: MATS Network
Internet address is 10.88.5.49/28
MTU 1500 bytes, BW 100000 Kbit/sec, DLY 100 usec,
reliability 255/255, txload 1/255, rxload 1/255
Encapsulation ARPA, loopback not set
Keepalive not supported
ARP type: ARPA, ARP Timeout 04:00:00
Last input 00:00:04, output never, output hang never
Last clearing of "show interface" counters never
Input queue: 0/75/0/0 (size/max/drops/flushes); Total output drops: 1
Queueing strategy: fifo
Output queue: 0/40 (size/max)
5 minute input rate 0 bits/sec, 0 packets/sec
5 minute output rate 0 bits/sec, 0 packets/sec
1992293 packets input, 187299894 bytes, 0 no buffer
Received 22809 broadcasts (0 IP multicasts)
0 runts, 0 giants, 0 throttles
0 input errors, 0 CRC, 0 frame, 0 overrun, 0 ignored
2115535 packets output, 813500880 bytes, 0 underruns
0 output errors, 1 interface resets
89225 unknown protocol drops
0 output buffer failures, 0 output buffers swapped out
I need to get the subnets count of bgp 7029, using regexp like
(?<=bgp 7029[\s]+\d[\s+])\d
but this doesn't work with positive look behind.
sh ip route vrf vrf-dnoc-mpls-test summary
IP routing table name is vrf-dnoc-mpls-test (0x2)
IP routing table maximum-paths is 32
Route Source Networks Subnets Replicates Overhead Memory (bytes)
static 0 0 0 0 0
connected 0 1 0 60 172
bgp 7029 0 1686 0 101160 289992
External: 0 Internal: 1686 Local: 0
internal 36 73652
Total 36 1687 0 101220 363816
Don't really need a lookbehind, a capture group will work just as well.
bgp[ \t]7029[ \t]+\d+[ \t]+(\d+)
where the subnet is in group 1
I am trying to communicate with an FT4222 chip using libft4222. When I run the following example code provided by FTDI, I receive different responses between Windows and Linux platforms.
Sample code:
FT_STATUS ftStatus;
FT_DEVICE_LIST_INFO_NODE *devInfo;
DWORD numDevs;
// create the device information list
ftStatus = FT_CreateDeviceInfoList(&numDevs);
if (ftStatus == FT_OK) {
printf("Number of devices is %d\n",numDevs);
}
if (numDevs > 0) {
// allocate storage for list based on numDevs
devInfo =
(FT_DEVICE_LIST_INFO_NODE*)malloc(sizeof(FT_DEVICE_LIST_INFO_NODE)*numDevs);
// get the device information list
ftStatus = FT_GetDeviceInfoList(devInfo,&numDevs);
if (ftStatus == FT_OK) {
for (int i = 0; i < numDevs; i++) {
printf("Dev %d:\n",i);
printf(" Flags=0x%x\n",devInfo[i].Flags);
printf(" Type=0x%x\n",devInfo[i].Type);
printf(" ID=0x%x\n",devInfo[i].ID);
printf(" LocId=0x%x\n",devInfo[i].LocId);
printf(" SerialNumber=%s\n",devInfo[i].SerialNumber);
printf(" Description=%s\n",devInfo[i].Description);
printf(" ftHandle=0x%x\n",devInfo[i].ftHandle);
}
}
}
On Windows I receive the following output, which looks correct:
Dev 0:
Flags= 0x2, (CLOSE-HS)
Type= 0xa
ID= 0x403601c
LocId= 0x1131
SerialNumber= A
Description= FT4222 A
ftHandle= 0x0
Dev 1:
Flags= 0x0, (CLOSE-FS)
Type= 0xa
ID= 0x403601c
LocId= 0x1132
SerialNumber= B
Description= FT4222 B
ftHandle= 0x0
On Linux (x64 Ubuntu, running i386 version of libft4222 and my test application) I receive the following output, which looks incorrect:
Dev 0:
Flags= 0x1, (OPEN-FS)
Type= 0x3
ID= 0x0
LocId= 0x0
SerialNumber=
Description=
ftHandle= 0x0
Dev 1:
Flags= 0x1, (OPEN-FS)
Type= 0x3
ID= 0x0
LocId= 0x0
SerialNumber=
Description=
ftHandle= 0x0
I'm curious why the difference between systems? Why is one showing as Closed while the other shows as Open?
EDIT: lsusb -v displays the following for this device:
Bus 001 Device 015: ID 0403:601c Future Technology Devices International, Ltd
Couldn't open device, some information will be missing
Device Descriptor:
bLength 18
bDescriptorType 1
bcdUSB 2.00
bDeviceClass 0 (Defined at Interface level)
bDeviceSubClass 0
bDeviceProtocol 0
bMaxPacketSize0 64
idVendor 0x0403 Future Technology Devices International, Ltd
idProduct 0x601c
bcdDevice 18.00
iManufacturer 1
iProduct 2
iSerial 0
bNumConfigurations 1
Configuration Descriptor:
bLength 9
bDescriptorType 2
wTotalLength 55
bNumInterfaces 2
bConfigurationValue 1
iConfiguration 0
bmAttributes 0xa0
(Bus Powered)
MaxPower 100mA
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 0
bAlternateSetting 0
bNumEndpoints 2
bInterfaceClass 255 Vendor Specific Class
bInterfaceSubClass 255 Vendor Specific Subclass
bInterfaceProtocol 255 Vendor Specific Protocol
iInterface 2
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x81 EP 1 IN
bmAttributes 2
Transfer Type Bulk
Synch Type None
Usage Type Data
wMaxPacketSize 0x0200 1x 512 bytes
bInterval 0
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x02 EP 2 OUT
bmAttributes 2
Transfer Type Bulk
Synch Type None
Usage Type Data
wMaxPacketSize 0x0200 1x 512 bytes
bInterval 0
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 1
bAlternateSetting 0
bNumEndpoints 2
bInterfaceClass 255 Vendor Specific Class
bInterfaceSubClass 255 Vendor Specific Subclass
bInterfaceProtocol 255 Vendor Specific Protocol
iInterface 2
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x83 EP 3 IN
bmAttributes 2
Transfer Type Bulk
Synch Type None
Usage Type Data
wMaxPacketSize 0x0008 1x 8 bytes
bInterval 0
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x04 EP 4 OUT
bmAttributes 2
Transfer Type Bulk
Synch Type None
Usage Type Data
wMaxPacketSize 0x0008 1x 8 bytes
bInterval 0
After trying with Kali i386, everything worked fine. I thought this meant the library didn't work well with amd64 OS flavors, so I tried with Ubuntu i386. Same problem as before - incorrect device info.
Found that the real issue was with Kali I was logging in under the root account. With Ubuntu, root account login is unavailable. After executing my test application with sudo, the information retrieved from the FT4222 chip was correct.
Proper solution is likely to use a udev rule to modify permissions for the FT4222 device.
under debian this udev rule helped me to avoid sudo rights:
ACTION=="add", ATTRS{idVendor}=="0403", ATTRS{idProduct}=="6001", MODE="0666", RUN+="/bin/sh -c 'rmmod ftdi_sio && rmmod usbserial'
also it might be important that your $USER is part of the group dialout
Given that I have the following output :
Loopback1 is up, line protocol is up
Hardware is Loopback
Description: ** NA4-ISIS-MGMT-LOOPBACK1_MPLS **
Internet address is 84.116.226.27/32
MTU 1514 bytes, BW 8000000 Kbit, DLY 5000 usec,
reliability 255/255, txload 1/255, rxload 1/255
Encapsulation LOOPBACK, loopback not set
Keepalive set (10 sec)
Last input 12w3d, output never, output hang never
Last clearing of "show interface" counters never
Input queue: 0/75/0/0 (size/max/drops/flushes); Total output drops: 0
Queueing strategy: fifo
Output queue: 0/0 (size/max)
5 minute input rate 0 bits/sec, 0 packets/sec
5 minute output rate 0 bits/sec, 0 packets/sec
0 packets input, 0 bytes, 0 no buffer
Received 0 broadcasts (0 IP multicasts)
0 runts, 0 giants, 0 throttles
0 input errors, 0 CRC, 0 frame, 0 overrun, 0 ignored, 0 abort
6 packets output, 456 bytes, 0 underruns
0 output errors, 0 collisions, 0 interface resets
0 output buffer failures, 0 output buffers swapped out
How can I match "Loopback1" and not "Loopback" ?
In other words, how can I match the interface name only if there is a number next to it, in Tcl ?
use lookahead
Loopback(?=\d+)
It matches only Loopback in Loopback followed by any number of digits. If you want to match loopback and the number, useLoopback\d+