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)
commit59f8f7c84c506cd4fafbfa47acd23ebdb6256dac
treeb3828547f16501e92cd559c55e722c01b9673b52
parent0c2600c619578f759cf3d5192b01bd14e281f24c
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: 9254f8ed15b6 ("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