]> 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)
commitdf12d2eb2a37f597a2f04192077fe2ed5aae27e9
tree7823a32f549c8b5f60345a05879929e9cc009b51
parent788531e41e67b647b32dda9321b7030642b0d827
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: 2d37ba78dc45 ("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