[dpdk-dev] [PATCH v2 2/2] app/testpmd: add support for generic copy rte flow action

Ori Kam orika at nvidia.com
Tue Jan 12 15:58:27 CET 2021


Hi Alexander,

> -----Original Message-----
> From: dev <dev-bounces at dpdk.org> On Behalf Of Alexander Kozyrev
> Subject: [dpdk-dev] [PATCH v2 2/2] app/testpmd: add support for generic copy
> rte flow action
> 
> Add support for the RTE_FLOW_ACTION_COPY_ITEM to the testpmd.
> Implement CLI to create the copy_item action and supply all the
> needed parameters to copy an arbitrary packet field (as well as
> mark, tag or metadata) into another item.
> 
> Example of the flow is the following:
> flow create 0 egress group 1 pattern eth / ipv4 / udp / end
>      actions copy_item dst_type tag dst_index 0 dst_offset 8
>      src_type gtp_teid src_index 0 src_offset 0 width 32 / end
> 
This is a long command, and for most cases holds to many extra values.
I suggest to allow default values, meaning that the application must
say the src and the dest fields but all the rest of the information can be
extract from those two parameters (offset =0, len(field_type).
If the user request he can add those parameters for more control.

> This flow copies 32 bits from the first Tag in the Tags array
> into the outermost GTP TEID packet header field. 8 bits of the Tag
> are skipped as indicated by the dst_offset action parameter.
> 
> Signed-off-by: Alexander Kozyrev <akozyrev at nvidia.com>
> ---


Best,
Ori


More information about the dev mailing list