[dpdk-dev] [PATCH 2/3] net/ice: enable protocol agnostic flow offloading in FDIR

Van Haaren, Harry harry.van.haaren at intel.com
Fri Sep 24 10:45:57 CEST 2021


> -----Original Message-----
> From: dev <dev-bounces at dpdk.org> On Behalf Of Junfeng Guo
> Sent: Friday, September 24, 2021 5:22 PM
> To: Zhang, Qi Z <qi.z.zhang at intel.com>; Wu, Jingjing <jingjing.wu at intel.com>;
> Xing, Beilei <beilei.xing at intel.com>
> Cc: dev at dpdk.org; Guo, Junfeng <junfeng.guo at intel.com>
> Subject: [dpdk-dev] [PATCH 2/3] 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,
> without public API change.
> 
> 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

To improve the documentation in the commit message, should the "00000800" (0x0800)
EtherType not be masked with 0xFFFF too? Non IPv4 packets which happen to have the
masked data "01020304" in that position would incorrectly match. By adding 0xFFFF in
the mask to check ethertype == 0x8000, this issue is resolved.

> 00000000000000000000000008004500001400004000401000000000000001020304 \
> pattern mask \
> 00000000000000000000FFFFFFFF00000000000000000000000000000000ffffffff \

Difficult to see if I changed correct characters in the string from 0 to F, but I hope the point is clear.

Regards, -Harry


More information about the dev mailing list