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 8B6E9A0C4A for ; Tue, 13 Jul 2021 08:49:38 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 63C42411D8; Tue, 13 Jul 2021 08:49:38 +0200 (CEST) Received: from NAM10-BN7-obe.outbound.protection.outlook.com (mail-bn7nam10on2087.outbound.protection.outlook.com [40.107.92.87]) by mails.dpdk.org (Postfix) with ESMTP id DAACD411DC; Tue, 13 Jul 2021 08:49:36 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=SUOPu7WG3wZRZlPuAh1n7elFEYSgez9iGsp7wEJCFhFKgrFkjwcpsnD8YBl2RNJoGqrVm8tphZuwnwEnoNdEkfXipYzYl7yEI7XJHtP9zYF3E7KxI8oe59m6veFlxmCKo3QEQ1pLcc+xSBBYiQ2zbJLvXWVHdKTDggNu18Bq7Eig/iMijLwXT++rmJP7WcbwGsNIOG9qeB1aynTcfleku9NZvCP1QjUft9O0XYNOLjJFx6Z07VqrQOgriHKVxCZGQnfzqVPUNBuuPV5iOEELWp/FWqs01zNUMVpV1cBQK72izL2tfD74Kn2yX0JTlbgY4p9HgGqqfsADm4w4KMUxSg== 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-SenderADCheck; bh=JSFfT3sBVG2+qhB1huBUNaFIWkLnlv8b6g1bbKS9MGQ=; b=KccdTVqnLC3O5UirVnK7uaLDYt6+4we8lq0v+zadETRXrPkxF/CSDBTfZo1F1d9Vu2nabNasoMgOA+Xmvq1NRvaiDtkXVJFPVjB0umiK4nl1A0eH8vfQiBvluCNgqX86PP2DXelDjNRzLCiTzDUJ0G7nsdeOUyKqf0jx/CLHXr3JUz7qKKG6fl/V9HXPoTx8BwR2xJhRMWMBNlfK4nofJYWsNpZ3i32Im/WvkoQ7KW3g1c22twg4nH4Q2m/k6iZ8s/ZLkCRvpp25YVmM/8ylHsx1hqJKPaWJX6y+coSm/h1ROqV0tH+rSh/3N+JeWInjzV7GWYIsFB3K2rpWfnXBbw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.112.34) smtp.rcpttodomain=intel.com smtp.mailfrom=nvidia.com; dmarc=pass (p=none sp=none 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=JSFfT3sBVG2+qhB1huBUNaFIWkLnlv8b6g1bbKS9MGQ=; b=ZKtROOKr6rtu+VQ4x+FB1xgriyAW75sHiYMTeZ/mjY45zpio7p0tjJYkJex7B6uInzndifLL3VAe7RRNqqmxbVsYHICHNECbWO2k8h5hqmZtDFgp9eUoyMO+ODMTQzy3Y3LcaHcxVVFhKdn02MXPUaul3kUlhucznY24p6f1auLTnkKoImcNwZddwVIeuD9H+4PkhL0rhURH64Ctf0Ay4nsnKy6F8w3UJ4zoZcuesbAZVXCfH7dIclYXPQ6txWz3rG1Jv+cBXieoZrhNsknX8ywzcSICkjVGi3pMc6cRU2zWP3zlEQqHwyGEGuBqsSxTrgXt7bLxRwEZCuZ83OaKrw== Received: from DS7PR03CA0280.namprd03.prod.outlook.com (2603:10b6:5:3ad::15) by MWHPR12MB1407.namprd12.prod.outlook.com (2603:10b6:300:15::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4308.21; Tue, 13 Jul 2021 06:49:35 +0000 Received: from DM6NAM11FT024.eop-nam11.prod.protection.outlook.com (2603:10b6:5:3ad:cafe::8e) by DS7PR03CA0280.outlook.office365.com (2603:10b6:5:3ad::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4308.20 via Frontend Transport; Tue, 13 Jul 2021 06:49:35 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 216.228.112.34) smtp.mailfrom=nvidia.com; intel.com; dkim=none (message not signed) header.d=none;intel.com; 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 DM6NAM11FT024.mail.protection.outlook.com (10.13.172.159) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.4308.20 via Frontend Transport; Tue, 13 Jul 2021 06:49:35 +0000 Received: from nvidia.com (172.20.187.5) by HQMAIL107.nvidia.com (172.20.187.13) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Tue, 13 Jul 2021 06:49:31 +0000 From: Eli Britstein To: CC: Ilya Maximets , Gaetan Rivet , Majd Dibbiny , Asaf Penso , "Thomas Monjalon" , Harry Van Haaren , Date: Tue, 13 Jul 2021 09:49:09 +0300 Message-ID: <20210713064910.12793-3-elibr@nvidia.com> X-Mailer: git-send-email 2.18.1 In-Reply-To: <20210713064910.12793-1-elibr@nvidia.com> References: <20210713064910.12793-1-elibr@nvidia.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [172.20.187.5] X-ClientProxiedBy: HQMAIL107.nvidia.com (172.20.187.13) To HQMAIL107.nvidia.com (172.20.187.13) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 2c5bccb7-3cad-4f86-45c5-08d945ca607c X-MS-TrafficTypeDiagnostic: MWHPR12MB1407: X-LD-Processed: 43083d15-7273-40c1-b7db-39efd9ccc17a,ExtAddr X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:6108; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: pI9xyR0KnKJBfBPUO9zDgrRSmP0gIjUc5FtBco14htR5eoFEfCIui6smZpd8ceeZG985pj543FexglbIsopP+k2TUYayIn2D0j73DmMfunav2aWfh4NcS/S1ZWufVDMXkot+zqkUV+J3SUn2jTX1oq9WViv0f4+UMvyjR6y1Y2djONO6DjRfvwxbfmkwYbafRhiDbqlcuqtaFq0gawGmwOGmn0K/hDpRsJrw0LhN9WHaW2mvS7z7BQAv5vMDAd6CXk+ToXWf+nePcbs0GvP1mdUZ/khQrYuoITDD65eVe1dfVxCD5PfP+JJ4DeYWXCqcJ8XkfUeqQl0D2dSBlZw+5oCNZXjDoJH0ySf04msdSftBH8gxRdPV7B0FV65WNXUj5F80hE5hDZPdHLAQhub+ZsBfEHHTmw68VtfK4mwCZ3Ye3cl0z+Xv1EZocclrkuMfPKO0FsmDMiWsnnCy1jHKBHP4itwxRmSOkD5Pk6V2ApB+WWhThbIH3q3TC9MMR6Ekc+vKOCwq4buoy3L5BQW6QZvFrJeofCnSqITTXtjZlEbfrCtOLEXmNebKI9aaPDIfl6enJ7LafXurMnWd3CjdV5NawBYp2oaRIPtYvJnYJYIhhl1rDHisvVh2ndej6fwKszLx+C6U0FuLMtQ7HQHPwXPwSku0LMX6NcVTJ7P1Bzk/hyxAuISvmQk0+j1dJssAJ+AHqZdy98lsg3uBVyWmZ6jovuVP9rVnDK0xH9RgPwc= 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)(376002)(396003)(346002)(136003)(39860400002)(46966006)(36840700001)(82740400003)(36860700001)(7696005)(34020700004)(6286002)(6916009)(36906005)(82310400003)(316002)(5660300002)(47076005)(7636003)(36756003)(70206006)(70586007)(8936002)(356005)(186003)(16526019)(6666004)(4326008)(1076003)(2906002)(336012)(8676002)(55016002)(2616005)(83380400001)(426003)(26005)(86362001)(478600001)(54906003); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 13 Jul 2021 06:49:35.2953 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 2c5bccb7-3cad-4f86-45c5-08d945ca607c 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: DM6NAM11FT024.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: MWHPR12MB1407 Subject: [dpdk-stable] [PATCH 2/3] mbuf: avoid cast-align warning in pktmbuf mtod offset macro 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" In rte_pktmbuf_mtod_offset macro, there is a casting from char * to type 't', which may cause cast-align warning when using gcc flags '-Werror -Wcast-align': .../include/rte_mbuf_core.h:723:3: error: cast increases required alignment of target type [-Werror=cast-align] 723 | ((t)((char *)(m)->buf_addr + (m)->data_off + (o))) | ^ As the code assumes correct alignment, add first a (void *) casting, to avoid the warning. Fixes: af75078fece3 ("first public release") Cc: stable@dpdk.org Signed-off-by: Eli Britstein --- lib/mbuf/rte_mbuf_core.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/mbuf/rte_mbuf_core.h b/lib/mbuf/rte_mbuf_core.h index bb38d7f581..dabdeee604 100644 --- a/lib/mbuf/rte_mbuf_core.h +++ b/lib/mbuf/rte_mbuf_core.h @@ -720,7 +720,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.28.0.2311.g225365fb51