click icon indicating copy to clipboard operation
click copied to clipboard

Cannot initialize DPDK port 0 with 1 RX and 1 TX queues

Open antonywei opened this issue 5 years ago • 3 comments

Hi, We configured a simple DPDK instance with click(a tunnel), But we came across some issues.It seems that the error only appeared in click with dpdk, but not in fastclick. Does anyone have any idea about what is wrong?

DPDK_NF_simple.click:8: While initializing ‘nicIn0 :: FromDPDKDevice’: Cannot initialize DPDK port 0 with 1 RX and 1 TX queues

define(
        $iface0 0,
        $iface1 1,
        $queueSize 1024,
        $burst 32
)

nicIn0 :: FromDPDKDevice(0000:01:00.2, BURST $burst, PROMISC true);

nicOut0 :: ToDPDKDevice(0000:01:00.2, IQUEUE $queueSize, BURST $burst);

nicIn1 :: FromDPDKDevice(0000:01:00.3, BURST $burst,PROMISC true);
nicOut1 :: ToDPDKDevice(0000:01:00.3, BURST $burst);


nicIn1 -> Print("got packet")->nicOut0;
nicIn0 ->Print("got packet")-> nicOut1;

antonywei avatar Nov 15 '19 07:11 antonywei

Oops sorry I missed your issue. The implementation of the DPDK elements in mainline Click is much less-featured, which explains a difference between the two.

Which DPDK version? Is that the same error? Which NIC? Some default parameters are probably invalid.

tbarbette avatar Nov 27 '19 11:11 tbarbette

Hi, i had the same error using DPDK 19.11.3 (LTS) and NIC: Intel Corporation I210 Gigabit Network Connection (rev 03), with the additional information, that the rss_hs is invalid. Comparing the dpdkdevice.cc of click and fast click, i noticed that fastclick uses an additional calculationstep for rss_hs:

calculation in click:

dev_conf.rx_adv_conf.rss_conf.rss_hf = ETH_RSS_IP | ETH_RSS_UDP | ETH_RSS_TCP; calculation in fastclick: dev_conf.rx_adv_conf.rss_conf.rss_hf = ETH_RSS_IP | ETH_RSS_UDP | ETH_RSS_TCP; dev_conf.rx_adv_conf.rss_conf.rss_hf &= dev_info.flow_type_rss_offloads;

Adding the additional line to click solved the problem for me. Hope this might help

woma1040 avatar Jul 30 '20 07:07 woma1040

Ho @woma1029 can you provide a patch/pull request?

Thanks!

tbarbette avatar Jul 30 '20 13:07 tbarbette