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 C30B6A0C41 for ; Thu, 18 Nov 2021 07:23:44 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 5F99540687; Thu, 18 Nov 2021 07:23:44 +0100 (CET) Received: from mail-ua1-f51.google.com (mail-ua1-f51.google.com [209.85.222.51]) by mails.dpdk.org (Postfix) with ESMTP id BC7A140395 for ; Thu, 18 Nov 2021 07:23:43 +0100 (CET) Received: by mail-ua1-f51.google.com with SMTP id ay21so11315539uab.12 for ; Wed, 17 Nov 2021 22:23:43 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=vG09hG5HLmePV/mCYp+s6b4wVDZO/6pSLhWiFWMuufs=; b=okMtP6D4twNc0nlqHFMgItQL4glgRMNwLdpsw3Vpw3VCQcxMRPMeKQZ88gzoer9uRV ubkDZ/NZrAv3j+Jiub7D/Awy50Q0Y/ghSNeu7PT1ns6JxZ18am0Jg+T6818O1DNljqHS 8WVISzAEYsxBL/wtv56b+pJ6dH/NvPfl59bSxiCF4O69KpuCdyHtbGCzIX7FXJdXD4cR uK03TWmTx3Uknfeef/7cKeEuU1ZIV7FgbeV6PM2HSxM/WeWXHVxk0+AUfP/sIbMDssOg Al9jlI77nIFknyJ2tRFVpzE485Od6ULaZ1tORCs5ydD8OYBuZuOTvY2N3zx0zrZQhK3t K/+g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=vG09hG5HLmePV/mCYp+s6b4wVDZO/6pSLhWiFWMuufs=; b=zHSLfNFg3sVF82nXutMHK7imsJWvd2++p3nBGas/zT8zmZDTvAjxLbQ+x+4GEYpslZ wuY/A59jtMYeJbOXvgE20S/hQqZ33ZCAmsNSjzARMIGiA9gKJBuMUKvGfn64tM0vsQtR iLCE5OBaD8cvmFqim/GPIWJHcpqNhPcQsen5G6zUAKZM00+Kv+9IxK56lmY3BIQCsWxq oi6FXPYJ+3+7SBPhMGnWvRDEFvu36vr3Dz7b2St3yA+hPXcnzgKPjtriF+d+t2cMMn24 WwBwftzZyKtbyPudGhqE/x+QFn02nWnzxLmp+9p3T7EXHpm3cQPCdNfSVcomFvSouje5 3UQQ== X-Gm-Message-State: AOAM532IsdKXmqO9weYk4RVhQDe+D88dYLVP8yuolsejS8D2bMaXb6b4 urr5kSgw8pk5PQM59af4BCykic2MwlKNTj6agq8= X-Google-Smtp-Source: ABdhPJwQgsnQedx1a8rbayNLtTx91ASJuzi3lneBgOyzS2Cz6o50eSoFC5QvdrExifWSk3FDyCiTSQVlUNqYx17TbuI= X-Received: by 2002:ab0:73d8:: with SMTP id m24mr32250594uaq.19.1637216622996; Wed, 17 Nov 2021 22:23:42 -0800 (PST) MIME-Version: 1.0 References: In-Reply-To: From: Cliff Burdick Date: Wed, 17 Nov 2021 22:23:33 -0800 Message-ID: Subject: Re: Can the DPDK multi-process feature be used in Docker containers? To: Li Feng Cc: Staffan Wiklund , users Content-Type: multipart/alternative; boundary="0000000000003bf2bc05d10a3340" 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 --0000000000003bf2bc05d10a3340 Content-Type: text/plain; charset="UTF-8" I don't remember that being a problem. Are you starting them with two different file prefixes and mounting the hugepages directory into both containers? On Wed, Nov 17, 2021, 22:20 Li Feng wrote: > On Thu, Nov 18, 2021 at 2:11 PM Cliff Burdick wrote: > > > > Yes. Try mapping the dpdk metadata directory (/var/run/dpdk) into both > containers from the host. You should be able to do the normal dual process > methods. > > > By the way, if I want to run two separate dpdk processes in two > different dockers, what should I do? > e.g. Running two processes: examples/dpdk-mp_server > These two dockers have mapped the same /dev/hugepages directories. > I have tested, the dpdk will crash because the hugepages are mixed. > > Thanks. > > > > On Wed, Nov 17, 2021, 05:58 Staffan Wiklund > wrote: > >> > >> Hello > >> > >> I wonder if it is possible to use the DPDK multi-process feature in > Docker containers? > >> > >> That is, can a DPDK application execute in a Docker container and share > its > >> DPDK memory with another DPDK application executing in another Docker > container > >> using the DPDK multi-process feature? > >> > >> For example if the DPDK example mp_server executes in one Docker > container: > >> /examples/dpdk-mp_server -l 1-2 -n 4 -- -p 3 -n 2 > >> > >> and the DPDK example mp_client executes in another Docker container: > >> > >> /examples/dpdk-mp_client -l 3 -n 4 --proc-type=auto -- -n 0 > >> > >> Is this possible to implement? > >> > >> Thanks > >> Staffan > >> > >> > --0000000000003bf2bc05d10a3340 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
I don't remember that being a problem. Are you starti= ng them with two different file prefixes and mounting the hugepages directo= ry into both containers?


On Wed, Nov 17, 2021, 2= 2:20 Li Feng <fengli@smartx.com= > wrote:
On Thu, Nov 18, 2021 at= 2:11 PM Cliff Burdick <shaklee3@gmail.com> wrote:
>
> Yes. Try mapping the dpdk metadata directory (/var/run/dpdk) into both= containers from the host. You should be able to do the normal dual process= methods.
>
By the way, if I want to run two separate dpdk processes in two
different dockers, what should I do?
e.g. Running two processes: examples/dpdk-mp_server
These two dockers have mapped the same /dev/hugepages directories.
I have tested, the dpdk will crash because the hugepages are mixed.

Thanks.
>
> On Wed, Nov 17, 2021, 05:58 Staffan Wiklund <staffan491@gmail.com= > wrote:
>>
>> Hello
>>
>> I wonder if it is possible to use the DPDK multi-process feature i= n Docker containers?
>>
>> That is, can a DPDK application execute in a Docker container and = share its
>> DPDK memory with another DPDK application executing in another Doc= ker container
>> using the DPDK multi-process feature?
>>
>> For example if the DPDK example mp_server executes in one Docker c= ontainer:
>> <build_dir>/examples/dpdk-mp_server -l 1-2 -n 4 -- -p 3 -n 2=
>>
>> and the DPDK example mp_client executes in another Docker containe= r:
>>
>> <build_dir>/examples/dpdk-mp_client -l 3 -n 4 --proc-type=3D= auto -- -n 0
>>
>> Is this possible to implement?
>>
>> Thanks
>> Staffan
>>
>>
--0000000000003bf2bc05d10a3340--