Closed Pesa closed 2 years ago
DPDK supports up to RTE_MAX_ETHPORTS
(default to 32) Ethernet ports.
Each Ethernet adapter (PCI, XDP, or AF_PACKET) or memif interface is considered an Ethernet port.
Are the previous memif faces closed, or are they still open? You can see it from the entirety of NDN-DPDK service logs since it started.
I did some tests and I can confirm that NDN-DPDK can support 32 EthDevs simultaneously, and the EthDev ID can be reused if it's closed properly. The reported error was caused by not properly closing memif faces, which is a bug in application / agent.
Additionally, a method to increase RTE_MAX_ETHPORTS
is provided in a8c7ef627293b86fc5b15cfb9481c1e01c36af41.
This issue wasn't so much about what the app is doing or not doing, but rather the fact that the error message "Reached maximum number of Ethernet ports" is entirely counterintuitive and does not point to the real problem, since nobody would expect that a memif face counts as "ethernet port" (it's not ethernet and it's not a port). So, can we make the error more useful?
No.
Messages from "logger":"DPDK"
are emitted by DPDK libraries and drivers.
NDN-DPDK cannot control these messages.
There's a note in ndn-dpdk/docs/face.md
:
DPDK supports up to 32 Ethernet devices by default. Both Ethernet ports and memif faces count toward this limit.
This issue wasn't so much about what the app is doing or not doing, but rather the fact that the error message "Reached maximum number of Ethernet ports" is entirely counterintuitive and does not point to the real problem, since nobody would expect that a memif face counts as "ethernet port" (it's not ethernet and it's not a port). So, can we make the error more useful?
No. Messages from
"logger":"DPDK"
are emitted by DPDK libraries and drivers. NDN-DPDK cannot control these messages.
That's a lame excuse. NDN-DPDK can log a better warning/error before calling into DPDK.
There's a note in
ndn-dpdk/docs/face.md
:DPDK supports up to 32 Ethernet devices by default. Both Ethernet ports and memif faces count toward this limit.
Yeah, maybe this will be enough... let's see how many more users get confused by this.
NDN-DPDK can log a better warning/error before calling into DPDK.
It is unreasonable to expect NDN-DPDK to check for every error condition in which DPDK would emit an error message that you don't understand.
This is with v0.0.0-20211025195105-7686941f2f7f after opening and closing a few memif faces several times.