[dpdk-dev] [PATCH v3 4/7] common/mlx5: adding DevX command for flex parsers

Slava Ovsiienko viacheslavo at mellanox.com
Thu Jul 16 17:05:04 CEST 2020


> -----Original Message-----
> From: Bing Zhao <bingz at mellanox.com>
> Sent: Thursday, July 16, 2020 17:24
> To: Ori Kam <orika at mellanox.com>; Slava Ovsiienko
> <viacheslavo at mellanox.com>
> Cc: Raslan Darawsheh <rasland at mellanox.com>; Matan Azrad
> <matan at mellanox.com>; dev at dpdk.org; Netanel Gonen
> <netanelg at mellanox.com>
> Subject: [PATCH v3 4/7] common/mlx5: adding DevX command for flex
> parsers
> 
> In order to use dynamic flex parser to parse protocols that is not supported
> natively, two steps are needed.
> 
> Firstly, creating the parse graph node. There are three parts of the flex
> parser: node, arc and sample. Node is the whole structure of a flex parser,
> when creating, the length of the protocol should be specified. Then the input
> arc(s) is(are) mandatory, it will tell the HW when to use this parser to parse
> the packet. For a single parser node, up to 8 input arcs could be supported
> and it gives SW ability to support this protocol over multiple layers. The
> output arc is optional and also up to 8 arcs could be supported. If the
> protocol is the last header of the stack, then output arc should be NULL. Or
> else it should be specified. The protocol type in the arc is used to indicate the
> parser pointing to or from this flex parser node. For output arc, the next
> header type field offset and size should be set in the node structure, then the
> HW could get the proper type of the next header and decide which parser to
> point to.
> Note: the parsers have two types now, native parser and flex parser.
> The arc between two flex parsers are not supported in this stage.
> 
> Secondly, querying the sample IDs. If the protocol header parsed with flex
> parser needs to used in flow rule offloading, the DW samples are needed
> when creating the parse graph node. The offset of bytes starting from the
> header needs to be set. After creating the node successfully, a general object
> handle will be returned.
> This object could be queryed with Devx command to get the sample IDs.
> When creating a flow, sample IDs could be used to sample a DW from the
> parsed header - 4 continuous bytes starting from the offset. The flow entry
> could specify some mask to use part of this DW for matching. Up to 8
> samples could be supported for a single parse graph node. The offset should
> not exceed the header length.
> 
> The HW resources have some limitation, low layer driver error should be
> checked once there is a failure of creating parse graph node.
> 
> Signed-off-by: Netanel Gonen <netanelg at mellanox.com>
> Signed-off-by: Bing Zhao <bingz at mellanox.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo at mellanox.com>


More information about the dev mailing list