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 D1C42A0C41; Thu, 16 Sep 2021 07:13:07 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 5A4EB4003F; Thu, 16 Sep 2021 07:13:07 +0200 (CEST) Received: from mail-lf1-f46.google.com (mail-lf1-f46.google.com [209.85.167.46]) by mails.dpdk.org (Postfix) with ESMTP id 75A594003C for ; Thu, 16 Sep 2021 07:13:06 +0200 (CEST) Received: by mail-lf1-f46.google.com with SMTP id x27so13596012lfu.5 for ; Wed, 15 Sep 2021 22:13:06 -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=ryU2E9KqmAJtlu5kuYNjq8mMwtjdjS26/Y5wpx+Wq/I=; b=SHh1k7w4bqQ8wQFSP9wOMWUdWLI7WVUBfCLgxouONKcpk0m1sdqWJ/9COFjYaOD0bT Qrdr7x7m/hwxe5edlc34JAtLU7XMOm41l94eyj6Mffdm7vgvIMAV/78lzixs+T/J93Sa oyztJcduDPh8AkBl8ahagEdXJB8/Hx0Gam0dU5mOqapkQF2sO8A+DI2WV3Xttuno5CbC ZUI0dE61vfdRVT+gxFFNNeHzGkhK5Xg2a7qFWOK3tZnxMMUQDNpXzY9MVR7Hjder+vdn Fhh1EMd65VmJvNuyocy62TmVw9mk27wyitzSnUegHEF/gzkMnIaiWSAMxPhfbiWNRZke uO6A== 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=ryU2E9KqmAJtlu5kuYNjq8mMwtjdjS26/Y5wpx+Wq/I=; b=YkoEutH0VaxaEHmsTOjGGKNgQsaiz2RAd4HgL4DShbVDJDotZlgm4yRhIss6hslrA4 wo/Itr3vDSKGXAVRdwCUkI5J76AV2G9xydOPjogQdM/KvgGcm12KihNU3hKH/Vm5GqUs mjZbUF2wGCcwAFant/GvRLjgPKY4rK1K1bdATRqxi23HVoR3AKOPWO1o9WS+3rWzjj9F KK1uSG6Xslfku1n3T4NNQnhufXULCc/xBURUz9dfKmM26tA0vLTfpz7P2myowSfY6Ewn 6WM/3pcwKFfbQbLUKvGZ+N5vvs1Ot+HGjzTiJd/BRLrWnEVZILx1ULw3WT8gF0c4eqgi g9Ug== X-Gm-Message-State: AOAM531ZxPH5jKkgtE5ag1wB5panbC/ktOg1KKUzLSlsKu2fVNiRrB0r GHKiMNnsrtb8ZMlD7vmJuReoExKNJGLc6fTYLBM= X-Google-Smtp-Source: ABdhPJx0uJA8NAeadyQmNI0a4SVPdaVnsGK+V/7/19Eaw9/Ob4Lr3RwHKJ5hf8s93myHczkmNmrVFGB4hGkuphdSMok= X-Received: by 2002:a05:6512:ba2:: with SMTP id b34mr2713397lfv.510.1631769185888; Wed, 15 Sep 2021 22:13:05 -0700 (PDT) MIME-Version: 1.0 References: <2a936b73-9935-6cd9-6d05-780d2f28982f@intel.com> <20210913085104.064bcc39@hermes.local> In-Reply-To: From: Kamaraj P Date: Thu, 16 Sep 2021 10:42:54 +0530 Message-ID: To: Lance Richardson Cc: Stephen Hemminger , Ferruh Yigit , dev , "Burakov, Anatoly" Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.29 Subject: Re: [dpdk-dev] DPDK Max Mbuf Allocation X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Hello All, Thank you for the clarification. Is there any guildliness(readme) that can be added as part of each release notes. This would help us to align our DPDK upgrade in our product. Thanks again for your support Thanks, Kamaraj On Tue, Sep 14, 2021 at 7:35 AM Lance Richardson < lance.richardson@broadcom.com> wrote: > On Mon, Sep 13, 2021 at 11:51 AM Stephen Hemminger > wrote: > > > > On Mon, 13 Sep 2021 16:43:18 +0100 > > Ferruh Yigit wrote: > > > > > On 9/13/2021 5:56 AM, Kamaraj P wrote: > > > > Hello All, > > > > > > > > Would like to understand or if there are any guidelines to allocate > the max > > > > no of mbuf per NIC ? > > > > For example, if i have defined as below: > > > > #define RX_RING_SIZE 1024 > > > > #define TX_RING_SIZE 1024 > > > > > > > > The Maximum RX/TX queues can be defined as 8 per NIC, What would be > the max > > > > no of mbuf can be allocated per NIC ? > > > > Please share if there is any guildliness or any limitation to > increase the > > > > mbuf ? > > > > > > > > > > Hi Kamaraj, > > > > > > Max number of the queues and max number of the descriptors per queue > depends to > > > HW and changes form HW to HW. > > > This information is shared by the PMDs that application needs to take > into > > > account. For example the descriptor limitations are provided by > > > 'rx_desc_lim'/'tx_desc_lim' etc. > > > > > > After descriptor number is defined, testpmd uses the mbuf count as > following, > > > which can be taken as sample: > > > > > > nb_mbuf_per_pool = RTE_TEST_RX_DESC_MAX + RTE_TEST_TX_DESC_MAX + > MAX_PKT_BURST + > > > (nb_lcores * mb_mempool_cache); > > > > > > > It is a a little more complicated since some devices (like bnxt) allocate > > multiple mbuf's per packet. Something like > > +1, and it's worth noting that this makes it difficult to run many > sample applications > on the bnxt PMD. > > > > > nb_mbuf_per_pool = MAX_RX_QUEUES * (RTE_TEST_RX_DESC_MAX * MBUF_PER_RX > + MBUF_PER_Q) > > + MAX_TX_QUEUE * RTE_TEST_TX_DESC_MAX * MBUF_PER_TX > > + nb_lcores * MAX_PKT_BURST > > + nb_lcores * mb_mempool_cache > > + nb_lcores * PKTMBUF_POOL_RESERVED; > > > > Ended up with > > MBUF_PER_RX = 3 > > For releases up to around 20.11, 3 is the correct value (one mbuf per RX > ring entry, two mbufs in each aggregation ring per RX ring entry). > Currently > the value for MBUF_PER_RX would be 5 (four mbufs in each aggregation > ring for each RX ring entry). BTW, a future version will avoid populating > aggregation rings with mbufs when LRO or scattered receive are not > enabled. > > > MBUF_PER_Q = 6 > > Hmm, it's not clear where these would be allocated in the bnxt PMD. It > seems to me that MBUF_PER_Q is zero for the bnxt PMD. > > > and when using jumbo > > MBUF_PER_TX = MAX_MTU / MBUF_DATA_SIZE = 2 > > I don't think this is correct... the bnxt PMD allocates TX descriptor rings > with the requested number of descriptors from tx_queue_setup(), this is > the maximum number of mbufs that can be present in a TX ring. > > > > > > > > > > > >