OSDN Git Service

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)
commitd8ce0275e45ec809a33f98fc080fe7921b720dfb
tree7823a32f549c8b5f60345a05879929e9cc009b51
parent5c4f5e19d6a8e159127b9d653bb67e0dc7a28047
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: f12725d98cbe ("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