[dpdk-users] Flow director struct rte_flow_item_raw guild
Tom Barbette
barbette at kth.se
Thu May 16 08:00:29 CEST 2019
Hi,
I learned to look at the datasheet first, or look at the code before
using "fancy" patterns (specially for Mellanox products that have no
datasheet :p).
Another way is to just try testpmd "flow create ..." quickly and see how
it goes.
Eg, for x520, you will have only access to what is called the 2 flex
bytes, see the 82599 datasheet.
If you grep the code you'll see the constraint are quite huge :
It will fail if any of these is true :
Mask :
raw_mask->pattern[0] != 0xff ||
raw_mask->pattern[1] != 0xff)
--> It's a fixed value search on two bytes. And you'll have to set that
value for all patterns if I remember the datasheet correctly.
Value:
raw_spec->relative != 0 ||
raw_spec->search != 0 ||
raw_spec->reserved != 0 ||
raw_spec->offset > IXGBE_MAX_FLX_SOURCE_OFF ||
raw_spec->offset % 2 ||
raw_spec->limit != 0 ||
raw_spec->length != 2 ||
/* pattern can't be 0xffff */
(raw_spec->pattern[0] == 0xff &&
raw_spec->pattern[1] == 0xff))
I think XL710 (i40e) will be as restrained. From what I remember the
flex bytes became a flex payload bytes. So you can't even match on the
header.
Tom
For relevance, other mask stuff :
raw_mask->relative != 0x1 ||
raw_mask->search != 0x1 ||
raw_mask->reserved != 0x0 ||
(uint32_t)raw_mask->offset != 0xffffffff ||
raw_mask->limit != 0xffff ||
raw_mask->length != 0xffff
Le 16/05/2019 à 07:34, 曾懷恩 a écrit :
> Hi Adrien,
>
> Thanks for reply,
>
> I tried to trace the mlx5 and ixgbe driver source code in DPDK source and notice that the flow director APIs are processed in it.
>
> I also compared the difference of flow director APIs between both two drivers and found that there is no rte_flow_item_raw defined in mlx5 driver.
>
> Is there any possible mlx5 series NICs support rte_flow_item_raw in the future?
>
> Thanks a lot.
>
> Best Regards,
>
>> Adrien Mazarguil <adrien.mazarguil at 6wind.com> 於 2019年5月13日 下午4:49 寫道:
>>
>> On Sat, May 11, 2019 at 02:20:48AM +0800, Huai-En Tseng wrote:
>>> Thanks for reply,
>>>
>>> Actually I’d like to use rte_flow_item_raw structure with PPP header, the ICMP format is my little trial.
>>
>> OK, makes sense, there's no pattern item for PPP yet.
>>
>>> I will try X520 next week.
>>>
>>> Another question, is ixgbevf also support RTE_FLOW_ITEM_RAW?
>>
>> The ixgbe driver looks like it does but I'm not sure regarding the VF
>> variant, Cc'ing maintainers just in case.
>>
>> --
>> Adrien Mazarguil
>> 6WIND
>
More information about the users
mailing list