Bug 437 - memif pmd, does not cleanup on primary application restart
Summary: memif pmd, does not cleanup on primary application restart
Status: CONFIRMED
Alias: None
Product: DPDK
Classification: Unclassified
Component: ethdev (show other bugs)
Version: 20.02
Hardware: x86 Linux
: Normal normal
Target Milestone: ---
Assignee: Muhammad Bilal
URL:
Depends on:
Blocks:
 
Reported: 2020-04-04 04:37 CEST by Vipin Varghese
Modified: 2020-09-16 23:47 CEST (History)
3 users (show)



Attachments

Description Vipin Varghese 2020-04-04 04:37:06 CEST
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)

`
Comment 1 Jakub Grajciar 2020-04-14 08:24:06 CEST
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/
Comment 2 Vipin Varghese 2020-04-14 10:55:44 CEST
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
Comment 3 Muhammad Bilal 2020-05-12 06:24:43 CEST
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/
Comment 4 Vipin Varghese 2020-05-12 06:50:24 CEST
shared my review for patch `https://patchwork.dpdk.org/patch/70081/`
Comment 5 Muhammad Bilal 2020-05-13 15:43:58 CEST
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.
Comment 6 Ajit Khaparde 2020-09-16 23:47:59 CEST
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

Note You need to log in before you can comment on or make changes to this bug.