]> asedeno.scripts.mit.edu Git - linux.git/commit
nfp: remove false positive offloads in flower vxlan
authorJohn Hurley <john.hurley@netronome.com>
Fri, 17 Nov 2017 01:06:43 +0000 (17:06 -0800)
committerDavid S. Miller <davem@davemloft.net>
Fri, 17 Nov 2017 05:09:36 +0000 (14:09 +0900)
commit0115552eac14a2d6db66da5f26bd67d0f2a5d79b
treeb70df4e2d983437ce1e0a44721d0ac1dea2e6007
parent1a24d4f9c07cc5b9d2207cd84236dff3048438e5
nfp: remove false positive offloads in flower vxlan

Pass information to the match offload on whether or not the repr is the
ingress or egress dev. Only accept tunnel matches if repr is the egress
dev.

This means rules such as the following are successfully offloaded:
tc .. add dev vxlan0 .. enc_dst_port 4789 .. action redirect dev nfp_p0

While rules such as the following are rejected:
tc .. add dev nfp_p0 .. enc_dst_port 4789 .. action redirect dev vxlan0

Also reject non tunnel flows that are offloaded to an egress dev.
Non tunnel matches assume that the offload dev is the ingress port and
offload a match accordingly.

Fixes: 611aec101ab7 ("nfp: compile flower vxlan tunnel metadata match fields")
Signed-off-by: John Hurley <john.hurley@netronome.com>
Reviewed-by: Jakub Kicinski <jakub.kicinski@netronome.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/netronome/nfp/flower/offload.c