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 54AE445C13; Wed, 30 Oct 2024 11:55:29 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 9F373433D1; Wed, 30 Oct 2024 11:55:21 +0100 (CET) Received: from NAM10-DM6-obe.outbound.protection.outlook.com (mail-dm6nam10on2058.outbound.protection.outlook.com [40.107.93.58]) by mails.dpdk.org (Postfix) with ESMTP id 9DDBA433D1 for ; Wed, 30 Oct 2024 11:55:20 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=ScxYdtvdCRXP7I0BNKfklJEGKF1u/iZU0jYGaSNOdnA7TgJIbs3Nma/WLERJmEPBtfZqMNHHBSL4GbnSWXWrlRiwwI9+PoqLFdOSrq6int0bxUJMPMXBYoMLgjiKcXNSLtyahAoagbPIk+6RNvni5aityAI+sfFXOXHtnLrR8tOJEvXeCb3Mk76i+gxzGz7e/ulUn3iZpMzpvJt7v1Q7ljqoZ3gdztvkJw9DaE3IGT7EiavzE6PWU/IafvRNB/oI/LCVfcZ9CHKTB+NodFHNRz+3yIttDw4tKahDQofh9QQuSj+8wsHSUf/SgRom31o6pr1I2SaEsfHAYgg7yH1OrQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; 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=SQsWZ224NozDVyBqX3Du7IEnRxUv2w/Xjhk+L6bgsco=; b=wmNyc6Gl/gK2kniLf6ZQKHvThFuynEgUfd+MAHOPEGwv+nrOz5u8RZRiQDg3GRY6eF+psCsqq9WlclQxEViYtUcp063BNg0IkSkA9l2rBaieCcL+SRHYQamjZFLECnKh8ScCsrLS1XyeBw4xSPLxjCWF/A0z7/VoCS9fS9MpERsK9zJiI1Ks0ifat/k8TZJ/z5zVBbd6QAqVl0jX3CE3AwK73gU+kW7lcOR+aXyCJoEW94T8kvCyZMQaz4CkNdN8HDT0gZwkN+A7jP777OyjIc+mYVzGXOAHlIr2RQe8vcMvULsTO/j+X0yzhrlmr2Be7p6ncCLNQOnYxZqhzz4gVg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.117.161) 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 (0) 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=SQsWZ224NozDVyBqX3Du7IEnRxUv2w/Xjhk+L6bgsco=; b=GNp9jNaIpiH6mVOkXMI14cwy+0x7MnM6psRd+dGfOjt8bxXojwmEMiGbmDP82CnAEsSGJ07E54UQ0J4pLcFamPongfgBhPDGuu4UelF4OdDyPz/n/adpA7JBgdeqmjO+tjL6n4QkW/d3CrNFH18P9wdXgaHtK83fQuQHRUPI60TrF+D1be0DjbFBhYdV8OfikAsKMof50V/lcgzcOticoDGr7p+K8rA0R3cvaKi7sqEoybWwFw/WfBPlMosfUl7nCsECJRzyQa+HiI2VRvoQ83gIZGQq74pecuznSrlZvDtleMt7zIXvoHT8VFD6N0QHrCXCD68pDPUPMzevsp3Vfw== Received: from MN2PR10CA0009.namprd10.prod.outlook.com (2603:10b6:208:120::22) by SA1PR12MB5657.namprd12.prod.outlook.com (2603:10b6:806:234::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8093.25; Wed, 30 Oct 2024 10:55:17 +0000 Received: from MN1PEPF0000ECDA.namprd02.prod.outlook.com (2603:10b6:208:120:cafe::db) by MN2PR10CA0009.outlook.office365.com (2603:10b6:208:120::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8114.17 via Frontend Transport; Wed, 30 Oct 2024 10:55:17 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 216.228.117.161) 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 216.228.117.161 as permitted sender) receiver=protection.outlook.com; client-ip=216.228.117.161; helo=mail.nvidia.com; pr=C Received: from mail.nvidia.com (216.228.117.161) by MN1PEPF0000ECDA.mail.protection.outlook.com (10.167.242.134) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8114.16 via Frontend Transport; Wed, 30 Oct 2024 10:55:16 +0000 Received: from rnnvmail201.nvidia.com (10.129.68.8) by mail.nvidia.com (10.129.200.67) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1544.4; Wed, 30 Oct 2024 03:54:55 -0700 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.1544.4; Wed, 30 Oct 2024 03:54:53 -0700 From: Dariusz Sosnowski To: Raslan Darawsheh , Viacheslav Ovsiienko , Bing Zhao , Ori Kam , Suanming Mou , Matan Azrad , Gregory Etelson CC: Subject: [PATCH 3/3] net/mlx5: fix stub for HWS context validation Date: Wed, 30 Oct 2024 11:54:12 +0100 Message-ID: <20241030105412.482107-4-dsosnowski@nvidia.com> X-Mailer: git-send-email 2.39.5 In-Reply-To: <20241030105412.482107-1-dsosnowski@nvidia.com> References: <20241030105412.482107-1-dsosnowski@nvidia.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Originating-IP: [10.126.231.35] X-ClientProxiedBy: rnnvmail201.nvidia.com (10.129.68.8) To rnnvmail201.nvidia.com (10.129.68.8) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: MN1PEPF0000ECDA:EE_|SA1PR12MB5657:EE_ X-MS-Office365-Filtering-Correlation-Id: aa432c16-a8f2-461f-1dc9-08dcf8d156f6 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; ARA:13230040|82310400026|36860700013|1800799024|376014; X-Microsoft-Antispam-Message-Info: =?us-ascii?Q?jEaN/bNMy5S/STldsM13w1FtubD0rW7dNJN//7U4xge7Gmoq7xiUjTLPAfv+?= =?us-ascii?Q?PE6pIzpgH+xPkLz3PaGTjGC+yO5AFH8zJl5BO0alL/unHrqQnpzyluZg80UR?= =?us-ascii?Q?dbcDVF+Px3MnBOyl+xJZO6fMkEDFelgnsGX8dCZn6txyuqRWZQnZ41YZaMI8?= =?us-ascii?Q?KT6HB0TY2anDEvI2jMkzTqs178tD/EotFlqH1AvqahUfAANzDuCPJqa4JhO2?= =?us-ascii?Q?E52/tT4fYm/Dkyu4hbm+3Zcrg03ZRuedFyr/igRrl17ITRkVgidOyOoHgneg?= =?us-ascii?Q?ShqKTUjqXGGSwx1sujZbj4glDamqUkcizxAC9nhK5jfyqljOiWS3+KJQ46g3?= =?us-ascii?Q?f5AM6Ns6OFGNB3hSsU8V8X0Fqg3eXypMG40rJJxhM3a3oEzrwrj9ECxY8Ozh?= =?us-ascii?Q?Lu4MyKKhokAePuXPqgAPBc3XkmZ5nw5LSb+fpxwhh/e0z7HoOdLohtQF5A0S?= =?us-ascii?Q?V212uFXg8u7S7VqvIAwA55QsFDEOHRCTpNWpCcCJr50yhbRonC2+gLIyaJe0?= =?us-ascii?Q?6mn5A1kkm8s1Kr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D?= X-Forefront-Antispam-Report: CIP:216.228.117.161; CTRY:US; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:mail.nvidia.com; PTR:dc6edge2.nvidia.com; CAT:NONE; SFS:(13230040)(82310400026)(36860700013)(1800799024)(376014); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 30 Oct 2024 10:55:16.8559 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: aa432c16-a8f2-461f-1dc9-08dcf8d156f6 X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=43083d15-7273-40c1-b7db-39efd9ccc17a; Ip=[216.228.117.161]; Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: MN1PEPF0000ECDA.namprd02.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: SA1PR12MB5657 X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Since weak symbols are not supported on MinGW, move mlx5_hw_ctx_validate() to dedicated stubs file. Fixes: f3b76d541a25 ("net/mlx5: validate HWS context in meter operations") Signed-off-by: Dariusz Sosnowski --- drivers/net/mlx5/mlx5_flow.c | 7 ------- drivers/net/mlx5/mlx5_flow_hw_stubs.c | 12 ++++++++++++ 2 files changed, 12 insertions(+), 7 deletions(-) diff --git a/drivers/net/mlx5/mlx5_flow.c b/drivers/net/mlx5/mlx5_flow.c index bfe757ec26..9c43201e05 100644 --- a/drivers/net/mlx5/mlx5_flow.c +++ b/drivers/net/mlx5/mlx5_flow.c @@ -12321,10 +12321,3 @@ mlx5_ctrl_flow_uc_dmac_vlan_exists(struct rte_eth_dev *dev, } return exists; } - -__rte_weak bool -mlx5_hw_ctx_validate(__rte_unused const struct rte_eth_dev *dev, - __rte_unused struct rte_flow_error *error) -{ - return false; -} diff --git a/drivers/net/mlx5/mlx5_flow_hw_stubs.c b/drivers/net/mlx5/mlx5_flow_hw_stubs.c index 06c096e1bc..f17bc27899 100644 --- a/drivers/net/mlx5/mlx5_flow_hw_stubs.c +++ b/drivers/net/mlx5/mlx5_flow_hw_stubs.c @@ -66,3 +66,15 @@ mlx5_flow_hw_ctrl_flow_dmac_vlan_destroy(struct rte_eth_dev *dev __rte_unused, rte_errno = ENOTSUP; return -rte_errno; } + +/* + * This is a stub for the real implementation of this function in mlx5_flow_hw.c in case: + * - PMD is compiled on Windows or + * - available rdma-core does not support HWS. + */ +bool +mlx5_hw_ctx_validate(__rte_unused const struct rte_eth_dev *dev, + __rte_unused struct rte_flow_error *error) +{ + return false; +} -- 2.39.5