]> git.baikalelectronics.ru Git - kernel.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)
commit0eb24ad91a33e766fb642fdaedf8e2e8ee352ba2
treeb70df4e2d983437ce1e0a44721d0ac1dea2e6007
parented08e2e5e8ac86bcc599cbc912a9eeffeb2972aa
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: d6a7237fc871 ("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