net/ice/base: fix VXLAN flow director creation
authorDapeng Yu <dapengx.yu@intel.com>
Wed, 16 Jun 2021 01:20:52 +0000 (09:20 +0800)
committerQi Zhang <qi.z.zhang@intel.com>
Fri, 9 Jul 2021 03:05:19 +0000 (05:05 +0200)
commita7e1e2f76485967dd7cf71f1f6407cecded00512
treec05e6fab6dd74c94aa148cad7076c4985423c375
parent931ee54072b143e973d861509c30af8928f30324
net/ice/base: fix VXLAN flow director creation

In original implementation, error returned when creating VXLAN flow
director with SCTP or TCP as layer 4 protocol of inner segment.

There are several root causes for the error:
1. ice_fdir_udp4_vxlan_pkt[] is not adapted to the TCP and SCTP protocol.
Its length cannot hold TCP header, only UDP protocol was supported in
original implementation
2. VXLAN VNI offset: 45 is inconsistent with IETF RFC 7348

This patch fixes those defects described above.

Fixes: 608cd0a5e283 ("net/ice/base: support VXLAN VNI field in flow director")
Cc: stable@dpdk.org
Signed-off-by: Dapeng Yu <dapengx.yu@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
drivers/net/ice/base/ice_fdir.c
drivers/net/ice/base/ice_fdir.h
drivers/net/ice/base/ice_type.h