[dpdk-dev] [PATCH v5 2/2] app/testpmd: add support for modify field flow action

Ori Kam orika at nvidia.com
Fri Jan 15 19:04:14 CET 2021



> -----Original Message-----
> From: Alexander Kozyrev <akozyrev at nvidia.com>
> Sent: Friday, January 15, 2021 5:43 PM
> Subject: [PATCH v5 2/2] app/testpmd: add support for modify field flow action
> 
> Add support for the RTE_FLOW_ACTION_MODIFY_FIELD to the testpmd.
> Implement CLI to create the modify_field action and supply all the
> needed parameters to modify an arbitrary packet field (as well as
> mark, tag or metadata) with data from another field or immediate
> value.
> 
> Example of the flow is the following:
> flow create 0 egress group 1 pattern eth / ipv4 / udp / end
>   actions modify_field op mov dst_type tag dst_level 2 dst_offset 8
>           src_type gtp_teid src_level 0 src_offset 0 width 16 / end
> 
> This flow copies 16 bits from the second 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.
> 
> op, dst_type, src_type and width are the mandatory parameters to
> specify. Levels and offset are 0 by default if they are not
> overridden by a user. The operation can be mov, add or sub.
> 
> Signed-off-by: Alexander Kozyrev <akozyrev at nvidia.com>
> 
> ---
> v1: Initial implementation.
> v2: Made dst_type, src_type and width only mandatory parameters.
> v3: Reworked to accomodate API change from copy_field to modify_field.
> ---

Acked-by: Ori Kam <orika at nvidia.com>
Thanks,
Ori



More information about the dev mailing list