]> git.baikalelectronics.ru Git - kernel.git/commit
net/mlx5: Fix forward to next namespace
authorMaor Gottlieb <maorg@mellanox.com>
Thu, 25 Jun 2020 07:56:07 +0000 (10:56 +0300)
committerSaeed Mahameed <saeedm@mellanox.com>
Tue, 28 Jul 2020 19:55:32 +0000 (12:55 -0700)
commit1223daa6be7bbf9a705a1b4a53e08f6a735c966d
treeb3828547f16501e92cd559c55e722c01b9673b52
parentf29c5d5165d42e2d2624b901e99a36bdc338cc0f
net/mlx5: Fix forward to next namespace

The steering tree is as follow (nic RX as example):
   ---------
                   |root_ns|
   ---------
|
       --------------------------------
     | |        |
   ----------     ----------      ---------
   |p(prio)0|    |   p1   |      |   pn  |
   ----------    ----------    ---------
        | |
 ----------------  ---------------
 |ns(e.g bypass)|  |ns(e.g. lag) |
 ----------------  ---------------
  |     |    |
----  ----  ----
|p0|  |p1|  |pn|
----  ----  ----
 |
----
|FT|
----

find_next_chained_ft(prio) returns the first flow table in the next
priority. If prio is a parent of a flow table then it returns the first
flow table in the next priority in the same namespace, else if prio
is parent of namespace, then it should return the first flow table
in the next namespace. Currently if the user requests to forward to
next namespace, the code calls to find_next_chained_ft with the prio
of the next namespace and not the prio of the namesapce itself.

Fixes: f1ee9441c87e ("net/mlx5: Add support in forward to namespace")
Signed-off-by: Maor Gottlieb <maorg@mellanox.com>
Reviewed-by: Mark Bloch <markb@mellanox.com>
Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
drivers/net/ethernet/mellanox/mlx5/core/fs_core.c