]> 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)
commita782ff6cad0fc10901cc5b61c49b5dbf48ca0cb3
treeb3828547f16501e92cd559c55e722c01b9673b52
parent3756a41d3beb7d948ec9051938137f03389cd86f
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: a194bd4cf507 ("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