Skip to contentSkip to conversation

net/mlx5: remove representor matching devarg

PATCH Superseded Dariusz Sosnowski 3 participants 4 messages Oct 27, 2025 – Nov 17, 2025 Network drivers

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 net/mlx5: remove representor matching devarg

As announced in 25.07 release deprecation notice [1],
this patch removes repr_matching_en device argument from mlx5 driver.

Applications which disabled this option were able to receive traffic from any physical port/VF/SF on any representor. Specifically, in most cases, this was used to process all traffic on representor which is a transfer proxy port.
Similar behavior in mlx5 PMD can be achieved without
the use of additional device arguments, by using RTE_FLOW_ACTION_TYPE_RSS flow action in transfer flow rules.

[1] https://doc.dpdk.org/guides-25.07/rel_notes/deprecation.html

---
 doc/guides/nics/mlx5.rst               |  26 +--
 doc/guides/rel_notes/deprecation.rst   |  11 -
 doc/guides/rel_notes/release_25_11.rst |   8 +
 drivers/net/mlx5/linux/mlx5_os.c       |  16 --
 drivers/net/mlx5/mlx5.c                |  13 --
 drivers/net/mlx5/mlx5.h                |   1 -
 drivers/net/mlx5/mlx5_flow.c           |   5 +-
 drivers/net/mlx5/mlx5_flow.h           |   4 -
 drivers/net/mlx5/mlx5_flow_hw.c        | 266 +------------------------
 drivers/net/mlx5/mlx5_trigger.c        |  20 +-
 drivers/net/mlx5/mlx5_txq.c            |   3 +-
 11 files changed, 19 insertions(+), 354 deletions(-)
doc/guides/nics/mlx5.rst +2 -24
index 20056f61d6..d248f5a6c3 100644
@@ -744,24 +744,6 @@ for an additional list of options shared with other mlx5 drivers.
 
     <Primary_PCI_BDF>,representor=pf[0,1]vf[0-2]
 
-- ``repr_matching_en`` parameter [int]
-
-  - 0. If representor matching is disabled, then there will be no implicit
-    item added. As a result, ingress flow rules will match traffic
-    coming to any port, not only the port on which flow rule is created.
-    Because of that, default flow rules for ingress traffic cannot be created
-    and port starts in isolated mode by default. Port cannot be switched back
-    to non-isolated mode.
-
-  - 1. If representor matching is enabled (default setting),
-    then each ingress pattern template has an implicit REPRESENTED_PORT
-    item added. Flow rules based on this pattern template will match
-    the vport associated with port on which rule is created.
-
-  .. note::
-
-     This parameter is deprecated and will be removed in future releases.
-
 - ``max_dump_files_num`` parameter [int]
 
   The maximum number of files per PMD entity that may be created for debug information.
@@ -2342,7 +2324,6 @@ Runtime configuration
 
 The behaviour of port representors is configured
 with some :ref:`parameters <mlx5_representor_params>`.
-The option ``repr_matching_en`` has an impact on flow steering.
 
 Limitations
 ^^^^^^^^^^^
@@ -2352,9 +2333,6 @@ Limitations
 #. A driver limitation for ``RTE_FLOW_ACTION_TYPE_PORT_REPRESENTOR`` action
    restricts the ``port_id`` configuration to only accept the value ``0xffff``,
    indicating the E-Switch manager.
-   If the ``repr_matching_en`` parameter is enabled, the traffic will be directed
-   to the representor of the source virtual port (SF/VF), while if it is disabled,
-   the traffic will be routed based on the steering rules in the ingress domain.
 
 Examples
 ^^^^^^^^
@@ -3183,8 +3161,8 @@ Limitations
 
 #. Only single item is supported per pattern template.
 
-#. In switch mode, when ``repr_matching_en`` is enabled (default setting),
-   matching ``RTE_FLOW_ITEM_TYPE_COMPARE`` is not supported for ``ingress`` rules.
+#. In switch mode, ``RTE_FLOW_ITEM_TYPE_COMPARE`` flow item
+   is not supported for ``ingress`` rules.
    This is because an implicit ``RTE_FLOW_ITEM_TYPE_REPRESENTED_PORT``
    needs to be added to the matcher,
    which conflicts with the single item limitation.
doc/guides/rel_notes/deprecation.rst +0 -11
index 1e60ac4e82..8653d6ca03 100644
@@ -147,14 +147,3 @@ Deprecation Notices
   This change will not result in any feature loss,
   as the fallback scalar paths which have feature parity with SSE
   will be used in the cases where the SSE paths would have been used.
-
-* net/mlx5: ``repr_matching_en`` device argument is deprecated
-  and will be removed in DPDK 25.11 release.
-  With disabled representor matching, behavior of Rx datapath in mlx5 PMD
-  is incompatible with current DPDK representor model.
-  Packets from any E-Switch port can arrive on any representor,
-  depending only on created flow rules.
-  Such working model should be exposed directly in DPDK ethdev API,
-  without relying on flow API.
-  Currently there is no alternative API
-  providing the same functionality as with ``repr_matching_en`` set to 0.
doc/guides/rel_notes/release_25_11.rst +8 -0
index c5ba335cfc..ce2d72a411 100644
@@ -197,6 +197,14 @@ Removed Items
   the functions ``rte_tel_data_add_array_u64`` and ``rte_tel_data_add_dict_u64`` are removed.
   They are replaced by ``rte_tel_data_add_array_uint`` and ``rte_tel_data_add_dict_uint`` respectively.
 
+* net/mlx5: ``repr_matching_en`` device argument has been removed.
+  Applications which disabled this option were able to receive traffic
+  from any physical port/VF/SF on any representor.
+  Specifically, in most cases, this was used to process all traffic on representor
+  which is a transfer proxy port.
+  Similar behavior in mlx5 PMD can be achieved without the use of additional device arguments,
+  by using ``RTE_FLOW_ACTION_TYPE_RSS`` flow action in transfer flow rules.
+
 
 API Changes
 -----------
drivers/net/mlx5/linux/mlx5_os.c +0 -16
index 8d11b1ac3a..83d3051fb8 100644
@@ -1777,22 +1777,6 @@ mlx5_dev_spawn(struct rte_device *dpdk_dev,
 			err = EINVAL;
 			goto error;
 		}
-		/*
-		 * If representor matching is disabled, PMD cannot create default flow rules
-		 * to receive traffic for all ports, since implicit source port match is not added.
-		 * Isolated mode is forced.
-		 */
-		if (priv->sh->config.dv_esw_en && !priv->sh->config.repr_matching) {
-			err = mlx5_flow_isolate(eth_dev, 1, NULL);
-			if (err < 0) {
-				err = -err;
-				goto error;
-			}
-			DRV_LOG(WARNING, "port %u ingress traffic is restricted to defined "
-					 "flow rules (isolated mode) since representor "
-					 "matching is disabled",
-				eth_dev->data->port_id);
-		}
 		eth_dev->data->dev_flags |= RTE_ETH_DEV_FLOW_OPS_THREAD_SAFE;
 		return eth_dev;
 #else
drivers/net/mlx5/mlx5.c +0 -13
index b018a4f0e2..0504fc2366 100644
@@ -182,9 +182,6 @@
 /* HW steering counter's query interval. */
 #define MLX5_HWS_CNT_CYCLE_TIME "svc_cycle_time"
 
-/* Device parameter to control representor matching in ingress/egress flows with HWS. */
-#define MLX5_REPR_MATCHING_EN "repr_matching_en"
-
 /*
  * Alignment of the Tx queue starting address,
  * If not set, using separate umem and MR for each TxQ.
@@ -1435,8 +1432,6 @@ mlx5_dev_args_check_handler(const char *key, const char *val, void *opaque)
 		config->cnt_svc.service_core = tmp;
 	} else if (strcmp(MLX5_HWS_CNT_CYCLE_TIME, key) == 0) {
 		config->cnt_svc.cycle_time = tmp;
-	} else if (strcmp(MLX5_REPR_MATCHING_EN, key) == 0) {
-		config->repr_matching = !!tmp;
 	} else if (strcmp(MLX5_TXQ_MEM_ALGN, key) == 0) {
 		config->txq_mem_algn = (uint32_t)tmp;
 	}
@@ -1477,7 +1472,6 @@ mlx5_shared_dev_ctx_args_config(struct mlx5_dev_ctx_shared *sh,
 		MLX5_FDB_DEFAULT_RULE_EN,
 		MLX5_HWS_CNT_SERVICE_CORE,
 		MLX5_HWS_CNT_CYCLE_TIME,
-		MLX5_REPR_MATCHING_EN,
 		MLX5_TXQ_MEM_ALGN,
 		NULL,
 	};
@@ -1500,7 +1494,6 @@ mlx5_shared_dev_ctx_args_config(struct mlx5_dev_ctx_shared *sh,
 	config->fdb_def_rule = 1;
 	config->cnt_svc.cycle_time = MLX5_CNT_SVC_CYCLE_TIME_DEFAULT;
 	config->cnt_svc.service_core = rte_get_main_lcore();
-	config->repr_matching = 1;
 	config->txq_mem_algn = log2above(alignment);
 	if (mkvlist != NULL) {
 		/* Process parameters. */
