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 8E8DE45C13; Wed, 30 Oct 2024 11:55:16 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 6B399433A8; Wed, 30 Oct 2024 11:55:16 +0100 (CET) Received: from NAM11-DM6-obe.outbound.protection.outlook.com (mail-dm6nam11on2085.outbound.protection.outlook.com [40.107.223.85]) by mails.dpdk.org (Postfix) with ESMTP id D1FDB40263 for ; Wed, 30 Oct 2024 11:55:14 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=K4oYaxfsz2WoC1Fu/NRc86OQDrS8gV0SU+LTnCF0zAW9B/dP1tAUqn8t6KHyCtYw2ZX0xXKEcJKRPw1MPpy3yEs4/EQvY1jc89DwEoB3tu9itX81CBZTaXQgvLsUzRKTRs77DTqZloTFONsoB/q7J7TmObpje3bBj/31bzkToI8xbcz9VNKolbUuynLGd/9cqEq6m8FGUBjovgiibgnTMnNbybt9WgpTsm4Aan9M9EgLrCV3X9d4IXDl/H22/FEqT2hoRmYu2coMlmawpvMifUtDLVsF0FvM2pjpE/ZCVv5iOGWKYMHnqw38Cbi5Ga+/Rmui4NkIf1enkV9M79+QSw== 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=qFj9Odup/5/aqjNvV2y/ZaJt2+y2mKIiQ4dhLUemxo0=; b=mgR5344aU+ki/MVJwOr8avfmDTBem2LCisJiJozvCQX8JMi7oTI68JwZzTDilqe43LBncZ8JCrkV6GAx/ceJ6dzbDy1yq41VGE60thPadHftRNmYLLvM40bjlS5/q+mK2J255Ebjwva6aY5meLJtKB9B65zECe6gvlXU4kJWbm1xqCh6/AS+AsnhnZ9dUvJXM1dr9naLlu+t+3WDIyjZFmFH5nzh1e3pC36GDzwx8gXhdN7Nz1OK0GbBYVrEWd9+hAM3fQAnxQ4JIGQQqyfCD5JiNZp86gqLilBtXXF6vRFSnmrZQcy+eksQ4MPYhKqQw6RCKMU4cwFb7eNDEuhN7A== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.117.160) 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=qFj9Odup/5/aqjNvV2y/ZaJt2+y2mKIiQ4dhLUemxo0=; b=tKHPGM04Asqg+HJTb6ohcXJA9LVfXFyiex8sfNWstC/JCnMRKWUvxGIsyiWibGzYNOr5AAEYhxCVUegYqjzp8L2uCQOfeiyIbjXWxFlviVpq6nue/gyVVAH+VyKqLRzJTRf93NbeD2UDI35ZCHVi3uznody6OkcgbnNNiR0zNbYMZP2AMGuukJ6DbzVWyLYktUJouw685V4OLLOWs2F8q4ABv465aCnj362C4TgkZUar2Hkw7oOffemGb6RTwGgSkovloLpfuSuwi8VnbxbBz4dk0m2+ep+3innEJSd34HvbjEmj5ErVvbMszo9gOgPYoDRDADokrj1AeyX/3WmbYw== Received: from BYAPR11CA0091.namprd11.prod.outlook.com (2603:10b6:a03:f4::32) by PH7PR12MB6492.namprd12.prod.outlook.com (2603:10b6:510:1f3::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8093.32; Wed, 30 Oct 2024 10:55:09 +0000 Received: from CY4PEPF0000EE38.namprd03.prod.outlook.com (2603:10b6:a03:f4:cafe::74) by BYAPR11CA0091.outlook.office365.com (2603:10b6:a03:f4::32) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8093.26 via Frontend Transport; Wed, 30 Oct 2024 10:55:09 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 216.228.117.160) 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.160 as permitted sender) receiver=protection.outlook.com; client-ip=216.228.117.160; helo=mail.nvidia.com; pr=C Received: from mail.nvidia.com (216.228.117.160) by CY4PEPF0000EE38.mail.protection.outlook.com (10.167.242.10) 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:09 +0000 Received: from rnnvmail201.nvidia.com (10.129.68.8) by mail.nvidia.com (10.129.200.66) 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:50 -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:48 -0700 From: Dariusz Sosnowski To: Raslan Darawsheh , Viacheslav Ovsiienko , Bing Zhao , Ori Kam , Suanming Mou , Matan Azrad CC: Subject: [PATCH 1/3] net/mlx5: fix mingw stubs link issue in flow creation Date: Wed, 30 Oct 2024 11:54:10 +0100 Message-ID: <20241030105412.482107-2-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: CY4PEPF0000EE38:EE_|PH7PR12MB6492:EE_ X-MS-Office365-Filtering-Correlation-Id: cdd0fb97-5c0d-49b9-4d81-08dcf8d15276 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; ARA:13230040|1800799024|376014|36860700013|82310400026; X-Microsoft-Antispam-Message-Info: =?us-ascii?Q?3DJAZKqpr2gc/VzilyaqUIIS9qrDXDTNH2Sqil6HZ12O28WVhwk+DmEe3Lm2?= =?us-ascii?Q?UG73aXpttHyLdo9XfIlkdnuUDU71SQuIuhd1y1VVu181LCV4LTPtR5IcbQX7?= =?us-ascii?Q?EgV9/IP45y85fsFrqWbgqc2xFaY5F4zdFsuR9yDe5GB0eDMl0bG0K7I0mShw?= =?us-ascii?Q?cuCU+/k8k+lfg7tiHVP+fr+51yeMDoJdqtJNzW5EYBpkmg0rNRkKs65koPFp?= =?us-ascii?Q?IE/DwhMnnPddvPU2tYA1f1QTtIxaapQF/2rBQ4OOilrIruvBxBn6kJ73uY8e?= =?us-ascii?Q?b5hdkMESMS/LzrnD/CJ0Ync6qjxyAQrVqqtf6t72drPJUIN0hSIlKqNjUqln?= =?us-ascii?Q?riiPDWhzLofEq7SBooj1Artj2beuKsnW1201MK4CeIaszbUjog3+oJc9LCAg?= =?us-ascii?Q?Tb+yvRqt/31BRHQ5CYHGcnXGAf7P1f1HhdDt/9nZ4T5hNy9BM99euTdCZNLn?= =?us-ascii?Q?fErhotK0UYGa6c5b1ceN0th7R3Te8WGC0XL4K1VFNrPJdzKMUHQLQMm7hDHn?= =?us-ascii?Q?kL/H6Dog5nuZu2+ZXIF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=3D?= X-Forefront-Antispam-Report: CIP:216.228.117.160; CTRY:US; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:mail.nvidia.com; PTR:dc6edge1.nvidia.com; CAT:NONE; SFS:(13230040)(1800799024)(376014)(36860700013)(82310400026); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 30 Oct 2024 10:55:09.4012 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: cdd0fb97-5c0d-49b9-4d81-08dcf8d15276 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.160]; Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: CY4PEPF0000EE38.namprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH7PR12MB6492 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 Offending commit used weak symbols to implement stubs for functions for creating control flow rules for MAC address and VLAN matching. Since weak symbols are not supported with MinGW and concrete implementations of these functions are required if and only if PMD is compiled on Linux and DV API is available in rdma-core, this patch removes the __rte_weak and adds mlx5_flow_hw_stubs.c to compilation only if aforementioned conditions are specified. Fixes: 17f2e7992fcb ("net/mlx5: rework creation of unicast flow rules") Signed-off-by: Dariusz Sosnowski --- drivers/net/mlx5/meson.build | 8 +++++++- drivers/net/mlx5/mlx5_flow_hw_stubs.c | 6 +++--- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/drivers/net/mlx5/meson.build b/drivers/net/mlx5/meson.build index 0114673491..e65fac0f6f 100644 --- a/drivers/net/mlx5/meson.build +++ b/drivers/net/mlx5/meson.build @@ -23,7 +23,6 @@ sources = files( 'mlx5_flow_dv.c', 'mlx5_flow_aso.c', 'mlx5_flow_flex.c', - 'mlx5_flow_hw_stubs.c', 'mlx5_mac.c', 'mlx5_rss.c', 'mlx5_rx.c', @@ -57,6 +56,13 @@ if is_linux ) endif +if is_windows or (mlx5_config.get('HAVE_INFINIBAND_VERBS_H', false) and + not mlx5_config.get('HAVE_IBV_FLOW_DV_SUPPORT', false)) + sources += files( + 'mlx5_flow_hw_stubs.c', + ) +endif + if is_linux and (dpdk_conf.has('RTE_ARCH_X86_64') or dpdk_conf.has('RTE_ARCH_ARM64') or dpdk_conf.has('RTE_ARCH_PPC_64')) diff --git a/drivers/net/mlx5/mlx5_flow_hw_stubs.c b/drivers/net/mlx5/mlx5_flow_hw_stubs.c index 0e79e6c1f2..1df615d94c 100644 --- a/drivers/net/mlx5/mlx5_flow_hw_stubs.c +++ b/drivers/net/mlx5/mlx5_flow_hw_stubs.c @@ -8,7 +8,7 @@ * mlx5_flow_hw.c source file is included in the build only on Linux. * Functions defined there are compiled if and only if available rdma-core supports DV. * - * This file contains stubs (through weak linking) for any functions exported from that file. + * This file contains stubs for any functions exported from that file. */ #include "mlx5_flow.h" @@ -18,7 +18,7 @@ * - PMD is compiled on Windows or * - available rdma-core does not support HWS. */ -__rte_weak int +int mlx5_flow_hw_ctrl_flow_dmac(struct rte_eth_dev *dev __rte_unused, const struct rte_ether_addr *addr __rte_unused) { @@ -44,7 +44,7 @@ mlx5_flow_hw_ctrl_flow_dmac_destroy(struct rte_eth_dev *dev __rte_unused, * - PMD is compiled on Windows or * - available rdma-core does not support HWS. */ -__rte_weak int +int mlx5_flow_hw_ctrl_flow_dmac_vlan(struct rte_eth_dev *dev __rte_unused, const struct rte_ether_addr *addr __rte_unused, const uint16_t vlan __rte_unused) -- 2.39.5