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 07EFC454E8 for ; Tue, 25 Jun 2024 01:59:59 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 03C37410F2; Tue, 25 Jun 2024 01:59:59 +0200 (CEST) Received: from mail-wm1-f41.google.com (mail-wm1-f41.google.com [209.85.128.41]) by mails.dpdk.org (Postfix) with ESMTP id 49583400EF for ; Tue, 25 Jun 2024 01:59:58 +0200 (CEST) Received: by mail-wm1-f41.google.com with SMTP id 5b1f17b1804b1-4217926991fso43479645e9.3 for ; Mon, 24 Jun 2024 16:59:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1719273598; x=1719878398; 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=XYUASMTjmM0KGY8aPDQcs5T/vw8oadFHXHnBU0NLc9A=; b=fF+zC3pIDMbO+2ITmE9QDd87uezLHkie+HwanEW5BRbMQqfYNEe48gdyFFs9GE97j5 crGT963qqn+yh3mwxpVoVS3DpmLODS7SYpi0jfBwCEefxgMnqpsAF4Qlx0GeWZZzuqVB H7gsXyvugjQei+TzDi1DQ4x9ycMnPWIbRPEjZm2QJD3xhK6TLx0h0wjPt1qQdvu8bQ7r Lt8Aty/HkllVVX2mQPq0YRK8CFGiC7Em+FjSe0PRZJIUXUkn+9be9QPK5Ui6wZyVEcN+ UK7zfdk0gyJiYps1JmqZnEpqcAAsoR1PpAjLxMRiRXmcWIwe+mDUFDWxwM33S6QIrBSR rcQA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1719273598; x=1719878398; 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=XYUASMTjmM0KGY8aPDQcs5T/vw8oadFHXHnBU0NLc9A=; b=W8qF4yQaot+r3M1rhVU8Hu89Rl4m9jhK9HsGtQEfGYIyYRfQ194w1h1XnLFsbcBhBS RxXWRyshbjqePEtBItKSiqfoQNkwkzeo9P7vDSM76k05Du0g0HhMBqUK6pexWIP6udGX HR96tdkrr49MqVLnITHZOE4Q5Yw51haKmuTtgw36Gup5oxFZsX8xUqE7YcKRUCY/VFDU 86hQyj5cd3tCNVC0p8o01ZLqMazcNeJnZwjk7Zy9I19Gn2qM5xhd6XGzXRVoNRPbrKIL UItROrvJ4lZNj1H/OWyMXPGTsGeJhBeoUJrjURS2uahwUyhi9rFZ4yZtEF2M2Z+8vo4k xaGA== X-Forwarded-Encrypted: i=1; AJvYcCXm2xS1vsnyx9AXCK4T+yFEhDOXOGR3MMeK5VFE5l83G4qEXi+GfgPiY2yeJL1MiXoq63pGW6YN24XdALU6biU= X-Gm-Message-State: AOJu0YxvubcI9wI29C2DFVGsSrkrdMAqYUm+TyrQC0aeXZ7z5zcL3tDM Ji1VvpYfKqsa0VJGAwev/WMTto9Nq8A89T4jpsf3W3pNhnGlhn9t X-Google-Smtp-Source: AGHT+IG9kLf5xjiukwKNQl2fxSSO/hDvwETHR/n9HnrzgXQWl2rqLtFd5uW73Do/1jq0QUa7uQ83bA== X-Received: by 2002:a05:600c:54c1:b0:421:8445:4f8d with SMTP id 5b1f17b1804b1-4248b9ebc64mr49611895e9.38.1719273597878; Mon, 24 Jun 2024 16:59:57 -0700 (PDT) Received: from localhost ([137.220.120.171]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-424817a9f11sm148489935e9.18.2024.06.24.16.59.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 24 Jun 2024 16:59:57 -0700 (PDT) From: luca.boccassi@gmail.com To: =?UTF-8?q?Mattias=20R=C3=B6nnblom?= Cc: =?UTF-8?q?Morten=20Br=C3=B8rup?= , Stephen Hemminger , Tyler Retzlaff , dpdk stable Subject: patch 'net/af_packet: align Rx/Tx structs to cache line' has been queued to stable release 22.11.6 Date: Tue, 25 Jun 2024 00:58:01 +0100 Message-Id: <20240624235907.885628-15-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-Type: text/plain; charset=UTF-8 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/a7e4b44736fb43bf7a6d228df2fe7b6ca4ea7f36 Thanks. Luca Boccassi --- >From a7e4b44736fb43bf7a6d228df2fe7b6ca4ea7f36 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mattias=20R=C3=B6nnblom?= 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 Reviewed-by: Morten Brørup Acked-by: Stephen Hemminger Acked-by: Tyler Retzlaff --- 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 397a32db58..6b7b16f348 100644 --- a/drivers/net/af_packet/rte_eth_af_packet.c +++ b/drivers/net/af_packet/rte_eth_af_packet.c @@ -6,6 +6,7 @@ * All rights reserved. */ +#include #include #include #include @@ -39,7 +40,7 @@ #define DFLT_FRAME_SIZE (1 << 11) #define DFLT_FRAME_COUNT (1 << 9) -struct pkt_rx_queue { +struct __rte_cache_aligned pkt_rx_queue { int sockfd; struct iovec *rd; @@ -55,7 +56,7 @@ struct pkt_rx_queue { volatile unsigned long rx_bytes; }; -struct pkt_tx_queue { +struct __rte_cache_aligned pkt_tx_queue { int sockfd; unsigned int frame_data_size; -- 2.39.2 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2024-06-25 00:22:14.475409131 +0100 +++ 0015-net-af_packet-align-Rx-Tx-structs-to-cache-line.patch 2024-06-25 00:22:13.093183774 +0100 @@ -1 +1 @@ -From c7a2ce0c1b1bb526304f8875f68cab78f5a5d42c Mon Sep 17 00:00:00 2001 +From a7e4b44736fb43bf7a6d228df2fe7b6ca4ea7f36 Mon Sep 17 00:00:00 2001 @@ -8,0 +9,2 @@ +[ upstream commit c7a2ce0c1b1bb526304f8875f68cab78f5a5d42c ] + @@ -20 +21,0 @@ -Cc: stable@dpdk.org