net/ice: enable protocol agnostic flow offloading in FDIR
authorJunfeng Guo <junfeng.guo@intel.com>
Wed, 3 Nov 2021 04:40:03 +0000 (12:40 +0800)
committerQi Zhang <qi.z.zhang@intel.com>
Wed, 3 Nov 2021 12:01:31 +0000 (13:01 +0100)
commit25be39cc1760fac2b65de65f0ec9e4f8f0fbbf7e
tree742ce0990f54c88e4f82540b81584cba59041ff8
parentdeaa33c251e2a0e9dc883ca730d05a78b54a58e6
net/ice: enable protocol agnostic flow offloading in FDIR

Protocol agnostic flow offloading in Flow Director is enabled by this
patch based on the Parser Library, using existing rte_flow raw API.

Note that the raw flow requires:
1. byte string of raw target packet bits.
2. byte string of mask of target packet.

Here is an example:
FDIR matching ipv4 dst addr with 1.2.3.4 and redirect to queue 3:

flow create 0 ingress pattern raw \
pattern spec \
00000000000000000000000008004500001400004000401000000000000001020304 \
pattern mask \
000000000000000000000000000000000000000000000000000000000000ffffffff \
/ end actions queue index 3 / mark id 3 / end

Note that mask of some key bits (e.g., 0x0800 to indicate ipv4 proto)
is optional in our cases. To avoid redundancy, we just omit the mask
of 0x0800 (with 0xFFFF) in the mask byte string example. The prefix
'0x' for the spec and mask byte (hex) strings are also omitted here.

Also update the ice feature list with rte_flow item raw.

Signed-off-by: Junfeng Guo <junfeng.guo@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
doc/guides/nics/features/ice.ini
doc/guides/rel_notes/release_21_11.rst
drivers/net/ice/ice_ethdev.h
drivers/net/ice/ice_fdir_filter.c
drivers/net/ice/ice_generic_flow.c
drivers/net/ice/ice_generic_flow.h