]> git.itanic.dy.fi Git - linux-stable/commit
net/mlx5: DR, Support SW created encap actions for FW table
authorYevgeny Kliteynik <kliteyn@nvidia.com>
Sun, 11 Jun 2023 22:05:48 +0000 (01:05 +0300)
committerSaeed Mahameed <saeedm@nvidia.com>
Fri, 16 Jun 2023 19:59:19 +0000 (12:59 -0700)
commit87cd0649176c0588daf2cad53058143f808b0905
tree55c83fa6eb28f17ba50ffb4c7f4fc9e16a8cb6e7
parentfb7be476ab7e797b18c6f0047041635c41b3b5a4
net/mlx5: DR, Support SW created encap actions for FW table

In some cases, steering might need to use SW-created action in
FW table, which results in wrong packet reformat being used:

  mlx5_core 0000:81:00.1: mlx5_cmd_check:756:(pid 1154):
      SET_FLOW_TABLE_ENTRY(0×936) op_mod(0×0) failed,
      status bad resource(0×5), syndrome (0xf2ff71)

This patch adds support for usage of SW-created packet reformat (encap)
actions in FW tables, and adds clear error flow for attempt to use
SW-created modify header on FW tables.

Fixes: 6a48faeeca10 ("net/mlx5: Add direct rule fs_cmd implementation")
Signed-off-by: Yevgeny Kliteynik <kliteyn@nvidia.com>
Reviewed-by: Erez Shitrit <erezsh@nvidia.com>
Signed-off-by: Saeed Mahameed <saeedm@nvidia.com>
drivers/net/ethernet/mellanox/mlx5/core/fs_cmd.c
drivers/net/ethernet/mellanox/mlx5/core/fs_core.h
drivers/net/ethernet/mellanox/mlx5/core/steering/dr_action.c
drivers/net/ethernet/mellanox/mlx5/core/steering/fs_dr.c
drivers/net/ethernet/mellanox/mlx5/core/steering/fs_dr.h
drivers/net/ethernet/mellanox/mlx5/core/steering/mlx5dr.h