openeuler22.03_LTS_SP3系统版本,网卡型号为X710,按照
链接配置,将网卡绑定到igb_uio驱动后,配置了lstack.cong文件:内容如下
dpdk_args=["-l", "0", "-a","0000:af:00.0","--socket-mem", "2048,0,0,0", "--huge-dir", "/mnt/hugepages-lstack", "--proc-type", "primary"]
stack_thread_mode="run-to-wakeup"
#ltran mode need add "--map-perfect" and "--legacy-mem" in dpdk_args
use_ltran=0
kni_switch=0
flow_bifurcation=0
low_power_mode=0
#needed mbuf count = tcp_conn_count * mbuf_count_per_conn
tcp_conn_count = 1500
mbuf_count_per_conn = 170
# send ring size, default is 32, max is 2048
# if udp pktlen exceeds 45952(32 * 1436)B, send_ring_size must be at least 64.
send_ring_size = 32
#recv ring size, default is 128, max is 2048
recv_ring_size = 128
#protocol stack thread per loop params
#read data form protocol stack into recv_ring
read_connect_number = 4
#process rpc msg number
rpc_number = 4
#read nic pkts number
nic_read_number = 128
nic_rxqueue_size = 4096
nic_txqueue_size = 2048
#each cpu core start a protocol stack thread.
num_cpus="0"
#app worker thread bind to numa in epoll/poll.
app_bind_numa=1
#app main thread affinity set by dpdk.
main_thread_affinity=0
host_addr="200.0.0.110"
mask_addr="255.255.255.0"
gateway_addr="200.0.0.1"
devices="68:91:D0:66:BC:B0"
#0: use rss rule
#1: use tcp tuple rule to specify packet to nic queue
tuple_filter=0
#tuple_filter=1, below cfg valid
num_process=1
process_numa="0,1"
process_idx=0
#tuple_filer=0, below cfg valid
listen_shadow=0
#vlan mode; only support -1~4094, -1 is disabled
nic_vlan_mode=-1
#bond mode; only support bond 4 or 6 mode ,-1 is disabled
bond_mode=-1
#bond slave mac, separated by ; , only support 2 slave mac
#bond_slave_mac="aa:bb:cc:dd:ee:ff;gg:hh:ii:jj:kk:ll"
#maximum number of rpc memory pools
rpc_msg_max=4096
mbuf_pool_size=1024000
执行运行程序命令:
LD_PRELOAD=/usr/lib64/liblstack.so GAZELLE_BIND_PROCNAME=test ./test
运行结果:
[root@localhost ~]# LD_PRELOAD=/usr/lib64/liblstack.so GAZELLE_BIND_PROCNAME=ttpd ./ttpd -i lo -d -c 64
dpdk argv: -l 0 -a 0000:af:00.0 --socket-mem 2048,0,0,0 --huge-dir /mnt/hugepages-lstack --proc-type primary --file-prefix 07
LSTACK[63130]: cfg_init success
EAL: Detected CPU lcores: 64
EAL: Detected NUMA nodes: 2
EAL: Detected shared linkage of DPDK
EAL: Multi-process socket /var/run/dpdk/07/mp_socket
EAL: Selected IOVA mode 'PA'
EAL: 10 hugepages of size 1073741824 reserved, but no mounted hugetlbfs found for that size
EAL: VFIO support initialized
EAL: Probe PCI driver: net_i40e (8086:1572) device: 0000:af:00.0 (socket 1)
TELEMETRY: No legacy callbacks, legacy socket not created
LSTACK: create_control_thread:182 create control_easy_thread success
LSTACK: stack_group_init_mempool:577 config::num_cpu=1 num_process=1
LSTACK: eth_params_checksum:204 RTE_ETH_RX_OFFLOAD_IPV4_CKSUM
LSTACK: eth_params_checksum:210 RTE_ETH_RX_OFFLOAD_TCP_CKSUM
LSTACK: eth_params_checksum:216 RTE_ETH_RX_OFFLOAD_UDP_CKSUM
LSTACK: eth_params_checksum:222 RTE_ETH_RX_OFFLOAD_VLAN_STRIP
LSTACK: eth_params_checksum:228 RTE_ETH_RX_OFFLOAD_VLAN_FILTER
LSTACK: eth_params_checksum:234 RTE_ETH_TX_OFFLOAD_IPV4_CKSUM
LSTACK: eth_params_checksum:240 RTE_ETH_TX_OFFLOAD_TCP_CKSUM
LSTACK: eth_params_checksum:246 RTE_ETH_TX_OFFLOAD_UDP_CKSUM
LSTACK: eth_params_checksum:252 RTE_ETH_TX_OFFLOAD_TCP_TSO
LSTACK: eth_params_checksum:258 RTE_ETH_TX_OFFLOAD_VLAN_INSERT
LSTACK: eth_params_checksum:275 Set checksum offloads
LSTACK: eth_params_rss:408 modified RSS hash function based on hardware support,requested:0x3afbc configured:0x2eb8
LSTACK: eth_params_rss:417 set rss_hf: 2eb8
Ethdev port_id=0 invalid RSS key len: 40, valid value: 52
LSTACK: dpdk_ethdev_init:576 cannot config eth dev at port 0: Invalid argument
LSTACK: init_dpdk_ethdev:845 dpdk_ethdev_init failed, port id=0
EAL: Error - exiting with code: 1
Cause: gazelle_network_init:317 init_dpdk_ethdev failed
其中
LSTACK: eth_params_rss:408 modified RSS hash function based on hardware support,requested:0x3afbc configured:0x2eb8
LSTACK: eth_params_rss:417 set rss_hf: 2eb8
Ethdev port_id=0 invalid RSS key len: 40, valid value: 52
LSTACK: dpdk_ethdev_init:576 cannot config eth dev at port 0: Invalid argument
这个问题是因为程序的RSS配置不支持x710网卡吗?该如何解决?