target: cmd: `./build/l2fwd --vdev=net_tap0 --vdev=net_memif,role=master -l 8,51 --socket-mem=104,0 --socket-limit=1024,0 --file-prefix=1 --proc-type=primary --no-pci --log-level=eal,8 -- -p 0x3 -T 1` steps: on success or failure for l2fwd in first attempt, restart the application once again Error: ` memif_socket_create(): Failed to setup socket /run/memif.sock: Address already in use vdev_probe(): failed to initialize net_memif device EAL: Bus (vdev) probe failed. EAL: Module /sys/module/vfio not found! error 2 (No such file or directory) MAC updating enabled EAL: Error - exiting with code: 1 Cause: Invalid portmask; possible (0x1) `
I see two bugs here. 1 is that memif pmd is not closed and 2 is that the app reports invalid portmask. 1 seems to be by the design of l2fwd. rte_eth_dev_close() is not called for all the created devices. 2 is that memif pmd does not implement promisc enable/disable, so l2fwd won't work with it. I created a patch to fix the promisc enable/disable here: https://patchwork.dpdk.org/patch/68371/
I see two bugs here. 1 is that memif pmd is not closed and 2 is that the app reports invalid portmask. 1 seems to be by the design of l2fwd. rte_eth_dev_close() is not called for all the created devices. VV> from the logs, it is clear `memif_socket_create(): Failed to setup socket /run/memif.sock: Address already in use`. Cleanup for the socket has to be done by PMD code
This issue can be solved by freeing port resources in case of error, while running l2fwd application. I have submitted a patch for this. https://patchwork.dpdk.org/patch/70081/
shared my review for patch `https://patchwork.dpdk.org/patch/70081/`
I have submitted a 2nd version of patch in which I also added rte_eal_cleanup() to free the resources. https://patchwork.dpdk.org/patch/70111/ Now I'm also working on other example applications which might need cleanup.
Hi, Since the patch is still pending to be accepted, I am assigning this bug to you. Please update it once the patch has been applied. Thanks Ajit