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 ED6C1A034F for ; Wed, 10 Nov 2021 07:53:51 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id D295D40142; Wed, 10 Nov 2021 07:53:51 +0100 (CET) Received: from NAM02-SN1-obe.outbound.protection.outlook.com (mail-sn1anam02on2065.outbound.protection.outlook.com [40.107.96.65]) by mails.dpdk.org (Postfix) with ESMTP id F138F40142 for ; Wed, 10 Nov 2021 07:53:50 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=dm6Rl9LPhV3a8/y4YIfqSIkCV//qC0WA+4QoJodgl0gusNnBuJyiRAyYgdfb5e8KGFq4SlgAfl0mdoXqRn1tyczQIeso3XCNgLd+9a9uahNZ2rxBEIhb6/kR8uwPHZpurU6ymsZsEZxb3Wa17s9MR6Qlkod3OG83HnVZPpmvXJESrPLR8LLckLBqaiDfM3Ca06+FxdjhPy0iSpf//2GGS+IZIxyvsHrcKhCkkZoxRqIMARtA5OeKwjDwa128STzQ75xVuqRw8FFQUWZz0sW1rurrSJ6EIrmZBZ4/0t2oa/+NnNBcGB0TgsPsUUk5l6XpNEAMJ5XYgN8ub8YYuz8IiA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=GWBiGi7V7zSxSUJ/aAXVgActWW7a+aIE/S7mhNJ1Z6E=; b=YPd0KyGcKlue5tNMJmUlUUVTP6UrO3RmD3eFe21Nn4AaSClJcjARTelFpECnA1hZaq3VnV7FzHck5zD+iY1gP9+u/WO/9JhGS3OYXE9ffbz3Sl4X2GKPGqYipTFHjBd0yD2ZinRkOYEfChx3PbbwO+d06RPC6/hGLjYbXFuEksf+skin7nT+yUqK2TyPWpFa5Wk02776HtpDHFC52hcEUarSAUma9dVt5FpdcTeXwzSo9cuif5NKjoElpaWyeKkn5uapjH7zefb4GHGgvlCmgBJkExXviyxZCNlqpFy5WuBOGVe3JV5tSFbbEla20gj2eJfmsnUPPmwtLbUJ3fcOgg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.112.34) smtp.rcpttodomain=dpdk.org smtp.mailfrom=nvidia.com; dmarc=pass (p=quarantine sp=quarantine pct=100) action=none header.from=nvidia.com; dkim=none (message not signed); arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Nvidia.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=GWBiGi7V7zSxSUJ/aAXVgActWW7a+aIE/S7mhNJ1Z6E=; b=OO1Ua/hafpxjUVyuAVuTztPGVBTLf1AF/XGkLMQ2n9xftW1b20UyXiY209KqZFOKAKtFFXiLXrZrySOurP6zysMx/1h8mHxQm8g4x0nKmoI3gBySbYqOFm/OjJ3zrRRE42czF/25C+7gJpLPOmFZVHdCitO4LHgsCndYb4QCNSgXDaahiHcpYvEweJ+gEL9z3jqO5BMsmD26heLpNWzBtfQTt9l1oVYakxZF3Q1epzDBD19bmWbT7ln5b+nE7WK+CSyqChb6lPZ4hfr6S8wYHsiUUGcQuklMyhMrPW3j92jbFwQ7FeP7qbrFU7at72vA8tM1qsf/a36A6Pp9IBq0uw== Received: from BN8PR07CA0025.namprd07.prod.outlook.com (2603:10b6:408:ac::38) by DM5PR12MB1915.namprd12.prod.outlook.com (2603:10b6:3:10c::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4669.13; Wed, 10 Nov 2021 06:53:49 +0000 Received: from BN8NAM11FT013.eop-nam11.prod.protection.outlook.com (2603:10b6:408:ac:cafe::50) by BN8PR07CA0025.outlook.office365.com (2603:10b6:408:ac::38) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4669.10 via Frontend Transport; Wed, 10 Nov 2021 06:53:49 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 216.228.112.34) smtp.mailfrom=nvidia.com; dpdk.org; dkim=none (message not signed) header.d=none;dpdk.org; dmarc=pass action=none header.from=nvidia.com; Received-SPF: Pass (protection.outlook.com: domain of nvidia.com designates 216.228.112.34 as permitted sender) receiver=protection.outlook.com; client-ip=216.228.112.34; helo=mail.nvidia.com; Received: from mail.nvidia.com (216.228.112.34) by BN8NAM11FT013.mail.protection.outlook.com (10.13.176.182) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.4669.10 via Frontend Transport; Wed, 10 Nov 2021 06:53:48 +0000 Received: from nvidia.com (172.20.187.6) by HQMAIL107.nvidia.com (172.20.187.13) with Microsoft SMTP Server (TLS) id 15.0.1497.18; Wed, 10 Nov 2021 06:53:46 +0000 From: Xueming Li To: Eli Britstein CC: Luca Boccassi , Olivier Matz , dpdk stable Date: Wed, 10 Nov 2021 14:31:14 +0800 Message-ID: <20211110063216.2744012-191-xuemingl@nvidia.com> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20211110063216.2744012-1-xuemingl@nvidia.com> References: <20211110063216.2744012-1-xuemingl@nvidia.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Originating-IP: [172.20.187.6] X-ClientProxiedBy: HQMAIL101.nvidia.com (172.20.187.10) To HQMAIL107.nvidia.com (172.20.187.13) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 23e18e39-7c4b-48ec-7fda-08d9a416d909 X-MS-TrafficTypeDiagnostic: DM5PR12MB1915: X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:1284; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: lIcbvSt3mJVTW7Ks0GcyrHsCheSCwEmlyYXcc5ueelE3+/SwtGX9smsthwM66rQ1JkIRgj7zHuj6VDz3zGZukMtuU2rsAx41/Ii0z6CU6f/eIL/qoCWgq4H6bqFneHumLDTiP0PfDD0ZlZm6dS/lp5tD5ixrmpt/seHaRDGUWyhQutyhxLSltbNE9/rJnJvAONvnXuL29rYh5JaOPK6J8vRcmpvrjas08qKojbpHC/RAnfDRYMwdguXcqUhYS0EFj+H0SoVxeUjl04lNcg/wpwMcrFvvRVFVaki3yD4e2g+UudRcF93uKq5ertCEQTguMJfhNLL7cU/O3GkAluG8/nIkpszvfZKzPlI0Iat/N9cKp4ZyS+5Xwz4On6utPTev9gfu1FE6Bz/sIVwA2FRUxyYQbjzymPnUwaqMNCgqpEJ0kRyyF13Bre4KGv+PUlcKxWnAw8g1v7b5WxX6OVeiYt7PCwNfAzi31W6eacUhl6ZztmD9lO0qj0JGvVSfYGnRmrzSf4SX15jZ+Q5LZrYSZojOIp9+NogGjdd5puh/qZWUzghIdUWi51919LtUsIaEBZFFOmUCTTNPwtIaUjrDTVBXqkSCjpCY+wJGZF0dlkdKrP494pHqId2zk8yqt+bmg5J7LLvAdimxsqzr0kF02/b/1ujONuhHww30y+ZHCcOk1dmvKzGeKFqXxZr85OxiIiWCgUOAhGnZrCOCMhwb26k6nSnvEJjfs1jJwgtScIqW4tLBYfjVR/xcTKia916PTMuMGkLLeJZv/4jKGzL7yeO0s5k/rvf3j4iWcsI1pgfFbXyjPO7hMW30I3FrTZGtt2+E3ydMmDvfDCv2HCdgwA== X-Forefront-Antispam-Report: CIP:216.228.112.34; CTRY:US; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:mail.nvidia.com; PTR:schybrid03.nvidia.com; CAT:NONE; SFS:(4636009)(46966006)(36840700001)(16526019)(6636002)(26005)(4001150100001)(8676002)(47076005)(356005)(53546011)(55016002)(186003)(508600001)(2616005)(83380400001)(54906003)(82310400003)(316002)(70206006)(2906002)(1076003)(36756003)(86362001)(5660300002)(6862004)(426003)(966005)(70586007)(6286002)(7636003)(36860700001)(6666004)(7696005)(4326008)(336012)(36906005)(37006003)(8936002); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 10 Nov 2021 06:53:48.5490 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 23e18e39-7c4b-48ec-7fda-08d9a416d909 X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=43083d15-7273-40c1-b7db-39efd9ccc17a; Ip=[216.228.112.34]; Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: BN8NAM11FT013.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM5PR12MB1915 Subject: [dpdk-stable] patch 'mbuf: avoid cast-align warning in data offset macro' has been queued to stable release 20.11.4 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 Sender: "stable" Hi, FYI, your patch has been queued to stable release 20.11.4 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/12/21. 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/steevenlee/dpdk This queued commit can be viewed at: https://github.com/steevenlee/dpdk/commit/96b6eaffb8c6086988726995aacbb5246a661cec Thanks. Xueming Li --- >From 96b6eaffb8c6086988726995aacbb5246a661cec Mon Sep 17 00:00:00 2001 From: Eli Britstein Date: Thu, 21 Oct 2021 11:51:31 +0300 Subject: [PATCH] mbuf: avoid cast-align warning in data offset macro Cc: Xueming Li [ upstream commit da0333c8790b365c6aa8665888a20253c4166bfe ] In rte_pktmbuf_mtod_offset macro, there is a casting from char * to type 't', which may cause cast-align warning when using strict cast align flag with supporting gcc: gcc (Ubuntu 9.3.0-17ubuntu1~20.04) 9.3.0 CFLAGS="-Wcast-align=strict" make V=1 -C examples/l2fwd clean static main.c: In function 'l2fwd_mac_updating': /dpdk/build/include/rte_mbuf_core.h:719:3: warning: cast increases required alignment of target type [-Wcast-align] 719 | ((t)((char *)(m)->buf_addr + (m)->data_off + (o))) | ^ /dpdk/build/include/rte_mbuf_core.h:733:32: note: in expansion of macro 'rte_pktmbuf_mtod_offset' 733 | #define rte_pktmbuf_mtod(m, t) rte_pktmbuf_mtod_offset(m, t, 0) | ^~~~~~~~~~~~~~~~~~~~~~~ As the code assumes correct alignment, add first a (void *) casting, to avoid the warning. Fixes: af75078fece3 ("first public release") Signed-off-by: Eli Britstein Acked-by: Olivier Matz --- lib/librte_mbuf/rte_mbuf_core.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/librte_mbuf/rte_mbuf_core.h b/lib/librte_mbuf/rte_mbuf_core.h index c26492cf45..93a58d8cd7 100644 --- a/lib/librte_mbuf/rte_mbuf_core.h +++ b/lib/librte_mbuf/rte_mbuf_core.h @@ -719,7 +719,7 @@ struct rte_mbuf_ext_shared_info { * The type to cast the result into. */ #define rte_pktmbuf_mtod_offset(m, t, o) \ - ((t)((char *)(m)->buf_addr + (m)->data_off + (o))) + ((t)(void *)((char *)(m)->buf_addr + (m)->data_off + (o))) /** * A macro that points to the start of the data in the mbuf. -- 2.33.0 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2021-11-10 14:17:10.351487051 +0800 +++ 0190-mbuf-avoid-cast-align-warning-in-data-offset-macro.patch 2021-11-10 14:17:02.000745027 +0800 @@ -1 +1 @@ -From da0333c8790b365c6aa8665888a20253c4166bfe Mon Sep 17 00:00:00 2001 +From 96b6eaffb8c6086988726995aacbb5246a661cec Mon Sep 17 00:00:00 2001 @@ -4,0 +5,3 @@ +Cc: Xueming Li + +[ upstream commit da0333c8790b365c6aa8665888a20253c4166bfe ] @@ -26 +28,0 @@ -Cc: stable@dpdk.org @@ -31 +33 @@ - lib/mbuf/rte_mbuf_core.h | 2 +- + lib/librte_mbuf/rte_mbuf_core.h | 2 +- @@ -34,5 +36,5 @@ -diff --git a/lib/mbuf/rte_mbuf_core.h b/lib/mbuf/rte_mbuf_core.h -index 117a72a134..321a419c71 100644 ---- a/lib/mbuf/rte_mbuf_core.h -+++ b/lib/mbuf/rte_mbuf_core.h -@@ -823,7 +823,7 @@ struct rte_mbuf_ext_shared_info { +diff --git a/lib/librte_mbuf/rte_mbuf_core.h b/lib/librte_mbuf/rte_mbuf_core.h +index c26492cf45..93a58d8cd7 100644 +--- a/lib/librte_mbuf/rte_mbuf_core.h ++++ b/lib/librte_mbuf/rte_mbuf_core.h +@@ -719,7 +719,7 @@ struct rte_mbuf_ext_shared_info {