From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 2D5D6A0093; Thu, 21 May 2020 12:19:13 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id ADA581D64B; Thu, 21 May 2020 12:19:12 +0200 (CEST) Received: from mail-il1-f195.google.com (mail-il1-f195.google.com [209.85.166.195]) by dpdk.org (Postfix) with ESMTP id E5FE81C20E for ; Thu, 21 May 2020 12:19:10 +0200 (CEST) Received: by mail-il1-f195.google.com with SMTP id y17so4318686ilg.0 for ; Thu, 21 May 2020 03:19:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=NjSOXb5Qf4kyJ9ULYcOYPx36xeJf8eoZunjRE25JDg0=; b=OcfjWz+ffcJsWHBReet+zWE74ociLxa5K0Oc1HXu8PudmTEjDSGQiGr3MFdWtoyYMr KmmUPRnWh9yIl03YT0VTHtXatVUEToC7kmiPWlvaozENEJ9BubvGVC60j4y5+g9BZXuP hAkSeMH6FxjF+REtDy0XvDpJCe8VA68KfThq9Zd67LfgKh9YGTfjGn0C+RnbTnTssWCJ SmTcjuE9gAd6F3m1ltZsQioIR6ma/iKf1ttpLqb0Y93T15qV+Kv0/iLrFuC6q7b7KO2E iZxaPmtr27mKEv8MTErRPB4rLzwM/papVKuZMZVRLqMgXk/n/L1Uu6xaR4a0uPtByDnz l47Q== 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=NjSOXb5Qf4kyJ9ULYcOYPx36xeJf8eoZunjRE25JDg0=; b=LZpw5du9eic/HbyuzopguQU9zU/i3NkGJxUKAXDVEOVmS8/1stDo+SPExMdNiEeWJQ BggQSHoesfnrolPSBFOEGh6ibliZyWC5bFS3/5SjunRf6PncGctyBFLSNaI8aTrzjdHg 5nl3Ea93Pi2w/rXnMwoHRn3/46u0oqV8nLEVCHuTDYDZcyD3zfdpXcNNenBEOFsMuX8B 1Mqek4lJWLhKOKlT0JxWhTU6VSxFUt/p9K5PnSI/SDqsNrCSUw+2nfCzuArS3zxdE/BH A2MhbZ/Zm45XQ2R3ek8K5X6QG3wshvdkV5BnZKSWsLh2iXK7mieAglNKUhAw+DopWff2 oIHA== X-Gm-Message-State: AOAM531tOoV5ggy6F6aXZ4kX+Bq3txKDjftE5ZQpwQidRL5vSshc/BfQ vw93P4RvrB+AZuOoEUh7wpDXreO/hiFnS+aacH4= X-Google-Smtp-Source: ABdhPJwW1td0OpctUu4U4Ees573tZqf2+fnfH9M3obdXcpueIUw5RAaZGCbJvON6O9hPnu8cV0ZATL+I9qfpUktofUA= X-Received: by 2002:a05:6e02:689:: with SMTP id o9mr8056745ils.294.1590056350092; Thu, 21 May 2020 03:19:10 -0700 (PDT) MIME-Version: 1.0 References: <1589977210-31046-1-git-send-email-adwivedi@marvell.com> In-Reply-To: <1589977210-31046-1-git-send-email-adwivedi@marvell.com> From: Jerin Jacob Date: Thu, 21 May 2020 15:48:54 +0530 Message-ID: To: Ankur Dwivedi , Ferruh Yigit Cc: dpdk-dev , Jerin Jacob , Nithin Dabilpuram , Kiran Kumar K Content-Type: text/plain; charset="UTF-8" Subject: Re: [dpdk-dev] [PATCH] net/octeontx2: fix buffer size assignment X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 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" On Wed, May 20, 2020 at 5:51 PM Ankur Dwivedi wrote: > > The elt_size field in mempool holds the size of one packet buffer. > It can be used to set the lpm_sizem1 field in rq context. > > The lpb_sizem1 field in rq context is 12 bit, direct assignment > to it was causing overflow of value. Because of this errors > were observed while trying inline inbound with large packets. > This patch resolves the errors. > > Fixes: 094fc8a3a1e2 ("net/octeontx2: add Rx queue setup and release") Cc: stable@dpdk.org > > Signed-off-by: Ankur Dwivedi > Reviewed-by: Nithin Kumar Dabilpuram > Reviewed-by: Jerin Jacob Kollanukkaran Fixed the name and Applied to dpdk-next-net-mrvl/master. Thanks > --- > drivers/net/octeontx2/otx2_ethdev.c | 5 +---- > 1 file changed, 1 insertion(+), 4 deletions(-) > > diff --git a/drivers/net/octeontx2/otx2_ethdev.c b/drivers/net/octeontx2/otx2_ethdev.c > index 3116e5c..3f3f0a6 100644 > --- a/drivers/net/octeontx2/otx2_ethdev.c > +++ b/drivers/net/octeontx2/otx2_ethdev.c > @@ -373,10 +373,7 @@ > aq->rq.first_skip = first_skip; > aq->rq.later_skip = (sizeof(struct rte_mbuf) / 8); > aq->rq.flow_tagw = 32; /* 32-bits */ > - aq->rq.lpb_sizem1 = rte_pktmbuf_data_room_size(mp); > - aq->rq.lpb_sizem1 += rte_pktmbuf_priv_size(mp); > - aq->rq.lpb_sizem1 += sizeof(struct rte_mbuf); > - aq->rq.lpb_sizem1 /= 8; > + aq->rq.lpb_sizem1 = mp->elt_size / 8; > aq->rq.lpb_sizem1 -= 1; /* Expressed in size minus one */ > aq->rq.ena = 1; > aq->rq.pb_caching = 0x2; /* First cache aligned block to LLC */ > -- > 1.9.3 >