CMD: ./build/l2fwd --vdev=net_tap0 --vdev=net_memif,role=master -l 8,51 --socket-mem=104,0 --socket-limit=1024,0 --file-prefix=custom --proc-type=primary --no-pci -- -p 0x3 -T 1 Issue: start DPDK application with memif. observation: ` EAL: Multi-process socket /var/run/dpdk/custom/mp_socket EAL: Selected IOVA mode 'VA' EAL: Probing VFIO support... memif_socket_create(): Failed to setup socket /run/memif.sock: Address already in use ` expectation: memif sock interface is to be in `/run/dpdk/custom/memif.sock` and not `/run/memif.sock`
On Sat, 04 Apr 2020 02:42:15 +0000 bugzilla@dpdk.org wrote: > https://bugs.dpdk.org/show_bug.cgi?id=438 > > Bug ID: 438 > Summary: memif sock does not honor file-prefix > Product: DPDK > Version: 20.02 > Hardware: x86 > OS: Linux > Status: UNCONFIRMED > Severity: normal > Priority: Normal > Component: ethdev > Assignee: dev@dpdk.org > Reporter: vipin.varghese@intel.com > Target Milestone: --- > > CMD: ./build/l2fwd --vdev=net_tap0 --vdev=net_memif,role=master -l 8,51 > --socket-mem=104,0 --socket-limit=1024,0 --file-prefix=custom > --proc-type=primary --no-pci -- -p 0x3 -T 1 > > Issue: start DPDK application with memif. > > > observation: > ` > EAL: Multi-process socket /var/run/dpdk/custom/mp_socket > EAL: Selected IOVA mode 'VA' > EAL: Probing VFIO support... > memif_socket_create(): Failed to setup socket /run/memif.sock: Address > already > in use > ` > > expectation: memif sock interface is to be in `/run/dpdk/custom/memif.sock` > and > not `/run/memif.sock` If it just used abstract socket type it would not have this problem.
Why was this assigned to me? I'm not a memif maintainer.
Jakub, Please take a look. Thanks
It's not a good idea that --file-prefix flag should affect memif socket path. Reason one: it might be confusing as the documentation states that --file-prefix is used on hugepages to separate shared data files. The second reason is that in order to establish a connection between independent DPDK processes under different prefixes you need to use the same socket.
Hi Jakub, the request or suggestion from my end is to `expectation: memif sock interface is to be in `/run/dpdk/custom/memif.sock` and not `/run/memif.sock` and not `using name defined under file prefix.` By having the sock file in `/var/run/dpdk` folder is to allow seamless cleanup. Without which today we get the error as reported `20.02` release
But isn't the 'custom' folder a '--file-prefix' argument? Meaning it would cause problem in case of multiple independent dpdk instances. Example: Let's assume two independent dpdk processes dpdk1 and dpdk2. dpdk1 sets --file-prefix=dpdk1 and dpdk2 sets --file-prefix=dpdk2. dpdk1's master interface creates the socket in /run/dpdk/dpdk1/memif.sock then dpdk2's slave interface looks for the socket in /run/dpdk/dpdk2/memif.sock. I'll also investigate the abstract socket solution suggested by Stephen, but I'm concerned that it may cause incompatibility with other implementations and older versions.
I submitted a patch to have memif use abstract socket: https://patches.dpdk.org/patch/79675/. This should resolve all issues regarding cleanup.