net/ice: fix VXLAN flow director creation
authorDapeng Yu <dapengx.yu@intel.com>
Wed, 16 Jun 2021 01:20:53 +0000 (09:20 +0800)
committerQi Zhang <qi.z.zhang@intel.com>
Fri, 9 Jul 2021 03:05:19 +0000 (05:05 +0200)
commita87688852dfa5e2dc1efcdd4024ae39defc0ead6
treef9960227939f5b9c42aefd4d98e3935fe17a07fc
parenta7e1e2f76485967dd7cf71f1f6407cecded00512
net/ice: 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_input_set_hdrs() set ICE_FLOW_SEG_HDR_UDP into protocol
header flag of inner segment of VXLAN FDIR rule, even if it shall be
ICE_FLOW_SEG_HDR_TCP or ICE_FLOW_SEG_HDR_SCTP
2. ice_fdir_input_set_hdrs() set ICE_FLOW_SEG_HDR_VXLAN into protocol
header flag of segments of VXLAN FDIR rule, it not necessary, and can
be set automatically by ice_flow_set_fld() later
3. flow type: ICE_FLTR_PTYPE_NONF_IPV4_UDP_VXLAN hides the flow type of
inner segment of VXLAN FDIR rule, then further causes function:
ice_fdir_get_gen_prgm_pkt() cannot write correct protocol id into inner
segment of training packet.

This patch fixes those defects described above.

Fixes: 855d23a07b36 ("net/ice: 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/ice_fdir_filter.c