1

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.

Mustafa
  • 147
  • 1
  • 12

1 Answers1

1

@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

Vipin Varghese
  • 4,540
  • 2
  • 9
  • 25
  • thank you again. But I still could not get rid of stop error. Somehow I get that error and error does not give any useful output with rte_strerror. I am feeling I should flush the rx and tx buffer or something else. I dont know :( – Mustafa Nov 26 '22 at 12:09
  • 1
    @Mustafa your question was on `rte_eth_promiscuous_disable` the answer address the same. Please accept and upvote to close the question. If you have question on stop, please open a new ticket. it is stack overflow model to focus on one question at a time. – Vipin Varghese Nov 26 '22 at 14:31
  • Thank you for your reply. I looked at the links and that was very helpful. Maybe I made a mistake by not mentioning about dpdk version. I am using 20.11.1 version. So, I checked the rte_eth_memif.c file and I could not find memif_dev_stop function in that version. In that version, ***rte_eth_dev_stop()*** is available and I am using it. So all the cases are solved I think. Thank you again.... – Mustafa Nov 26 '22 at 22:34