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 DCA12A0542 for ; Fri, 11 Nov 2022 11:34:56 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id D791640150; Fri, 11 Nov 2022 11:34:56 +0100 (CET) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by mails.dpdk.org (Postfix) with ESMTP id 7338D40150 for ; Fri, 11 Nov 2022 11:34:54 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1668162893; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=YBSLYJGVIFGmzyrnIhKzIx3qK0EE99ljJwo1F3ir7K8=; b=Nk9t5WiSVSzh28ntKQARpp9FXbids3KFEYOIl/Ln67w0WZ4M9FoDpzHO40VTVSAjnhYNrf Wt559duzuJ7ZOa93gPozGgcJdiMLfMHGFyfsQMADx0WZEMAxOhMGrH3INrLk3D44a5X8tn tNr2dsB7jVKyZlMGvNubbCXimjdipAw= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-67-jeSM1rNFPY-eTlRijAlO0g-1; Fri, 11 Nov 2022 05:34:52 -0500 X-MC-Unique: jeSM1rNFPY-eTlRijAlO0g-1 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.rdu2.redhat.com [10.11.54.4]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 3F1B5185A792; Fri, 11 Nov 2022 10:34:52 +0000 (UTC) Received: from rh.redhat.com (unknown [10.39.195.104]) by smtp.corp.redhat.com (Postfix) with ESMTP id 7A0052022EA2; Fri, 11 Nov 2022 10:34:51 +0000 (UTC) From: Kevin Traynor To: Nithin Dabilpuram Cc: dpdk stable Subject: patch 'net/cnxk: fix later skip to include mbuf private data' has been queued to stable release 21.11.3 Date: Fri, 11 Nov 2022 10:33:22 +0000 Message-Id: <20221111103337.307408-32-ktraynor@redhat.com> In-Reply-To: <20221111103337.307408-1-ktraynor@redhat.com> References: <20221111103337.307408-1-ktraynor@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.4 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset="US-ASCII"; x-default=true X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org Hi, FYI, your patch has been queued to stable release 21.11.3 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 11/14/22. So please shout if anyone has objections. Also note that after the patch there's a diff of the upstream commit vs the patch applied to the branch. This will indicate if there was any rebasing needed to apply to the stable branch. If there were code changes for rebasing (ie: not only metadata diffs), please double check that the rebase was correctly done. Queued patches are on a temporary branch at: https://github.com/kevintraynor/dpdk-stable This queued commit can be viewed at: https://github.com/kevintraynor/dpdk-stable/commit/0f3f7b9de14880c4a988baddb33ffb0145adcf1b Thanks. Kevin --- >From 0f3f7b9de14880c4a988baddb33ffb0145adcf1b Mon Sep 17 00:00:00 2001 From: Nithin Dabilpuram Date: Fri, 14 Oct 2022 11:13:07 +0530 Subject: [PATCH] net/cnxk: fix later skip to include mbuf private data [ upstream commit 480b03be9d052e77d0b81c2ff174bedf20e48aa7 ] Fix later skip to include mbuf priv data as mbuf->buf_addr is populated based on calculation including per-mbuf priv area. Fixes: 706eeae60757 ("net/cnxk: add multi-segment Rx for CN10K") Signed-off-by: Nithin Dabilpuram --- drivers/net/cnxk/cn10k_rx.h | 4 +++- drivers/net/cnxk/cnxk_ethdev.c | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/net/cnxk/cn10k_rx.h b/drivers/net/cnxk/cn10k_rx.h index 5806392322..034e95186b 100644 --- a/drivers/net/cnxk/cn10k_rx.h +++ b/drivers/net/cnxk/cn10k_rx.h @@ -245,4 +245,5 @@ nix_cqe_xtract_mseg(const union nix_rx_parse_u *rx, struct rte_mbuf *mbuf, { const rte_iova_t *iova_list; + uint16_t later_skip = 0; struct rte_mbuf *head; const rte_iova_t *eol; @@ -271,8 +272,9 @@ nix_cqe_xtract_mseg(const union nix_rx_parse_u *rx, struct rte_mbuf *mbuf, rearm = rearm & ~0xFFFF; + later_skip = (uintptr_t)mbuf->buf_addr - (uintptr_t)mbuf; head = mbuf; while (nb_segs) { - mbuf->next = ((struct rte_mbuf *)*iova_list) - 1; + mbuf->next = (struct rte_mbuf *)(*iova_list - later_skip); mbuf = mbuf->next; diff --git a/drivers/net/cnxk/cnxk_ethdev.c b/drivers/net/cnxk/cnxk_ethdev.c index a1da90be57..8ba35ac36f 100644 --- a/drivers/net/cnxk/cnxk_ethdev.c +++ b/drivers/net/cnxk/cnxk_ethdev.c @@ -568,5 +568,5 @@ cnxk_nix_rx_queue_setup(struct rte_eth_dev *eth_dev, uint16_t qid, first_skip += rte_pktmbuf_priv_size(mp); rq->first_skip = first_skip; - rq->later_skip = sizeof(struct rte_mbuf); + rq->later_skip = sizeof(struct rte_mbuf) + rte_pktmbuf_priv_size(mp); rq->lpb_size = mp->elt_size; -- 2.38.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2022-11-11 10:32:17.836128856 +0000 +++ 0032-net-cnxk-fix-later-skip-to-include-mbuf-private-data.patch 2022-11-11 10:32:17.093300845 +0000 @@ -1 +1 @@ -From 480b03be9d052e77d0b81c2ff174bedf20e48aa7 Mon Sep 17 00:00:00 2001 +From 0f3f7b9de14880c4a988baddb33ffb0145adcf1b Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit 480b03be9d052e77d0b81c2ff174bedf20e48aa7 ] + @@ -10 +11,0 @@ -Cc: stable@dpdk.org @@ -19 +20 @@ -index 46488d442e..cf390a0361 100644 +index 5806392322..034e95186b 100644 @@ -22 +23 @@ -@@ -683,4 +683,5 @@ nix_cqe_xtract_mseg(const union nix_rx_parse_u *rx, struct rte_mbuf *mbuf, +@@ -245,4 +245,5 @@ nix_cqe_xtract_mseg(const union nix_rx_parse_u *rx, struct rte_mbuf *mbuf, @@ -28 +29 @@ -@@ -721,8 +722,9 @@ nix_cqe_xtract_mseg(const union nix_rx_parse_u *rx, struct rte_mbuf *mbuf, +@@ -271,8 +272,9 @@ nix_cqe_xtract_mseg(const union nix_rx_parse_u *rx, struct rte_mbuf *mbuf, @@ -40 +41 @@ -index 71c3f1666b..bf1585fe67 100644 +index a1da90be57..8ba35ac36f 100644 @@ -43,2 +44,2 @@ -@@ -681,5 +681,5 @@ cnxk_nix_rx_queue_setup(struct rte_eth_dev *eth_dev, uint16_t qid, - first_skip += rte_pktmbuf_priv_size(lpb_pool); +@@ -568,5 +568,5 @@ cnxk_nix_rx_queue_setup(struct rte_eth_dev *eth_dev, uint16_t qid, + first_skip += rte_pktmbuf_priv_size(mp); @@ -48,2 +49,2 @@ - rq->lpb_size = lpb_pool->elt_size; - if (roc_errata_nix_no_meta_aura()) + rq->lpb_size = mp->elt_size; +