NetSys / bess

BESS: Berkeley Extensible Software Switch
Other
311 stars 174 forks source link

PMDPort crashes with Mellanox NIC but succeed with intel NIC #863

Open janeyen opened 5 years ago

janeyen commented 5 years ago

Hi,

I'm running up-to-date BESS (with dpdk 17.11) on Ubuntu 16.04 with kernel version 4.4.0-137-generic and use Mellanox Connectx-5 single port NIC with OFED version 4.2-1.2.0.0-ubuntu16.04-x86_64 (using --dpdk and --upstream-libs flags at installation step).

Both DPDK and BESS are built successfully. But as I tried to put p0 = PMDPort(pci='af:00.0') in BESS script (Our Mellanox NIC is using pci af:00.0), bessctl crashes.

*** Error: Unhandled exception in the configuration script (most recent call last) File "~/bess/bessctl/conf/port/multicore-phy.bess", line 40, in <module> p0 = PMDPort(pci='af:00.0') File "~/bess/bessctl/../pybess/port.py", line 42, in __init__ self.choose_arg(None, kwargs)) File "~/bess/bessctl/../pybess/bess.py", line 383, in create_port return self._request('CreatePort', request) File "~/bess/bessctl/../pybessbess.py", line 261, in _request raise self.RPCError(str(e)) *** Error: RPC failed to - localhost:10514

I want to make sure the error does not come from my BESS script, so I simply replace pci with another one of an embedded intel NIC card, and bessctl runs perfectly. (Just want to note when we used older version BESS and DPDK, the code PMDPort(pci='af:00.0') would work) Would you please check on this and give some suggestions? Thanks.

I attached the crash log and pasted the used BESS script here. bessd_crash.log

BESS script code: bess.add_worker(0, 0) bess.add_worker(1, 1) p0 = PMDPort(pci='af:00.0') hlb = HashLB(gates=[0, 1], mode='l2') src0::PortInc(port=p0.name) -> Sink() src0.attach_task(wid=0)

sangjinhan commented 5 years ago

If possible, could you update the code as follows and try again to see if the problem still persists? (I don't have a Mellanox NIC at handy)

ret.rx_adv_conf.rss_conf = {                                        
    .rss_key = nullptr,                                             
-     .rss_key_len = 40,                                              
+     .rss_key_len = 0,                                              
    /* TODO: query rte_eth_dev_info_get() to set this*/             
    .rss_hf = ETH_RSS_IP | ETH_RSS_UDP | ETH_RSS_TCP | ETH_RSS_SCTP,
janeyen commented 5 years ago

Thanks! The change works.