patch 'net/af_packet: align Rx/Tx structs to cache line' has been queued to stable release 21.11.8
Kevin Traynor
ktraynor at redhat.com
Fri Aug 23 18:17:20 CEST 2024
Hi,
FYI, your patch has been queued to stable release 21.11.8
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 08/28/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/kevintraynor/dpdk-stable
This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable/commit/858c31a50101ef9e5812c2717ab860890295fe52
Thanks.
Kevin
---
>From 858c31a50101ef9e5812c2717ab860890295fe52 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Mattias=20R=C3=B6nnblom?= <mattias.ronnblom at ericsson.com>
Date: Fri, 26 Apr 2024 11:05:02 +0200
Subject: [PATCH] net/af_packet: align Rx/Tx structs to cache line
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
[ upstream commit c7a2ce0c1b1bb526304f8875f68cab78f5a5d42c ]
Cache align Rx and Tx queue struct to avoid false sharing.
The RX struct happens to be 64 bytes on x86_64 already, so cache
alignment has no effect there, but it does on 32-bit ISAs.
The TX struct is 56 bytes on x86_64.
Both structs keep counters, and in the RX case they are updated even
for empty polls.
Fixes: 364e08f2bbc0 ("af_packet: add PMD for AF_PACKET-based virtual devices")
Signed-off-by: Mattias Rönnblom <mattias.ronnblom at ericsson.com>
Reviewed-by: Morten Brørup <mb at smartsharesystems.com>
Acked-by: Stephen Hemminger <stephen at networkplumber.org>
Acked-by: Tyler Retzlaff <roretzla at linux.microsoft.com>
---
drivers/net/af_packet/rte_eth_af_packet.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/drivers/net/af_packet/rte_eth_af_packet.c b/drivers/net/af_packet/rte_eth_af_packet.c
index 88cdc7ee2e..164597d767 100644
--- a/drivers/net/af_packet/rte_eth_af_packet.c
+++ b/drivers/net/af_packet/rte_eth_af_packet.c
@@ -7,4 +7,5 @@
*/
+#include <rte_common.h>
#include <rte_string_fns.h>
#include <rte_mbuf.h>
@@ -39,5 +40,5 @@
#define DFLT_FRAME_COUNT (1 << 9)
-struct pkt_rx_queue {
+struct __rte_cache_aligned pkt_rx_queue {
int sockfd;
@@ -55,5 +56,5 @@ struct pkt_rx_queue {
};
-struct pkt_tx_queue {
+struct __rte_cache_aligned pkt_tx_queue {
int sockfd;
unsigned int frame_data_size;
--
2.46.0
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2024-08-23 17:18:10.383819571 +0100
+++ 0012-net-af_packet-align-Rx-Tx-structs-to-cache-line.patch 2024-08-23 17:18:09.626429777 +0100
@@ -1 +1 @@
-From c7a2ce0c1b1bb526304f8875f68cab78f5a5d42c Mon Sep 17 00:00:00 2001
+From 858c31a50101ef9e5812c2717ab860890295fe52 Mon Sep 17 00:00:00 2001
@@ -8,0 +9,2 @@
+[ upstream commit c7a2ce0c1b1bb526304f8875f68cab78f5a5d42c ]
+
@@ -20 +21,0 @@
-Cc: stable at dpdk.org
@@ -31 +32 @@
-index 397a32db58..6b7b16f348 100644
+index 88cdc7ee2e..164597d767 100644
@@ -40 +41 @@
-@@ -40,5 +41,5 @@
+@@ -39,5 +40,5 @@
@@ -47 +48 @@
-@@ -56,5 +57,5 @@ struct pkt_rx_queue {
+@@ -55,5 +56,5 @@ struct pkt_rx_queue {
More information about the stable
mailing list