Search code examples
dpdkdpdk-pmd

Dpdk pmd device not stopping


I am using memif devices in my project. As you know memif's are the eth devices in dpdk. When I am ending my application, I am stopping, disable promiscuous mode and closing memif eth devices. This is the sequence I fallow;

rte_eth_dev_stop(portId);
rte_eth_promiscuous_disable(portId);
rte_eth_dev_close(portId);

Eth device gives error Unknown error -95 (-95) in rte_eth_dev_stop(portId) and same error no at rte_eth_promiscuous_disable() function. Besides I get the memif_disconnect(): Failed to unregister control channel callback error. But rte_eth_dev_close() return success. I don't know what am I doing wrong ? Maybe the closing sequence could be wrong.

I would be very appreciated if you guide me about that issue. Best regards.


Solution

  • @Mustafa I request to spend some time in both documentation and code, which will help in easily understanding that memif does not enable or disable promiscuous mode.

    Let me explain

    1. From DPDK [NIC overview][1] Table 1.1 Features availability in networking drivers it calls out various features what is supported
    2. For memif promsicous mode is not present.
    3. DPDK internal library (rte_ethdev) implements promiscuous_enable and promiscuous_disable to support user requests to be transferred to underlying PMD.
    4. In case of memif, check [code][2] code static const struct eth_dev_ops ops. The promiscuous enable|dsiable function handlers are absent.

    Hence there is nothing wrong memif.

    [EDIT-1] with respect to memif rte_eth_dev_stop, checking for memif_dev_stop, only the return value is return 0; hence the claim of -95 for stop device is not valid.

    Note: please check the code and links to better understand the code. [1]: https://doc.dpdk.org/guides/nics/overview.html [2]: https://git.dpdk.org/dpdk/tree/drivers/net/memif/rte_eth_memif.c