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 2BA2AA00BE for ; Wed, 16 Feb 2022 19:46:43 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id AA4B040150; Wed, 16 Feb 2022 19:46:42 +0100 (CET) Received: from mail-pf1-f170.google.com (mail-pf1-f170.google.com [209.85.210.170]) by mails.dpdk.org (Postfix) with ESMTP id 1B56340042 for ; Wed, 16 Feb 2022 19:46:41 +0100 (CET) Received: by mail-pf1-f170.google.com with SMTP id i6so2848597pfc.9 for ; Wed, 16 Feb 2022 10:46:41 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20210112.gappssmtp.com; s=20210112; h=date:from:to:cc:subject:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=0c+VtGXdEu+SquU9GqWoyBqt0+6DuGS6HDYTZhT0sSU=; b=D4M1LgvcQaA8N3uiJ9HwTqVEVHphDhJtVTan7vKMcjJiFsATgy8Xkp8auSm1FY2a+S ddcltyql0S7NPwh0iMPYHGImuGcIfGiu5KiEL650y6EQkrdUplkNMkF1NhSh97gr9mNn wwmxQsTFumdK4+jEJoc+a1p/3sqcMaA0MGY/pREffHZLxaHRsMuBj5hlQjNfda7lXpf7 kdrAQJBX9+lNDIslGUqEMhO1mgqihaq5n08ZEdfs3a1eHelYb+ftm4sH9edUDHY7+vWx 0WQno0Ed1pNX2+MaNcvNRZSc78fcgbFs56rd2IuoDQv3/Wk9FeXiZYft+gzmpmHvTiFn 9h2g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=0c+VtGXdEu+SquU9GqWoyBqt0+6DuGS6HDYTZhT0sSU=; b=LDBSmveTwvSXPo7hJp0eGgPmPxbKt5mStMbBhI2R0Qg0zTPpPSoHykHrt76/sgs9/1 Hu6SgRrS6s4GIOU/taq2PYO3G0Pd9ZmKbB1kyg3IhzWWtsgTozc50ssAqShoAGqD58PE gKAje5/RFs37N7JUR3icjqzwswOJuJByxK3IFq+SLsEi/I+fK/Xi0iOIGUpodSaa8UWk qHSrAUOKB4Z23CGYPJ0gi7jUA5erSTF94vAIV26Ui3KkXaX4xW0AltROoKEA/amPT/4u L+DwnlIdOq90SIZgeIcKsqEVXxrh+L/nz/ASUHbhCPbdQm0rfWEaLvuIAMSM9Bl73/MV a9Kg== X-Gm-Message-State: AOAM533xWaGvDNnK7CbcnGMF/6QG1dSy5T3U27F7J0pFVGTd9qv73kEx 44SvN/bTR7g/CBeM+Qt1e/67vA== X-Google-Smtp-Source: ABdhPJzz3HG+hGshJYAjLkNfxyQjcFPpzRZNL0S7uJSH0aMDBUbnDa3cgMP9fWOxp4MwUwFotiNxWQ== X-Received: by 2002:a63:2a95:0:b0:361:7967:5043 with SMTP id q143-20020a632a95000000b0036179675043mr3409027pgq.119.1645037200012; Wed, 16 Feb 2022 10:46:40 -0800 (PST) Received: from hermes.local (204-195-112-199.wavecable.com. [204.195.112.199]) by smtp.gmail.com with ESMTPSA id q13sm2954384pfl.210.2022.02.16.10.46.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 16 Feb 2022 10:46:39 -0800 (PST) Date: Wed, 16 Feb 2022 10:46:37 -0800 From: Stephen Hemminger To: Staffan Wiklund Cc: users Subject: Re: How to use DPDK memif between Docker container and native Linux application? Message-ID: <20220216104637.4632aa3b@hermes.local> In-Reply-To: References: MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit 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 On Wed, 16 Feb 2022 10:19:02 +0100 Staffan Wiklund wrote: > 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 The docker container is in a different filesystem namespace so the two can't talk to each other. You might get it to work with the abstract option to memif.