]> git.baikalelectronics.ru Git - kernel.git/commit
nfp: flower: fix pre_tun mask id allocation
authorLouis Peens <louis.peens@corigine.com>
Tue, 16 Mar 2021 18:13:10 +0000 (19:13 +0100)
committerDavid S. Miller <davem@davemloft.net>
Tue, 16 Mar 2021 22:36:44 +0000 (15:36 -0700)
commit4ddb988fd6402e6832e192d79aacd8df41ebc650
tree7823a32f549c8b5f60345a05879929e9cc009b51
parentd5c51f87b6a40db3e90bb8d4ebc9bd3e018265d8
nfp: flower: fix pre_tun mask id allocation

pre_tun_rule flows does not follow the usual add-flow path, instead
they are used to update the pre_tun table on the firmware. This means
that if the mask-id gets allocated here the firmware will never see the
"NFP_FL_META_FLAG_MANAGE_MASK" flag for the specific mask id, which
triggers the allocation on the firmware side. This leads to the firmware
mask being corrupted and causing all sorts of strange behaviour.

Fixes: c717eb9eaad9 ("nfp: flower: offload pre-tunnel rules")
Signed-off-by: Louis Peens <louis.peens@corigine.com>
Signed-off-by: Simon Horman <simon.horman@netronome.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/netronome/nfp/flower/metadata.c