Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 2 additions & 24 deletions doc/guides/nics/mlx5.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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
^^^^^^^^^^^
Expand All @@ -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
^^^^^^^^
Expand Down Expand Up @@ -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.
Expand Down
11 changes: 0 additions & 11 deletions doc/guides/rel_notes/deprecation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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.
8 changes: 8 additions & 0 deletions doc/guides/rel_notes/release_25_11.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Comment on lines +203 to +204
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

suggestion (typo): Consider adding 'a' before 'representor' for grammatical correctness.

Change the sentence to: 'Specifically, in most cases, this was used to process all traffic on a representor, which is a transfer proxy port.'

Suggested change
Specifically, in most cases, this was used to process all traffic on representor
which is a transfer proxy port.
Specifically, in most cases, this was used to process all traffic on a 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
-----------
Expand Down
16 changes: 0 additions & 16 deletions drivers/net/mlx5/linux/mlx5_os.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
13 changes: 0 additions & 13 deletions drivers/net/mlx5/mlx5.c
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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;
}
Expand Down Expand Up @@ -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,
};
Expand All @@ -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. */
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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;
}
Expand Down
1 change: 0 additions & 1 deletion drivers/net/mlx5/mlx5.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
5 changes: 1 addition & 4 deletions drivers/net/mlx5/mlx5_flow.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
4 changes: 0 additions & 4 deletions drivers/net/mlx5/mlx5_flow.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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,
Expand Down
Loading