net/ice/base: return switch error on invalid match criteria
authorQi Zhang <qi.z.zhang@intel.com>
Thu, 29 Aug 2019 02:36:31 +0000 (10:36 +0800)
committerFerruh Yigit <ferruh.yigit@intel.com>
Mon, 7 Oct 2019 13:00:53 +0000 (15:00 +0200)
commitaa6ff47ad8961ecfe9926d63bd7ddb74eb5cd138
tree2f6b3ee7f014114c0d3431b92d41ed4ab8f773d2
parent55744222e6e2b4623de0626aef586d98e245bdd2
net/ice/base: return switch error on invalid match criteria

Modify ice_add_adv_rule to return an error when an invalid match
criteria is requested by the caller. This happens when the protocol
and offset pair is not supported by the package.

This change required a fix for the offset in the VXLAN GPE header,
and also found an issue with NVGRE where the package does not seem
to extract the correct offsets.

Signed-off-by: Dan Nowlin <dan.nowlin@intel.com>
Signed-off-by: Paul M Stillwell Jr <paul.m.stillwell.jr@intel.com>
Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
Acked-by: Xiaolong Ye <xiaolong.ye@intel.com>
drivers/net/ice/base/ice_switch.c