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 30BC2A0C41 for ; Thu, 18 Nov 2021 18:38:22 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 1152840687; Thu, 18 Nov 2021 18:38:22 +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 90C1140395 for ; Thu, 18 Nov 2021 18:38:20 +0100 (CET) Received: by mail-ua1-f51.google.com with SMTP id az37so15337721uab.13 for ; Thu, 18 Nov 2021 09:38:20 -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=gAkYxtFBZVUZmPGaC0DCSs56p1yMgPnYujBmLiW4K3s=; b=aSpjTYXXZG6EDjg0GEzlt+VzziZIMW1Bk9hn+D71aU/b3padhWi7SPbEdsHJ93iWw8 uE/5rCSfKH/Jq5uK1hoKAvxJVbtmQ0osplcP/+Q95iA/fAPQbSiwIINSHS8hw9PLUdpg boq/PmhZf0P8sgKC2nahiJ6UDv9kgjPmSoC6znh0BGZi16DCFrKEUIeaEi0W8CW696Tp uysxxKYeWNwACH6I0yzTppSOj6DFP3pe3cDJoPjYlhuJPf+RWybraoAnasHPj9oD52rQ xGCM+CHuNW+5DEnk8CET7Y/omaslO8RE3wIHF0V7owIMYcj1jvEl9gKdkK4ZCDQ8IPGJ /YmA== 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=gAkYxtFBZVUZmPGaC0DCSs56p1yMgPnYujBmLiW4K3s=; b=DBajc05kLKzvSQONR06E3GsqhuqNu0SCRwmkuGOqxzPt7JEhutXgUWNuA73KPD1ej9 FqB2ELFiKh0qguvjw29GZ7UYEp2HmdGx9Y/GCuQHzuv8FaJERlowFSSPtmzHkFOQa9LB Vne7pEj2sfh5SiqC79etdN60WdsNHci1zvNAVgmZYdmz3t5HjrQoDxLcZJ42UL+JIzrl i7/LmNtOkegKVox0d9ViHoUVHv1WPbqTvf4N5z2erYrpgw0OsLNxfIKetEcNM+dHd8dv M0Y8cbCFOgmrH6lO7pBEqH2btDuV+MC9AgRKgg5MVevZvBVAMvFY6NcjmGiqceu24Z+I GBxQ== X-Gm-Message-State: AOAM533ux+hxcjDAahwvX/cFRik0KB+jsLFfSTWCXKbTivGyJQe7nReV OoSzqjQtM3TdLcCUCnHRqJZ5nHDHJ/hw5lcCnpQ= X-Google-Smtp-Source: ABdhPJyT5GT/82T0spMSwoNDkH3yXH75VU4j6cI1JGvtnK4F8CSqDVoNDIIOET9Zmai5zeHE1a9Q7VJM8LhoeawHf3M= X-Received: by 2002:a05:6102:c4d:: with SMTP id y13mr83385266vss.43.1637257099801; Thu, 18 Nov 2021 09:38:19 -0800 (PST) MIME-Version: 1.0 References: In-Reply-To: From: Cliff Burdick Date: Thu, 18 Nov 2021 09:38:08 -0800 Message-ID: Subject: Re: Can the DPDK multi-process feature be used in Docker containers? To: Staffan Wiklund Cc: Li Feng , users Content-Type: multipart/alternative; boundary="000000000000d7001e05d1139f86" 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 --000000000000d7001e05d1139f86 Content-Type: text/plain; charset="UTF-8" Li, I would suggest pasting your errors. It sounds like a separate issue from Staffan, and I know for sure it works in DPDK (never used SPDK), so I'd be curious to see what the problem is. On Wed, Nov 17, 2021 at 11:13 PM Staffan Wiklund wrote: > Cliff, > > Many thanks for your help! > Mapping /var/run/dpdk into both containers as you said made it possible to > use the multi-process feature in Docker containers. > > Regards > Staffan > > Den tors 18 nov. 2021 kl 07:47 skrev Li Feng : > >> On Thu, Nov 18, 2021 at 2:23 PM Cliff Burdick wrote: >> > >> > 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? >> > >> I'm running the spdk processes, so the hugepage files are created with >> prefix "spdk-", both containers are mounting the same >> /dev/hugepages. >> >> >> > >> > 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 >> >> >> >> >> >> >> > --000000000000d7001e05d1139f86 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Li, I would suggest pasting your errors. It sounds like a = separate issue from Staffan, and I know for sure it works in DPDK (never us= ed SPDK), so I'd be curious to see what the problem is.

On Wed, Nov 17, = 2021 at 11:13 PM Staffan Wiklund <staffan491@gmail.com> wrote:
Cliff,

Many thanks for your help!
Mapping /var/run/dpdk into both conta= iners as you said made it possible to use the multi-process feature in Dock= er containers.

Regards
Staffan

Den tors 18 nov. 2021 kl 07:47 skrev Li Feng <fengli@smartx.com>:
On Thu, Nov 18, 2021 at 2:23 PM= Cliff Burdick <= shaklee3@gmail.com> wrote:
>
> 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?
>
I'm running the spdk processes, so the hugepage files are created with<= br> prefix "spdk-<PID>", both containers are mounting the same<= br> /dev/hugepages.


>
> On Wed, Nov 17, 2021, 22: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 dua= l 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> w= rote:
>> >>
>> >> 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 conta= iner and share its
>> >> DPDK memory with another DPDK application executing in an= other Docker container
>> >> using the DPDK multi-process feature?
>> >>
>> >> For example if the DPDK example mp_server executes in one= Docker container:
>> >> <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= container:
>> >>
>> >> <build_dir>/examples/dpdk-mp_client -l 3 -n 4 --pro= c-type=3Dauto -- -n 0
>> >>
>> >> Is this possible to implement?
>> >>
>> >> Thanks
>> >> Staffan
>> >>
>> >>
--000000000000d7001e05d1139f86--