net/mlx5: fix PMD compilation in non-HWS setup

Message ID 20241029133415.583413-1-getelson@nvidia.com (mailing list archive)
State Accepted, archived
Delegated to: Raslan Darawsheh
Headers
Series net/mlx5: fix PMD compilation in non-HWS setup |

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/loongarch-compilation success Compilation OK
ci/loongarch-unit-testing success Unit Testing PASS
ci/Intel-compilation success Compilation OK
ci/intel-Testing success Testing PASS
ci/intel-Functional success Functional PASS
ci/iol-mellanox-Performance success Performance Testing PASS
ci/iol-intel-Functional success Functional Testing PASS
ci/iol-marvell-Functional success Functional Testing PASS
ci/iol-broadcom-Performance success Performance Testing PASS
ci/iol-compile-arm64-testing success Testing PASS
ci/iol-unit-arm64-testing warning Testing issues
ci/iol-unit-amd64-testing success Testing PASS
ci/iol-compile-amd64-testing success Testing PASS
ci/iol-sample-apps-testing success Testing PASS

Commit Message

Etelson, Gregory Oct. 29, 2024, 1:34 p.m. UTC
The PMD calls `mlx5_hw_ctx_validate()` function to differentiate
between HWS and SWS run-time setups.

The function was not defined if HWS functionality was not enabled
during meson code configuration.

The patch creates default weak mlx5_hw_ctx_validate symbol.

Fixes: d3144c59ac98 ("net/mlx5: validate HWS context in meter operations")

Signed-off-by: Gregory Etelson <getelson@nvidia.com>
---
 drivers/net/mlx5/mlx5_flow.c | 7 +++++++
 1 file changed, 7 insertions(+)
  

Comments

Raslan Darawsheh Oct. 30, 2024, 7:07 a.m. UTC | #1
Hi,

From: Gregory Etelson <getelson@nvidia.com>
Sent: Tuesday, October 29, 2024 3:34 PM
To: dev@dpdk.org
Cc: Gregory Etelson; Maayan Kashani; Raslan Darawsheh; Dariusz Sosnowski; Slava Ovsiienko; Bing Zhao; Ori Kam; Suanming Mou; Matan Azrad
Subject: [PATCH] net/mlx5: fix PMD compilation in non-HWS setup

The PMD calls `mlx5_hw_ctx_validate()` function to differentiate
between HWS and SWS run-time setups.

The function was not defined if HWS functionality was not enabled
during meson code configuration.

The patch creates default weak mlx5_hw_ctx_validate symbol.

Fixes: d3144c59ac98 ("net/mlx5: validate HWS context in meter operations")

Signed-off-by: Gregory Etelson <getelson@nvidia.com>

Patch squashed into relevant commit in next-net-mlx,

Kindest regards,
Raslan Darawsheh
  

Patch

diff --git a/drivers/net/mlx5/mlx5_flow.c b/drivers/net/mlx5/mlx5_flow.c
index 9c43201e05..bfe757ec26 100644
--- a/drivers/net/mlx5/mlx5_flow.c
+++ b/drivers/net/mlx5/mlx5_flow.c
@@ -12321,3 +12321,10 @@  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;
+}