[dpdk-dev] [PATCH v4] ethdev: extend flow metadata

Ori Kam orika at mellanox.com
Sun Oct 27 20:10:57 CET 2019



> -----Original Message-----
> From: dev <dev-bounces at dpdk.org> On Behalf Of Viacheslav Ovsiienko
> Subject: [dpdk-dev] [PATCH v4] ethdev: extend flow metadata
> 
> Currently, metadata can be set on egress path via mbuf tx_metadata field
> with PKT_TX_METADATA flag and RTE_FLOW_ITEM_TYPE_META matches
> metadata.
> 
> This patch extends the metadata feature usability.
> 
> 1) RTE_FLOW_ACTION_TYPE_SET_META
> 
> When supporting multiple tables, Tx metadata can also be set by a rule and
> matched by another rule. This new action allows metadata to be set as a
> result of flow match.
> 
> 2) Metadata on ingress
> 
> There's also need to support metadata on ingress. Metadata can be set by
> SET_META action and matched by META item like Tx. The final value set by
> the action will be delivered to application via metadata dynamic field of
> mbuf which can be accessed by RTE_FLOW_DYNF_METADATA().
> PKT_RX_DYNF_METADATA flag will be set along with the data.
> 
> The mbuf dynamic field must be registered by calling
> rte_flow_dynf_metadata_register() prior to use SET_META action.
> 
> The availability of dynamic mbuf metadata field can be checked
> with rte_flow_dynf_metadata_avail() routine.
> 
> For loopback/hairpin packet, metadata set on Rx/Tx may or may not be
> propagated to the other path depending on hardware capability.
> 
> Signed-off-by: Yongseok Koh <yskoh at mellanox.com>
> Signed-off-by: Viacheslav Ovsiienko <viacheslavo at mellanox.com>
> 
> ---
> v4: documentation comments addressed
>     deprecation notice for Tx metadata offload flag
>     rebased
> 
> v3:
> https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fpatches.dp
> dk.org%2Fpatch%2F61902%2F&data=02%7C01%7Corika%40mellanox.com
> %7Ce5a38cd79f30468e76d408d75b0d2f4c%7Ca652971c7d2e4d9ba6a4d149256
> f461b%7C0%7C0%7C637077984504455741&sdata=C1yyYY8M8LpoOg1bTz
> wM8nIx19RcDzP96GVNA%2FABRb8%3D&reserved=0
>     rebased, neat updates
> 
> v2:
> https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fpatches.dp
> dk.org%2Fpatch%2F60909%2F&data=02%7C01%7Corika%40mellanox.com
> %7Ce5a38cd79f30468e76d408d75b0d2f4c%7Ca652971c7d2e4d9ba6a4d149256
> f461b%7C0%7C0%7C637077984504455741&sdata=H1zpBrDfxQaTAQwETE
> St9uiY3rgVHQEMw%2FeEveZSdx4%3D&reserved=0
> v1:
> https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fpatches.dp
> dk.org%2Fpatch%2F56104%2F&data=02%7C01%7Corika%40mellanox.com
> %7Ce5a38cd79f30468e76d408d75b0d2f4c%7Ca652971c7d2e4d9ba6a4d149256
> f461b%7C0%7C0%7C637077984504455741&sdata=olUN2iPv38TqFHIX8a0
> b3Uz505Cqz34BOlckZHsl8rw%3D&reserved=0
> rfc:
> https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fpatches.dp
> dk.org%2Fpatch%2F54271%2F&data=02%7C01%7Corika%40mellanox.com
> %7Ce5a38cd79f30468e76d408d75b0d2f4c%7Ca652971c7d2e4d9ba6a4d149256
> f461b%7C0%7C0%7C637077984504455741&sdata=%2BMP4tWWQHO6Vd
> NBGJNM1om%2BwoM5ARrbXx0DP44et5mA%3D&reserved=0
> 
>  app/test-pmd/cmdline_flow.c              | 57 +++++++++++++++++-
>  app/test-pmd/util.c                      |  5 ++
>  doc/guides/prog_guide/rte_flow.rst       | 72 ++++++++++++++++++-----
>  doc/guides/rel_notes/deprecation.rst     |  4 ++
>  doc/guides/rel_notes/release_19_11.rst   | 15 +++++
>  lib/librte_ethdev/rte_ethdev.h           |  1 -
>  lib/librte_ethdev/rte_ethdev_version.map |  3 +
>  lib/librte_ethdev/rte_flow.c             | 41 +++++++++++++
>  lib/librte_ethdev/rte_flow.h             | 99
> +++++++++++++++++++++++++++++++-

Acked-by: Ori Kam <orika at mellanox.com>

Thanks,
Ori


More information about the dev mailing list