net/mlx5: CT: Set flow source hint from provided tuple device
authorPaul Blakey <paulb@nvidia.com>
Mon, 3 Jan 2022 11:44:52 +0000 (13:44 +0200)
committerDavid S. Miller <davem@davemloft.net>
Tue, 4 Jan 2022 12:12:56 +0000 (12:12 +0000)
commitc9c079b4deaae3e9e29286829aff1c2b55169fc5
tree066fc0c341cbdaf052ac2ab06f5d56fd81829e2a
parentb702436a51dfdf1e2960fb8e228009e09eedb462
net/mlx5: CT: Set flow source hint from provided tuple device

Get originating device from tuple offload metadata match ingress_ifindex,
and set flow_source hint to either LOCAL for vf/sf reps, UPLINK for
uplink/wire/tunnel devices/bond, or ANY (as before this patch)
for all others.

This allows lower layer (software steering or firmware) to insert the tuple
rule only in one table (either rx or tx) instead of two (rx and tx).

Signed-off-by: Paul Blakey <paulb@nvidia.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/mellanox/mlx5/core/dev.c
drivers/net/ethernet/mellanox/mlx5/core/en/tc_ct.c
drivers/net/ethernet/mellanox/mlx5/core/mlx5_core.h