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 7245A454E9 for ; Tue, 25 Jun 2024 02:00:11 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 6A7FF40EE3; Tue, 25 Jun 2024 02:00:11 +0200 (CEST) Received: from mail-wm1-f49.google.com (mail-wm1-f49.google.com [209.85.128.49]) by mails.dpdk.org (Postfix) with ESMTP id 6AEB2410FC for ; Tue, 25 Jun 2024 02:00:10 +0200 (CEST) Received: by mail-wm1-f49.google.com with SMTP id 5b1f17b1804b1-424a3411edeso37245e9.0 for ; Mon, 24 Jun 2024 17:00:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1719273610; x=1719878410; darn=dpdk.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=a3MSrphxR9wfWncyvnDR8DcRs4poH9XZI7FpswqLahg=; b=a4By7o/lQmMdpXK1vUCFPcJiGS08euu7rURAvheV5crT4O63WjeQZ0q8NglYdFvkdP TAOmSxr1iTsleeq/fZnNhAznwQi7CvUTebtqHIzI5dVZLm1g6eM0xj8PrSC9NPLkkNQ0 eZXblEJt7YqjO12z918Gqxmdxg2KNRo1XKvvkeyI3BpVuk1ZuySWJtKDl/CuzLObO9cj IdKU0YKrAvwmw+fb55GFhH8WB+xbjl0xyLs0Wjc5obdrXc5KCz6+M3qnFeSugwclEaCJ 4i6CgtElH8q27wzWM6Wer1MmDmOsK4iEnNrZnRg4scQt4QdS3gDWjceGzoYVxHmmoVRv uaWA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1719273610; x=1719878410; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=a3MSrphxR9wfWncyvnDR8DcRs4poH9XZI7FpswqLahg=; b=a4FDnvhPFAJFXdBYlS9o7C8phYcxTXDomQR4T5o1qzTrEEWpDGAPJENe5mjKTBShVB EzY4rHVK6NTNhqNPOEcSWPcdS2ArPIc2xJ1Em1Obye1N9sLVOl+Y7eJr8gOoTa9JdiaV Au9hFt51zQOpWnE7zuX0Vs3WIoNOTKTUwL00S5iVHhlzJN9T6t+LAHWu24TSQSbAPfm9 9C+T7p3Dv0flRqsKbrOKbfNWcXvZF9MKyBRpUuYvORxI6TDqtOP8j/13QmOdGskBfKG2 TB849bOsQLb9M/BVSXtA9WKMm159c6eQBCLbynReMvVWzxrt/ox3lIyp76f/iIvUuBV/ oDEw== X-Forwarded-Encrypted: i=1; AJvYcCU8hCjSoO/cx+TOxkpMsBflwFsb0SgQZZilSHhzftDYHGViyH933F8FudSWc1a02sGkGk8zy0OnUpxuIdFqcto= X-Gm-Message-State: AOJu0Yw8i4Kgtdc9TeH2L38PReQhL6a8EmQv0r6QSnHHC+XL/ubmpjqw SxZzy4qJrihXdpkbpap4J8cDAehhxn8zClcShtg2v6XKfMVtrkSIw8rxew== X-Google-Smtp-Source: AGHT+IFVK1eF074ravzmKB+qdww3PyF9YBgVoc3BqL71L6SwURPyogzLP5nl9Ises4q5HKDb+8lWyA== X-Received: by 2002:a05:600c:3541:b0:422:615f:6499 with SMTP id 5b1f17b1804b1-4248cc597d7mr47117465e9.31.1719273610056; Mon, 24 Jun 2024 17:00:10 -0700 (PDT) Received: from localhost ([137.220.120.171]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4247d0c54c9sm192665045e9.27.2024.06.24.17.00.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 24 Jun 2024 17:00:09 -0700 (PDT) From: luca.boccassi@gmail.com To: Ciara Loftus Cc: Stephen Hemminger , Maryam Tahhan , dpdk stable Subject: patch 'net/af_xdp: fix port ID in Rx mbuf' has been queued to stable release 22.11.6 Date: Tue, 25 Jun 2024 00:58:03 +0100 Message-Id: <20240624235907.885628-17-luca.boccassi@gmail.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240624235907.885628-1-luca.boccassi@gmail.com> References: <20240624235907.885628-1-luca.boccassi@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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 22.11.6 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 06/27/24. 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/bluca/dpdk-stable This queued commit can be viewed at: https://github.com/bluca/dpdk-stable/commit/20c39f6a1b472578edc5595d472c4e5416a584eb Thanks. Luca Boccassi --- >From 20c39f6a1b472578edc5595d472c4e5416a584eb Mon Sep 17 00:00:00 2001 From: Ciara Loftus Date: Tue, 14 May 2024 08:41:52 +0000 Subject: [PATCH] net/af_xdp: fix port ID in Rx mbuf [ upstream commit 9bab1d2667aec4942ae1d384671e5148960bd88f ] Record the port id in the af_xdp rx queue structure and use it to set the port id of the mbuf of a received packed. Bugzilla ID: 1428 Fixes: f1debd77efaf ("net/af_xdp: introduce AF_XDP PMD") Reported-by: Stephen Hemminger Signed-off-by: Ciara Loftus Acked-by: Maryam Tahhan Acked-by: Stephen Hemminger --- drivers/net/af_xdp/rte_eth_af_xdp.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/drivers/net/af_xdp/rte_eth_af_xdp.c b/drivers/net/af_xdp/rte_eth_af_xdp.c index 3c976dd6e0..b28418234d 100644 --- a/drivers/net/af_xdp/rte_eth_af_xdp.c +++ b/drivers/net/af_xdp/rte_eth_af_xdp.c @@ -112,6 +112,7 @@ struct pkt_rx_queue { struct xsk_umem_info *umem; struct xsk_socket *xsk; struct rte_mempool *mb_pool; + uint16_t port; struct rx_stats stats; @@ -338,6 +339,7 @@ af_xdp_rx_zc(void *queue, struct rte_mbuf **bufs, uint16_t nb_pkts) bufs[i]->data_off = offset - sizeof(struct rte_mbuf) - rte_pktmbuf_priv_size(umem->mb_pool) - umem->mb_pool->header_size; + bufs[i]->port = rxq->port; rte_pktmbuf_pkt_len(bufs[i]) = len; rte_pktmbuf_data_len(bufs[i]) = len; @@ -404,6 +406,7 @@ af_xdp_rx_cp(void *queue, struct rte_mbuf **bufs, uint16_t nb_pkts) rte_pktmbuf_data_len(mbufs[i]) = len; rx_bytes += len; bufs[i] = mbufs[i]; + bufs[i]->port = rxq->port; } xsk_ring_cons__release(rx, nb_pkts); @@ -1495,6 +1498,8 @@ eth_rx_queue_setup(struct rte_eth_dev *dev, process_private->rxq_xsk_fds[rx_queue_id] = rxq->fds[0].fd; + rxq->port = dev->data->port_id; + dev->data->rx_queues[rx_queue_id] = rxq; return 0; -- 2.39.2 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2024-06-25 00:22:14.610814298 +0100 +++ 0017-net-af_xdp-fix-port-ID-in-Rx-mbuf.patch 2024-06-25 00:22:13.097183855 +0100 @@ -1 +1 @@ -From 9bab1d2667aec4942ae1d384671e5148960bd88f Mon Sep 17 00:00:00 2001 +From 20c39f6a1b472578edc5595d472c4e5416a584eb Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit 9bab1d2667aec4942ae1d384671e5148960bd88f ] + @@ -11 +12,0 @@ -Cc: stable@dpdk.org @@ -22 +23 @@ -index 2d6f64337e..0997543ee5 100644 +index 3c976dd6e0..b28418234d 100644 @@ -25 +26 @@ -@@ -133,6 +133,7 @@ struct pkt_rx_queue { +@@ -112,6 +112,7 @@ struct pkt_rx_queue { @@ -33 +34 @@ -@@ -368,6 +369,7 @@ af_xdp_rx_zc(void *queue, struct rte_mbuf **bufs, uint16_t nb_pkts) +@@ -338,6 +339,7 @@ af_xdp_rx_zc(void *queue, struct rte_mbuf **bufs, uint16_t nb_pkts) @@ -41 +42 @@ -@@ -434,6 +436,7 @@ af_xdp_rx_cp(void *queue, struct rte_mbuf **bufs, uint16_t nb_pkts) +@@ -404,6 +406,7 @@ af_xdp_rx_cp(void *queue, struct rte_mbuf **bufs, uint16_t nb_pkts) @@ -49 +50 @@ -@@ -1813,6 +1816,8 @@ eth_rx_queue_setup(struct rte_eth_dev *dev, +@@ -1495,6 +1498,8 @@ eth_rx_queue_setup(struct rte_eth_dev *dev,