From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <dev-bounces@dpdk.org>
Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124])
	by inbox.dpdk.org (Postfix) with ESMTP id CB366A0C43;
	Mon,  6 Sep 2021 16:02:50 +0200 (CEST)
Received: from [217.70.189.124] (localhost [127.0.0.1])
	by mails.dpdk.org (Postfix) with ESMTP id 430D0410ED;
	Mon,  6 Sep 2021 16:02:50 +0200 (CEST)
Received: from mail-lf1-f41.google.com (mail-lf1-f41.google.com
 [209.85.167.41])
 by mails.dpdk.org (Postfix) with ESMTP id 538B1410E9;
 Mon,  6 Sep 2021 16:02:48 +0200 (CEST)
Received: by mail-lf1-f41.google.com with SMTP id bq28so13706868lfb.7;
 Mon, 06 Sep 2021 07:02:48 -0700 (PDT)
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=LSo6JDLsQwxP8McwSg0PgwVw1mlfjag3OhJOu3T3CK4=;
 b=WQ3RnpdUPKkJZtR6hnav/l8MgJL7ZVVy9DamZaAAruD/dw5vVhKenkBPnk9ClFM5VO
 Geg9rExyAZp/kPcsmFERHbdSQSFctUQT8y73YGgA/hFTCLZpCceYwxy5brHI9hUdQ1ph
 ESw3SgKJ06e0H1Zk/oND5WsoV9Nx8b3bd/TPNorycLRQA6wRsbdXgefVpq2KUBzmACJF
 jywIyz+SjpcmgHcIGQMrqMPvIRGdXMtAHYowks40a4GqF5GWmjH1a/QaI3uZwzyr24KD
 yOeldoFqB5Iiwq8Ysg9ideS+Gduffm1qSXW9Cal9p+WgIDCA/txJnePMrzfYCKHTXH0h
 LAMQ==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20161025;
 h=x-gm-message-state:mime-version:references:in-reply-to:from:date
 :message-id:subject:to:cc;
 bh=LSo6JDLsQwxP8McwSg0PgwVw1mlfjag3OhJOu3T3CK4=;
 b=Y+Wlm9V4rLEkudkm+fDyicivFmLWjN5gZzoBOD+HyorFOQbDkNOo3PvcHY0pk6hxDU
 sWS18lVQIjZu2hojIEAjMB6kVqaZ+K7J693NfCwng2nxdMtloo1T0RAfJaul5RQxMeH0
 97VYUwlW8WicAXVwf4zlMdYYGhrUElSkKzDY7kvQIB3F5QLUtSZcyoyg42GONH8xCk2S
 CZyqEoU//PsnBJituwuwYLROpC5ExiXVs00fDK1ntqTU1NH8c+fZEmFd4uQht+CmcnyD
 km12iZEBk5yHlh6HAdn+G2CR3MwX8J61NfvQ4t/cJv6cyF0IqRX8q+Vx7A4o8DWk2dug
 r8Kg==
X-Gm-Message-State: AOAM530V4mul++KVlNuYWL5On7RVBSZ2zj+6abps+qEDWaYXzLHxlDYm
 s+y6F6qxRTsicsJk5hLuWT6i+t3/ceDI9dxam9E=
X-Google-Smtp-Source: ABdhPJzI2Sof3LE+lSW4MoUGAGTmhoaW8n21MsDN/joWt5n3PNB7liK7G8g7DEwH94GiLL4/n5jAOJ+lwOgA/wMxglY=
X-Received: by 2002:a05:6512:ba3:: with SMTP id
 b35mr9872381lfv.510.1630936967631; 
 Mon, 06 Sep 2021 07:02:47 -0700 (PDT)
MIME-Version: 1.0
References: <CAG8PAarTj04Mywxf3ZQbHLkqb0sw0TqMTr_ndx6OgKcZqtu_Hw@mail.gmail.com>
 <YS6Gjo75srOUXt40@bricha3-MOBL.ger.corp.intel.com>
 <CAG8PAapB0GWwwwY5_oihK9YBRFHB9dRQkAXkzyLYALfDjBCvDA@mail.gmail.com>
 <7447482.grEccaFACA@thomas>
 <CAG8PAarFqbpPW5BGYZ9O8=h_22HnOhLv4TnaKs7VyHLR8Vm54A@mail.gmail.com>
In-Reply-To: <CAG8PAarFqbpPW5BGYZ9O8=h_22HnOhLv4TnaKs7VyHLR8Vm54A@mail.gmail.com>
From: Kamaraj P <pkamaraj@gmail.com>
Date: Mon, 6 Sep 2021 19:32:36 +0530
Message-ID: <CAG8PAaoetZmi3=uzeEMpGEmngVEPZMB=HB_p7HHQG-3Yb=v6=A@mail.gmail.com>
To: Thomas Monjalon <thomas@monjalon.net>
Cc: Bruce Richardson <bruce.richardson@intel.com>,
 David Marchand <david.marchand@redhat.com>, 
 dev <dev@dpdk.org>, Anatoly Burakov <anatoly.burakov@intel.com>, 
 Ferruh Yigit <ferruh.yigit@intel.com>, ksimha@cisco.com, kalas@cisco.com, 
 seveluch@cisco.com, "techboard@dpdk.org" <techboard@dpdk.org>, hpai@cisco.com,
 ppitchai@cisco.com, 
 Aaron Conole <aconole@redhat.com>, "Kamaraj P (kamp)" <kamp@cisco.com>,
 jchhapek@cisco.com
