net/mlx5: DR, Handle reformat capability over sw-steering tables
On flow table creation, send the relevant flags according to what the FW
currently supports.
When FW doesn't support reformat option over SW-steering managed table,
the driver shouldn't pass this.
Fixes: 988fd6b32d
("net/mlx5: DR, Pass table flags at creation to lower layer")
Signed-off-by: Erez Shitrit <erezsh@mellanox.com>
Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
This commit is contained in:
parent
76781623f0
commit
13a7e459a4
|
@ -66,15 +66,20 @@ static int mlx5_cmd_dr_create_flow_table(struct mlx5_flow_root_namespace *ns,
|
|||
struct mlx5_flow_table *next_ft)
|
||||
{
|
||||
struct mlx5dr_table *tbl;
|
||||
u32 flags;
|
||||
int err;
|
||||
|
||||
if (mlx5_dr_is_fw_table(ft->flags))
|
||||
return mlx5_fs_cmd_get_fw_cmds()->create_flow_table(ns, ft,
|
||||
log_size,
|
||||
next_ft);
|
||||
flags = ft->flags;
|
||||
/* turn off encap/decap if not supported for sw-str by fw */
|
||||
if (!MLX5_CAP_FLOWTABLE(ns->dev, sw_owner_reformat_supported))
|
||||
flags = ft->flags & ~(MLX5_FLOW_TABLE_TUNNEL_EN_REFORMAT |
|
||||
MLX5_FLOW_TABLE_TUNNEL_EN_DECAP);
|
||||
|
||||
tbl = mlx5dr_table_create(ns->fs_dr_domain.dr_domain,
|
||||
ft->level, ft->flags);
|
||||
tbl = mlx5dr_table_create(ns->fs_dr_domain.dr_domain, ft->level, flags);
|
||||
if (!tbl) {
|
||||
mlx5_core_err(ns->dev, "Failed creating dr flow_table\n");
|
||||
return -EINVAL;
|
||||
|
|
|
@ -688,7 +688,10 @@ struct mlx5_ifc_flow_table_nic_cap_bits {
|
|||
u8 nic_rx_multi_path_tirs[0x1];
|
||||
u8 nic_rx_multi_path_tirs_fts[0x1];
|
||||
u8 allow_sniffer_and_nic_rx_shared_tir[0x1];
|
||||
u8 reserved_at_3[0x1d];
|
||||
u8 reserved_at_3[0x4];
|
||||
u8 sw_owner_reformat_supported[0x1];
|
||||
u8 reserved_at_8[0x18];
|
||||
|
||||
u8 encap_general_header[0x1];
|
||||
u8 reserved_at_21[0xa];
|
||||
u8 log_max_packet_reformat_context[0x5];
|
||||
|
|
Loading…
Reference in New Issue