seladb / PcapPlusPlus

PcapPlusPlus is a multiplatform C++ library for capturing, parsing and crafting of network packets. It is designed to be efficient, powerful and easy to use. It provides C++ wrappers for the most popular packet processing engines such as libpcap, Npcap, WinPcap, DPDK, AF_XDP and PF_RING.
https://pcapplusplus.github.io/
The Unlicense
2.75k stars 674 forks source link

Reopened Application terminated in error: Couldn't open DPDK device #0, PMD 'net_i40e' #198 #205

Closed duanwujie closed 5 years ago

duanwujie commented 5 years ago

isDeviceSupportRssHashFunction debug info bellow

(gdb) p devInfo 
$2 = {pci_dev = 0x1003a26b0, driver_name = 0x100219088 "net_i40e", if_index = 0, min_rx_bufsize = 1024, max_rx_pktlen = 9728, 
  max_rx_queues = 192, max_tx_queues = 192, max_mac_addrs = 64, max_hash_mac_addrs = 0, max_vfs = 0, max_vmdq_pools = 32, 
  rx_offload_capa = 47, tx_offload_capa = 8127, rx_queue_offload_capa = 0, tx_queue_offload_capa = 0, reta_size = 512, 
  hash_key_size = 52 '4', flow_type_rss_offloads = 32504, default_rxconf = {rx_thresh = {pthresh = 8 '\b', hthresh = 8 '\b', 
      wthresh = 0 '\000'}, rx_free_thresh = 32, rx_drop_en = 0 '\000', rx_deferred_start = 0 '\000', offloads = 0}, default_txconf = {
    tx_thresh = {pthresh = 32 ' ', hthresh = 0 '\000', wthresh = 0 '\000'}, tx_rs_thresh = 32, tx_free_thresh = 32, txq_flags = 3841, 
    tx_deferred_start = 0 '\000', offloads = 0}, vmdq_queue_base = 64, vmdq_queue_num = 128, vmdq_pool_base = 1, rx_desc_lim = {
    nb_max = 4096, nb_min = 64, nb_align = 32, nb_seg_max = 0, nb_mtu_seg_max = 0}, tx_desc_lim = {nb_max = 4096, nb_min = 64, 
    nb_align = 32, nb_seg_max = 255, nb_mtu_seg_max = 8}, speed_capa = 288, nb_rx_queues = 0, nb_tx_queues = 0}
(gdb) p devInfo.flow_type_rss_offloads
$3 = 32504
(gdb) p dpdkRssHF
$4 = 0
(gdb) 
duanwujie commented 5 years ago

The i40e support :

duanwujie commented 5 years ago

Which should I use?

echo-Mike commented 5 years ago

As for my experience You should use all of them and hardware will choose one based on incoming packet type This is an feature of i40e NICs

echo-Mike commented 5 years ago

See my comments here: https://github.com/seladb/PcapPlusPlus/issues/198#issuecomment-494465905

duanwujie commented 5 years ago

Extra steps to enable the symmetry hash for i40e:

https://dev.dpdk.narkive.com/AIj6ALhm/dpdk-dev-symmetry-for-tcp-packets-on-x710-intel

Will be improve the performance?

echo-Mike commented 5 years ago

Sorry the link You provided is broken for me

echo-Mike commented 5 years ago

Oh I see now. I have read something about the RSS key length previously: in older hardware firmware versions the key must be longer than 40 bytes but in newer versions it was fixed. I personally have used the 40 byte key and directly specify the length on device configuration and it was working.

seladb commented 5 years ago

@duanwujie please advise if we can close this issue

seladb commented 5 years ago

I'll close the issue now, please reopen if needed