Content-Type: text/plain; charset="UTF-8"
X-Content-Filtered-By: Mailman/MimeDel 2.1.29
Subject: Re: [dpdk-dev] Running DPDK application with non-previlege mode
X-BeenThere: dev@dpdk.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: DPDK patches and discussions <dev.dpdk.org>
List-Unsubscribe: <https://mails.dpdk.org/options/dev>,
 <mailto:dev-request@dpdk.org?subject=unsubscribe>
List-Archive: <http://mails.dpdk.org/archives/dev/>
List-Post: <mailto:dev@dpdk.org>
List-Help: <mailto:dev-request@dpdk.org?subject=help>
List-Subscribe: <https://mails.dpdk.org/listinfo/dev>,
 <mailto:dev-request@dpdk.org?subject=subscribe>
Errors-To: dev-bounces@dpdk.org
Sender: "dev" <dev-bounces@dpdk.org>

Hi Thomas/Antoly,

We have tried with the below capability to start a DPDK application as a
container.
--cap-add=NET_ADMIN --cap-add=SYS_RESOURCE  --cap-add=SYS_NICE

Still We could see the failures when rte_eali_init() ..

09-06-2021  10:48:37.423583 EAL: NUMA is not supported.
*09-06-2021  10:48:37.423895 EAL: alloc_seg(): get_mempolicy: Function not
implemented  ==> Does this sound like virtual memory is not enough in the
running system (because of NUMA not supported )?*
09-06-2021  10:48:37.423910 EAL: Ask a virtual area of 0x200000 bytes
09-06-2021  10:48:37.423919 EAL: Virtual area found at 0x2200200000 (size =
0x200000)
09-06-2021  10:48:37.423933 EAL: attempted to allocate 1 segments, but only
0 were allocated
09-06-2021  10:48:37.423945 EAL: NUMA is not supported.
*09-06-2021  10:48:37.427811 EAL: alloc_seg(): mmap() failed: Cannot
allocate memory ==>  SYS_RESOURCE would suffice here ?*
09-06-2021  10:48:37.427821 EAL: Ask a virtual area of 0x40000000 bytes
09-06-2021  10:48:37.427829 EAL: Virtual area found at 0x140000000 (size =
0x40000000)
09-06-2021  10:48:37.427839 EAL: attempted to allocate 1 segments, but only
0 were allocated
09-06-2021  10:48:37.427847 EAL: error allocating rte services array
09-06-2021  10:48:37.427869 EAL: rte_service_init() failed


As for the dpdk options when bringing up our application,
--log-level=*:8
--lcores=(0-1)@0
--in-memory
-d/usr/lib64/dpdk-19/librte_pmd_ixgbe.so.20.0
-d/usr/lib64/dpdk-19/librte_pmd_e1000.so.20.0
-d/usr/lib64/dpdk-19/librte_pmd_bnxt.so.20.0
--vdev=net_af_packet0,iface=dpbr_100
--vdev=net_af_packet1,iface=asac-in
--vdev=net_af_packet2,iface=asac-out
*--iova-mode=va  ==> will valid here ?*

Would assume some of the flags were not enough to run DPDK on top of our
environment ? Any memory configuration which needs to be checked for the
underlying system ?
Please share your thoughts.

Thanks,
Kamaraj

On Sun, Sep 5, 2021 at 10:24 PM Kamaraj P <pkamaraj@gmail.com> wrote:

> Hello Thomas,
> THanks for the suggestion.
> Yes. Our DPDK application already has an in-memory option.
> BTW we are not using a multi-process environment for our DPDK application.
>
> Thanks,
> Kamaraj
>
>
> On Wed, Sep 1, 2021 at 11:23 PM Thomas Monjalon <thomas@monjalon.net>
> wrote:
>
>> 01/09/2021 18:09, Kamaraj P:
>> > Thanks Bruce.
>> >
>> > BTW we are trying to run our application as docker container.
>> > We may need to pass the parameters(system capability) along with docker
>> > command line to mount the hugepages ?
>> > Like this :
>> https://github.com/usnistgov/ndn-dpdk/blob/main/docs/Docker.md
>> >
>> > Please share your thoughts.
>>
>> The easiest is to run with --in-memory option.
>>
>> If you really want the hugetlb files (for multi-process),
>> use such docker option:
>> --mount type=bind,src=/dev/hugepages,dst=/dev/hugepages
>>
>>
>>
>>