On Tue, 28 Feb 2023 15:12:31 +0000 Tony Hart <[email protected]> wrote:
> I’m trying to use the Generic Flow API (rte_flow) to match IP packets based > on their length (either L2, L3 or L4 lengths). > > There doesn’t seem to be an item type that explicitly matches based on length > (RTE_FLOW_ITEM_TYPE_x). So I’ve tried using a mask with > RTE_FLOW_ITEM_TYPE_IPV4 to match on the total_length field (and similar > attempt to match on the UDP header dgram_len field) but the NIC I’m using > (mlx5) returns an error (mask enables non supported bits). > > Am I out of luck, or maybe missing something? > > Thanks for any insights! > > I’ve tried, DPDK: 20.11.7 and 22.11.1 > > Tony Hart | Chief Architect > [email protected] <mailto:[email protected]> Short answer: yes, you are right there is no generic length match. Longer answer: rte_flow is an API which is meant to provide access to the underlying match features of NIC hardware. Supporting something requires that the HW/FW can do the match, and that the driver writer has added (and tested) that match. Hopefully the MLX5 experts can help answer what is possible.
