Skip to contentSkip to conversation

common/mlx5: add mlx5 prefix to remaining internal functions

PATCH Superseded Maayan Kashani 2 participants 7 messages Nov 27, 2025 – Feb 12 Network drivers

lore
Share & tools
lore
#0 lore raw

PATCH 1/2 common/mlx5: add mlx5 prefix to remaining internal functions

Several internal functions in the mlx5 driver were missing the mlx5_ prefix, which could lead to symbol conflicts when linking. This patch adds the proper prefix to all remaining global symbols in common mlx5.

The following function categories were updated:
haswell_broadwell_cpu->mlx5_haswell_broadwell_cpu

Global variable:
atomic_sn is now static.

Bugzilla ID: 1794

---
 drivers/common/mlx5/linux/mlx5_common_os.c    |  2 +-
 drivers/common/mlx5/linux/mlx5_common_verbs.c |  2 +-
 drivers/common/mlx5/linux/mlx5_nl.c           |  2 +-
 drivers/common/mlx5/mlx5_common.c             | 14 +++++++-------
 drivers/common/mlx5/mlx5_common.h             |  2 +-
 drivers/common/mlx5/windows/mlx5_common_os.c  |  2 +-
 6 files changed, 12 insertions(+), 12 deletions(-)
drivers/common/mlx5/linux/mlx5_common_os.c +1 -1
index 2867e216188..7d0c9492524 100644
@@ -994,7 +994,7 @@ mlx5_os_wrapped_mkey_create(void *ctx, void *pd, uint32_t pdn, void *addr,
 	struct mlx5_devx_obj *mkey;
 	struct ibv_mr *ibv_mr = mlx5_glue->reg_mr(pd, addr, length,
 						  IBV_ACCESS_LOCAL_WRITE |
-						  (haswell_broadwell_cpu ? 0 :
+						  (mlx5_haswell_broadwell_cpu ? 0 :
 						  IBV_ACCESS_RELAXED_ORDERING));
 
 	if (!ibv_mr) {
drivers/common/mlx5/linux/mlx5_common_verbs.c +1 -1
index 98260df4707..2322d9d0335 100644
@@ -115,7 +115,7 @@ mlx5_common_verbs_reg_mr(void *pd, void *addr, size_t length,
 
 	ibv_mr = mlx5_glue->reg_mr(pd, addr, length,
 				   IBV_ACCESS_LOCAL_WRITE |
-				   (haswell_broadwell_cpu ? 0 :
+				   (mlx5_haswell_broadwell_cpu ? 0 :
 				   IBV_ACCESS_RELAXED_ORDERING));
 	if (!ibv_mr)
 		return -1;
drivers/common/mlx5/linux/mlx5_nl.c +1 -1
index d53543a1132..4fbb67af21d 100644
@@ -176,7 +176,7 @@ struct mlx5_nl_mac_addr {
 	int mac_n; /**< Number of addresses in the array. */
 };
 
-RTE_ATOMIC(uint32_t) atomic_sn;
+static RTE_ATOMIC(uint32_t) atomic_sn;
 
 /* Generate Netlink sequence number. */
 #define MLX5_NL_SN_GENERATE (rte_atomic_fetch_add_explicit(&atomic_sn, 1, \
drivers/common/mlx5/mlx5_common.c +7 -7
index 84a93e7dbde..f71dbe46378 100644
@@ -21,8 +21,8 @@
 #include "mlx5_common_defs.h"
 #include "mlx5_common_private.h"
 
-RTE_EXPORT_INTERNAL_SYMBOL(haswell_broadwell_cpu)
-uint8_t haswell_broadwell_cpu;
+RTE_EXPORT_INTERNAL_SYMBOL(mlx5_haswell_broadwell_cpu)
+uint8_t mlx5_haswell_broadwell_cpu;
 
 /* Driver type key for new device global syntax. */
 #define MLX5_DRIVER_KEY "driver"
@@ -1273,7 +1273,7 @@ mlx5_common_init(void)
 
 /**
  * This function is responsible of initializing the variable
- *  haswell_broadwell_cpu by checking if the cpu is intel
+ *  mlx5_haswell_broadwell_cpu by checking if the cpu is intel
  *  and reading the data returned from mlx5_cpu_id().
  *  since haswell and broadwell cpus don't have improved performance
  *  when using relaxed ordering we want to check the cpu type before
@@ -1299,7 +1299,7 @@ RTE_INIT_PRIO(mlx5_is_haswell_broadwell_cpu, LOG)
 	vendor = ebx;
 	max_level = eax;
 	if (max_level < 1) {
-		haswell_broadwell_cpu = 0;
+		mlx5_haswell_broadwell_cpu = 0;
 		return;
 	}
 	mlx5_cpu_id(1, &eax, &ebx, &ecx, &edx);
@@ -1314,18 +1314,18 @@ RTE_INIT_PRIO(mlx5_is_haswell_broadwell_cpu, LOG)
 		if (brand_id == 0 && family == 0x6) {
 			for (i = 0; i < RTE_DIM(broadwell_models); i++)
 				if (model == broadwell_models[i]) {
-					haswell_broadwell_cpu = 1;
+					mlx5_haswell_broadwell_cpu = 1;
 					return;
 				}
 			for (i = 0; i < RTE_DIM(haswell_models); i++)
 				if (model == haswell_models[i]) {
-					haswell_broadwell_cpu = 1;
+					mlx5_haswell_broadwell_cpu = 1;
 					return;
 				}
 		}
 	}
 #endif
-	haswell_broadwell_cpu = 0;
+	mlx5_haswell_broadwell_cpu = 0;
 }
 
 /**
drivers/common/mlx5/mlx5_common.h +1 -1
index 9403385195d..311e862f05a 100644
@@ -477,7 +477,7 @@ __rte_internal
 void mlx5_translate_port_name(const char *port_name_in,
 			      struct mlx5_switch_info *port_info_out);
 void mlx5_glue_constructor(void);
-extern uint8_t haswell_broadwell_cpu;
+extern uint8_t mlx5_haswell_broadwell_cpu;
 
 __rte_internal
 void mlx5_common_init(void);
drivers/common/mlx5/windows/mlx5_common_os.c +1 -1
index 7fac361460b..16fcc5f9fcc 100644
@@ -402,7 +402,7 @@ mlx5_os_reg_mr(void *pd,
 	mkey_attr.size = length;
 	mkey_attr.umem_id = ((struct mlx5_devx_umem *)(obj))->umem_id;
 	mkey_attr.pd = mlx5_pd->pdn;
-	if (!haswell_broadwell_cpu) {
+	if (!mlx5_haswell_broadwell_cpu) {
 		mkey_attr.relaxed_ordering_write = attr.relaxed_ordering_write;
 		mkey_attr.relaxed_ordering_read = attr.relaxed_ordering_read;
 	}
Signature · 1 line
2.21.0
#1 lore raw

PATCH 2/2 net/mlx5: add mlx5 prefix to remaining internal functions

Several internal functions in the mlx5 driver were missing the mlx5_ prefix, which could lead to symbol conflicts when linking. This patch
adds the proper prefix to all remaining global symbols and convert needed global vars to static.

The following function categories were updated:

1. Flow hardware control functions:
- flow_hw_list_destroy -> mlx5_flow_hw_list_destroy
- flow_hw_create_flow -> mlx5_flow_hw_create_flow
- flow_hw_set_port_info -> mlx5_flow_hw_set_port_info
- flow_hw_create_vport_action -> mlx5_flow_hw_create_vport_action
- flow_hw_destroy_vport_action -> mlx5_flow_hw_destroy_vport_action
- flow_hw_get_ecpri_parser_profile -> mlx5_flow_hw_get_ecpri_parser_profile

2. Flow DV (Direct Verbs) functions:
- flow_dv_convert_encap_data -> mlx5_flow_dv_convert_encap_data
- flow_dv_translate_items_hws -> mlx5_flow_dv_translate_items_hws
- flow_dv_tbl_resource_release -> mlx5_flow_dv_tbl_resource_release
- __flow_dv_translate_items_hws -> mlx5_flow_dv_translate_items_hws_impl

3. Flow callback functions (26+ instances):
- flow_dv_mreg_create_cb -> mlx5_flow_dv_mreg_create_cb
- flow_dv_mreg_match_cb -> mlx5_flow_dv_mreg_match_cb
- flow_dv_mreg_remove_cb -> mlx5_flow_dv_mreg_remove_cb
- flow_dv_mreg_clone_cb -> mlx5_flow_dv_mreg_clone_cb
- flow_dv_mreg_clone_free_cb -> mlx5_flow_dv_mreg_clone_free_cb
- flow_dv_port_id_* callbacks (5 functions)
- flow_dv_push_vlan_* callbacks (5 functions)
- flow_dv_sample_* callbacks (5 functions)
- flow_dv_dest_array_* callbacks (5 functions)
- flow_nta_mreg_create_cb -> mlx5_flow_nta_mreg_create_cb
- flow_nta_mreg_remove_cb -> mlx5_flow_nta_mreg_remove_cb

4. Global variable:
- reg_to_field->mlx5_reg_to_field

After this change, all internal global symbols now have the mlx5_ prefix. Public PMD APIs correctly use the rte_pmd_mlx5_ prefix.

Following the above changes, Coverity warnings were handled.

Bugzilla ID: 1794

---
 drivers/net/mlx5/hws/mlx5dr_crc32.c     |   6 +-
 drivers/net/mlx5/hws/mlx5dr_crc32.h     |   2 +-
 drivers/net/mlx5/hws/mlx5dr_definer.c   |   2 +-
 drivers/net/mlx5/hws/mlx5dr_matcher.c   |  10 +-
 drivers/net/mlx5/hws/mlx5dr_rule.c      |   8 +-
 drivers/net/mlx5/linux/mlx5_flow_os.c   |   2 +-
 drivers/net/mlx5/linux/mlx5_os.c        |  87 +--
 drivers/net/mlx5/linux/mlx5_socket.c    |   4 +-
 drivers/net/mlx5/linux/mlx5_verbs.c     |   4 +-
 drivers/net/mlx5/linux/mlx5_verbs.h     |   2 +-
 drivers/net/mlx5/mlx5.c                 |  32 +-
 drivers/net/mlx5/mlx5.h                 |  18 +-
 drivers/net/mlx5/mlx5_devx.c            |   2 +-
 drivers/net/mlx5/mlx5_devx.h            |   2 +-
 drivers/net/mlx5/mlx5_driver_event.c    |   2 +-
 drivers/net/mlx5/mlx5_ethdev.c          |   4 +-
 drivers/net/mlx5/mlx5_flow.c            | 126 ++--
 drivers/net/mlx5/mlx5_flow.h            | 462 +++++++-------
 drivers/net/mlx5/mlx5_flow_dv.c         | 764 ++++++++++++------------
 drivers/net/mlx5/mlx5_flow_flex.c       |  22 +-
 drivers/net/mlx5/mlx5_flow_hw.c         | 150 ++---
 drivers/net/mlx5/mlx5_flow_meter.c      |   2 +-
 drivers/net/mlx5/mlx5_flow_verbs.c      |  14 +-
 drivers/net/mlx5/mlx5_nta_rss.c         |  56 +-
 drivers/net/mlx5/mlx5_nta_sample.c      |  34 +-
 drivers/net/mlx5/mlx5_nta_split.c       |   4 +-
 drivers/net/mlx5/mlx5_rx.c              |   4 +-
 drivers/net/mlx5/mlx5_rx.h              |   6 +-
 drivers/net/mlx5/mlx5_rxq.c             |  14 +-
 drivers/net/mlx5/mlx5_trigger.c         |   8 +-
 drivers/net/mlx5/mlx5_tx.c              |   4 +-
 drivers/net/mlx5/mlx5_tx.h              |   4 +-
 drivers/net/mlx5/mlx5_txq.c             |   8 +-
 drivers/net/mlx5/windows/mlx5_flow_os.c |   4 +-
 drivers/net/mlx5/windows/mlx5_os.c      |   2 +-
 35 files changed, 966 insertions(+), 909 deletions(-)
drivers/net/mlx5/hws/mlx5dr_crc32.c +3 -3
index 7431462e14c..6c757e25559 100644
@@ -4,7 +4,7 @@
 
 #include "mlx5dr_internal.h"
 
-uint32_t dr_ste_crc_tab32[] = {
+static const uint32_t dr_ste_crc_tab32[] = {
 	0x0, 0x77073096, 0xee0e612c, 0x990951ba, 0x76dc419, 0x706af48f,
 	0xe963a535, 0x9e6495a3, 0xedb8832, 0x79dcb8a4, 0xe0d5e91e, 0x97d2d988,
 	0x9b64c2b, 0x7eb17cbd, 0xe7b82d07, 0x90bf1d91, 0x1db71064, 0x6ab020f2,
@@ -51,7 +51,7 @@ uint32_t dr_ste_crc_tab32[] = {
 };
 
 /* CRC table for the CRC-16, the polynome is 0x100b */
-uint16_t dr_crc_inner_crc_tab16[] = {
+static const uint16_t dr_crc_inner_crc_tab16[] = {
 	0x0000, 0x100B, 0x2016, 0x301D, 0x402C, 0x5027, 0x603A, 0x7031,
 	0x8058, 0x9053, 0xA04E, 0xB045, 0xC074, 0xD07F, 0xE062, 0xF069,
 	0x10BB, 0x00B0, 0x30AD, 0x20A6, 0x5097, 0x409C, 0x7081, 0x608A,
@@ -96,7 +96,7 @@ uint32_t mlx5dr_crc32_calc(uint8_t *p, size_t len)
 	return rte_be_to_cpu_32(crc);
 }
 
-uint16_t mlx5dr_crc16_calc(uint8_t *p, size_t len, uint16_t crc_tab16[])
+uint16_t mlx5dr_crc16_calc(uint8_t *p, size_t len, const uint16_t crc_tab16[])
 {
 	uint16_t crc = 0;
 
drivers/net/mlx5/hws/mlx5dr_crc32.h +1 -1
index 75b6009a15a..c1fc910f518 100644
@@ -13,6 +13,6 @@ uint32_t mlx5dr_crc32_calc(uint8_t *p, size_t len);
 /* Standard CRC16 calculation using the crc_tab16 param to indicate
  * the pre-calculated polynome hash values.
  */
-uint16_t mlx5dr_crc16_calc(uint8_t *p, size_t len, uint16_t crc_tab16[]);
+uint16_t mlx5dr_crc16_calc(uint8_t *p, size_t len, const uint16_t crc_tab16[]);
 
 #endif /* MLX5DR_CRC32_C_ */
drivers/net/mlx5/hws/mlx5dr_definer.c +1 -1
index afa70bf7937..ff1d8b1e032 100644
@@ -2663,7 +2663,7 @@ mlx5dr_definer_get_ecpri_parser_byte_off_from_ctx(void *dr_ctx, uint32_t *byte_o
 	struct mlx5_ecpri_parser_profile *ecp;
 	uint32_t i;
 
-	ecp = flow_hw_get_ecpri_parser_profile(dr_ctx);
+	ecp = mlx5_flow_hw_get_ecpri_parser_profile(dr_ctx);
 	if (!ecp)
 		return UINT32_MAX;
 	for (i = 0; i < ecp->num; i++)
drivers/net/mlx5/hws/mlx5dr_matcher.c +5 -5
index 7d77cf4a3e2..8c07ea88821 100644
@@ -1350,11 +1350,11 @@ static int mlx5dr_matcher_init_root(struct mlx5dr_matcher *matcher)
 	flow_attr.tbl_type = type;
 
 	/* On root table matcher, only a single match template is supported */
-	ret = flow_dv_translate_items_hws(matcher->mt[0].items,
-					  &flow_attr, mask->match_buf,
-					  MLX5_SET_MATCHER_HS_M, NULL,
-					  &match_criteria,
-					  &rte_error);
+	ret = mlx5_flow_dv_translate_items_hws(matcher->mt[0].items,
+					       &flow_attr, mask->match_buf,
+					       MLX5_SET_MATCHER_HS_M, NULL,
+					       &match_criteria,
+					       &rte_error);
 	if (ret) {
 		DR_LOG(ERR, "Failed to convert items to PRM [%s]", rte_error.message);
 		goto free_mask;
drivers/net/mlx5/hws/mlx5dr_rule.c +4 -4
index 895ac858eca..4ff3d26e6f8 100644
@@ -738,10 +738,10 @@ int mlx5dr_rule_create_root_no_comp(struct mlx5dr_rule *rule,
 
 	flow_attr.tbl_type = rule->matcher->tbl->type;
 
-	ret = flow_dv_translate_items_hws(items, &flow_attr, value->match_buf,
-					  MLX5_SET_MATCHER_HS_V, NULL,
-					  &match_criteria,
-					  &error);
+	ret = mlx5_flow_dv_translate_items_hws(items, &flow_attr, value->match_buf,
+					       MLX5_SET_MATCHER_HS_V, NULL,
+					       &match_criteria,
+					       &error);
 	if (ret) {
 		DR_LOG(ERR, "Failed to convert items to PRM [%s]", error.message);
 		goto free_value;
drivers/net/mlx5/linux/mlx5_flow_os.c +1 -1
index f5eee46e44b..5d80898b667 100644
@@ -73,7 +73,7 @@ mlx5_flow_os_workspace_gc_release(void)
 		struct mlx5_flow_workspace *wks = gc_head;
 
 		gc_head = wks->gc;
-		flow_release_workspace(wks);
+		mlx5_flow_release_workspace(wks);
 	}
 }
 
drivers/net/mlx5/linux/mlx5_os.c +51 -36

162 lines not on this page · raw message

drivers/net/mlx5/linux/mlx5_socket.c +2 -2
index 6ce0e59643d..3a67dff4a19 100644
@@ -23,8 +23,8 @@
 #define MLX5_SOCKET_PATH "/var/tmp/dpdk_net_mlx5_%d"
 #define MLX5_ALL_PORT_IDS 0xffff
 
-int server_socket = -1; /* Unix socket for primary process. */
-struct rte_intr_handle *server_intr_handle; /* Interrupt handler. */
+static int server_socket = -1; /* Unix socket for primary process. */
+static struct rte_intr_handle *server_intr_handle; /* Interrupt handler. */
 
 /**
  * Handle server pmd socket interrupts.
drivers/net/mlx5/linux/mlx5_verbs.c +2 -2
index 01d3d6ae5d4..103a03bd1ab 100644
@@ -795,7 +795,7 @@ mlx5_ibv_drop_action_create(struct rte_eth_dev *dev)
 			.rx_hash_conf = (struct ibv_rx_hash_conf){
 				.rx_hash_function = IBV_RX_HASH_FUNC_TOEPLITZ,
 				.rx_hash_key_len = MLX5_RSS_HASH_KEY_LEN,
-				.rx_hash_key = rss_hash_default_key,
+				.rx_hash_key = mlx5_rss_hash_default_key,
 				.rx_hash_fields_mask = 0,
 				},
 			.rwq_ind_tbl = ind_tbl,
@@ -1225,7 +1225,7 @@ mlx5_txq_ibv_obj_release(struct mlx5_txq_obj *txq_obj)
 	claim_zero(mlx5_glue->destroy_cq(txq_obj->cq));
 }
 
-struct mlx5_obj_ops ibv_obj_ops = {
+struct mlx5_obj_ops mlx5_ibv_obj_ops = {
 	.rxq_obj_modify_vlan_strip = mlx5_rxq_obj_modify_wq_vlan_strip,
 	.rxq_obj_new = mlx5_rxq_ibv_obj_new,
 	.rxq_event_get = mlx5_rx_ibv_get_event,
drivers/net/mlx5/linux/mlx5_verbs.h +1 -1
index 829d9fa7387..80732756413 100644
@@ -12,5 +12,5 @@ void mlx5_txq_ibv_obj_release(struct mlx5_txq_obj *txq_obj);
 int mlx5_rxq_ibv_obj_dummy_lb_create(struct rte_eth_dev *dev);
 void mlx5_rxq_ibv_obj_dummy_lb_release(struct rte_eth_dev *dev);
 
-extern struct mlx5_obj_ops ibv_obj_ops;
+extern struct mlx5_obj_ops mlx5_ibv_obj_ops;
 #endif /* RTE_PMD_MLX5_VERBS_H_ */
drivers/net/mlx5/mlx5.c +16 -16
index decf540c519..a65937caf00 100644
@@ -2129,11 +2129,11 @@ mlx5_alloc_hw_group_hash_list(struct mlx5_priv *priv)
 	sh->groups = mlx5_hlist_create
 			(s, MLX5_FLOW_TABLE_HLIST_ARRAY_SIZE,
 			 false, true, sh,
-			 flow_hw_grp_create_cb,
-			 flow_hw_grp_match_cb,
-			 flow_hw_grp_remove_cb,
-			 flow_hw_grp_clone_cb,
-			 flow_hw_grp_clone_free_cb);
+			 mlx5_flow_hw_grp_create_cb,
+			 mlx5_flow_hw_grp_match_cb,
+			 mlx5_flow_hw_grp_remove_cb,
+			 mlx5_flow_hw_grp_clone_cb,
+			 mlx5_flow_hw_grp_clone_free_cb);
 	if (!sh->groups) {
 		DRV_LOG(ERR, "flow groups with hash creation failed.");
 		err = ENOMEM;
@@ -2171,11 +2171,11 @@ mlx5_alloc_table_hash_list(struct mlx5_priv *priv __rte_unused)
 	snprintf(s, sizeof(s), "%s_flow_table", priv->sh->ibdev_name);
 	sh->flow_tbls = mlx5_hlist_create(s, MLX5_FLOW_TABLE_HLIST_ARRAY_SIZE,
 					  false, true, sh,
-					  flow_dv_tbl_create_cb,
-					  flow_dv_tbl_match_cb,
-					  flow_dv_tbl_remove_cb,
-					  flow_dv_tbl_clone_cb,
-					  flow_dv_tbl_clone_free_cb);
+					  mlx5_flow_dv_tbl_create_cb,
+					  mlx5_flow_dv_tbl_match_cb,
+					  mlx5_flow_dv_tbl_remove_cb,
+					  mlx5_flow_dv_tbl_clone_cb,
+					  mlx5_flow_dv_tbl_clone_free_cb);
 	if (!sh->flow_tbls) {
 		DRV_LOG(ERR, "flow tables with hash creation failed.");
 		err = ENOMEM;
@@ -2190,11 +2190,11 @@ mlx5_alloc_table_hash_list(struct mlx5_priv *priv __rte_unused)
 	 * because DV expect to see them even if they cannot be created by
 	 * RDMA-CORE.
 	 */
-	if (!flow_dv_tbl_resource_get(dev, 0, 0, 0, 0,
+	if (!mlx5_flow_dv_tbl_resource_get(dev, 0, 0, 0, 0,
 		NULL, 0, 1, 0, &error) ||
-	    !flow_dv_tbl_resource_get(dev, 0, 1, 0, 0,
+	    !mlx5_flow_dv_tbl_resource_get(dev, 0, 1, 0, 0,
 		NULL, 0, 1, 0, &error) ||
-	    !flow_dv_tbl_resource_get(dev, 0, 0, 1, 0,
+	    !mlx5_flow_dv_tbl_resource_get(dev, 0, 0, 1, 0,
 		NULL, 0, 1, 0, &error)) {
 		err = ENOMEM;
 		goto error;
@@ -2390,10 +2390,10 @@ mlx5_dev_close(struct rte_eth_dev *dev)
 	mlx5_indirect_list_handles_release(dev);
 #ifdef HAVE_MLX5_HWS_SUPPORT
 	mlx5_nta_sample_context_free(dev);
-	flow_hw_destroy_vport_action(dev);
+	mlx5_flow_hw_destroy_vport_action(dev);
 	/* dr context will be closed after mlx5_os_free_shared_dr. */
-	flow_hw_resource_release(dev);
-	flow_hw_clear_port_info(dev);
+	mlx5_flow_hw_resource_release(dev);
+	mlx5_flow_hw_clear_port_info(dev);
 	if (priv->tlv_options != NULL) {
 		/* Free the GENEVE TLV parser resource. */
 		claim_zero(mlx5_geneve_tlv_options_destroy(priv->tlv_options, sh->phdev));
drivers/net/mlx5/mlx5.h +9 -9
index 966e802f5fd..6164b63f588 100644
@@ -2526,8 +2526,8 @@ int mlx5_counter_query(struct rte_eth_dev *dev, uint32_t cnt,
 		    bool clear, uint64_t *pkts, uint64_t *bytes, void **action);
 int mlx5_flow_dev_dump(struct rte_eth_dev *dev, struct rte_flow *flow,
 			FILE *file, struct rte_flow_error *error);
-int save_dump_file(const unsigned char *data, uint32_t size,
-		uint32_t type, uint64_t id, void *arg, FILE *file);
+int mlx5_save_dump_file(const unsigned char *data, uint32_t size,
+			uint32_t type, uint64_t id, void *arg, FILE *file);
 int mlx5_flow_query_counter(struct rte_eth_dev *dev, struct rte_flow *flow,
 	struct rte_flow_query_count *count, struct rte_flow_error *error);
 #ifdef HAVE_IBV_FLOW_DV_SUPPORT
@@ -2575,7 +2575,7 @@ int mlx5_flow_meter_ops_get(struct rte_eth_dev *dev, void *arg);
 struct mlx5_flow_meter_info *mlx5_flow_meter_find(struct mlx5_priv *priv,
 		uint32_t meter_id, uint32_t *mtr_idx);
 struct mlx5_flow_meter_info *
-flow_dv_meter_find_by_idx(struct mlx5_priv *priv, uint32_t idx);
+mlx5_flow_dv_meter_find_by_idx(struct mlx5_priv *priv, uint32_t idx);
 int mlx5_flow_meter_attach(struct mlx5_priv *priv,
 			   struct mlx5_flow_meter_info *fm,
 			   const struct rte_flow_attr *attr,
@@ -2708,12 +2708,12 @@ mlx5_aso_cqe_err_handle(struct mlx5_aso_sq *sq);
 /* mlx5_flow_flex.c */
 
 struct rte_flow_item_flex_handle *
-flow_dv_item_create(struct rte_eth_dev *dev,
-		    const struct rte_flow_item_flex_conf *conf,
-		    struct rte_flow_error *error);
-int flow_dv_item_release(struct rte_eth_dev *dev,
-		    const struct rte_flow_item_flex_handle *flex_handle,
-		    struct rte_flow_error *error);
+mlx5_flow_dv_item_create(struct rte_eth_dev *dev,
+			 const struct rte_flow_item_flex_conf *conf,
+			 struct rte_flow_error *error);
+int mlx5_flow_dv_item_release(struct rte_eth_dev *dev,
+			      const struct rte_flow_item_flex_handle *flex_handle,
+			      struct rte_flow_error *error);
 int mlx5_flex_item_port_init(struct rte_eth_dev *dev);
 void mlx5_flex_item_port_cleanup(struct rte_eth_dev *dev);
 void mlx5_flex_flow_translate_item(struct rte_eth_dev *dev, void *matcher,
drivers/net/mlx5/mlx5_devx.c +1 -1
index 523b53d7130..4b30a4fade5 100644
@@ -1733,7 +1733,7 @@ mlx5_txq_devx_obj_release(struct mlx5_txq_obj *txq_obj)
 	}
 }
 
-struct mlx5_obj_ops devx_obj_ops = {
+struct mlx5_obj_ops mlx5_devx_obj_ops = {
 	.rxq_obj_modify_vlan_strip = mlx5_rxq_obj_modify_rq_vlan_strip,
 	.rxq_obj_modify_counter_set_id = mlx5_rxq_obj_modify_counter,
 	.rxq_obj_new = mlx5_rxq_devx_obj_new,
drivers/net/mlx5/mlx5_devx.h +1 -1
index 4ab8cfbd221..3c836170f58 100644
@@ -14,6 +14,6 @@ void mlx5_txq_devx_obj_release(struct mlx5_txq_obj *txq_obj);
 int mlx5_devx_modify_rq(struct mlx5_rxq_priv *rxq, uint8_t type);
 int mlx5_devx_extq_port_validate(uint16_t port_id);
 
-extern struct mlx5_obj_ops devx_obj_ops;
+extern struct mlx5_obj_ops mlx5_devx_obj_ops;
 
 #endif /* RTE_PMD_MLX5_DEVX_H_ */
drivers/net/mlx5/mlx5_driver_event.c +1 -1
index cad1f875180..1dc8029ee50 100644
@@ -32,7 +32,7 @@ struct registered_cb {
 	const void *opaque;
 };
 
-LIST_HEAD(, registered_cb) cb_list_head = LIST_HEAD_INITIALIZER(cb_list_head);
+static LIST_HEAD(, registered_cb) cb_list_head = LIST_HEAD_INITIALIZER(cb_list_head);
 
 static const char *
 generate_rx_queue_info(struct mlx5_rxq_priv *rxq)
drivers/net/mlx5/mlx5_ethdev.c +2 -2
index 7747b0c8698..08773db5006 100644
@@ -103,7 +103,7 @@ mlx5_dev_configure(struct rte_eth_dev *dev)
 	memcpy(priv->rss_conf.rss_key,
 	       use_app_rss_key ?
 	       dev->data->dev_conf.rx_adv_conf.rss_conf.rss_key :
-	       rss_hash_default_key,
+	       mlx5_rss_hash_default_key,
 	       MLX5_RSS_HASH_KEY_LEN);
 	priv->rss_conf.rss_key_len = MLX5_RSS_HASH_KEY_LEN;
 	priv->rss_conf.rss_hf = dev->data->dev_conf.rx_adv_conf.rss_conf.rss_hf;
@@ -397,7 +397,7 @@ mlx5_dev_infos_get(struct rte_eth_dev *dev, struct rte_eth_dev_info *info)
 	info->rx_desc_lim.nb_max = max_wqe;
 	info->tx_desc_lim.nb_max = max_wqe;
 	if (priv->sh->cdev->config.hca_attr.mem_rq_rmp &&
-	    priv->obj_ops.rxq_obj_new == devx_obj_ops.rxq_obj_new)
+	    priv->obj_ops.rxq_obj_new == mlx5_devx_obj_ops.rxq_obj_new)
 		info->dev_capa |= RTE_ETH_DEV_CAPA_RXQ_SHARE;
 	info->switch_info.name = dev->data->name;
 	info->switch_info.domain_id = priv->domain_id;
drivers/net/mlx5/mlx5_flow.c +63 -63

324 lines not on this page · raw message

drivers/net/mlx5/mlx5_flow.h +234 -228

589 lines not on this page · raw message

drivers/net/mlx5/mlx5_flow_dv.c +394 -370

1,682 lines not on this page · raw message

drivers/net/mlx5/mlx5_flow_flex.c +15 -7
index d21e28f7fd7..ee7d63a32c5 100644

Lines of this file are not shown. View the raw message.

drivers/net/mlx5/mlx5_flow_hw.c +77 -73

150 lines not on this page · raw message

drivers/net/mlx5/mlx5_flow_meter.c +1 -1
index cd6a8045930..3d0cf152e5d 100644

Lines of this file are not shown. View the raw message.

drivers/net/mlx5/mlx5_flow_verbs.c +7 -7
index 67d199ce15e..bb240d38d94 100644

Lines of this file are not shown. View the raw message.

drivers/net/mlx5/mlx5_nta_rss.c +28 -28

56 lines not on this page · raw message

drivers/net/mlx5/mlx5_nta_sample.c +17 -17
index 0b7b3d0c8ee..c637b0ede38 100644

Lines of this file are not shown. View the raw message.

drivers/net/mlx5/mlx5_nta_split.c +2 -2
index c95da56d729..327930ecb83 100644

Lines of this file are not shown. View the raw message.

drivers/net/mlx5/mlx5_rx.c +2 -2
index ac663a978ee..bc0470e6af3 100644

Lines of this file are not shown. View the raw message.

drivers/net/mlx5/mlx5_rx.h +3 -3
index 127abe41fb2..86636d598fc 100644

Lines of this file are not shown. View the raw message.

drivers/net/mlx5/mlx5_rxq.c +7 -7
index 9210a92c5f4..01e90a08a7d 100644

Lines of this file are not shown. View the raw message.

drivers/net/mlx5/mlx5_trigger.c +4 -4
index 028844e45d6..93227d9c1d1 100644

Lines of this file are not shown. View the raw message.

drivers/net/mlx5/mlx5_tx.c +2 -2
index fe9da7f8c1e..4c970130d91 100644

Lines of this file are not shown. View the raw message.

drivers/net/mlx5/mlx5_tx.h +2 -2
index 16307206e2a..fbf6dacb020 100644

Lines of this file are not shown. View the raw message.

drivers/net/mlx5/mlx5_txq.c +4 -4
index ad15b20e7b9..5219642c7db 100644

Lines of this file are not shown. View the raw message.

drivers/net/mlx5/windows/mlx5_flow_os.c +2 -2
index 15c6fc56133..48d9f8520e0 100644

Lines of this file are not shown. View the raw message.

drivers/net/mlx5/windows/mlx5_os.c +1 -1
index 4eadc872a54..d84abbab88b 100644

Lines of this file are not shown. View the raw message.

The rest of this diff is not shown. View the raw message.

Signature · 1 line
2.21.0

Part of the diff is not shown here. View the raw message.

#2 lore raw

PATCH v2 1/2 common/mlx5: add mlx5 prefix to remaining internal functions

In reply to Maayan Kashani

Several internal functions in the mlx5 driver were missing the mlx5_ prefix, which could lead to symbol conflicts when linking. This patch adds the proper prefix to all remaining global symbols in common mlx5.

The following function categories were updated:
haswell_broadwell_cpu->mlx5_haswell_broadwell_cpu

Global variable:
atomic_sn is now static.

Bugzilla ID: 1794

---
 drivers/common/mlx5/linux/mlx5_common_os.c    |  2 +-
 drivers/common/mlx5/linux/mlx5_common_verbs.c |  2 +-
 drivers/common/mlx5/linux/mlx5_nl.c           |  2 +-
 drivers/common/mlx5/mlx5_common.c             | 14 +++++++-------
 drivers/common/mlx5/mlx5_common.h             |  2 +-
 drivers/common/mlx5/windows/mlx5_common_os.c  |  2 +-
 6 files changed, 12 insertions(+), 12 deletions(-)
drivers/common/mlx5/linux/mlx5_common_os.c +1 -1
index 2867e216188..7d0c9492524 100644
@@ -994,7 +994,7 @@ mlx5_os_wrapped_mkey_create(void *ctx, void *pd, uint32_t pdn, void *addr,
 	struct mlx5_devx_obj *mkey;
 	struct ibv_mr *ibv_mr = mlx5_glue->reg_mr(pd, addr, length,
 						  IBV_ACCESS_LOCAL_WRITE |
-						  (haswell_broadwell_cpu ? 0 :
+						  (mlx5_haswell_broadwell_cpu ? 0 :
 						  IBV_ACCESS_RELAXED_ORDERING));
 
 	if (!ibv_mr) {
drivers/common/mlx5/linux/mlx5_common_verbs.c +1 -1
index 98260df4707..2322d9d0335 100644
@@ -115,7 +115,7 @@ mlx5_common_verbs_reg_mr(void *pd, void *addr, size_t length,
 
 	ibv_mr = mlx5_glue->reg_mr(pd, addr, length,
 				   IBV_ACCESS_LOCAL_WRITE |
-				   (haswell_broadwell_cpu ? 0 :
+				   (mlx5_haswell_broadwell_cpu ? 0 :
 				   IBV_ACCESS_RELAXED_ORDERING));
 	if (!ibv_mr)
 		return -1;
drivers/common/mlx5/linux/mlx5_nl.c +1 -1
index d53543a1132..4fbb67af21d 100644
@@ -176,7 +176,7 @@ struct mlx5_nl_mac_addr {
 	int mac_n; /**< Number of addresses in the array. */
 };
 
-RTE_ATOMIC(uint32_t) atomic_sn;
+static RTE_ATOMIC(uint32_t) atomic_sn;
 
 /* Generate Netlink sequence number. */
 #define MLX5_NL_SN_GENERATE (rte_atomic_fetch_add_explicit(&atomic_sn, 1, \
drivers/common/mlx5/mlx5_common.c +7 -7
index 84a93e7dbde..f71dbe46378 100644
@@ -21,8 +21,8 @@
 #include "mlx5_common_defs.h"
 #include "mlx5_common_private.h"
 
-RTE_EXPORT_INTERNAL_SYMBOL(haswell_broadwell_cpu)
-uint8_t haswell_broadwell_cpu;
+RTE_EXPORT_INTERNAL_SYMBOL(mlx5_haswell_broadwell_cpu)
+uint8_t mlx5_haswell_broadwell_cpu;
 
 /* Driver type key for new device global syntax. */
 #define MLX5_DRIVER_KEY "driver"
@@ -1273,7 +1273,7 @@ mlx5_common_init(void)
 
 /**
  * This function is responsible of initializing the variable
- *  haswell_broadwell_cpu by checking if the cpu is intel
+ *  mlx5_haswell_broadwell_cpu by checking if the cpu is intel
  *  and reading the data returned from mlx5_cpu_id().
  *  since haswell and broadwell cpus don't have improved performance
  *  when using relaxed ordering we want to check the cpu type before
@@ -1299,7 +1299,7 @@ RTE_INIT_PRIO(mlx5_is_haswell_broadwell_cpu, LOG)
 	vendor = ebx;
 	max_level = eax;
 	if (max_level < 1) {
-		haswell_broadwell_cpu = 0;
+		mlx5_haswell_broadwell_cpu = 0;
 		return;
 	}
 	mlx5_cpu_id(1, &eax, &ebx, &ecx, &edx);
@@ -1314,18 +1314,18 @@ RTE_INIT_PRIO(mlx5_is_haswell_broadwell_cpu, LOG)
 		if (brand_id == 0 && family == 0x6) {
 			for (i = 0; i < RTE_DIM(broadwell_models); i++)
 				if (model == broadwell_models[i]) {
-					haswell_broadwell_cpu = 1;
+					mlx5_haswell_broadwell_cpu = 1;
 					return;
 				}
 			for (i = 0; i < RTE_DIM(haswell_models); i++)
 				if (model == haswell_models[i]) {
-					haswell_broadwell_cpu = 1;
+					mlx5_haswell_broadwell_cpu = 1;
 					return;
 				}
 		}
 	}
 #endif
-	haswell_broadwell_cpu = 0;
+	mlx5_haswell_broadwell_cpu = 0;
 }
 
 /**
drivers/common/mlx5/mlx5_common.h +1 -1
index 9403385195d..311e862f05a 100644
@@ -477,7 +477,7 @@ __rte_internal
 void mlx5_translate_port_name(const char *port_name_in,
 			      struct mlx5_switch_info *port_info_out);
 void mlx5_glue_constructor(void);
-extern uint8_t haswell_broadwell_cpu;
+extern uint8_t mlx5_haswell_broadwell_cpu;
 
 __rte_internal
 void mlx5_common_init(void);
drivers/common/mlx5/windows/mlx5_common_os.c +1 -1
index 7fac361460b..16fcc5f9fcc 100644
@@ -402,7 +402,7 @@ mlx5_os_reg_mr(void *pd,
 	mkey_attr.size = length;
 	mkey_attr.umem_id = ((struct mlx5_devx_umem *)(obj))->umem_id;
 	mkey_attr.pd = mlx5_pd->pdn;
-	if (!haswell_broadwell_cpu) {
+	if (!mlx5_haswell_broadwell_cpu) {
 		mkey_attr.relaxed_ordering_write = attr.relaxed_ordering_write;
 		mkey_attr.relaxed_ordering_read = attr.relaxed_ordering_read;
 	}
Signature · 1 line
2.21.0
#3 lore raw

PATCH v2 2/2 net/mlx5: add mlx5 prefix to remaining internal functions

Several internal functions in the mlx5 driver were missing the mlx5_ prefix, which could lead to symbol conflicts when linking. This patch
adds the proper prefix to all remaining global symbols and convert needed global vars to static.

The following function categories were updated:

1. Flow hardware control functions:
- flow_hw_list_destroy -> mlx5_flow_hw_list_destroy
- flow_hw_create_flow -> mlx5_flow_hw_create_flow
- flow_hw_set_port_info -> mlx5_flow_hw_set_port_info
- flow_hw_create_vport_action -> mlx5_flow_hw_create_vport_action
- flow_hw_destroy_vport_action -> mlx5_flow_hw_destroy_vport_action
- flow_hw_get_ecpri_parser_profile -> mlx5_flow_hw_get_ecpri_parser_profile

2. Flow DV (Direct Verbs) functions:
- flow_dv_convert_encap_data -> mlx5_flow_dv_convert_encap_data
- flow_dv_translate_items_hws -> mlx5_flow_dv_translate_items_hws
- flow_dv_tbl_resource_release -> mlx5_flow_dv_tbl_resource_release
- __flow_dv_translate_items_hws -> mlx5_flow_dv_translate_items_hws_impl

3. Flow callback functions (26+ instances):
- flow_dv_mreg_create_cb -> mlx5_flow_dv_mreg_create_cb
- flow_dv_mreg_match_cb -> mlx5_flow_dv_mreg_match_cb
- flow_dv_mreg_remove_cb -> mlx5_flow_dv_mreg_remove_cb
- flow_dv_mreg_clone_cb -> mlx5_flow_dv_mreg_clone_cb
- flow_dv_mreg_clone_free_cb -> mlx5_flow_dv_mreg_clone_free_cb
- flow_dv_port_id_* callbacks (5 functions)
- flow_dv_push_vlan_* callbacks (5 functions)
- flow_dv_sample_* callbacks (5 functions)
- flow_dv_dest_array_* callbacks (5 functions)
- flow_nta_mreg_create_cb -> mlx5_flow_nta_mreg_create_cb
- flow_nta_mreg_remove_cb -> mlx5_flow_nta_mreg_remove_cb

4. Global variable:
- reg_to_field->mlx5_reg_to_field

After this change, all internal global symbols now have the mlx5_ prefix. Public PMD APIs correctly use the rte_pmd_mlx5_ prefix.

Following the above changes, Coverity warnings were handled.

Bugzilla ID: 1794

---
 drivers/net/mlx5/hws/mlx5dr_crc32.c     |   6 +-
 drivers/net/mlx5/hws/mlx5dr_crc32.h     |   2 +-
 drivers/net/mlx5/hws/mlx5dr_definer.c   |   2 +-
 drivers/net/mlx5/hws/mlx5dr_matcher.c   |  10 +-
 drivers/net/mlx5/hws/mlx5dr_rule.c      |   8 +-
 drivers/net/mlx5/linux/mlx5_flow_os.c   |   2 +-
 drivers/net/mlx5/linux/mlx5_os.c        |  87 +--
 drivers/net/mlx5/linux/mlx5_socket.c    |   4 +-
 drivers/net/mlx5/linux/mlx5_verbs.c     |   4 +-
 drivers/net/mlx5/linux/mlx5_verbs.h     |   2 +-
 drivers/net/mlx5/mlx5.c                 |  32 +-
 drivers/net/mlx5/mlx5.h                 |  18 +-
 drivers/net/mlx5/mlx5_devx.c            |   2 +-
 drivers/net/mlx5/mlx5_devx.h            |   2 +-
 drivers/net/mlx5/mlx5_driver_event.c    |   2 +-
 drivers/net/mlx5/mlx5_ethdev.c          |   4 +-
 drivers/net/mlx5/mlx5_flow.c            | 126 ++--
 drivers/net/mlx5/mlx5_flow.h            | 462 +++++++-------
 drivers/net/mlx5/mlx5_flow_dv.c         | 764 ++++++++++++------------
 drivers/net/mlx5/mlx5_flow_flex.c       |  22 +-
 drivers/net/mlx5/mlx5_flow_hw.c         | 156 ++---
 drivers/net/mlx5/mlx5_flow_meter.c      |   2 +-
 drivers/net/mlx5/mlx5_flow_verbs.c      |  14 +-
 drivers/net/mlx5/mlx5_nta_rss.c         |  56 +-
 drivers/net/mlx5/mlx5_nta_sample.c      |  34 +-
 drivers/net/mlx5/mlx5_nta_split.c       |   4 +-
 drivers/net/mlx5/mlx5_rx.c              |   4 +-
 drivers/net/mlx5/mlx5_rx.h              |   6 +-
 drivers/net/mlx5/mlx5_rxq.c             |  14 +-
 drivers/net/mlx5/mlx5_trigger.c         |   8 +-
 drivers/net/mlx5/mlx5_tx.c              |   4 +-
 drivers/net/mlx5/mlx5_tx.h              |   4 +-
 drivers/net/mlx5/mlx5_txq.c             |   8 +-
 drivers/net/mlx5/windows/mlx5_flow_os.c |   4 +-
 drivers/net/mlx5/windows/mlx5_os.c      |   2 +-
 35 files changed, 969 insertions(+), 912 deletions(-)
drivers/net/mlx5/hws/mlx5dr_crc32.c +3 -3
index 7431462e14c..6c757e25559 100644
@@ -4,7 +4,7 @@
 
 #include "mlx5dr_internal.h"
 
-uint32_t dr_ste_crc_tab32[] = {
+static const uint32_t dr_ste_crc_tab32[] = {
 	0x0, 0x77073096, 0xee0e612c, 0x990951ba, 0x76dc419, 0x706af48f,
 	0xe963a535, 0x9e6495a3, 0xedb8832, 0x79dcb8a4, 0xe0d5e91e, 0x97d2d988,
 	0x9b64c2b, 0x7eb17cbd, 0xe7b82d07, 0x90bf1d91, 0x1db71064, 0x6ab020f2,
@@ -51,7 +51,7 @@ uint32_t dr_ste_crc_tab32[] = {
 };
 
 /* CRC table for the CRC-16, the polynome is 0x100b */
-uint16_t dr_crc_inner_crc_tab16[] = {
+static const uint16_t dr_crc_inner_crc_tab16[] = {
 	0x0000, 0x100B, 0x2016, 0x301D, 0x402C, 0x5027, 0x603A, 0x7031,
 	0x8058, 0x9053, 0xA04E, 0xB045, 0xC074, 0xD07F, 0xE062, 0xF069,
 	0x10BB, 0x00B0, 0x30AD, 0x20A6, 0x5097, 0x409C, 0x7081, 0x608A,
@@ -96,7 +96,7 @@ uint32_t mlx5dr_crc32_calc(uint8_t *p, size_t len)
 	return rte_be_to_cpu_32(crc);
 }
 
-uint16_t mlx5dr_crc16_calc(uint8_t *p, size_t len, uint16_t crc_tab16[])
+uint16_t mlx5dr_crc16_calc(uint8_t *p, size_t len, const uint16_t crc_tab16[])
 {
 	uint16_t crc = 0;
 
drivers/net/mlx5/hws/mlx5dr_crc32.h +1 -1
index 75b6009a15a..c1fc910f518 100644
@@ -13,6 +13,6 @@ uint32_t mlx5dr_crc32_calc(uint8_t *p, size_t len);
 /* Standard CRC16 calculation using the crc_tab16 param to indicate
  * the pre-calculated polynome hash values.
  */
-uint16_t mlx5dr_crc16_calc(uint8_t *p, size_t len, uint16_t crc_tab16[]);
+uint16_t mlx5dr_crc16_calc(uint8_t *p, size_t len, const uint16_t crc_tab16[]);
 
 #endif /* MLX5DR_CRC32_C_ */
drivers/net/mlx5/hws/mlx5dr_definer.c +1 -1
index 03d2794367e..6a016de78ea 100644
@@ -2663,7 +2663,7 @@ mlx5dr_definer_get_ecpri_parser_byte_off_from_ctx(void *dr_ctx, uint32_t *byte_o
 	struct mlx5_ecpri_parser_profile *ecp;
 	uint32_t i;
 
-	ecp = flow_hw_get_ecpri_parser_profile(dr_ctx);
+	ecp = mlx5_flow_hw_get_ecpri_parser_profile(dr_ctx);
 	if (!ecp)
 		return UINT32_MAX;
 	for (i = 0; i < ecp->num; i++)
drivers/net/mlx5/hws/mlx5dr_matcher.c +5 -5
index 7d77cf4a3e2..8c07ea88821 100644
@@ -1350,11 +1350,11 @@ static int mlx5dr_matcher_init_root(struct mlx5dr_matcher *matcher)
 	flow_attr.tbl_type = type;
 
 	/* On root table matcher, only a single match template is supported */
-	ret = flow_dv_translate_items_hws(matcher->mt[0].items,
-					  &flow_attr, mask->match_buf,
-					  MLX5_SET_MATCHER_HS_M, NULL,
-					  &match_criteria,
-					  &rte_error);
+	ret = mlx5_flow_dv_translate_items_hws(matcher->mt[0].items,
+					       &flow_attr, mask->match_buf,
+					       MLX5_SET_MATCHER_HS_M, NULL,
+					       &match_criteria,
+					       &rte_error);
 	if (ret) {
 		DR_LOG(ERR, "Failed to convert items to PRM [%s]", rte_error.message);
 		goto free_mask;
drivers/net/mlx5/hws/mlx5dr_rule.c +4 -4
index 895ac858eca..4ff3d26e6f8 100644
@@ -738,10 +738,10 @@ int mlx5dr_rule_create_root_no_comp(struct mlx5dr_rule *rule,
 
 	flow_attr.tbl_type = rule->matcher->tbl->type;
 
-	ret = flow_dv_translate_items_hws(items, &flow_attr, value->match_buf,
-					  MLX5_SET_MATCHER_HS_V, NULL,
-					  &match_criteria,
-					  &error);
+	ret = mlx5_flow_dv_translate_items_hws(items, &flow_attr, value->match_buf,
+					       MLX5_SET_MATCHER_HS_V, NULL,
+					       &match_criteria,
+					       &error);
 	if (ret) {
 		DR_LOG(ERR, "Failed to convert items to PRM [%s]", error.message);
 		goto free_value;
drivers/net/mlx5/linux/mlx5_flow_os.c +1 -1
index f5eee46e44b..5d80898b667 100644
@@ -73,7 +73,7 @@ mlx5_flow_os_workspace_gc_release(void)
 		struct mlx5_flow_workspace *wks = gc_head;
 
 		gc_head = wks->gc;
-		flow_release_workspace(wks);
+		mlx5_flow_release_workspace(wks);
 	}
 }
 
drivers/net/mlx5/linux/mlx5_os.c +51 -36

162 lines not on this page · raw message

drivers/net/mlx5/linux/mlx5_socket.c +2 -2
index 6ce0e59643d..3a67dff4a19 100644
@@ -23,8 +23,8 @@
 #define MLX5_SOCKET_PATH "/var/tmp/dpdk_net_mlx5_%d"
 #define MLX5_ALL_PORT_IDS 0xffff
 
-int server_socket = -1; /* Unix socket for primary process. */
-struct rte_intr_handle *server_intr_handle; /* Interrupt handler. */
+static int server_socket = -1; /* Unix socket for primary process. */
+static struct rte_intr_handle *server_intr_handle; /* Interrupt handler. */
 
 /**
  * Handle server pmd socket interrupts.
drivers/net/mlx5/linux/mlx5_verbs.c +2 -2
index 01d3d6ae5d4..103a03bd1ab 100644
@@ -795,7 +795,7 @@ mlx5_ibv_drop_action_create(struct rte_eth_dev *dev)
 			.rx_hash_conf = (struct ibv_rx_hash_conf){
 				.rx_hash_function = IBV_RX_HASH_FUNC_TOEPLITZ,
 				.rx_hash_key_len = MLX5_RSS_HASH_KEY_LEN,
-				.rx_hash_key = rss_hash_default_key,
+				.rx_hash_key = mlx5_rss_hash_default_key,
 				.rx_hash_fields_mask = 0,
 				},
 			.rwq_ind_tbl = ind_tbl,
@@ -1225,7 +1225,7 @@ mlx5_txq_ibv_obj_release(struct mlx5_txq_obj *txq_obj)
 	claim_zero(mlx5_glue->destroy_cq(txq_obj->cq));
 }
 
-struct mlx5_obj_ops ibv_obj_ops = {
+struct mlx5_obj_ops mlx5_ibv_obj_ops = {
 	.rxq_obj_modify_vlan_strip = mlx5_rxq_obj_modify_wq_vlan_strip,
 	.rxq_obj_new = mlx5_rxq_ibv_obj_new,
 	.rxq_event_get = mlx5_rx_ibv_get_event,
drivers/net/mlx5/linux/mlx5_verbs.h +1 -1
index 829d9fa7387..80732756413 100644
@@ -12,5 +12,5 @@ void mlx5_txq_ibv_obj_release(struct mlx5_txq_obj *txq_obj);
 int mlx5_rxq_ibv_obj_dummy_lb_create(struct rte_eth_dev *dev);
 void mlx5_rxq_ibv_obj_dummy_lb_release(struct rte_eth_dev *dev);
 
-extern struct mlx5_obj_ops ibv_obj_ops;
+extern struct mlx5_obj_ops mlx5_ibv_obj_ops;
 #endif /* RTE_PMD_MLX5_VERBS_H_ */
drivers/net/mlx5/mlx5.c +16 -16
index d77b3035219..5a52ab180dd 100644
@@ -2211,11 +2211,11 @@ mlx5_alloc_hw_group_hash_list(struct mlx5_priv *priv)
 	sh->groups = mlx5_hlist_create
 			(s, MLX5_FLOW_TABLE_HLIST_ARRAY_SIZE,
 			 false, true, sh,
-			 flow_hw_grp_create_cb,
-			 flow_hw_grp_match_cb,
-			 flow_hw_grp_remove_cb,
-			 flow_hw_grp_clone_cb,
-			 flow_hw_grp_clone_free_cb);
+			 mlx5_flow_hw_grp_create_cb,
+			 mlx5_flow_hw_grp_match_cb,
+			 mlx5_flow_hw_grp_remove_cb,
+			 mlx5_flow_hw_grp_clone_cb,
+			 mlx5_flow_hw_grp_clone_free_cb);
 	if (!sh->groups) {
 		DRV_LOG(ERR, "flow groups with hash creation failed.");
 		err = ENOMEM;
@@ -2253,11 +2253,11 @@ mlx5_alloc_table_hash_list(struct mlx5_priv *priv __rte_unused)
 	snprintf(s, sizeof(s), "%s_flow_table", priv->sh->ibdev_name);
 	sh->flow_tbls = mlx5_hlist_create(s, MLX5_FLOW_TABLE_HLIST_ARRAY_SIZE,
 					  false, true, sh,
-					  flow_dv_tbl_create_cb,
-					  flow_dv_tbl_match_cb,
-					  flow_dv_tbl_remove_cb,
-					  flow_dv_tbl_clone_cb,
-					  flow_dv_tbl_clone_free_cb);
+					  mlx5_flow_dv_tbl_create_cb,
+					  mlx5_flow_dv_tbl_match_cb,
+					  mlx5_flow_dv_tbl_remove_cb,
+					  mlx5_flow_dv_tbl_clone_cb,
+					  mlx5_flow_dv_tbl_clone_free_cb);
 	if (!sh->flow_tbls) {
 		DRV_LOG(ERR, "flow tables with hash creation failed.");
 		err = ENOMEM;
@@ -2272,11 +2272,11 @@ mlx5_alloc_table_hash_list(struct mlx5_priv *priv __rte_unused)
 	 * because DV expect to see them even if they cannot be created by
 	 * RDMA-CORE.
 	 */
-	if (!flow_dv_tbl_resource_get(dev, 0, 0, 0, 0,
+	if (!mlx5_flow_dv_tbl_resource_get(dev, 0, 0, 0, 0,
 		NULL, 0, 1, 0, &error) ||
-	    !flow_dv_tbl_resource_get(dev, 0, 1, 0, 0,
+	    !mlx5_flow_dv_tbl_resource_get(dev, 0, 1, 0, 0,
 		NULL, 0, 1, 0, &error) ||
-	    !flow_dv_tbl_resource_get(dev, 0, 0, 1, 0,
+	    !mlx5_flow_dv_tbl_resource_get(dev, 0, 0, 1, 0,
 		NULL, 0, 1, 0, &error)) {
 		err = ENOMEM;
 		goto error;
@@ -2472,10 +2472,10 @@ mlx5_dev_close(struct rte_eth_dev *dev)
 	mlx5_indirect_list_handles_release(dev);
 #ifdef HAVE_MLX5_HWS_SUPPORT
 	mlx5_nta_sample_context_free(dev);
-	flow_hw_destroy_vport_action(dev);
+	mlx5_flow_hw_destroy_vport_action(dev);
 	/* dr context will be closed after mlx5_os_free_shared_dr. */
-	flow_hw_resource_release(dev);
-	flow_hw_clear_port_info(dev);
+	mlx5_flow_hw_resource_release(dev);
+	mlx5_flow_hw_clear_port_info(dev);
 	if (priv->tlv_options != NULL) {
 		/* Free the GENEVE TLV parser resource. */
 		claim_zero(mlx5_geneve_tlv_options_destroy(priv->tlv_options, sh->phdev));
drivers/net/mlx5/mlx5.h +9 -9
index d84445db492..4bec2127720 100644
@@ -2527,8 +2527,8 @@ int mlx5_counter_query(struct rte_eth_dev *dev, uint32_t cnt,
 		    bool clear, uint64_t *pkts, uint64_t *bytes, void **action);
 int mlx5_flow_dev_dump(struct rte_eth_dev *dev, struct rte_flow *flow,
 			FILE *file, struct rte_flow_error *error);
-int save_dump_file(const unsigned char *data, uint32_t size,
-		uint32_t type, uint64_t id, void *arg, FILE *file);
+int mlx5_save_dump_file(const unsigned char *data, uint32_t size,
+			uint32_t type, uint64_t id, void *arg, FILE *file);
 int mlx5_flow_query_counter(struct rte_eth_dev *dev, struct rte_flow *flow,
 	struct rte_flow_query_count *count, struct rte_flow_error *error);
 #ifdef HAVE_IBV_FLOW_DV_SUPPORT
@@ -2576,7 +2576,7 @@ int mlx5_flow_meter_ops_get(struct rte_eth_dev *dev, void *arg);
 struct mlx5_flow_meter_info *mlx5_flow_meter_find(struct mlx5_priv *priv,
 		uint32_t meter_id, uint32_t *mtr_idx);
 struct mlx5_flow_meter_info *
-flow_dv_meter_find_by_idx(struct mlx5_priv *priv, uint32_t idx);
+mlx5_flow_dv_meter_find_by_idx(struct mlx5_priv *priv, uint32_t idx);
 int mlx5_flow_meter_attach(struct mlx5_priv *priv,
 			   struct mlx5_flow_meter_info *fm,
 			   const struct rte_flow_attr *attr,
@@ -2709,12 +2709,12 @@ mlx5_aso_cqe_err_handle(struct mlx5_aso_sq *sq);
 /* mlx5_flow_flex.c */
 
 struct rte_flow_item_flex_handle *
-flow_dv_item_create(struct rte_eth_dev *dev,
-		    const struct rte_flow_item_flex_conf *conf,
-		    struct rte_flow_error *error);
-int flow_dv_item_release(struct rte_eth_dev *dev,
-		    const struct rte_flow_item_flex_handle *flex_handle,
-		    struct rte_flow_error *error);
+mlx5_flow_dv_item_create(struct rte_eth_dev *dev,
+			 const struct rte_flow_item_flex_conf *conf,
+			 struct rte_flow_error *error);
+int mlx5_flow_dv_item_release(struct rte_eth_dev *dev,
+			      const struct rte_flow_item_flex_handle *flex_handle,
+			      struct rte_flow_error *error);
 int mlx5_flex_item_port_init(struct rte_eth_dev *dev);
 void mlx5_flex_item_port_cleanup(struct rte_eth_dev *dev);
 void mlx5_flex_flow_translate_item(struct rte_eth_dev *dev, void *matcher,
drivers/net/mlx5/mlx5_devx.c +1 -1
index 523b53d7130..4b30a4fade5 100644
@@ -1733,7 +1733,7 @@ mlx5_txq_devx_obj_release(struct mlx5_txq_obj *txq_obj)
 	}
 }
 
-struct mlx5_obj_ops devx_obj_ops = {
+struct mlx5_obj_ops mlx5_devx_obj_ops = {
 	.rxq_obj_modify_vlan_strip = mlx5_rxq_obj_modify_rq_vlan_strip,
 	.rxq_obj_modify_counter_set_id = mlx5_rxq_obj_modify_counter,
 	.rxq_obj_new = mlx5_rxq_devx_obj_new,
drivers/net/mlx5/mlx5_devx.h +1 -1
index 4ab8cfbd221..3c836170f58 100644
@@ -14,6 +14,6 @@ void mlx5_txq_devx_obj_release(struct mlx5_txq_obj *txq_obj);
 int mlx5_devx_modify_rq(struct mlx5_rxq_priv *rxq, uint8_t type);
 int mlx5_devx_extq_port_validate(uint16_t port_id);
 
-extern struct mlx5_obj_ops devx_obj_ops;
+extern struct mlx5_obj_ops mlx5_devx_obj_ops;
 
 #endif /* RTE_PMD_MLX5_DEVX_H_ */
drivers/net/mlx5/mlx5_driver_event.c +1 -1
index cad1f875180..1dc8029ee50 100644
@@ -32,7 +32,7 @@ struct registered_cb {
 	const void *opaque;
 };
 
-LIST_HEAD(, registered_cb) cb_list_head = LIST_HEAD_INITIALIZER(cb_list_head);
+static LIST_HEAD(, registered_cb) cb_list_head = LIST_HEAD_INITIALIZER(cb_list_head);
 
 static const char *
 generate_rx_queue_info(struct mlx5_rxq_priv *rxq)
drivers/net/mlx5/mlx5_ethdev.c +2 -2
index c93a7ac4f26..c022e5d4f94 100644
@@ -103,7 +103,7 @@ mlx5_dev_configure(struct rte_eth_dev *dev)
 	memcpy(priv->rss_conf.rss_key,
 	       use_app_rss_key ?
 	       dev->data->dev_conf.rx_adv_conf.rss_conf.rss_key :
-	       rss_hash_default_key,
+	       mlx5_rss_hash_default_key,
 	       MLX5_RSS_HASH_KEY_LEN);
 	priv->rss_conf.rss_key_len = MLX5_RSS_HASH_KEY_LEN;
 	priv->rss_conf.rss_hf = dev->data->dev_conf.rx_adv_conf.rss_conf.rss_hf;
@@ -397,7 +397,7 @@ mlx5_dev_infos_get(struct rte_eth_dev *dev, struct rte_eth_dev_info *info)
 	info->rx_desc_lim.nb_max = max_wqe;
 	info->tx_desc_lim.nb_max = max_wqe;
 	if (priv->sh->cdev->config.hca_attr.mem_rq_rmp &&
-	    priv->obj_ops.rxq_obj_new == devx_obj_ops.rxq_obj_new)
+	    priv->obj_ops.rxq_obj_new == mlx5_devx_obj_ops.rxq_obj_new)
 		info->dev_capa |= RTE_ETH_DEV_CAPA_RXQ_SHARE;
 	info->switch_info.name = dev->data->name;
 	info->switch_info.domain_id = priv->domain_id;
drivers/net/mlx5/mlx5_flow.c +63 -63

324 lines not on this page · raw message

drivers/net/mlx5/mlx5_flow.h +234 -228

589 lines not on this page · raw message

drivers/net/mlx5/mlx5_flow_dv.c +394 -370

1,682 lines not on this page · raw message

drivers/net/mlx5/mlx5_flow_flex.c +15 -7
index 12d79ffb9e1..32f126f0526 100644

Lines of this file are not shown. View the raw message.

drivers/net/mlx5/mlx5_flow_hw.c +80 -76

156 lines not on this page · raw message

drivers/net/mlx5/mlx5_flow_meter.c +1 -1
index cd6a8045930..3d0cf152e5d 100644

Lines of this file are not shown. View the raw message.

drivers/net/mlx5/mlx5_flow_verbs.c +7 -7
index 67d199ce15e..bb240d38d94 100644

Lines of this file are not shown. View the raw message.

drivers/net/mlx5/mlx5_nta_rss.c +28 -28

56 lines not on this page · raw message

drivers/net/mlx5/mlx5_nta_sample.c +17 -17
index 0b7b3d0c8ee..c637b0ede38 100644

Lines of this file are not shown. View the raw message.

drivers/net/mlx5/mlx5_nta_split.c +2 -2
index c95da56d729..327930ecb83 100644

Lines of this file are not shown. View the raw message.

drivers/net/mlx5/mlx5_rx.c +2 -2
index ac663a978ee..bc0470e6af3 100644

Lines of this file are not shown. View the raw message.

drivers/net/mlx5/mlx5_rx.h +3 -3
index 127abe41fb2..86636d598fc 100644

Lines of this file are not shown. View the raw message.

drivers/net/mlx5/mlx5_rxq.c +7 -7
index 9210a92c5f4..01e90a08a7d 100644

Lines of this file are not shown. View the raw message.

drivers/net/mlx5/mlx5_trigger.c +4 -4
index b38ba9022ea..f155b1a7a05 100644

Lines of this file are not shown. View the raw message.

drivers/net/mlx5/mlx5_tx.c +2 -2
index fe9da7f8c1e..4c970130d91 100644

Lines of this file are not shown. View the raw message.

drivers/net/mlx5/mlx5_tx.h +2 -2
index 16307206e2a..fbf6dacb020 100644

Lines of this file are not shown. View the raw message.

drivers/net/mlx5/mlx5_txq.c +4 -4
index ad15b20e7b9..5219642c7db 100644

Lines of this file are not shown. View the raw message.

drivers/net/mlx5/windows/mlx5_flow_os.c +2 -2
index 15c6fc56133..48d9f8520e0 100644

Lines of this file are not shown. View the raw message.

drivers/net/mlx5/windows/mlx5_os.c +1 -1
index 4a00c280095..4250ac38b0c 100644

Lines of this file are not shown. View the raw message.

The rest of this diff is not shown. View the raw message.

Signature · 1 line
2.21.0

Part of the diff is not shown here. View the raw message.

#4 lore raw

PATCH v3 1/2 common/mlx5: add mlx5 prefix to remaining internal functions

In reply to Maayan Kashani

Several internal functions in the mlx5 driver were missing the mlx5_ prefix, which could lead to symbol conflicts when linking. This patch adds the proper prefix to all remaining global symbols in common mlx5.

The following function categories were updated:
haswell_broadwell_cpu->mlx5_haswell_broadwell_cpu

Global variable:
atomic_sn is now static.

Bugzilla ID: 1794

---
 drivers/common/mlx5/linux/mlx5_common_os.c    |  2 +-
 drivers/common/mlx5/linux/mlx5_common_verbs.c |  2 +-
 drivers/common/mlx5/linux/mlx5_nl.c           |  2 +-
 drivers/common/mlx5/mlx5_common.c             | 14 +++++++-------
 drivers/common/mlx5/mlx5_common.h             |  2 +-
 drivers/common/mlx5/windows/mlx5_common_os.c  |  2 +-
 6 files changed, 12 insertions(+), 12 deletions(-)
drivers/common/mlx5/linux/mlx5_common_os.c +1 -1
index 2867e216188..7d0c9492524 100644
@@ -994,7 +994,7 @@ mlx5_os_wrapped_mkey_create(void *ctx, void *pd, uint32_t pdn, void *addr,
 	struct mlx5_devx_obj *mkey;
 	struct ibv_mr *ibv_mr = mlx5_glue->reg_mr(pd, addr, length,
 						  IBV_ACCESS_LOCAL_WRITE |
-						  (haswell_broadwell_cpu ? 0 :
+						  (mlx5_haswell_broadwell_cpu ? 0 :
 						  IBV_ACCESS_RELAXED_ORDERING));
 
 	if (!ibv_mr) {
drivers/common/mlx5/linux/mlx5_common_verbs.c +1 -1
index 98260df4707..2322d9d0335 100644
@@ -115,7 +115,7 @@ mlx5_common_verbs_reg_mr(void *pd, void *addr, size_t length,
 
 	ibv_mr = mlx5_glue->reg_mr(pd, addr, length,
 				   IBV_ACCESS_LOCAL_WRITE |
-				   (haswell_broadwell_cpu ? 0 :
+				   (mlx5_haswell_broadwell_cpu ? 0 :
 				   IBV_ACCESS_RELAXED_ORDERING));
 	if (!ibv_mr)
 		return -1;
drivers/common/mlx5/linux/mlx5_nl.c +1 -1
index d53543a1132..4fbb67af21d 100644
@@ -176,7 +176,7 @@ struct mlx5_nl_mac_addr {
 	int mac_n; /**< Number of addresses in the array. */
 };
 
-RTE_ATOMIC(uint32_t) atomic_sn;
+static RTE_ATOMIC(uint32_t) atomic_sn;
 
 /* Generate Netlink sequence number. */
 #define MLX5_NL_SN_GENERATE (rte_atomic_fetch_add_explicit(&atomic_sn, 1, \
drivers/common/mlx5/mlx5_common.c +7 -7
index 84a93e7dbde..f71dbe46378 100644
@@ -21,8 +21,8 @@
 #include "mlx5_common_defs.h"
 #include "mlx5_common_private.h"
 
-RTE_EXPORT_INTERNAL_SYMBOL(haswell_broadwell_cpu)
-uint8_t haswell_broadwell_cpu;
+RTE_EXPORT_INTERNAL_SYMBOL(mlx5_haswell_broadwell_cpu)
+uint8_t mlx5_haswell_broadwell_cpu;
 
 /* Driver type key for new device global syntax. */
 #define MLX5_DRIVER_KEY "driver"
@@ -1273,7 +1273,7 @@ mlx5_common_init(void)
 
 /**
  * This function is responsible of initializing the variable
- *  haswell_broadwell_cpu by checking if the cpu is intel
+ *  mlx5_haswell_broadwell_cpu by checking if the cpu is intel
  *  and reading the data returned from mlx5_cpu_id().
  *  since haswell and broadwell cpus don't have improved performance
  *  when using relaxed ordering we want to check the cpu type before
@@ -1299,7 +1299,7 @@ RTE_INIT_PRIO(mlx5_is_haswell_broadwell_cpu, LOG)
 	vendor = ebx;
 	max_level = eax;
 	if (max_level < 1) {
-		haswell_broadwell_cpu = 0;
+		mlx5_haswell_broadwell_cpu = 0;
 		return;
 	}
 	mlx5_cpu_id(1, &eax, &ebx, &ecx, &edx);
@@ -1314,18 +1314,18 @@ RTE_INIT_PRIO(mlx5_is_haswell_broadwell_cpu, LOG)
 		if (brand_id == 0 && family == 0x6) {
 			for (i = 0; i < RTE_DIM(broadwell_models); i++)
 				if (model == broadwell_models[i]) {
-					haswell_broadwell_cpu = 1;
+					mlx5_haswell_broadwell_cpu = 1;
 					return;
 				}
 			for (i = 0; i < RTE_DIM(haswell_models); i++)
 				if (model == haswell_models[i]) {
-					haswell_broadwell_cpu = 1;
+					mlx5_haswell_broadwell_cpu = 1;
 					return;
 				}
 		}
 	}
 #endif
-	haswell_broadwell_cpu = 0;
+	mlx5_haswell_broadwell_cpu = 0;
 }
 
 /**
drivers/common/mlx5/mlx5_common.h +1 -1
index 9403385195d..311e862f05a 100644
@@ -477,7 +477,7 @@ __rte_internal
 void mlx5_translate_port_name(const char *port_name_in,
 			      struct mlx5_switch_info *port_info_out);
 void mlx5_glue_constructor(void);
-extern uint8_t haswell_broadwell_cpu;
+extern uint8_t mlx5_haswell_broadwell_cpu;
 
 __rte_internal
 void mlx5_common_init(void);
drivers/common/mlx5/windows/mlx5_common_os.c +1 -1
index 7fac361460b..16fcc5f9fcc 100644
@@ -402,7 +402,7 @@ mlx5_os_reg_mr(void *pd,
 	mkey_attr.size = length;
 	mkey_attr.umem_id = ((struct mlx5_devx_umem *)(obj))->umem_id;
 	mkey_attr.pd = mlx5_pd->pdn;
-	if (!haswell_broadwell_cpu) {
+	if (!mlx5_haswell_broadwell_cpu) {
 		mkey_attr.relaxed_ordering_write = attr.relaxed_ordering_write;
 		mkey_attr.relaxed_ordering_read = attr.relaxed_ordering_read;
 	}
Signature · 1 line
2.21.0
#5 lore raw

PATCH v3 2/2 net/mlx5: add mlx5 prefix to remaining internal functions

Several internal functions in the mlx5 driver were missing the mlx5_ prefix, which could lead to symbol conflicts when linking. This patch
adds the proper prefix to all remaining global symbols and convert needed global vars to static.

The following function categories were updated:

1. Flow hardware control functions:
- flow_hw_list_destroy -> mlx5_flow_hw_list_destroy
- flow_hw_create_flow -> mlx5_flow_hw_create_flow
- flow_hw_set_port_info -> mlx5_flow_hw_set_port_info
- flow_hw_create_vport_action -> mlx5_flow_hw_create_vport_action
- flow_hw_destroy_vport_action -> mlx5_flow_hw_destroy_vport_action
- flow_hw_get_ecpri_parser_profile -> mlx5_flow_hw_get_ecpri_parser_profile

2. Flow DV (Direct Verbs) functions:
- flow_dv_convert_encap_data -> mlx5_flow_dv_convert_encap_data
- flow_dv_translate_items_hws -> mlx5_flow_dv_translate_items_hws
- flow_dv_tbl_resource_release -> mlx5_flow_dv_tbl_resource_release
- __flow_dv_translate_items_hws -> mlx5_flow_dv_translate_items_hws_impl

3. Flow callback functions (26+ instances):
- flow_dv_mreg_create_cb -> mlx5_flow_dv_mreg_create_cb
- flow_dv_mreg_match_cb -> mlx5_flow_dv_mreg_match_cb
- flow_dv_mreg_remove_cb -> mlx5_flow_dv_mreg_remove_cb
- flow_dv_mreg_clone_cb -> mlx5_flow_dv_mreg_clone_cb
- flow_dv_mreg_clone_free_cb -> mlx5_flow_dv_mreg_clone_free_cb
- flow_dv_port_id_* callbacks (5 functions)
- flow_dv_push_vlan_* callbacks (5 functions)
- flow_dv_sample_* callbacks (5 functions)
- flow_dv_dest_array_* callbacks (5 functions)
- flow_nta_mreg_create_cb -> mlx5_flow_nta_mreg_create_cb
- flow_nta_mreg_remove_cb -> mlx5_flow_nta_mreg_remove_cb

4. Global variable:
- reg_to_field->mlx5_reg_to_field

After this change, all internal global symbols now have the mlx5_ prefix. Public PMD APIs correctly use the rte_pmd_mlx5_ prefix.

Following the above changes, Coverity warnings were handled. Coverity issue: N/A

Bugzilla ID: 1794

---
 drivers/net/mlx5/hws/mlx5dr_crc32.c     |   6 +-
 drivers/net/mlx5/hws/mlx5dr_crc32.h     |   2 +-
 drivers/net/mlx5/hws/mlx5dr_definer.c   |   2 +-
 drivers/net/mlx5/hws/mlx5dr_matcher.c   |  10 +-
 drivers/net/mlx5/hws/mlx5dr_rule.c      |   8 +-
 drivers/net/mlx5/linux/mlx5_flow_os.c   |   2 +-
 drivers/net/mlx5/linux/mlx5_os.c        |  87 +--
 drivers/net/mlx5/linux/mlx5_socket.c    |   4 +-
 drivers/net/mlx5/linux/mlx5_verbs.c     |   4 +-
 drivers/net/mlx5/linux/mlx5_verbs.h     |   2 +-
 drivers/net/mlx5/mlx5.c                 |  32 +-
 drivers/net/mlx5/mlx5.h                 |  18 +-
 drivers/net/mlx5/mlx5_devx.c            |   2 +-
 drivers/net/mlx5/mlx5_devx.h            |   2 +-
 drivers/net/mlx5/mlx5_driver_event.c    |   2 +-
 drivers/net/mlx5/mlx5_ethdev.c          |   4 +-
 drivers/net/mlx5/mlx5_flow.c            | 126 ++--
 drivers/net/mlx5/mlx5_flow.h            | 462 +++++++-------
 drivers/net/mlx5/mlx5_flow_dv.c         | 764 ++++++++++++------------
 drivers/net/mlx5/mlx5_flow_flex.c       |  22 +-
 drivers/net/mlx5/mlx5_flow_hw.c         | 156 ++---
 drivers/net/mlx5/mlx5_flow_meter.c      |   2 +-
 drivers/net/mlx5/mlx5_flow_verbs.c      |  14 +-
 drivers/net/mlx5/mlx5_nta_rss.c         |  56 +-
 drivers/net/mlx5/mlx5_nta_sample.c      |  34 +-
 drivers/net/mlx5/mlx5_nta_split.c       |   4 +-
 drivers/net/mlx5/mlx5_rx.c              |   4 +-
 drivers/net/mlx5/mlx5_rx.h              |   6 +-
 drivers/net/mlx5/mlx5_rxq.c             |  14 +-
 drivers/net/mlx5/mlx5_trigger.c         |   8 +-
 drivers/net/mlx5/mlx5_tx.c              |   4 +-
 drivers/net/mlx5/mlx5_tx.h              |   4 +-
 drivers/net/mlx5/mlx5_txq.c             |   8 +-
 drivers/net/mlx5/windows/mlx5_flow_os.c |   4 +-
 drivers/net/mlx5/windows/mlx5_os.c      |   2 +-
 35 files changed, 969 insertions(+), 912 deletions(-)
drivers/net/mlx5/hws/mlx5dr_crc32.c +3 -3
index 7431462e14c..6c757e25559 100644
@@ -4,7 +4,7 @@
 
 #include "mlx5dr_internal.h"
 
-uint32_t dr_ste_crc_tab32[] = {
+static const uint32_t dr_ste_crc_tab32[] = {
 	0x0, 0x77073096, 0xee0e612c, 0x990951ba, 0x76dc419, 0x706af48f,
 	0xe963a535, 0x9e6495a3, 0xedb8832, 0x79dcb8a4, 0xe0d5e91e, 0x97d2d988,
 	0x9b64c2b, 0x7eb17cbd, 0xe7b82d07, 0x90bf1d91, 0x1db71064, 0x6ab020f2,
@@ -51,7 +51,7 @@ uint32_t dr_ste_crc_tab32[] = {
 };
 
 /* CRC table for the CRC-16, the polynome is 0x100b */
-uint16_t dr_crc_inner_crc_tab16[] = {
+static const uint16_t dr_crc_inner_crc_tab16[] = {
 	0x0000, 0x100B, 0x2016, 0x301D, 0x402C, 0x5027, 0x603A, 0x7031,
 	0x8058, 0x9053, 0xA04E, 0xB045, 0xC074, 0xD07F, 0xE062, 0xF069,
 	0x10BB, 0x00B0, 0x30AD, 0x20A6, 0x5097, 0x409C, 0x7081, 0x608A,
@@ -96,7 +96,7 @@ uint32_t mlx5dr_crc32_calc(uint8_t *p, size_t len)
 	return rte_be_to_cpu_32(crc);
 }
 
-uint16_t mlx5dr_crc16_calc(uint8_t *p, size_t len, uint16_t crc_tab16[])
+uint16_t mlx5dr_crc16_calc(uint8_t *p, size_t len, const uint16_t crc_tab16[])
 {
 	uint16_t crc = 0;
 
drivers/net/mlx5/hws/mlx5dr_crc32.h +1 -1
index 75b6009a15a..c1fc910f518 100644
@@ -13,6 +13,6 @@ uint32_t mlx5dr_crc32_calc(uint8_t *p, size_t len);
 /* Standard CRC16 calculation using the crc_tab16 param to indicate
  * the pre-calculated polynome hash values.
  */
-uint16_t mlx5dr_crc16_calc(uint8_t *p, size_t len, uint16_t crc_tab16[]);
+uint16_t mlx5dr_crc16_calc(uint8_t *p, size_t len, const uint16_t crc_tab16[]);
 
 #endif /* MLX5DR_CRC32_C_ */
drivers/net/mlx5/hws/mlx5dr_definer.c +1 -1
index 03d2794367e..6a016de78ea 100644
@@ -2663,7 +2663,7 @@ mlx5dr_definer_get_ecpri_parser_byte_off_from_ctx(void *dr_ctx, uint32_t *byte_o
 	struct mlx5_ecpri_parser_profile *ecp;
 	uint32_t i;
 
-	ecp = flow_hw_get_ecpri_parser_profile(dr_ctx);
+	ecp = mlx5_flow_hw_get_ecpri_parser_profile(dr_ctx);
 	if (!ecp)
 		return UINT32_MAX;
 	for (i = 0; i < ecp->num; i++)
drivers/net/mlx5/hws/mlx5dr_matcher.c +5 -5
index 7d77cf4a3e2..8c07ea88821 100644
@@ -1350,11 +1350,11 @@ static int mlx5dr_matcher_init_root(struct mlx5dr_matcher *matcher)
 	flow_attr.tbl_type = type;
 
 	/* On root table matcher, only a single match template is supported */
-	ret = flow_dv_translate_items_hws(matcher->mt[0].items,
-					  &flow_attr, mask->match_buf,
-					  MLX5_SET_MATCHER_HS_M, NULL,
-					  &match_criteria,
-					  &rte_error);
+	ret = mlx5_flow_dv_translate_items_hws(matcher->mt[0].items,
+					       &flow_attr, mask->match_buf,
+					       MLX5_SET_MATCHER_HS_M, NULL,
+					       &match_criteria,
+					       &rte_error);
 	if (ret) {
 		DR_LOG(ERR, "Failed to convert items to PRM [%s]", rte_error.message);
 		goto free_mask;
drivers/net/mlx5/hws/mlx5dr_rule.c +4 -4
index 4f53734eec8..0fda0a2d713 100644
@@ -742,10 +742,10 @@ int mlx5dr_rule_create_root_no_comp(struct mlx5dr_rule *rule,
 
 	flow_attr.tbl_type = rule->matcher->tbl->type;
 
-	ret = flow_dv_translate_items_hws(items, &flow_attr, value->match_buf,
-					  MLX5_SET_MATCHER_HS_V, NULL,
-					  &match_criteria,
-					  &error);
+	ret = mlx5_flow_dv_translate_items_hws(items, &flow_attr, value->match_buf,
+					       MLX5_SET_MATCHER_HS_V, NULL,
+					       &match_criteria,
+					       &error);
 	if (ret) {
 		DR_LOG(ERR, "Failed to convert items to PRM [%s]", error.message);
 		goto free_value;
drivers/net/mlx5/linux/mlx5_flow_os.c +1 -1
index f5eee46e44b..5d80898b667 100644
@@ -73,7 +73,7 @@ mlx5_flow_os_workspace_gc_release(void)
 		struct mlx5_flow_workspace *wks = gc_head;
 
 		gc_head = wks->gc;
-		flow_release_workspace(wks);
+		mlx5_flow_release_workspace(wks);
 	}
 }
 
drivers/net/mlx5/linux/mlx5_os.c +51 -36

162 lines not on this page · raw message

drivers/net/mlx5/linux/mlx5_socket.c +2 -2
index 6ce0e59643d..3a67dff4a19 100644
@@ -23,8 +23,8 @@
 #define MLX5_SOCKET_PATH "/var/tmp/dpdk_net_mlx5_%d"
 #define MLX5_ALL_PORT_IDS 0xffff
 
-int server_socket = -1; /* Unix socket for primary process. */
-struct rte_intr_handle *server_intr_handle; /* Interrupt handler. */
+static int server_socket = -1; /* Unix socket for primary process. */
+static struct rte_intr_handle *server_intr_handle; /* Interrupt handler. */
 
 /**
  * Handle server pmd socket interrupts.
drivers/net/mlx5/linux/mlx5_verbs.c +2 -2
index 01d3d6ae5d4..103a03bd1ab 100644
@@ -795,7 +795,7 @@ mlx5_ibv_drop_action_create(struct rte_eth_dev *dev)
 			.rx_hash_conf = (struct ibv_rx_hash_conf){
 				.rx_hash_function = IBV_RX_HASH_FUNC_TOEPLITZ,
 				.rx_hash_key_len = MLX5_RSS_HASH_KEY_LEN,
-				.rx_hash_key = rss_hash_default_key,
+				.rx_hash_key = mlx5_rss_hash_default_key,
 				.rx_hash_fields_mask = 0,
 				},
 			.rwq_ind_tbl = ind_tbl,
@@ -1225,7 +1225,7 @@ mlx5_txq_ibv_obj_release(struct mlx5_txq_obj *txq_obj)
 	claim_zero(mlx5_glue->destroy_cq(txq_obj->cq));
 }
 
-struct mlx5_obj_ops ibv_obj_ops = {
+struct mlx5_obj_ops mlx5_ibv_obj_ops = {
 	.rxq_obj_modify_vlan_strip = mlx5_rxq_obj_modify_wq_vlan_strip,
 	.rxq_obj_new = mlx5_rxq_ibv_obj_new,
 	.rxq_event_get = mlx5_rx_ibv_get_event,
drivers/net/mlx5/linux/mlx5_verbs.h +1 -1
index 829d9fa7387..80732756413 100644
@@ -12,5 +12,5 @@ void mlx5_txq_ibv_obj_release(struct mlx5_txq_obj *txq_obj);
 int mlx5_rxq_ibv_obj_dummy_lb_create(struct rte_eth_dev *dev);
 void mlx5_rxq_ibv_obj_dummy_lb_release(struct rte_eth_dev *dev);
 
-extern struct mlx5_obj_ops ibv_obj_ops;
+extern struct mlx5_obj_ops mlx5_ibv_obj_ops;
 #endif /* RTE_PMD_MLX5_VERBS_H_ */
drivers/net/mlx5/mlx5.c +16 -16
index 26a05e51c2d..5e8d4bf67b7 100644
@@ -2214,11 +2214,11 @@ mlx5_alloc_hw_group_hash_list(struct mlx5_priv *priv)
 	sh->groups = mlx5_hlist_create
 			(s, MLX5_FLOW_TABLE_HLIST_ARRAY_SIZE,
 			 false, true, sh,
-			 flow_hw_grp_create_cb,
-			 flow_hw_grp_match_cb,
-			 flow_hw_grp_remove_cb,
-			 flow_hw_grp_clone_cb,
-			 flow_hw_grp_clone_free_cb);
+			 mlx5_flow_hw_grp_create_cb,
+			 mlx5_flow_hw_grp_match_cb,
+			 mlx5_flow_hw_grp_remove_cb,
+			 mlx5_flow_hw_grp_clone_cb,
+			 mlx5_flow_hw_grp_clone_free_cb);
 	if (!sh->groups) {
 		DRV_LOG(ERR, "flow groups with hash creation failed.");
 		err = ENOMEM;
@@ -2256,11 +2256,11 @@ mlx5_alloc_table_hash_list(struct mlx5_priv *priv __rte_unused)
 	snprintf(s, sizeof(s), "%s_flow_table", priv->sh->ibdev_name);
 	sh->flow_tbls = mlx5_hlist_create(s, MLX5_FLOW_TABLE_HLIST_ARRAY_SIZE,
 					  false, true, sh,
-					  flow_dv_tbl_create_cb,
-					  flow_dv_tbl_match_cb,
-					  flow_dv_tbl_remove_cb,
-					  flow_dv_tbl_clone_cb,
-					  flow_dv_tbl_clone_free_cb);
+					  mlx5_flow_dv_tbl_create_cb,
+					  mlx5_flow_dv_tbl_match_cb,
+					  mlx5_flow_dv_tbl_remove_cb,
+					  mlx5_flow_dv_tbl_clone_cb,
+					  mlx5_flow_dv_tbl_clone_free_cb);
 	if (!sh->flow_tbls) {
 		DRV_LOG(ERR, "flow tables with hash creation failed.");
 		err = ENOMEM;
@@ -2275,11 +2275,11 @@ mlx5_alloc_table_hash_list(struct mlx5_priv *priv __rte_unused)
 	 * because DV expect to see them even if they cannot be created by
 	 * RDMA-CORE.
 	 */
-	if (!flow_dv_tbl_resource_get(dev, 0, 0, 0, 0,
+	if (!mlx5_flow_dv_tbl_resource_get(dev, 0, 0, 0, 0,
 		NULL, 0, 1, 0, &error) ||
-	    !flow_dv_tbl_resource_get(dev, 0, 1, 0, 0,
+	    !mlx5_flow_dv_tbl_resource_get(dev, 0, 1, 0, 0,
 		NULL, 0, 1, 0, &error) ||
-	    !flow_dv_tbl_resource_get(dev, 0, 0, 1, 0,
+	    !mlx5_flow_dv_tbl_resource_get(dev, 0, 0, 1, 0,
 		NULL, 0, 1, 0, &error)) {
 		err = ENOMEM;
 		goto error;
@@ -2475,10 +2475,10 @@ mlx5_dev_close(struct rte_eth_dev *dev)
 	mlx5_indirect_list_handles_release(dev);
 #ifdef HAVE_MLX5_HWS_SUPPORT
 	mlx5_nta_sample_context_free(dev);
-	flow_hw_destroy_vport_action(dev);
+	mlx5_flow_hw_destroy_vport_action(dev);
 	/* dr context will be closed after mlx5_os_free_shared_dr. */
-	flow_hw_resource_release(dev);
-	flow_hw_clear_port_info(dev);
+	mlx5_flow_hw_resource_release(dev);
+	mlx5_flow_hw_clear_port_info(dev);
 	if (priv->tlv_options != NULL) {
 		/* Free the GENEVE TLV parser resource. */
 		claim_zero(mlx5_geneve_tlv_options_destroy(priv->tlv_options, sh->phdev));
drivers/net/mlx5/mlx5.h +9 -9
index cdc61f6b701..b83dda56524 100644
@@ -2526,8 +2526,8 @@ int mlx5_counter_query(struct rte_eth_dev *dev, uint32_t cnt,
 		    bool clear, uint64_t *pkts, uint64_t *bytes, void **action);
 int mlx5_flow_dev_dump(struct rte_eth_dev *dev, struct rte_flow *flow,
 			FILE *file, struct rte_flow_error *error);
-int save_dump_file(const unsigned char *data, uint32_t size,
-		uint32_t type, uint64_t id, void *arg, FILE *file);
+int mlx5_save_dump_file(const unsigned char *data, uint32_t size,
+			uint32_t type, uint64_t id, void *arg, FILE *file);
 int mlx5_flow_query_counter(struct rte_eth_dev *dev, struct rte_flow *flow,
 	struct rte_flow_query_count *count, struct rte_flow_error *error);
 #ifdef HAVE_IBV_FLOW_DV_SUPPORT
@@ -2575,7 +2575,7 @@ int mlx5_flow_meter_ops_get(struct rte_eth_dev *dev, void *arg);
 struct mlx5_flow_meter_info *mlx5_flow_meter_find(struct mlx5_priv *priv,
 		uint32_t meter_id, uint32_t *mtr_idx);
 struct mlx5_flow_meter_info *
-flow_dv_meter_find_by_idx(struct mlx5_priv *priv, uint32_t idx);
+mlx5_flow_dv_meter_find_by_idx(struct mlx5_priv *priv, uint32_t idx);
 int mlx5_flow_meter_attach(struct mlx5_priv *priv,
 			   struct mlx5_flow_meter_info *fm,
 			   const struct rte_flow_attr *attr,
@@ -2708,12 +2708,12 @@ mlx5_aso_cqe_err_handle(struct mlx5_aso_sq *sq);
 /* mlx5_flow_flex.c */
 
 struct rte_flow_item_flex_handle *
-flow_dv_item_create(struct rte_eth_dev *dev,
-		    const struct rte_flow_item_flex_conf *conf,
-		    struct rte_flow_error *error);
-int flow_dv_item_release(struct rte_eth_dev *dev,
-		    const struct rte_flow_item_flex_handle *flex_handle,
-		    struct rte_flow_error *error);
+mlx5_flow_dv_item_create(struct rte_eth_dev *dev,
+			 const struct rte_flow_item_flex_conf *conf,
+			 struct rte_flow_error *error);
+int mlx5_flow_dv_item_release(struct rte_eth_dev *dev,
+			      const struct rte_flow_item_flex_handle *flex_handle,
+			      struct rte_flow_error *error);
 int mlx5_flex_item_port_init(struct rte_eth_dev *dev);
 void mlx5_flex_item_port_cleanup(struct rte_eth_dev *dev);
 void mlx5_flex_flow_translate_item(struct rte_eth_dev *dev, void *matcher,
drivers/net/mlx5/mlx5_devx.c +1 -1
index 523b53d7130..4b30a4fade5 100644
@@ -1733,7 +1733,7 @@ mlx5_txq_devx_obj_release(struct mlx5_txq_obj *txq_obj)
 	}
 }
 
-struct mlx5_obj_ops devx_obj_ops = {
+struct mlx5_obj_ops mlx5_devx_obj_ops = {
 	.rxq_obj_modify_vlan_strip = mlx5_rxq_obj_modify_rq_vlan_strip,
 	.rxq_obj_modify_counter_set_id = mlx5_rxq_obj_modify_counter,
 	.rxq_obj_new = mlx5_rxq_devx_obj_new,
drivers/net/mlx5/mlx5_devx.h +1 -1
index 4ab8cfbd221..3c836170f58 100644
@@ -14,6 +14,6 @@ void mlx5_txq_devx_obj_release(struct mlx5_txq_obj *txq_obj);
 int mlx5_devx_modify_rq(struct mlx5_rxq_priv *rxq, uint8_t type);
 int mlx5_devx_extq_port_validate(uint16_t port_id);
 
-extern struct mlx5_obj_ops devx_obj_ops;
+extern struct mlx5_obj_ops mlx5_devx_obj_ops;
 
 #endif /* RTE_PMD_MLX5_DEVX_H_ */
drivers/net/mlx5/mlx5_driver_event.c +1 -1
index cad1f875180..1dc8029ee50 100644
@@ -32,7 +32,7 @@ struct registered_cb {
 	const void *opaque;
 };
 
-LIST_HEAD(, registered_cb) cb_list_head = LIST_HEAD_INITIALIZER(cb_list_head);
+static LIST_HEAD(, registered_cb) cb_list_head = LIST_HEAD_INITIALIZER(cb_list_head);
 
 static const char *
 generate_rx_queue_info(struct mlx5_rxq_priv *rxq)
drivers/net/mlx5/mlx5_ethdev.c +2 -2
index 00a1d444ef4..a29cdeeb505 100644
@@ -103,7 +103,7 @@ mlx5_dev_configure(struct rte_eth_dev *dev)
 	memcpy(priv->rss_conf.rss_key,
 	       use_app_rss_key ?
 	       dev->data->dev_conf.rx_adv_conf.rss_conf.rss_key :
-	       rss_hash_default_key,
+	       mlx5_rss_hash_default_key,
 	       MLX5_RSS_HASH_KEY_LEN);
 	priv->rss_conf.rss_key_len = MLX5_RSS_HASH_KEY_LEN;
 	priv->rss_conf.rss_hf = dev->data->dev_conf.rx_adv_conf.rss_conf.rss_hf;
@@ -397,7 +397,7 @@ mlx5_dev_infos_get(struct rte_eth_dev *dev, struct rte_eth_dev_info *info)
 	info->rx_desc_lim.nb_max = max_wqe;
 	info->tx_desc_lim.nb_max = max_wqe;
 	if (priv->sh->cdev->config.hca_attr.mem_rq_rmp &&
-	    priv->obj_ops.rxq_obj_new == devx_obj_ops.rxq_obj_new)
+	    priv->obj_ops.rxq_obj_new == mlx5_devx_obj_ops.rxq_obj_new)
 		info->dev_capa |= RTE_ETH_DEV_CAPA_RXQ_SHARE;
 	info->switch_info.name = dev->data->name;
 	info->switch_info.domain_id = priv->domain_id;
drivers/net/mlx5/mlx5_flow.c +63 -63

324 lines not on this page · raw message

drivers/net/mlx5/mlx5_flow.h +234 -228

589 lines not on this page · raw message

drivers/net/mlx5/mlx5_flow_dv.c +394 -370

1,682 lines not on this page · raw message

drivers/net/mlx5/mlx5_flow_flex.c +15 -7
index 33c424b42a6..baa5ddd9771 100644

Lines of this file are not shown. View the raw message.

drivers/net/mlx5/mlx5_flow_hw.c +80 -76

156 lines not on this page · raw message

drivers/net/mlx5/mlx5_flow_meter.c +1 -1
index 312cf38f949..e7afcf5399b 100644

Lines of this file are not shown. View the raw message.

drivers/net/mlx5/mlx5_flow_verbs.c +7 -7
index 67d199ce15e..bb240d38d94 100644

Lines of this file are not shown. View the raw message.

drivers/net/mlx5/mlx5_nta_rss.c +28 -28

56 lines not on this page · raw message

drivers/net/mlx5/mlx5_nta_sample.c +17 -17
index 0b7b3d0c8ee..c637b0ede38 100644

Lines of this file are not shown. View the raw message.

drivers/net/mlx5/mlx5_nta_split.c +2 -2
index c95da56d729..327930ecb83 100644

Lines of this file are not shown. View the raw message.

drivers/net/mlx5/mlx5_rx.c +2 -2
index ac663a978ee..bc0470e6af3 100644

Lines of this file are not shown. View the raw message.

drivers/net/mlx5/mlx5_rx.h +3 -3
index 127abe41fb2..86636d598fc 100644

Lines of this file are not shown. View the raw message.

drivers/net/mlx5/mlx5_rxq.c +7 -7
index c4ba746d473..48d982a8c24 100644

Lines of this file are not shown. View the raw message.

drivers/net/mlx5/mlx5_trigger.c +4 -4
index b38ba9022ea..f155b1a7a05 100644

Lines of this file are not shown. View the raw message.

drivers/net/mlx5/mlx5_tx.c +2 -2
index fe9da7f8c1e..4c970130d91 100644

Lines of this file are not shown. View the raw message.

drivers/net/mlx5/mlx5_tx.h +2 -2
index 16307206e2a..fbf6dacb020 100644

Lines of this file are not shown. View the raw message.

drivers/net/mlx5/mlx5_txq.c +4 -4
index ad15b20e7b9..5219642c7db 100644

Lines of this file are not shown. View the raw message.

drivers/net/mlx5/windows/mlx5_flow_os.c +2 -2
index 15c6fc56133..48d9f8520e0 100644

Lines of this file are not shown. View the raw message.

drivers/net/mlx5/windows/mlx5_os.c +1 -1
index 37a6bdfe9a8..f141f515daf 100644

Lines of this file are not shown. View the raw message.

The rest of this diff is not shown. View the raw message.

Signature · 1 line
2.21.0

Part of the diff is not shown here. View the raw message.

#6 lore raw
In reply to Maayan Kashani

Hi,

Quoted 8 lines · Maayan Kashani

Several internal functions in the mlx5 driver were missing the mlx5_ prefix, which could lead to symbol conflicts when linking. This patch adds the proper prefix to all remaining global symbols in common mlx5.

The following function categories were updated:
haswell_broadwell_cpu->mlx5_haswell_broadwell_cpu

Quoted 6 lines

Global variable:
atomic_sn is now static.

Bugzilla ID: 1794

Series applied to next-net-mlx,

Kindest regards
Raslan Darawsheh