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 31F02A034C for ; Wed, 20 Jul 2022 10:24:43 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 2C98440697; Wed, 20 Jul 2022 10:24:43 +0200 (CEST) Received: from NAM12-BN8-obe.outbound.protection.outlook.com (mail-bn8nam12on2065.outbound.protection.outlook.com [40.107.237.65]) by mails.dpdk.org (Postfix) with ESMTP id 3C3FB4003C for ; Wed, 20 Jul 2022 10:24:42 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=IU32liExeI7GuGL8+OUH2UKVjZ2WD9xxlr6NJPKTLU8zcg7U1QY21OS7xCYgPqZyygTUdGPowNHlaeM+OQvuVQVFSklnPGzxJPLLy2aUmReWSEx9/1q9ZUc4LvFcXQwSmLYXiTxQBdDscLiMyhIos54Lw+tVanrZCpRev2U78Tjbx5Ur/f8L55Tk07ys9ao9PfJFpfFfr/Zi5ag82ftswyOoF8MHqTX0sikjGHbMyJwBCPHJlcyJyYzjIFvzL/p8U8kWLTvv6NMQNYLJOuNz7mCOC8CJdZvu5L2GtDzmPKP6jDR5D7fDqJN8AfCEbJjumRPeL8z2qtYivn5/yiDFVQ== 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=S+iMondUwkM15E6Qi/vX4QVfYzZeDL5mGSO5fCN4qVM=; b=LuF6d7JwUtOhmJa4g7jG7NcBZjFHo2hC3m4x0PF2TMJCBooF5HCbVyJzl2GyV3e94VdOgoJpSHsP0jq3WMqhMJudTHH6LMaSBkg//8uaasJYrOsoA+Oy1voBg0hzejxG8QRBorQ1j7eD5F08r+iDntY27i9DCX96IlpOSEvbXr6+GrhtlmwqDWDJ2IAdUSAoOm/y07L/rPyqXT0Z7eqBnMREQAOLCyHc+xJhsRDgfHbztXALFFye3IVtXpSov2o845FH4Te6g6AqUXAH94bqdXJJLoSGT91wRG0T3sSwwENCOhfqhj0NFH9f2CAhik13RhUMxfsQ6+6awUjBVrcQvw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 12.22.5.234) smtp.rcpttodomain=dpdk.org smtp.mailfrom=nvidia.com; dmarc=pass (p=reject sp=reject 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=S+iMondUwkM15E6Qi/vX4QVfYzZeDL5mGSO5fCN4qVM=; b=bjdnaQ85YP7fdC22/L48O/UARiUgtZyCTx5vzzJASobqPkbGpeUs5qYWSqGwCdq1FnCarMK1uRcwZKUlY7jO2fqD8SG2p6fw6A1AHVwqS6Nc7sm1y3dx631vONwZconcJmKnGNPL4xDNq7EjLXy+DDOzB1OCzZ6YrIq5LFZJVLLrhONqX4DGXELn84mYpRVgMR9MGhtMEguqTg5nzgg/nKyTz3FTvt9/ifYoRXIPXIlo8gfXnAJN9fXm8nbyQFd8g9HAxjntWKlgZ0nbVrxHJG+Hy+PIRM3vE7h2wgwrWNH30mQuW6JcdS+7n7NYbV1VdXK7zRAPwiW9JEpJ1ZDmuw== Received: from BN8PR16CA0029.namprd16.prod.outlook.com (2603:10b6:408:4c::42) by PH7PR12MB6635.namprd12.prod.outlook.com (2603:10b6:510:210::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5438.23; Wed, 20 Jul 2022 08:24:40 +0000 Received: from BN8NAM11FT037.eop-nam11.prod.protection.outlook.com (2603:10b6:408:4c:cafe::b1) by BN8PR16CA0029.outlook.office365.com (2603:10b6:408:4c::42) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5438.19 via Frontend Transport; Wed, 20 Jul 2022 08:24:40 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 12.22.5.234) smtp.mailfrom=nvidia.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=nvidia.com; Received-SPF: Pass (protection.outlook.com: domain of nvidia.com designates 12.22.5.234 as permitted sender) receiver=protection.outlook.com; client-ip=12.22.5.234; helo=mail.nvidia.com; pr=C Received: from mail.nvidia.com (12.22.5.234) by BN8NAM11FT037.mail.protection.outlook.com (10.13.177.182) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.5458.17 via Frontend Transport; Wed, 20 Jul 2022 08:24:40 +0000 Received: from rnnvmail201.nvidia.com (10.129.68.8) by DRHQMAIL101.nvidia.com (10.27.9.10) with Microsoft SMTP Server (TLS) id 15.0.1497.32; Wed, 20 Jul 2022 08:24:39 +0000 Received: from nvidia.com (10.126.231.35) by rnnvmail201.nvidia.com (10.129.68.8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.26; Wed, 20 Jul 2022 01:24:37 -0700 From: Xueming Li To: Stephen Hemminger CC: , dpdk stable Subject: patch 'net/qede: fix build with GCC 12' has been queued to stable release 20.11.6 Date: Wed, 20 Jul 2022 11:21:00 +0300 Message-ID: <20220720082132.3954126-31-xuemingl@nvidia.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20220720082132.3954126-1-xuemingl@nvidia.com> References: <20220621080301.2315720-1-xuemingl@nvidia.com> <20220720082132.3954126-1-xuemingl@nvidia.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Originating-IP: [10.126.231.35] X-ClientProxiedBy: rnnvmail202.nvidia.com (10.129.68.7) To rnnvmail201.nvidia.com (10.129.68.8) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 3d7aebce-ccff-4cd5-8deb-08da6a294a89 X-MS-TrafficTypeDiagnostic: PH7PR12MB6635:EE_ X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: =?us-ascii?Q?RlHaEcKux2v+hsJdw7Sc1d6Z48YaA9X61RsW9GkTgUkQLS0X3nNwmrTa4OMb?= =?us-ascii?Q?BsF5BoYFcyD6B/wwlsVsmzAWZ/WVO4now9R1MZ8PcipzcIOrf481uebu3Aoy?= =?us-ascii?Q?yjl3N19JBYvVBP58c6Wx+a1ddlfzN6F7xyEPHUIT+lZNr/WzpYXUmeYA4MTa?= =?us-ascii?Q?eqAx/p7L3tDDsX6JRhhbtyzn10gWqDN0ASoy8oz/Y9PgY5v+XVfOYo2OTugJ?= =?us-ascii?Q?WHnMMPJdznGTGM5gxqcD7S+j8HTzjrpSdE68lO56laVY/9UGCVvyTrRVvjIc?= =?us-ascii?Q?2UVnYKNFvK2jcAXj9USm+h7MGIN0llHEnvHLsa6aLfZirQNvFFeU2SlAq5ky?= =?us-ascii?Q?u+IMrsP4wee2BWoJor6RGa5CmfST60edmU85SnJ6eyMGCDphzwiY4QImocZX?= =?us-ascii?Q?EMHpeQnFF6fOBzMrUWS8fz/VefOPHAZUxOR9khcNat+nrfysn6c4qnqqoFvC?= =?us-ascii?Q?RWZ3eKiVOgHby2X3TXSvP86CU59aj4p/y1cPCHqS00drIwxvg/FjcAwTyfuo?= =?us-ascii?Q?vRbMilRRO4sJiGxW43R/HZVVXNLJ5xfP+e4WCCaUPvuxxKV/TiGv5gDkR9xx?= =?us-ascii?Q?XvxVuL5zYWIYyEtnAvPRrvoOVLQhswIrTOpS6/oFPR7iApKolxD4UDOJQalU?= =?us-ascii?Q?PAuxK6nwDpb/RJTxxDLJjVZs23ZuEwDvr0h+1453RH21x44lor7fWkerDu54?= =?us-ascii?Q?b36obfCTr9pcD7b1P+nc8P/aoKCDgmHfIvYFkuVfWyg1LST4yD3AO917yvYs?= =?us-ascii?Q?3zTRWNFBhvXclqc2GsHyxWW02bUfU/zs6O9QDMl25gvgsbNcna2Iq06iGlNu?= =?us-ascii?Q?5TFnFAQqsIoaEOMN+eeqK+8+fr2PaPcThJhaJhtLrZnI9WiYzkqu40YegGgG?= =?us-ascii?Q?qKstpd0dCK0pQen0YexB9A15YtfpWGY9pHSxhU+pvTulWAYE03Tp+SX4SF2S?= =?us-ascii?Q?MwALMhfm951EB+B2uKtpIg=3D=3D?= X-Forefront-Antispam-Report: CIP:12.22.5.234; CTRY:US; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:mail.nvidia.com; PTR:InfoNoRecords; CAT:NONE; SFS:(13230016)(4636009)(396003)(136003)(39860400002)(346002)(376002)(46966006)(36840700001)(40470700004)(6666004)(41300700001)(186003)(966005)(7696005)(336012)(2616005)(1076003)(478600001)(26005)(16526019)(36860700001)(83380400001)(53546011)(356005)(47076005)(81166007)(82740400003)(426003)(6916009)(6286002)(8936002)(5660300002)(2906002)(82310400005)(316002)(36756003)(4326008)(55016003)(40480700001)(86362001)(8676002)(40460700003)(70586007)(54906003)(70206006)(36900700001); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 20 Jul 2022 08:24:40.0422 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 3d7aebce-ccff-4cd5-8deb-08da6a294a89 X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=43083d15-7273-40c1-b7db-39efd9ccc17a; Ip=[12.22.5.234]; Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: BN8NAM11FT037.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH7PR12MB6635 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 20.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 07/22/22. 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/35ab757a023b4399d926e662d40cfb7e9c906b80 Thanks. Xueming Li --- >From 35ab757a023b4399d926e662d40cfb7e9c906b80 Mon Sep 17 00:00:00 2001 From: Stephen Hemminger Date: Tue, 7 Jun 2022 10:17:40 -0700 Subject: [PATCH] net/qede: fix build with GCC 12 Cc: Xueming Li [ upstream commit 4200c4d62586985d70ad69ed7bee526a282b8777 ] The x86 version of rte_memcpy can cause warnings. The driver does not need to use rte_memcpy for everything. Standard memcpy is just as fast and safer; the compiler and static analysis tools treat memcpy specially. Signed-off-by: Stephen Hemminger --- drivers/net/qede/base/bcm_osal.h | 3 +-- drivers/net/qede/qede_ethdev.c | 2 +- drivers/net/qede/qede_filter.c | 16 ++++++---------- drivers/net/qede/qede_main.c | 13 ++++++------- drivers/net/qede/qede_sriov.c | 6 +++--- 5 files changed, 17 insertions(+), 23 deletions(-) diff --git a/drivers/net/qede/base/bcm_osal.h b/drivers/net/qede/base/bcm_osal.h index c5b5399282..9ea579bfc8 100644 --- a/drivers/net/qede/base/bcm_osal.h +++ b/drivers/net/qede/base/bcm_osal.h @@ -14,7 +14,6 @@ #include #include #include -#include #include #include #include @@ -99,7 +98,7 @@ typedef intptr_t osal_int_ptr_t; } while (0) #define OSAL_VFREE(dev, memory) OSAL_FREE(dev, memory) #define OSAL_MEM_ZERO(mem, size) bzero(mem, size) -#define OSAL_MEMCPY(dst, src, size) rte_memcpy(dst, src, size) +#define OSAL_MEMCPY(dst, src, size) memcpy(dst, src, size) #define OSAL_MEMCMP(s1, s2, size) memcmp(s1, s2, size) #define OSAL_MEMSET(dst, val, length) \ memset(dst, val, length) diff --git a/drivers/net/qede/qede_ethdev.c b/drivers/net/qede/qede_ethdev.c index 5570f68b5e..02a1d8945a 100644 --- a/drivers/net/qede/qede_ethdev.c +++ b/drivers/net/qede/qede_ethdev.c @@ -358,7 +358,7 @@ qede_assign_rxtx_handlers(struct rte_eth_dev *dev, bool is_dummy) static void qede_alloc_etherdev(struct qede_dev *qdev, struct qed_dev_eth_info *info) { - rte_memcpy(&qdev->dev_info, info, sizeof(*info)); + qdev->dev_info = *info; qdev->ops = qed_ops; } diff --git a/drivers/net/qede/qede_filter.c b/drivers/net/qede/qede_filter.c index df5c07dfe5..5590b9d214 100644 --- a/drivers/net/qede/qede_filter.c +++ b/drivers/net/qede/qede_filter.c @@ -388,10 +388,8 @@ qede_arfs_construct_pkt(struct rte_eth_dev *eth_dev, ip6->vtc_flow = rte_cpu_to_be_32(QEDE_FDIR_IPV6_DEFAULT_VTC_FLOW); - rte_memcpy(&ip6->src_addr, arfs->tuple.src_ipv6, - IPV6_ADDR_LEN); - rte_memcpy(&ip6->dst_addr, arfs->tuple.dst_ipv6, - IPV6_ADDR_LEN); + memcpy(&ip6->src_addr, arfs->tuple.src_ipv6, IPV6_ADDR_LEN); + memcpy(&ip6->dst_addr, arfs->tuple.dst_ipv6, IPV6_ADDR_LEN); len += sizeof(struct rte_ipv6_hdr); params->ipv6 = true; @@ -821,12 +819,10 @@ qede_flow_parse_pattern(__rte_unused struct rte_eth_dev *dev, const struct rte_flow_item_ipv6 *spec; spec = pattern->spec; - rte_memcpy(flow->entry.tuple.src_ipv6, - spec->hdr.src_addr, - IPV6_ADDR_LEN); - rte_memcpy(flow->entry.tuple.dst_ipv6, - spec->hdr.dst_addr, - IPV6_ADDR_LEN); + memcpy(flow->entry.tuple.src_ipv6, + spec->hdr.src_addr, IPV6_ADDR_LEN); + memcpy(flow->entry.tuple.dst_ipv6, + spec->hdr.dst_addr, IPV6_ADDR_LEN); flow->entry.tuple.eth_proto = RTE_ETHER_TYPE_IPV6; } diff --git a/drivers/net/qede/qede_main.c b/drivers/net/qede/qede_main.c index caa9d1d4f6..e987b1b390 100644 --- a/drivers/net/qede/qede_main.c +++ b/drivers/net/qede/qede_main.c @@ -381,7 +381,7 @@ qed_fill_dev_info(struct ecore_dev *edev, struct qed_dev_info *dev_info) dev_info->mtu = ECORE_LEADING_HWFN(edev)->hw_info.mtu; dev_info->dev_type = edev->type; - rte_memcpy(&dev_info->hw_mac, &edev->hwfns[0].hw_info.hw_mac_addr, + memcpy(&dev_info->hw_mac, &edev->hwfns[0].hw_info.hw_mac_addr, RTE_ETHER_ADDR_LEN); dev_info->fw_major = FW_MAJOR_VERSION; @@ -449,7 +449,7 @@ qed_fill_eth_dev_info(struct ecore_dev *edev, struct qed_dev_eth_info *info) info->num_vlan_filters = RESC_NUM(&edev->hwfns[0], ECORE_VLAN) - max_vf_vlan_filters; - rte_memcpy(&info->port_mac, &edev->hwfns[0].hw_info.hw_mac_addr, + memcpy(&info->port_mac, &edev->hwfns[0].hw_info.hw_mac_addr, RTE_ETHER_ADDR_LEN); } else { ecore_vf_get_num_rxqs(ECORE_LEADING_HWFN(edev), @@ -480,7 +480,7 @@ static void qed_set_name(struct ecore_dev *edev, char name[NAME_SIZE]) { int i; - rte_memcpy(edev->name, name, NAME_SIZE); + memcpy(edev->name, name, NAME_SIZE); for_each_hwfn(edev, i) { snprintf(edev->hwfns[i].name, NAME_SIZE, "%s-%d", name, i); } @@ -522,10 +522,9 @@ static void qed_fill_link(struct ecore_hwfn *hwfn, /* Prepare source inputs */ if (IS_PF(hwfn->p_dev)) { - rte_memcpy(¶ms, ecore_mcp_get_link_params(hwfn), - sizeof(params)); - rte_memcpy(&link, ecore_mcp_get_link_state(hwfn), sizeof(link)); - rte_memcpy(&link_caps, ecore_mcp_get_link_capabilities(hwfn), + memcpy(¶ms, ecore_mcp_get_link_params(hwfn), sizeof(params)); + memcpy(&link, ecore_mcp_get_link_state(hwfn), sizeof(link)); + memcpy(&link_caps, ecore_mcp_get_link_capabilities(hwfn), sizeof(link_caps)); } else { ecore_vf_read_bulletin(hwfn, &change); diff --git a/drivers/net/qede/qede_sriov.c b/drivers/net/qede/qede_sriov.c index 0b99a8d6fe..937d339fb8 100644 --- a/drivers/net/qede/qede_sriov.c +++ b/drivers/net/qede/qede_sriov.c @@ -203,10 +203,10 @@ void qed_inform_vf_link_state(struct ecore_hwfn *hwfn) if (!hwfn->pf_iov_info) return; - rte_memcpy(¶ms, ecore_mcp_get_link_params(lead_hwfn), + memcpy(¶ms, ecore_mcp_get_link_params(lead_hwfn), sizeof(params)); - rte_memcpy(&link, ecore_mcp_get_link_state(lead_hwfn), sizeof(link)); - rte_memcpy(&caps, ecore_mcp_get_link_capabilities(lead_hwfn), + memcpy(&link, ecore_mcp_get_link_state(lead_hwfn), sizeof(link)); + memcpy(&caps, ecore_mcp_get_link_capabilities(lead_hwfn), sizeof(caps)); /* Update bulletin of all future possible VFs with link configuration */ -- 2.35.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2022-07-20 15:01:00.255371531 +0800 +++ 0031-net-qede-fix-build-with-GCC-12.patch 2022-07-20 15:00:58.731000464 +0800 @@ -1 +1 @@ -From 4200c4d62586985d70ad69ed7bee526a282b8777 Mon Sep 17 00:00:00 2001 +From 35ab757a023b4399d926e662d40cfb7e9c906b80 Mon Sep 17 00:00:00 2001 @@ -4,0 +5,3 @@ +Cc: Xueming Li + +[ upstream commit 4200c4d62586985d70ad69ed7bee526a282b8777 ] @@ -11,2 +13,0 @@ -Cc: stable@dpdk.org - @@ -44 +45 @@ -index ea6b71f093..a4923670d6 100644 +index 5570f68b5e..02a1d8945a 100644 @@ -57 +58 @@ -index 440440423a..ca3165d972 100644 +index df5c07dfe5..5590b9d214 100644 @@ -91 +92 @@ -index ad101194d6..03039038ad 100644 +index caa9d1d4f6..e987b1b390 100644 @@ -94 +95 @@ -@@ -372,7 +372,7 @@ qed_fill_dev_info(struct ecore_dev *edev, struct qed_dev_info *dev_info) +@@ -381,7 +381,7 @@ qed_fill_dev_info(struct ecore_dev *edev, struct qed_dev_info *dev_info) @@ -103 +104 @@ -@@ -440,7 +440,7 @@ qed_fill_eth_dev_info(struct ecore_dev *edev, struct qed_dev_eth_info *info) +@@ -449,7 +449,7 @@ qed_fill_eth_dev_info(struct ecore_dev *edev, struct qed_dev_eth_info *info) @@ -112 +113 @@ -@@ -471,7 +471,7 @@ static void qed_set_name(struct ecore_dev *edev, char name[NAME_SIZE]) +@@ -480,7 +480,7 @@ static void qed_set_name(struct ecore_dev *edev, char name[NAME_SIZE]) @@ -121 +122 @@ -@@ -513,10 +513,9 @@ static void qed_fill_link(struct ecore_hwfn *hwfn, +@@ -522,10 +522,9 @@ static void qed_fill_link(struct ecore_hwfn *hwfn,