@@ -1535,11 +1528,6 @@ mlx5_shared_dev_ctx_args_config(struct mlx5_dev_ctx_shared *sh,
 			config->dv_xmeta_en);
 		config->dv_xmeta_en = MLX5_XMETA_MODE_LEGACY;
 	}
-	if (config->dv_flow_en != 2 && !config->repr_matching) {
-		DRV_LOG(DEBUG, "Disabling representor matching is valid only "
-			       "when HW Steering is enabled.");
-		config->repr_matching = 1;
-	}
 	if (config->tx_pp && !sh->dev_cap.txpp_en) {
 		DRV_LOG(ERR, "Packet pacing is not supported.");
 		rte_errno = ENODEV;
@@ -1594,7 +1582,6 @@ mlx5_shared_dev_ctx_args_config(struct mlx5_dev_ctx_shared *sh,
 	DRV_LOG(DEBUG, "\"allow_duplicate_pattern\" is %u.",
 		config->allow_duplicate_pattern);
 	DRV_LOG(DEBUG, "\"fdb_def_rule_en\" is %u.", config->fdb_def_rule);
-	DRV_LOG(DEBUG, "\"repr_matching_en\" is %u.", config->repr_matching);
 	DRV_LOG(DEBUG, "\"txq_mem_algn\" is %u.", config->txq_mem_algn);
 	return 0;
 }
drivers/net/mlx5/mlx5.h +0 -1
index 07418b0922..44ceb76c08 100644
@@ -397,7 +397,6 @@ struct mlx5_sh_config {
 	uint32_t lro_allowed:1; /* Whether LRO is allowed. */
 	/* Allow/Prevent the duplicate rules pattern. */
 	uint32_t fdb_def_rule:1; /* Create FDB default jump rule */
-	uint32_t repr_matching:1; /* Enable implicit vport matching in HWS FDB. */
 	uint32_t txq_mem_algn; /* logarithm value of the TxQ address alignment. */
 	struct {
 		uint16_t service_core;
drivers/net/mlx5/mlx5_flow.c +1 -4
index 1de398982a..a612f1f7cf 100644
@@ -8793,10 +8793,7 @@ mlx5_flow_isolate(struct rte_eth_dev *dev,
 				   "port must be stopped first");
 		return -rte_errno;
 	}
-	if (!enable && !priv->sh->config.repr_matching)
-		return rte_flow_error_set(error, ENOTSUP, RTE_FLOW_ERROR_TYPE_UNSPECIFIED, NULL,
-					  "isolated mode cannot be disabled when "
-					  "representor matching is disabled");
+
 	priv->isolated = !!enable;
 	if (enable)
 		dev->dev_ops = &mlx5_dev_ops_isolate;
drivers/net/mlx5/mlx5_flow.h +0 -4
index ff61706054..9bca014fc6 100644
@@ -3007,9 +3007,6 @@ struct mlx5_flow_hw_ctrl_fdb {
 	struct rte_flow_pattern_template *port_items_tmpl;
 	struct rte_flow_actions_template *jump_one_actions_tmpl;
 	struct rte_flow_template_table *hw_esw_zero_tbl;
-	struct rte_flow_pattern_template *tx_meta_items_tmpl;
-	struct rte_flow_actions_template *tx_meta_actions_tmpl;
-	struct rte_flow_template_table *hw_tx_meta_cpy_tbl;
 	struct rte_flow_pattern_template *lacp_rx_items_tmpl;
 	struct rte_flow_actions_template *lacp_rx_actions_tmpl;
 	struct rte_flow_template_table *hw_lacp_rx_tbl;
@@ -3582,7 +3579,6 @@ int mlx5_flow_hw_esw_create_sq_miss_flow(struct rte_eth_dev *dev,
 int mlx5_flow_hw_esw_destroy_sq_miss_flow(struct rte_eth_dev *dev,
 					  uint32_t sqn);
 int mlx5_flow_hw_esw_create_default_jump_flow(struct rte_eth_dev *dev);
-int mlx5_flow_hw_create_tx_default_mreg_copy_flow(struct rte_eth_dev *dev);
 int mlx5_flow_hw_tx_repr_matching_flow(struct rte_eth_dev *dev, uint32_t sqn, bool external);
 int mlx5_flow_hw_lacp_rx_flow(struct rte_eth_dev *dev);
 int mlx5_flow_actions_validate(struct rte_eth_dev *dev,
drivers/net/mlx5/mlx5_flow_hw.c +3 -263

350 lines not on this page · raw message

drivers/net/mlx5/mlx5_trigger.c +4 -16
index 916ac03c16..343fb844ad 100644
@@ -1132,9 +1132,9 @@ mlx5_hw_representor_port_allowed_start(struct rte_eth_dev *dev)
 		rte_errno = EAGAIN;
 		return -rte_errno;
 	}
-	if (priv->sh->config.repr_matching && !priv->dr_ctx) {
-		DRV_LOG(ERR, "Failed to start port %u: with representor matching enabled, port "
-			     "must be configured for HWS", dev->data->port_id);
+	if (priv->dr_ctx == NULL) {
+		DRV_LOG(ERR, "Failed to start port %u: port must be configured for HWS",
+			dev->data->port_id);
 		rte_errno = EINVAL;
 		return -rte_errno;
 	}
@@ -1606,18 +1606,6 @@ mlx5_traffic_enable_hws(struct rte_eth_dev *dev)
 	unsigned int i;
 	int ret;
 
-	/*
-	 * With extended metadata enabled, the Tx metadata copy is handled by default
-	 * Tx tagging flow rules, so default Tx flow rule is not needed. It is only
-	 * required when representor matching is disabled.
-	 */
-	if (config->dv_esw_en &&
-	    !config->repr_matching &&
-	    config->dv_xmeta_en == MLX5_XMETA_MODE_META32_HWS &&
-	    priv->master) {
-		if (mlx5_flow_hw_create_tx_default_mreg_copy_flow(dev))
-			goto error;
-	}
 	for (i = 0; i < priv->txqs_n; ++i) {
 		struct mlx5_txq_ctrl *txq = mlx5_txq_get(dev, i);
 		uint32_t queue;
@@ -1633,7 +1621,7 @@ mlx5_traffic_enable_hws(struct rte_eth_dev *dev)
 				goto error;
 			}
 		}
-		if (config->dv_esw_en && config->repr_matching) {
+		if (config->dv_esw_en) {
 			if (mlx5_flow_hw_tx_repr_matching_flow(dev, queue, false)) {
 				mlx5_txq_release(dev, i);
 				goto error;
drivers/net/mlx5/mlx5_txq.c +1 -2
index b090d8274d..cd831f9728 100644
@@ -1453,8 +1453,7 @@ rte_pmd_mlx5_external_sq_enable(uint16_t port_id, uint32_t sq_num)
 			sq_miss_created = true;
 		}
 
-		if (priv->sh->config.repr_matching &&
-		    mlx5_flow_hw_tx_repr_matching_flow(dev, sq_num, true)) {
+		if (mlx5_flow_hw_tx_repr_matching_flow(dev, sq_num, true)) {
 			if (sq_miss_created)
 				mlx5_flow_hw_esw_destroy_sq_miss_flow(dev, sq_num);
 			return -rte_errno;
Signature · 1 line
2.39.5
Acked-by on v1 1/1
#1 lore raw

Hi,

Quoted 779 lines

-----Original Message-----
From: Dariusz Sosnowski <[email protected]>
Sent: Tuesday, October 28, 2025 3:36 AM
To: Slava Ovsiienko <[email protected]>; Bing Zhao <[email protected]>; Ori Kam <[email protected]>; Suanming Mou <[email protected]>; Matan Azrad <[email protected]>
Cc: [email protected]; NBU-Contact-Thomas Monjalon (EXTERNAL) <[email protected]>; Raslan Darawsheh <[email protected]>
Subject: [PATCH] net/mlx5: remove representor matching devarg

As announced in 25.07 release deprecation notice [1], this patch removes repr_matching_en device argument from mlx5 driver.

Applications which disabled this option were able to receive traffic from any physical port/VF/SF on any representor.
Specifically, in most cases, this was used to process all traffic on representor which is a transfer proxy port.
Similar behavior in mlx5 PMD can be achieved without the use of additional device arguments, by using RTE_FLOW_ACTION_TYPE_RSS flow action in transfer flow rules.

[1] https://doc.dpdk.org/guides-25.07/rel_notes/deprecation.html

---
 doc/guides/nics/mlx5.rst               |  26 +--
 doc/guides/rel_notes/deprecation.rst   |  11 -
 doc/guides/rel_notes/release_25_11.rst |   8 +
 drivers/net/mlx5/linux/mlx5_os.c       |  16 --
 drivers/net/mlx5/mlx5.c                |  13 --
 drivers/net/mlx5/mlx5.h                |   1 -
 drivers/net/mlx5/mlx5_flow.c           |   5 +-
 drivers/net/mlx5/mlx5_flow.h           |   4 -
 drivers/net/mlx5/mlx5_flow_hw.c        | 266 +------------------------
 drivers/net/mlx5/mlx5_trigger.c        |  20 +-
 drivers/net/mlx5/mlx5_txq.c            |   3 +-
 11 files changed, 19 insertions(+), 354 deletions(-)
doc/guides/nics/mlx5.rst index renamed from doc/guides/nics/mlx5.rst +0 -0

20056f61d6..d248f5a6c3 100644

doc/guides/nics/mlx5.rst +0 -0
@@ -744,24 +744,6 @@ for an additional list of options shared with other

mlx5 drivers.

     <Primary_PCI_BDF>,representor=pf[0,1]vf[0-2]

-- ``repr_matching_en`` parameter [int]

doc/guides/nics/mlx5.rst +0 -2
-
-  - 0. If representor matching is disabled, then there will be no

implicit

doc/guides/nics/mlx5.rst +0 -3
-    item added. As a result, ingress flow rules will match traffic
-    coming to any port, not only the port on which flow rule is created.
-    Because of that, default flow rules for ingress traffic cannot be

created
- and port starts in isolated mode by default. Port cannot be switched
back

doc/guides/nics/mlx5.rst +0 -11
-    to non-isolated mode.
-
-  - 1. If representor matching is enabled (default setting),
-    then each ingress pattern template has an implicit REPRESENTED_PORT
-    item added. Flow rules based on this pattern template will match
-    the vport associated with port on which rule is created.
-
-  .. note::
-
-     This parameter is deprecated and will be removed in future releases.
-
 - ``max_dump_files_num`` parameter [int]
 
   The maximum number of files per PMD entity that may be created for

debug information.

doc/guides/nics/mlx5.rst +0 -0
@@ -2342,7 +2324,6 @@ Runtime configuration
 
 The behaviour of port representors is configured  with

some :ref:parameters <mlx5_representor_params>.

doc/guides/nics/mlx5.rst +0 -1
-The option ``repr_matching_en`` has an impact on flow steering.
 
 Limitations
 ^^^^^^^^^^^
@@ -2352,9 +2333,6 @@ Limitations
 #. A driver limitation for ``RTE_FLOW_ACTION_TYPE_PORT_REPRESENTOR``

action
restricts the ``port_id`` configuration to only accept the value
``0xffff``,
indicating the E-Switch manager.
- If the ``repr_matching_en`` parameter is enabled, the traffic will be
directed
- to the representor of the source virtual port (SF/VF), while if it is
disabled,
- the traffic will be routed based on the steering rules in the ingress
domain.

Examples
^^^^^^^^

doc/guides/nics/mlx5.rst +0 -2
@@ -3183,8 +3161,8 @@ Limitations
 
 #. Only single item is supported per pattern template.
 
-#. In switch mode, when ``repr_matching_en`` is enabled (default
 setting),
-   matching ``RTE_FLOW_ITEM_TYPE_COMPARE`` is not supported for

``ingress`` rules.

doc/guides/nics/mlx5.rst +2 -0
+#. In switch mode, ``RTE_FLOW_ITEM_TYPE_COMPARE`` flow item
+   is not supported for ``ingress`` rules.
    This is because an implicit ``RTE_FLOW_ITEM_TYPE_REPRESENTED_PORT``
    needs to be added to the matcher,
    which conflicts with the single item limitation.
doc/guides/rel_notes/deprecation.rst +0 -11
index 1e60ac4e82..8653d6ca03 100644
@@ -147,14 +147,3 @@ Deprecation Notices
   This change will not result in any feature loss,
   as the fallback scalar paths which have feature parity with SSE
   will be used in the cases where the SSE paths would have been used.
-
-* net/mlx5: ``repr_matching_en`` device argument is deprecated
-  and will be removed in DPDK 25.11 release.
-  With disabled representor matching, behavior of Rx datapath in mlx5 PMD
-  is incompatible with current DPDK representor model.
-  Packets from any E-Switch port can arrive on any representor,
-  depending only on created flow rules.
-  Such working model should be exposed directly in DPDK ethdev API,
-  without relying on flow API.
-  Currently there is no alternative API
-  providing the same functionality as with ``repr_matching_en`` set to 0.
doc/guides/rel_notes/release_25_11.rst +0 -0
index c5ba335cfc..ce2d72a411 100644
@@ -197,6 +197,14 @@ Removed Items
   the functions ``rte_tel_data_add_array_u64`` and

``rte_tel_data_add_dict_u64`` are removed.
They are replaced by ``rte_tel_data_add_array_uint`` and
``rte_tel_data_add_dict_uint`` respectively.

doc/guides/rel_notes/release_25_11.rst +9 -0
+* net/mlx5: ``repr_matching_en`` device argument has been removed.
+  Applications which disabled this option were able to receive traffic
+  from any physical port/VF/SF on any representor.
+  Specifically, in most cases, this was used to process all traffic on
+representor
+  which is a transfer proxy port.
+  Similar behavior in mlx5 PMD can be achieved without the use of
+additional device arguments,
+  by using ``RTE_FLOW_ACTION_TYPE_RSS`` flow action in transfer flow

rules.

doc/guides/rel_notes/release_25_11.rst +1 -0
+
 
 API Changes
 -----------
drivers/net/mlx5/linux/mlx5_os.c +0 -2
index 8d11b1ac3a..83d3051fb8 100644
@@ -1777,22 +1777,6 @@ mlx5_dev_spawn(struct rte_device *dpdk_dev,
 			err = EINVAL;
 			goto error;
 		}
-		/*
-		 * If representor matching is disabled, PMD cannot create

default flow rules

drivers/net/mlx5/linux/mlx5_os.c +0 -1
-		 * to receive traffic for all ports, since implicit source

port match is not added.

drivers/net/mlx5/linux/mlx5_os.c +0 -3
-		 * Isolated mode is forced.
-		 */
-		if (priv->sh->config.dv_esw_en && !priv->sh-
Quoted 1 line

config.repr_matching) {

drivers/net/mlx5/linux/mlx5_os.c +0 -6
-			err = mlx5_flow_isolate(eth_dev, 1, NULL);
-			if (err < 0) {
-				err = -err;
-				goto error;
-			}
-			DRV_LOG(WARNING, "port %u ingress traffic is restricted

to defined "

drivers/net/mlx5/linux/mlx5_os.c +0 -1
-					 "flow rules (isolated mode) since

representor "

drivers/net/mlx5/linux/mlx5_os.c +0 -3
-					 "matching is disabled",
-				eth_dev->data->port_id);
-		}
 		eth_dev->data->dev_flags |= RTE_ETH_DEV_FLOW_OPS_THREAD_SAFE;
 		return eth_dev;
 #else
drivers/net/mlx5/mlx5.c index renamed from drivers/net/mlx5/mlx5.c +0 -0

b018a4f0e2..0504fc2366 100644

drivers/net/mlx5/mlx5.c +0 -0
@@ -182,9 +182,6 @@
 /* HW steering counter's query interval. */  #define

MLX5_HWS_CNT_CYCLE_TIME "svc_cycle_time"

-/* Device parameter to control representor matching in ingress/egress flows with HWS. */ -#define MLX5_REPR_MATCHING_EN "repr_matching_en"

drivers/net/mlx5/mlx5.c +0 -3
-
 /*
  * Alignment of the Tx queue starting address,
  * If not set, using separate umem and MR for each TxQ.
@@ -1435,8 +1432,6 @@ mlx5_dev_args_check_handler(const char *key, const
 char *val, void *opaque)
 		config->cnt_svc.service_core = tmp;
 	} else if (strcmp(MLX5_HWS_CNT_CYCLE_TIME, key) == 0) {
 		config->cnt_svc.cycle_time = tmp;
-	} else if (strcmp(MLX5_REPR_MATCHING_EN, key) == 0) {
-		config->repr_matching = !!tmp;
 	} else if (strcmp(MLX5_TXQ_MEM_ALGN, key) == 0) {
 		config->txq_mem_algn = (uint32_t)tmp;
drivers/net/mlx5/mlx5.c +0 -1
 	}
@@ -1477,7 +1472,6 @@ mlx5_shared_dev_ctx_args_config(struct
 mlx5_dev_ctx_shared *sh,
 		MLX5_FDB_DEFAULT_RULE_EN,
 		MLX5_HWS_CNT_SERVICE_CORE,
 		MLX5_HWS_CNT_CYCLE_TIME,
-		MLX5_REPR_MATCHING_EN,
 		MLX5_TXQ_MEM_ALGN,
 		NULL,
drivers/net/mlx5/mlx5.c +0 -1
 	};
@@ -1500,7 +1494,6 @@ mlx5_shared_dev_ctx_args_config(struct
 mlx5_dev_ctx_shared *sh,
 	config->fdb_def_rule = 1;
 	config->cnt_svc.cycle_time = MLX5_CNT_SVC_CYCLE_TIME_DEFAULT;
 	config->cnt_svc.service_core = rte_get_main_lcore();
-	config->repr_matching = 1;
 	config->txq_mem_algn = log2above(alignment);
 	if (mkvlist != NULL) {
drivers/net/mlx5/mlx5.c +0 -5
 		/* Process parameters. */
@@ -1535,11 +1528,6 @@ mlx5_shared_dev_ctx_args_config(struct
 mlx5_dev_ctx_shared *sh,
 			config->dv_xmeta_en);
 		config->dv_xmeta_en = MLX5_XMETA_MODE_LEGACY;
 	}
-	if (config->dv_flow_en != 2 && !config->repr_matching) {
-		DRV_LOG(DEBUG, "Disabling representor matching is valid only "
-			       "when HW Steering is enabled.");
-		config->repr_matching = 1;
-	}
 	if (config->tx_pp && !sh->dev_cap.txpp_en) {
 		DRV_LOG(ERR, "Packet pacing is not supported.");
drivers/net/mlx5/mlx5.c +0 -1
 		rte_errno = ENODEV;
@@ -1594,7 +1582,6 @@ mlx5_shared_dev_ctx_args_config(struct
 mlx5_dev_ctx_shared *sh,
 	DRV_LOG(DEBUG, "\"allow_duplicate_pattern\" is %u.",
 		config->allow_duplicate_pattern);
 	DRV_LOG(DEBUG, "\"fdb_def_rule_en\" is %u.", config->fdb_def_rule);
-	DRV_LOG(DEBUG, "\"repr_matching_en\" is %u.", config-
 >repr_matching);
 	DRV_LOG(DEBUG, "\"txq_mem_algn\" is %u.", config->txq_mem_algn);
drivers/net/mlx5/mlx5.c +0 -0
 	return 0;
 }
drivers/net/mlx5/mlx5.h index renamed from drivers/net/mlx5/mlx5.h +0 -0

07418b0922..44ceb76c08 100644

drivers/net/mlx5/mlx5.h +0 -1
@@ -397,7 +397,6 @@ struct mlx5_sh_config {
 	uint32_t lro_allowed:1; /* Whether LRO is allowed. */
 	/* Allow/Prevent the duplicate rules pattern. */
 	uint32_t fdb_def_rule:1; /* Create FDB default jump rule */
-	uint32_t repr_matching:1; /* Enable implicit vport matching in HWS

FDB. */
uint32_t txq_mem_algn; /* logarithm value of the TxQ address
alignment. */

drivers/net/mlx5/mlx5.h +0 -0
 	struct {
 		uint16_t service_core;
drivers/net/mlx5/mlx5_flow.c +1 -4
index 1de398982a..a612f1f7cf 100644
@@ -8793,10 +8793,7 @@ mlx5_flow_isolate(struct rte_eth_dev *dev,
 				   "port must be stopped first");
 		return -rte_errno;
 	}
-	if (!enable && !priv->sh->config.repr_matching)
-		return rte_flow_error_set(error, ENOTSUP,
 RTE_FLOW_ERROR_TYPE_UNSPECIFIED, NULL,
-					  "isolated mode cannot be disabled when "
-					  "representor matching is disabled");
+
 	priv->isolated = !!enable;
 	if (enable)

dev->dev_ops = &mlx5_dev_ops_isolate; diff --git
a/drivers/net/mlx5/mlx5_flow.h b/drivers/net/mlx5/mlx5_flow.h index ff61706054..9bca014fc6 100644

drivers/net/mlx5/mlx5_flow.h +0 -3
@@ -3007,9 +3007,6 @@ struct mlx5_flow_hw_ctrl_fdb {
 	struct rte_flow_pattern_template *port_items_tmpl;
 	struct rte_flow_actions_template *jump_one_actions_tmpl;
 	struct rte_flow_template_table *hw_esw_zero_tbl;
-	struct rte_flow_pattern_template *tx_meta_items_tmpl;
-	struct rte_flow_actions_template *tx_meta_actions_tmpl;
-	struct rte_flow_template_table *hw_tx_meta_cpy_tbl;
 	struct rte_flow_pattern_template *lacp_rx_items_tmpl;
 	struct rte_flow_actions_template *lacp_rx_actions_tmpl;
 	struct rte_flow_template_table *hw_lacp_rx_tbl; @@ -3582,7 +3579,6

@@ int mlx5_flow_hw_esw_create_sq_miss_flow(struct rte_eth_dev *dev, int mlx5_flow_hw_esw_destroy_sq_miss_flow(struct rte_eth_dev *dev,
uint32_t sqn);
int mlx5_flow_hw_esw_create_default_jump_flow(struct rte_eth_dev *dev); -
int mlx5_flow_hw_create_tx_default_mreg_copy_flow(struct rte_eth_dev *dev); int mlx5_flow_hw_tx_repr_matching_flow(struct rte_eth_dev *dev, uint32_t sqn, bool external); int mlx5_flow_hw_lacp_rx_flow(struct rte_eth_dev *dev); int mlx5_flow_actions_validate(struct rte_eth_dev *dev, diff --git a/drivers/net/mlx5/mlx5_flow_hw.c b/drivers/net/mlx5/mlx5_flow_hw.c index 491a78a0de..f5f73b38cd 100644

drivers/net/mlx5/mlx5_flow_hw.c +0 -1
@@ -5305,7 +5305,7 @@ __translate_group(struct rte_eth_dev *dev,
 						  "group index not supported");
 		*table_group = group + 1;
 	} else if (config->dv_esw_en &&
-		   (config->repr_matching || config->dv_xmeta_en ==

MLX5_XMETA_MODE_META32_HWS) &&

drivers/net/mlx5/mlx5_flow_hw.c +2 -1
+		   config->dv_xmeta_en == MLX5_XMETA_MODE_META32_HWS &&
 		   external &&
 		   flow_attr->egress) {
 		/*
@@ -8549,7 +8549,7 @@ __flow_hw_pattern_validate(struct rte_eth_dev *dev,
 			break;
 		}
 		case RTE_FLOW_ITEM_TYPE_REPRESENTED_PORT:
-			if (attr->ingress && priv->sh->config.repr_matching)
+			if (attr->ingress)
 				return rte_flow_error_set(error, EINVAL,
 						  RTE_FLOW_ERROR_TYPE_ITEM, NULL,
 						  "represented port item cannot be

used"

drivers/net/mlx5/mlx5_flow_hw.c +0 -2
@@ -9024,14 +9024,12 @@ flow_hw_pattern_template_create(struct rte_eth_dev
 *dev,
 		return NULL;
 	orig_item_nb = rc;
 	if (priv->sh->config.dv_esw_en &&
-	    priv->sh->config.repr_matching &&
 	    attr->ingress && !attr->egress && !attr->transfer) {
 		copied_items = flow_hw_prepend_item(items, orig_item_nb,
 &port, error);
 		if (!copied_items)
 			return NULL;
 		tmpl_items = copied_items;
 	} else if (priv->sh->config.dv_esw_en &&
-		   priv->sh->config.repr_matching &&
 		   !attr->ingress && attr->egress && !attr->transfer) {
drivers/net/mlx5/mlx5_flow_hw.c +0 -0
 		if (item_flags & MLX5_FLOW_ITEM_SQ) {
 			DRV_LOG(DEBUG, "Port %u omitting implicit REG_C_0 match

for egress "

drivers/net/mlx5/mlx5_flow_hw.c +0 -1
@@ -9979,7 +9977,6 @@ flow_hw_setup_tx_repr_tagging(struct rte_eth_dev
 *dev, struct rte_flow_error *er
 	};
 
 	MLX5_ASSERT(priv->sh->config.dv_esw_en);
-	MLX5_ASSERT(priv->sh->config.repr_matching);
 	priv->hw_tx_repr_tagging_pt =
 		flow_hw_create_tx_repr_sq_pattern_tmpl(dev, error);
drivers/net/mlx5/mlx5_flow_hw.c +0 -3
 	if (!priv->hw_tx_repr_tagging_pt)
@@ -10158,46 +10155,6 @@ flow_hw_create_ctrl_port_pattern_template(struct
 rte_eth_dev *dev,
 	return flow_hw_pattern_template_create(dev, &attr, items, error);  }
 
-/*
- * Creating a flow pattern template with all ETH packets matching.
- * This template is used to set up a table for default Tx copy (Tx

metadata
- * to REG_C_1) flow rule usage.
- *
- * @param dev
- * Pointer to Ethernet device.
- * @param error
- * Pointer to error structure.
- *
- * @return
- * Pointer to flow pattern template on success, NULL otherwise.
- */
-static struct rte_flow_pattern_template * - flow_hw_create_tx_default_mreg_copy_pattern_template(struct rte_eth_dev *dev,

drivers/net/mlx5/mlx5_flow_hw.c +0 -8
-						     struct rte_flow_error *error)
-{
-	struct rte_flow_pattern_template_attr tx_pa_attr = {
-		.relaxed_matching = 0,
-		.egress = 1,
-	};
-	struct rte_flow_item_eth promisc = {
-		.hdr.dst_addr.addr_bytes = { 0x00, 0x00, 0x00, 0x00, 0x00,

0x00 },

drivers/net/mlx5/mlx5_flow_hw.c +0 -1
-		.hdr.src_addr.addr_bytes = { 0x00, 0x00, 0x00, 0x00, 0x00,

0x00 },

drivers/net/mlx5/mlx5_flow_hw.c +0 -14
-		.hdr.ether_type = 0,
-	};
-	struct rte_flow_item eth_all[] = {
-		[0] = {
-			.type = RTE_FLOW_ITEM_TYPE_ETH,
-			.spec = &promisc,
-			.mask = &promisc,
-		},
-		[1] = {
-			.type = RTE_FLOW_ITEM_TYPE_END,
-		},
-	};
-
-	return flow_hw_pattern_template_create(dev, &tx_pa_attr, eth_all,

error);

drivers/net/mlx5/mlx5_flow_hw.c +0 -2
-}
-
 /*
  * Creating a flow pattern template with all LACP packets matching, only

for NIC
* ingress domain.

drivers/net/mlx5/mlx5_flow_hw.c +0 -13
@@ -10419,90 +10376,6 @@ flow_hw_create_ctrl_port_actions_template(struct
 rte_eth_dev *dev,
 	return flow_hw_actions_template_create(dev, &attr, actions_v,
 actions_m, error);  }
 
-/*
- * Creating an actions template to use header modify action for register
- * copying. This template is used to set up a table for copy flow.
- *
- * @param dev
- *   Pointer to Ethernet device.
- * @param error
- *   Pointer to error structure.
- *
- * @return
- *   Pointer to flow actions template on success, NULL otherwise.
- */
-static struct rte_flow_actions_template * -

flow_hw_create_tx_default_mreg_copy_actions_template(struct rte_eth_dev *dev,

drivers/net/mlx5/mlx5_flow_hw.c +0 -9
-						     struct rte_flow_error *error)
-{
-	struct rte_flow_actions_template_attr tx_act_attr = {
-		.egress = 1,
-	};
-	const struct rte_flow_action_modify_field mreg_action = {
-		.operation = RTE_FLOW_MODIFY_SET,
-		.dst = {
-			.field = (enum

rte_flow_field_id)MLX5_RTE_FLOW_FIELD_META_REG,

drivers/net/mlx5/mlx5_flow_hw.c +0 -4
-			.tag_index = REG_C_1,
-		},
-		.src = {
-			.field = (enum

rte_flow_field_id)MLX5_RTE_FLOW_FIELD_META_REG,

drivers/net/mlx5/mlx5_flow_hw.c +0 -8
-			.tag_index = REG_A,
-		},
-		.width = 32,
-	};
-	const struct rte_flow_action_modify_field mreg_mask = {
-		.operation = RTE_FLOW_MODIFY_SET,
-		.dst = {
-			.field = (enum

rte_flow_field_id)MLX5_RTE_FLOW_FIELD_META_REG,

drivers/net/mlx5/mlx5_flow_hw.c +0 -6
-			.level = UINT8_MAX,
-			.tag_index = UINT8_MAX,
-			.offset = UINT32_MAX,
-		},
-		.src = {
-			.field = (enum

rte_flow_field_id)MLX5_RTE_FLOW_FIELD_META_REG,

drivers/net/mlx5/mlx5_flow_hw.c +0 -43
-			.level = UINT8_MAX,
-			.tag_index = UINT8_MAX,
-			.offset = UINT32_MAX,
-		},
-		.width = UINT32_MAX,
-	};
-	const struct rte_flow_action_jump jump_action = {
-		.group = 1,
-	};
-	const struct rte_flow_action_jump jump_mask = {
-		.group = UINT32_MAX,
-	};
-	const struct rte_flow_action actions[] = {
-		[0] = {
-			.type = RTE_FLOW_ACTION_TYPE_MODIFY_FIELD,
-			.conf = &mreg_action,
-		},
-		[1] = {
-			.type = RTE_FLOW_ACTION_TYPE_JUMP,
-			.conf = &jump_action,
-		},
-		[2] = {
-			.type = RTE_FLOW_ACTION_TYPE_END,
-		},
-	};
-	const struct rte_flow_action masks[] = {
-		[0] = {
-			.type = RTE_FLOW_ACTION_TYPE_MODIFY_FIELD,
-			.conf = &mreg_mask,
-		},
-		[1] = {
-			.type = RTE_FLOW_ACTION_TYPE_JUMP,
-			.conf = &jump_mask,
-		},
-		[2] = {
-			.type = RTE_FLOW_ACTION_TYPE_END,
-		},
-	};
-
-	return flow_hw_actions_template_create(dev, &tx_act_attr, actions,
-					       masks, error);
-}
-
 /*
  * Creating an actions template to use default miss to re-route packets

to the
* kernel driver stack.

drivers/net/mlx5/mlx5_flow_hw.c +0 -37
@@ -10616,43 +10489,6 @@ flow_hw_create_ctrl_sq_miss_table(struct
 rte_eth_dev *dev,
 	return flow_hw_table_create(dev, &cfg, &it, 1, &at, 1, error);  }
 
-/*
- * Creating the default Tx metadata copy table on NIC Tx group 0.
- *
- * @param dev
- *   Pointer to Ethernet device.
- * @param pt
- *   Pointer to flow pattern template.
- * @param at
- *   Pointer to flow actions template.
- * @param error
- *   Pointer to error structure.
- *
- * @return
- *   Pointer to flow table on success, NULL otherwise.
- */
-static struct rte_flow_template_table*
-flow_hw_create_tx_default_mreg_copy_table(struct rte_eth_dev *dev,
-					  struct rte_flow_pattern_template *pt,
-					  struct rte_flow_actions_template *at,
-					  struct rte_flow_error *error)
-{
-	struct rte_flow_template_table_attr tx_tbl_attr = {
-		.flow_attr = {
-			.group = 0, /* Root */
-			.priority = MLX5_HW_LOWEST_PRIO_ROOT,
-			.egress = 1,
-		},
-		.nb_flows = 1, /* One default flow rule for all. */
-	};
-	struct mlx5_flow_template_table_cfg tx_tbl_cfg = {
-		.attr = tx_tbl_attr,
-		.external = false,
-	};
-
-	return flow_hw_table_create(dev, &tx_tbl_cfg, &pt, 1, &at, 1,
 error);
-}
-
 /**
  * Creates a control flow table used to transfer traffic

* from group 0 to group 1.

drivers/net/mlx5/mlx5_flow_hw.c +0 -5
@@ -10718,15 +10554,6 @@ flow_hw_cleanup_ctrl_fdb_tables(struct
 rte_eth_dev *dev)
 	if (hw_ctrl_fdb->lacp_rx_items_tmpl)
 		claim_zero(flow_hw_pattern_template_destroy(dev, hw_ctrl_fdb-
 >lacp_rx_items_tmpl,
 			   NULL));
-	/* Clean up templates used for default Tx metadata copy. */
-	if (hw_ctrl_fdb->hw_tx_meta_cpy_tbl)
-		claim_zero(flow_hw_table_destroy(dev, hw_ctrl_fdb-
 >hw_tx_meta_cpy_tbl, NULL));
-	if (hw_ctrl_fdb->tx_meta_actions_tmpl)
-		claim_zero(flow_hw_actions_template_destroy(dev, hw_ctrl_fdb-
Quoted 1 line

tx_meta_actions_tmpl,

drivers/net/mlx5/mlx5_flow_hw.c +0 -3
-			   NULL));
-	if (hw_ctrl_fdb->tx_meta_items_tmpl)
-		claim_zero(flow_hw_pattern_template_destroy(dev, hw_ctrl_fdb-
Quoted 1 line

tx_meta_items_tmpl,

drivers/net/mlx5/mlx5_flow_hw.c +0 -1
-			   NULL));
 	/* Clean up templates used for default FDB jump rule. */
 	if (hw_ctrl_fdb->hw_esw_zero_tbl)
 		claim_zero(flow_hw_table_destroy(dev, hw_ctrl_fdb-
Quoted 1 line

hw_esw_zero_tbl, NULL)); @@ -10813,8 +10640,6 @@

flow_hw_create_ctrl_tables(struct rte_eth_dev *dev, struct rte_flow_error *error {

drivers/net/mlx5/mlx5_flow_hw.c +0 -2
 	struct mlx5_priv *priv = dev->data->dev_private;
 	struct mlx5_flow_hw_ctrl_fdb *hw_ctrl_fdb;
-	uint32_t xmeta = priv->sh->config.dv_xmeta_en;
-	uint32_t repr_matching = priv->sh->config.repr_matching;
 	uint32_t fdb_def_rule = priv->sh->config.fdb_def_rule;
 
 	MLX5_ASSERT(priv->hw_ctrl_fdb == NULL); @@ -10900,32 +10725,6 @@

flow_hw_create_ctrl_tables(struct rte_eth_dev *dev, struct rte_flow_error *error

drivers/net/mlx5/mlx5_flow_hw.c +0 -1
 			goto err;
 		}
 	}
-	/* Create templates and table for default Tx metadata copy flow

rule. */

drivers/net/mlx5/mlx5_flow_hw.c +0 -3
-	if (!repr_matching && xmeta == MLX5_XMETA_MODE_META32_HWS) {
-		hw_ctrl_fdb->tx_meta_items_tmpl =
-
	flow_hw_create_tx_default_mreg_copy_pattern_template(dev, error);
drivers/net/mlx5/mlx5_flow_hw.c +0 -2
-		if (!hw_ctrl_fdb->tx_meta_items_tmpl) {
-			DRV_LOG(ERR, "port %u failed to Tx metadata copy

pattern"

drivers/net/mlx5/mlx5_flow_hw.c +0 -1
-				" template for control flows", dev->data-
Quoted 1 line

port_id);

drivers/net/mlx5/mlx5_flow_hw.c +0 -4
-			goto err;
-		}
-		hw_ctrl_fdb->tx_meta_actions_tmpl =
-
	flow_hw_create_tx_default_mreg_copy_actions_template(dev, error);
drivers/net/mlx5/mlx5_flow_hw.c +0 -2
-		if (!hw_ctrl_fdb->tx_meta_actions_tmpl) {
-			DRV_LOG(ERR, "port %u failed to Tx metadata copy

actions"

drivers/net/mlx5/mlx5_flow_hw.c +0 -1
-				" template for control flows", dev->data-
Quoted 1 line

port_id);

drivers/net/mlx5/mlx5_flow_hw.c +0 -8
-			goto err;
-		}
-		hw_ctrl_fdb->hw_tx_meta_cpy_tbl =
-			flow_hw_create_tx_default_mreg_copy_table
-				(dev, hw_ctrl_fdb->tx_meta_items_tmpl,
-				 hw_ctrl_fdb->tx_meta_actions_tmpl, error);
-		if (!hw_ctrl_fdb->hw_tx_meta_cpy_tbl) {
-			DRV_LOG(ERR, "port %u failed to create table for

default"

drivers/net/mlx5/mlx5_flow_hw.c +0 -1
-				" Tx metadata copy flow rule", dev->data-
Quoted 1 line

port_id);

drivers/net/mlx5/mlx5_flow_hw.c +0 -3
-			goto err;
-		}
-	}
 	/* Create LACP default miss table. */
 	if (!priv->sh->config.lacp_by_user && priv->pf_bond >= 0 && priv-
Quoted 1 line

master) {

drivers/net/mlx5/mlx5_flow_hw.c +1 -27
 		hw_ctrl_fdb->lacp_rx_items_tmpl =
@@ -12105,7 +11904,7 @@ __flow_hw_configure(struct rte_eth_dev *dev,
 		if (!priv->hw_tag[i])
 			goto err;
 	}
-	if (priv->sh->config.dv_esw_en && priv->sh->config.repr_matching) {
+	if (priv->sh->config.dv_esw_en) {
 		ret = flow_hw_setup_tx_repr_tagging(dev, error);
 		if (ret)
 			goto err;
@@ -16003,63 +15802,6 @@ mlx5_flow_hw_esw_create_default_jump_flow(struct
 rte_eth_dev *dev)
 					items, 0, actions, 0, &flow_info, false);  }
 
-int
-mlx5_flow_hw_create_tx_default_mreg_copy_flow(struct rte_eth_dev *dev) -{
-	struct mlx5_priv *priv = dev->data->dev_private;
-	struct rte_flow_item_eth promisc = {
-		.hdr.dst_addr.addr_bytes = { 0x00, 0x00, 0x00, 0x00, 0x00,
 0x00 },
-		.hdr.src_addr.addr_bytes = { 0x00, 0x00, 0x00, 0x00, 0x00,
 0x00 },
-		.hdr.ether_type = 0,
-	};
-	struct rte_flow_item eth_all[] = {
-		[0] = {
-			.type = RTE_FLOW_ITEM_TYPE_ETH,
-			.spec = &promisc,
-			.mask = &promisc,
-		},
-		[1] = {
-			.type = RTE_FLOW_ITEM_TYPE_END,
-		},
-	};
-	struct rte_flow_action_modify_field mreg_action = {
-		.operation = RTE_FLOW_MODIFY_SET,
-		.dst = {
-			.field = (enum
 rte_flow_field_id)MLX5_RTE_FLOW_FIELD_META_REG,
-			.tag_index = REG_C_1,
-		},
-		.src = {
-			.field = (enum

rte_flow_field_id)MLX5_RTE_FLOW_FIELD_META_REG,

drivers/net/mlx5/mlx5_flow_hw.c +0 -28
-			.tag_index = REG_A,
-		},
-		.width = 32,
-	};
-	struct rte_flow_action copy_reg_action[] = {
-		[0] = {
-			.type = RTE_FLOW_ACTION_TYPE_MODIFY_FIELD,
-			.conf = &mreg_action,
-		},
-		[1] = {
-			.type = RTE_FLOW_ACTION_TYPE_JUMP,
-		},
-		[2] = {
-			.type = RTE_FLOW_ACTION_TYPE_END,
-		},
-	};
-	struct mlx5_ctrl_flow_info flow_info = {
-		.type = MLX5_CTRL_FLOW_TYPE_TX_META_COPY,
-	};
-
-	MLX5_ASSERT(priv->master);
-	if (!priv->dr_ctx ||
-	    !priv->hw_ctrl_fdb ||
-	    !priv->hw_ctrl_fdb->hw_tx_meta_cpy_tbl)
-		return 0;
-	return flow_hw_create_ctrl_flow(dev, dev,
-					priv->hw_ctrl_fdb->hw_tx_meta_cpy_tbl,
-					eth_all, 0, copy_reg_action, 0, &flow_info,

false);

drivers/net/mlx5/mlx5_flow_hw.c +0 -2
-}
-
 int
 mlx5_flow_hw_tx_repr_matching_flow(struct rte_eth_dev *dev, uint32_t sqn,

bool external) { @@ -16091,8 +15833,6 @@ mlx5_flow_hw_tx_repr_matching_flow(struct rte_eth_dev *dev, uint32_t sqn, bool e

drivers/net/mlx5/mlx5_flow_hw.c +0 -2
 		.tx_repr_sq = sqn,
 	};
 
-	/* It is assumed that caller checked for representor matching. */
-	MLX5_ASSERT(priv->sh->config.repr_matching);
 	if (!priv->dr_ctx) {
 		DRV_LOG(DEBUG, "Port %u must be configured for HWS, before

creating "

drivers/net/mlx5/mlx5_flow_hw.c +0 -0
 			       "default egress flow rules. Omitting creation.",
(quoted diff) +0 -0

b/drivers/net/mlx5/mlx5_trigger.c index 916ac03c16..343fb844ad 100644

drivers/net/mlx5/mlx5_trigger.c +0 -2
@@ -1132,9 +1132,9 @@ mlx5_hw_representor_port_allowed_start(struct
 rte_eth_dev *dev)
 		rte_errno = EAGAIN;
 		return -rte_errno;
 	}
-	if (priv->sh->config.repr_matching && !priv->dr_ctx) {
-		DRV_LOG(ERR, "Failed to start port %u: with representor

matching enabled, port "

drivers/net/mlx5/mlx5_trigger.c +2 -1
-			     "must be configured for HWS", dev->data->port_id);
+	if (priv->dr_ctx == NULL) {
+		DRV_LOG(ERR, "Failed to start port %u: port must be configured

for HWS",

drivers/net/mlx5/mlx5_trigger.c +1 -2
+			dev->data->port_id);
 		rte_errno = EINVAL;
 		return -rte_errno;
 	}
@@ -1606,18 +1606,6 @@ mlx5_traffic_enable_hws(struct rte_eth_dev *dev)
 	unsigned int i;
 	int ret;
 
-	/*
-	 * With extended metadata enabled, the Tx metadata copy is handled

by default

drivers/net/mlx5/mlx5_trigger.c +0 -1
-	 * Tx tagging flow rules, so default Tx flow rule is not needed. It

is only

drivers/net/mlx5/mlx5_trigger.c +1 -10
-	 * required when representor matching is disabled.
-	 */
-	if (config->dv_esw_en &&
-	    !config->repr_matching &&
-	    config->dv_xmeta_en == MLX5_XMETA_MODE_META32_HWS &&
-	    priv->master) {
-		if (mlx5_flow_hw_create_tx_default_mreg_copy_flow(dev))
-			goto error;
-	}
 	for (i = 0; i < priv->txqs_n; ++i) {
 		struct mlx5_txq_ctrl *txq = mlx5_txq_get(dev, i);
 		uint32_t queue;
@@ -1633,7 +1621,7 @@ mlx5_traffic_enable_hws(struct rte_eth_dev *dev)
 				goto error;
 			}
 		}
-		if (config->dv_esw_en && config->repr_matching) {
+		if (config->dv_esw_en) {
 			if (mlx5_flow_hw_tx_repr_matching_flow(dev, queue,
 false)) {
 				mlx5_txq_release(dev, i);
drivers/net/mlx5/mlx5_trigger.c +0 -0
 				goto error;
drivers/net/mlx5/mlx5_txq.c +1 -2
index b090d8274d..cd831f9728 100644
@@ -1453,8 +1453,7 @@ rte_pmd_mlx5_external_sq_enable(uint16_t port_id,
 uint32_t sq_num)
 			sq_miss_created = true;
 		}
 
-		if (priv->sh->config.repr_matching &&
-		    mlx5_flow_hw_tx_repr_matching_flow(dev, sq_num, true)) {
+		if (mlx5_flow_hw_tx_repr_matching_flow(dev, sq_num, true)) {
 			if (sq_miss_created)
 				mlx5_flow_hw_esw_destroy_sq_miss_flow(dev,
Quoted 4 lines

sq_num);
return -rte_errno;
--
2.39.5

#2 lore raw

PATCH v2 1/1 net/mlx5: remove representor matching devarg

In reply to Dariusz Sosnowski

As announced in 25.07 release deprecation notice [1],
this patch removes repr_matching_en device argument from mlx5 driver.

Applications which disabled this option were able to receive traffic from any physical port/VF/SF on any representor. Specifically, in most cases, this was used to process all traffic on representor which is a transfer proxy port.
Similar behavior in mlx5 PMD can be achieved without
the use of additional device arguments, by using RTE_FLOW_ACTION_TYPE_RSS flow action in transfer flow rules.

[1] https://doc.dpdk.org/guides-25.07/rel_notes/deprecation.html

---
v2:
- Rebased on top of the latest commit in next-net-mlx:
commit ae657d56b1f0 ("doc: document non-template API limitations on top of HWS")

 doc/guides/nics/mlx5.rst               |  26 +---
 doc/guides/rel_notes/deprecation.rst   |  11 --
 doc/guides/rel_notes/release_25_11.rst |   8 +
 drivers/net/mlx5/linux/mlx5_os.c       |  16 --
 drivers/net/mlx5/mlx5.c                |  13 --
 drivers/net/mlx5/mlx5.h                |   1 -
 drivers/net/mlx5/mlx5_flow.c           |   5 +-
 drivers/net/mlx5/mlx5_flow.h           |   7 -
 drivers/net/mlx5/mlx5_flow_hw.c        | 194 +------------------------
 drivers/net/mlx5/mlx5_trigger.c        |  28 ++--
 drivers/net/mlx5/mlx5_txq.c            |  17 +--
 11 files changed, 25 insertions(+), 301 deletions(-)
doc/guides/nics/mlx5.rst +2 -24
index e0ec3e4f6f..6ec47a9fbc 100644
@@ -745,24 +745,6 @@ for an additional list of options shared with other mlx5 drivers.
 
     <Primary_PCI_BDF>,representor=pf[0,1]vf[0-2]
 
-- ``repr_matching_en`` parameter [int]
-
-  - 0. If representor matching is disabled, then there will be no implicit
-    item added. As a result, ingress flow rules will match traffic
-    coming to any port, not only the port on which flow rule is created.
-    Because of that, default flow rules for ingress traffic cannot be created
-    and port starts in isolated mode by default. Port cannot be switched back
-    to non-isolated mode.
-
-  - 1. If representor matching is enabled (default setting),
-    then each ingress pattern template has an implicit REPRESENTED_PORT
-    item added. Flow rules based on this pattern template will match
-    the vport associated with port on which rule is created.
-
-  .. note::
-
-     This parameter is deprecated and will be removed in future releases.
-
 - ``max_dump_files_num`` parameter [int]
 
   The maximum number of files per PMD entity that may be created for debug information.
@@ -2388,7 +2370,6 @@ Runtime configuration
 
 The behaviour of port representors is configured
 with some :ref:`parameters <mlx5_representor_params>`.
-The option ``repr_matching_en`` has an impact on flow steering.
 
 Limitations
 ^^^^^^^^^^^
@@ -2398,9 +2379,6 @@ Limitations
 #. A driver limitation for ``RTE_FLOW_ACTION_TYPE_PORT_REPRESENTOR`` action
    restricts the ``port_id`` configuration to only accept the value ``0xffff``,
    indicating the E-Switch manager.
-   If the ``repr_matching_en`` parameter is enabled, the traffic will be directed
-   to the representor of the source virtual port (SF/VF), while if it is disabled,
-   the traffic will be routed based on the steering rules in the ingress domain.
 
 Examples
 ^^^^^^^^
@@ -3275,8 +3253,8 @@ Limitations
 
 #. Only single item is supported per pattern template.
 
-#. In switch mode, when ``repr_matching_en`` is enabled (default setting),
-   matching ``RTE_FLOW_ITEM_TYPE_COMPARE`` is not supported for ``ingress`` rules.
+#. In switch mode, ``RTE_FLOW_ITEM_TYPE_COMPARE`` flow item
+   is not supported for ``ingress`` rules.
    This is because an implicit ``RTE_FLOW_ITEM_TYPE_REPRESENTED_PORT``
    needs to be added to the matcher,
    which conflicts with the single item limitation.
doc/guides/rel_notes/deprecation.rst +0 -11
index 1e60ac4e82..8653d6ca03 100644
@@ -147,14 +147,3 @@ Deprecation Notices
   This change will not result in any feature loss,
   as the fallback scalar paths which have feature parity with SSE
   will be used in the cases where the SSE paths would have been used.
-
-* net/mlx5: ``repr_matching_en`` device argument is deprecated
-  and will be removed in DPDK 25.11 release.
-  With disabled representor matching, behavior of Rx datapath in mlx5 PMD
-  is incompatible with current DPDK representor model.
-  Packets from any E-Switch port can arrive on any representor,
-  depending only on created flow rules.
-  Such working model should be exposed directly in DPDK ethdev API,
-  without relying on flow API.
-  Currently there is no alternative API
-  providing the same functionality as with ``repr_matching_en`` set to 0.
doc/guides/rel_notes/release_25_11.rst +8 -0
index 06bc200f25..fbcb2f5f38 100644
@@ -239,6 +239,14 @@ Removed Items
   the functions ``rte_tel_data_add_array_u64`` and ``rte_tel_data_add_dict_u64`` are removed.
   They are replaced by ``rte_tel_data_add_array_uint`` and ``rte_tel_data_add_dict_uint`` respectively.
 
+* net/mlx5: ``repr_matching_en`` device argument has been removed.
+  Applications which disabled this option were able to receive traffic
+  from any physical port/VF/SF on any representor.
+  Specifically, in most cases, this was used to process all traffic on representor
+  which is a transfer proxy port.
+  Similar behavior in mlx5 PMD can be achieved without the use of additional device arguments,
+  by using ``RTE_FLOW_ACTION_TYPE_RSS`` flow action in transfer flow rules.
+
 
 API Changes
 -----------
drivers/net/mlx5/linux/mlx5_os.c +0 -16
index c742e0f282..68448f6554 100644
@@ -1777,22 +1777,6 @@ mlx5_dev_spawn(struct rte_device *dpdk_dev,
 			err = EINVAL;
 			goto error;
 		}
-		/*
-		 * If representor matching is disabled, PMD cannot create default flow rules
-		 * to receive traffic for all ports, since implicit source port match is not added.
-		 * Isolated mode is forced.
-		 */
-		if (priv->sh->config.dv_esw_en && !priv->sh->config.repr_matching) {
-			err = mlx5_flow_isolate(eth_dev, 1, NULL);
-			if (err < 0) {
-				err = -err;
-				goto error;
-			}
-			DRV_LOG(WARNING, "port %u ingress traffic is restricted to defined "
-					 "flow rules (isolated mode) since representor "
-					 "matching is disabled",
-				eth_dev->data->port_id);
-		}
 		eth_dev->data->dev_flags |= RTE_ETH_DEV_FLOW_OPS_THREAD_SAFE;
 		return eth_dev;
 #else
drivers/net/mlx5/mlx5.c +0 -13
index 666216c21a..9ba4786c5b 100644
@@ -182,9 +182,6 @@
 /* HW steering counter's query interval. */
 #define MLX5_HWS_CNT_CYCLE_TIME "svc_cycle_time"
 
-/* Device parameter to control representor matching in ingress/egress flows with HWS. */
-#define MLX5_REPR_MATCHING_EN "repr_matching_en"
-
 /*
  * Alignment of the Tx queue starting address,
  * If not set, using separate umem and MR for each TxQ.
@@ -1432,8 +1429,6 @@ mlx5_dev_args_check_handler(const char *key, const char *val, void *opaque)
 		config->cnt_svc.service_core = tmp;
 	} else if (strcmp(MLX5_HWS_CNT_CYCLE_TIME, key) == 0) {
 		config->cnt_svc.cycle_time = tmp;
-	} else if (strcmp(MLX5_REPR_MATCHING_EN, key) == 0) {
-		config->repr_matching = !!tmp;
 	} else if (strcmp(MLX5_TXQ_MEM_ALGN, key) == 0) {
 		config->txq_mem_algn = (uint32_t)tmp;
 	}
@@ -1474,7 +1469,6 @@ mlx5_shared_dev_ctx_args_config(struct mlx5_dev_ctx_shared *sh,
 		MLX5_FDB_DEFAULT_RULE_EN,
 		MLX5_HWS_CNT_SERVICE_CORE,
 		MLX5_HWS_CNT_CYCLE_TIME,
-		MLX5_REPR_MATCHING_EN,
 		MLX5_TXQ_MEM_ALGN,
 		NULL,
 	};
@@ -1497,7 +1491,6 @@ mlx5_shared_dev_ctx_args_config(struct mlx5_dev_ctx_shared *sh,
 	config->fdb_def_rule = 1;
 	config->cnt_svc.cycle_time = MLX5_CNT_SVC_CYCLE_TIME_DEFAULT;
 	config->cnt_svc.service_core = rte_get_main_lcore();
-	config->repr_matching = 1;
 	config->txq_mem_algn = log2above(alignment);
 	if (mkvlist != NULL) {
 		/* Process parameters. */
@@ -1532,11 +1525,6 @@ mlx5_shared_dev_ctx_args_config(struct mlx5_dev_ctx_shared *sh,
 			config->dv_xmeta_en);
 		config->dv_xmeta_en = MLX5_XMETA_MODE_LEGACY;
 	}
-	if (config->dv_flow_en != 2 && !config->repr_matching) {
-		DRV_LOG(DEBUG, "Disabling representor matching is valid only "
-			       "when HW Steering is enabled.");
-		config->repr_matching = 1;
-	}
 	if (config->tx_pp && !sh->dev_cap.txpp_en) {
 		DRV_LOG(ERR, "Packet pacing is not supported.");
 		rte_errno = ENODEV;
@@ -1591,7 +1579,6 @@ mlx5_shared_dev_ctx_args_config(struct mlx5_dev_ctx_shared *sh,
 	DRV_LOG(DEBUG, "\"allow_duplicate_pattern\" is %u.",
 		config->allow_duplicate_pattern);
 	DRV_LOG(DEBUG, "\"fdb_def_rule_en\" is %u.", config->fdb_def_rule);
-	DRV_LOG(DEBUG, "\"repr_matching_en\" is %u.", config->repr_matching);
 	DRV_LOG(DEBUG, "\"txq_mem_algn\" is %u.", config->txq_mem_algn);
 	return 0;
 }
drivers/net/mlx5/mlx5.h +0 -1
index 7e4bfacd11..966e802f5f 100644
@@ -397,7 +397,6 @@ struct mlx5_sh_config {
 	uint32_t lro_allowed:1; /* Whether LRO is allowed. */
 	/* Allow/Prevent the duplicate rules pattern. */
 	uint32_t fdb_def_rule:1; /* Create FDB default jump rule */
-	uint32_t repr_matching:1; /* Enable implicit vport matching in HWS FDB. */
 	uint32_t txq_mem_algn; /* logarithm value of the TxQ address alignment. */
 	struct {
 		uint16_t service_core;
drivers/net/mlx5/mlx5_flow.c +1 -4
index ed67a90a22..2c48f1b01b 100644
@@ -8818,10 +8818,7 @@ mlx5_flow_isolate(struct rte_eth_dev *dev,
 				   "port must be stopped first");
 		return -rte_errno;
 	}
-	if (!enable && !priv->sh->config.repr_matching)
-		return rte_flow_error_set(error, ENOTSUP, RTE_FLOW_ERROR_TYPE_UNSPECIFIED, NULL,
-					  "isolated mode cannot be disabled when "
-					  "representor matching is disabled");
+
 	priv->isolated = !!enable;
 	if (enable)
 		dev->dev_ops = &mlx5_dev_ops_isolate;
drivers/net/mlx5/mlx5_flow.h +0 -7
index e8b298dd1d..d7cc60f8d9 100644
@@ -3029,9 +3029,6 @@ struct mlx5_flow_hw_ctrl_fdb {
 	struct rte_flow_pattern_template *port_items_tmpl;
 	struct rte_flow_actions_template *jump_one_actions_tmpl;
 	struct rte_flow_template_table *hw_esw_zero_tbl;
-	struct rte_flow_pattern_template *tx_meta_items_tmpl;
-	struct rte_flow_actions_template *tx_meta_actions_tmpl;
-	struct rte_flow_template_table *hw_tx_meta_cpy_tbl;
 	struct rte_flow_pattern_template *lacp_rx_items_tmpl;
 	struct rte_flow_actions_template *lacp_rx_actions_tmpl;
 	struct rte_flow_template_table *hw_lacp_rx_tbl;
@@ -3610,11 +3607,7 @@ int mlx5_flow_hw_esw_create_sq_miss_flow(struct rte_eth_dev *dev,
 int mlx5_flow_hw_esw_destroy_sq_miss_flow(struct rte_eth_dev *dev,
 					  uint32_t sqn, bool external);
 int mlx5_flow_hw_esw_create_default_jump_flow(struct rte_eth_dev *dev);
-int mlx5_flow_hw_create_fdb_tx_default_mreg_copy_flow(struct rte_eth_dev *dev,
-						  uint32_t sqn, bool external);
 int mlx5_flow_hw_create_nic_tx_default_mreg_copy_flow(struct rte_eth_dev *dev, uint32_t sqn);
-int mlx5_flow_hw_destroy_tx_default_mreg_copy_flow(struct rte_eth_dev *dev,
-						   uint32_t sqn, bool external);
 int mlx5_flow_hw_create_tx_repr_matching_flow(struct rte_eth_dev *dev,
 					      uint32_t sqn, bool external);
 int mlx5_flow_hw_destroy_tx_repr_matching_flow(struct rte_eth_dev *dev,
drivers/net/mlx5/mlx5_flow_hw.c +3 -191

272 lines not on this page · raw message

drivers/net/mlx5/mlx5_trigger.c +9 -19
index 996c1eb6ac..c0fb98e78a 100644
@@ -1132,9 +1132,9 @@ mlx5_hw_representor_port_allowed_start(struct rte_eth_dev *dev)
 		rte_errno = EAGAIN;
 		return -rte_errno;
 	}
-	if (priv->sh->config.repr_matching && !priv->dr_ctx) {
-		DRV_LOG(ERR, "Failed to start port %u: with representor matching enabled, port "
-			     "must be configured for HWS", dev->data->port_id);
+	if (priv->dr_ctx == NULL) {
+		DRV_LOG(ERR, "Failed to start port %u: port must be configured for HWS",
+			dev->data->port_id);
 		rte_errno = EINVAL;
 		return -rte_errno;
 	}
@@ -1621,27 +1621,17 @@ mlx5_traffic_enable_hws(struct rte_eth_dev *dev)
 				goto error;
 			}
 		}
-		if (config->dv_esw_en && config->repr_matching) {
+		if (config->dv_esw_en) {
 			if (mlx5_flow_hw_create_tx_repr_matching_flow(dev, queue, false)) {
 				mlx5_txq_release(dev, i);
 				goto error;
 			}
 		}
-		/*
-		 * With extended metadata enabled, the Tx metadata copy is handled by default
-		 * Tx tagging flow rules, so default Tx flow rule is not needed. It is only
-		 * required when representor matching is disabled.
-		 */
-		if (config->dv_esw_en && !config->repr_matching &&
-		    config->dv_xmeta_en == MLX5_XMETA_MODE_META32_HWS &&
-		    (priv->master || priv->representor)) {
-			ret = mlx5_flow_hw_create_fdb_tx_default_mreg_copy_flow(dev, queue, false);
-		} else if (mlx5_vport_tx_metadata_passing_enabled(priv->sh)) {
-			ret = mlx5_flow_hw_create_nic_tx_default_mreg_copy_flow(dev, queue);
-		}
-		if (ret != 0) {
-			mlx5_txq_release(dev, i);
-			goto error;
+		if (mlx5_vport_tx_metadata_passing_enabled(priv->sh)) {
+			if (mlx5_flow_hw_create_nic_tx_default_mreg_copy_flow(dev, queue)) {
+				mlx5_txq_release(dev, i);
+				goto error;
+			}
 		}
 		mlx5_txq_release(dev, i);
 	}
drivers/net/mlx5/mlx5_txq.c +2 -15
index e273486809..ad15b20e7b 100644
@@ -1453,20 +1453,12 @@ rte_pmd_mlx5_external_sq_enable(uint16_t port_id, uint32_t sq_num)
 			sq_miss_created = true;
 		}
 
-		if (priv->sh->config.repr_matching &&
-		    mlx5_flow_hw_create_tx_repr_matching_flow(dev, sq_num, true)) {
+		if (mlx5_flow_hw_create_tx_repr_matching_flow(dev, sq_num, true)) {
 			if (sq_miss_created)
 				mlx5_flow_hw_esw_destroy_sq_miss_flow(dev, sq_num, true);
 			return -rte_errno;
 		}
 
-		if (!priv->sh->config.repr_matching &&
-		    priv->sh->config.dv_xmeta_en == MLX5_XMETA_MODE_META32_HWS &&
-		    mlx5_flow_hw_create_fdb_tx_default_mreg_copy_flow(dev, sq_num, true)) {
-			if (sq_miss_created)
-				mlx5_flow_hw_esw_destroy_sq_miss_flow(dev, sq_num, true);
-			return -rte_errno;
-		}
 		return 0;
 	}
 #endif
@@ -1510,12 +1502,7 @@ rte_pmd_mlx5_external_sq_disable(uint16_t port_id, uint32_t sq_num)
 		if (priv->sh->config.fdb_def_rule &&
 		    mlx5_flow_hw_esw_destroy_sq_miss_flow(dev, sq_num, true))
 			return -rte_errno;
-		if (priv->sh->config.repr_matching &&
-		    mlx5_flow_hw_destroy_tx_repr_matching_flow(dev, sq_num, true))
-			return -rte_errno;
-		if (!priv->sh->config.repr_matching &&
-		    priv->sh->config.dv_xmeta_en == MLX5_XMETA_MODE_META32_HWS &&
-		    mlx5_flow_hw_destroy_tx_default_mreg_copy_flow(dev, sq_num, true))
+		if (mlx5_flow_hw_destroy_tx_repr_matching_flow(dev, sq_num, true))
 			return -rte_errno;
 		return 0;
 	}

--
2.39.5

#3 lore raw

Hi,

Quoted 11 lines · Dariusz Sosnowski

As announced in 25.07 release deprecation notice [1],
this patch removes repr_matching_en device argument from mlx5 driver.

Applications which disabled this option were able to receive traffic from any physical port/VF/SF on any representor. Specifically, in most cases, this was used to process all traffic on representor which is a transfer proxy port.
Similar behavior in mlx5 PMD can be achieved without
the use of additional device arguments, by using RTE_FLOW_ACTION_TYPE_RSS flow action in transfer flow rules.

Quoted 4 lines

[1] https://doc.dpdk.org/guides-25.07/rel_notes/deprecation.html

Patch applied to next-net-mlx,
Kindest regards
Raslan Darawsheh