nfp: fix supported key layers calculation
authorPieter Jansen van Vuuren <pieter.jansenvanvuuren@netronome.com>
Fri, 25 Aug 2017 17:31:02 +0000 (19:31 +0200)
committerDavid S. Miller <davem@davemloft.net>
Mon, 28 Aug 2017 22:20:24 +0000 (15:20 -0700)
commit74af5975108f54f9443952c0b4d52487031a7569
tree1adac9d966a89d8d7939c5f0bb4601762faed2b6
parenta7cd39e0c7805a93eaa4256370bcd48c506d46c1
nfp: fix supported key layers calculation

Previously when calculating the supported key layers MPLS, IPv4/6
TTL and TOS were not considered. This patch checks that the TTL and
TOS fields are masked out before offloading. Additionally this patch
checks that MPLS packets are correctly handled, by not offloading them.

Fixes: af9d842c1354 ("nfp: extend flower add flow offload")
Signed-off-by: Pieter Jansen van Vuuren <pieter.jansenvanvuuren@netronome.com>
Reviewed-by: Jakub Kicinski <jakub.kicinski@netronome.com>
Reviewed-by: Simon Horman <simon.horman@netronome.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/netronome/nfp/flower/offload.c