From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id CD6B0A00C5 for ; Wed, 16 Feb 2022 10:19:15 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 5BB0A410FB; Wed, 16 Feb 2022 10:19:15 +0100 (CET) Received: from mail-vk1-f170.google.com (mail-vk1-f170.google.com [209.85.221.170]) by mails.dpdk.org (Postfix) with ESMTP id CC3BE410F7 for ; Wed, 16 Feb 2022 10:19:13 +0100 (CET) Received: by mail-vk1-f170.google.com with SMTP id k128so900735vkk.10 for ; Wed, 16 Feb 2022 01:19:13 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:from:date:message-id:subject:to; bh=JXl4tn/U0Kq+i3vhyY4yoBHQJ/s0jx0XIu8doTYzVj4=; b=A6jBLhdYCqIC1oKQt9kuefDD/gYUaFeHmrVqSm2TUA00LjuSIBu5ojRsloYOqDAHc1 Gw9wZOR+Urd/rgUpS5eyIK3dEr27mJH2Zwe2bv18FFltQZDH0jOYqdThmeDGLGCIdy4d qhJtcHAVN/W1zKy7rOqMNLV+bXm80tyocT/ftWaGiIHsF3FbfEzbKEL7+y3yN7jxof+v JN+fKwuOIjXI3UuLaHEuqchxVoz6hDXyElVShaR+IJe8BwIvXGc24/CG4WaVjrSHU16l Sh1hF8PTzxnUEZNZdTeD8NRRx1imfGs/Iwd0pGPAv8DLOYwmqF0OJPxe7qE7cbWoGSge V49w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=JXl4tn/U0Kq+i3vhyY4yoBHQJ/s0jx0XIu8doTYzVj4=; b=SUjmTlHWWPfBL//PrJk32RPYKUdOKprnyAVLz2wjvoxVi/wIesyIV1HwV1xY6rItYn ORp+0nR8m7f2KvYzcGVPy0t0eoxATLRVwnuv6TSdEBYyawLrrR6qUY5Yjy136Rqp9TP1 OTO8kpLGREHOfeeEZe1mCN0tIwzZteFoVG6L34AQS2n2SAxmSqOFO2wN63/4fRJKAWzB j92qZMcuKM/6U5xN16XmFWTBeepuhL7X69lf9jK1shYX7a/S+g1si7nvkiSMlKSf+ovk K0I2qt2325fHL1m2iMzOPQ7J4lb3YOVoAl+739o5mnain0Bg8jI5UgoxTVQULdae77na syoQ== X-Gm-Message-State: AOAM5312AW29093r1Kn8W0kqQbb1C0RCWwo7+7FXNTgcRYVukHBuQ1Ie SCHdtV3aAU66s1htyDTlY5KyBq4Qrlt0iFNR7YlF+lUGenA= X-Google-Smtp-Source: ABdhPJy/vIDhNjZG8eiFBxX1MFlYZwZlDMOAqoXAMZkhuePCycpRtZJ+XAengmuuSjwf3qYBorh55U5Yg9wZtlujPiw= X-Received: by 2002:a1f:9d10:0:b0:327:a7e6:3afa with SMTP id g16-20020a1f9d10000000b00327a7e63afamr523961vke.28.1645003152931; Wed, 16 Feb 2022 01:19:12 -0800 (PST) MIME-Version: 1.0 From: Staffan Wiklund Date: Wed, 16 Feb 2022 10:19:02 +0100 Message-ID: Subject: How to use DPDK memif between Docker container and native Linux application? To: users Content-Type: multipart/alternative; boundary="00000000000095be2f05d81f249a" X-BeenThere: users@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK usage discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: users-bounces@dpdk.org --00000000000095be2f05d81f249a Content-Type: text/plain; charset="UTF-8" Hello I wonder if it is possible for a DPDK application using the memif feature to communicate with a native Linux application? I have tried to create a Docker container and start the image by: docker run -ti --privileged -v "/mnt/huge:/mnt/huge" -v "/var/run:/var/run" -v "/tmp:/tmp" -v "/run:/run" -v "/sys:/sys" -v "/dev:/dev" testpmd /bin/bash In this container I start the dpdk-testpmd application in server mode by: ./dpdk-testpmd -l 1-2 --no-pci --proc-type=primary --file-prefix=td1 --vdev=net_memif,role=server,mac=00:00:00:00:00:01 -- -i >From a UNIX shell in the same server I start the dpdk-testpmd in client mode: sudo ./dpdk-testpmd -l 3-4 --no-pci --proc-type=primary --file-prefix=td2 --vdev=net_memif,zero-copy=yes,mac=00:00:00:00:00:02 --single-file-segments -- -i This results in the following error message on the client side: . . . Configuring Port 0 (socket 0) memif_connect_client(): Failed to connect socket: /run/memif.sock. Fail to start port 0 . . . If I start both sides in a UNIX shell, the client can connect to the server. Do you know what can be the fault when executing in a Docker container and in a UNIX shell for communication using the DPDK memif feature? Thanks Staffan --00000000000095be2f05d81f249a Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hello

I wonder if it is = possible for a DPDK application using the memif feature to communicate with= a native Linux application?

I have tried to = create a Docker container and start the image by:
docker run = -ti --privileged -v "/mnt/huge:/mnt/huge" -v=20 "/var/run:/var/run" -v "/tmp:/tmp" -v "/run:/run&q= uot; -v "/sys:/sys" -v=20 "/dev:/dev" testpmd /bin/bash

In this co= ntainer I start the dpdk-testpmd application in server mode by:
./dpdk-testpmd -l 1-2 =C2=A0--no-pci =C2=A0--proc-type=3Dprimary --file-= prefix=3Dtd1 --vdev=3Dnet_memif,role=3Dserver,mac=3D00:00:00:00:00:01 -- -i=

From a UNIX shell in the same server I start the = dpdk-testpmd in client mode:
sudo ./dpdk-testpmd -l 3-4 =C2= =A0--no-pci --proc-type=3Dprimary --file-prefix=3Dtd2 --vdev=3Dnet_memif,ze= ro-copy=3Dyes,mac=3D00:00:00:00:00:02 --single-file-segments -- -i

This results in the following error message on the cl= ient side:
. . .
Configuring Port 0 (socket 0)
memif= _connect_client(): Failed to connect socket: /run/memif.sock.
Fail to st= art port 0
. . .

If I start both= sides in a UNIX shell, the client can connect to the server.
Do you know what can be the fault when executing in a Docker container and= in a UNIX shell for communication using the DPDK memif feature?
<= div>
Thanks
Staffan

--00000000000095be2f05d81f249a--