[RFC PATCH v3] ethdev: advertise flow restore in mbuf

Slava Ovsiienko viacheslavo at nvidia.com
Tue Jun 20 18:43:48 CEST 2023


> -----Original Message-----
> From: David Marchand <david.marchand at redhat.com>
> Sent: Tuesday, June 20, 2023 2:10 PM
> To: dev at dpdk.org
> Cc: NBU-Contact-Thomas Monjalon (EXTERNAL) <thomas at monjalon.net>;
> i.maximets at ovn.org; Ali Alnubani <alialnu at nvidia.com>; Aman Singh
> <aman.deep.singh at intel.com>; Yuying Zhang <yuying.zhang at intel.com>;
> Matan Azrad <matan at nvidia.com>; Slava Ovsiienko
> <viacheslavo at nvidia.com>; Ori Kam <orika at nvidia.com>; Suanming Mou
> <suanmingm at nvidia.com>; David Christensen <drc at linux.vnet.ibm.com>;
> Ruifeng Wang <ruifeng.wang at arm.com>; Bruce Richardson
> <bruce.richardson at intel.com>; Konstantin Ananyev
> <konstantin.v.ananyev at yandex.ru>; Andrew Rybchenko
> <andrew.rybchenko at oktetlabs.ru>; Ferruh Yigit <ferruh.yigit at amd.com>
> Subject: [RFC PATCH v3] ethdev: advertise flow restore in mbuf
> 
> As reported by Ilya [1], unconditionally calling
> rte_flow_get_restore_info() impacts an application performance for drivers
> that do not provide this ops.
> It could also impact processing of packets that require no call to
> rte_flow_get_restore_info() at all.
> 
> Register a dynamic mbuf flag when an application negotiates tunnel metadata
> delivery (calling rte_eth_rx_metadata_negotiate() with
> RTE_ETH_RX_METADATA_TUNNEL_ID).
> 
> Drivers then advertise that metadata can be extracted by setting this dynamic
> flag in each mbuf.
> 
> The application then calls rte_flow_get_restore_info() only when required.
> 
> Link: http://inbox.dpdk.org/dev/5248c2ca-f2a6-3fb0-38b8-
> 7f659bfa40de at ovn.org/
> Signed-off-by: David Marchand <david.marchand at redhat.com>

We did not notice the degradation, so:
Acked-by: Viacheslav Ovsiienko <viacheslavo at nvidia.com>


> ---
> Changes since RFC v2:
> - fixed crash introduced in v2 and removed unneeded argument to
>   rte_flow_restore_info_dynflag_register(),
> 
> Changes since RFC v1:
> - rebased,
> - updated vectorized datapath functions for net/mlx5,
> - moved dynamic flag register to rte_eth_rx_metadata_negotiate() and
>   hid rte_flow_restore_info_dynflag_register() into ethdev internals,
> 
> ---
>  app/test-pmd/util.c                      |  9 +++--
>  drivers/net/mlx5/mlx5.c                  |  2 +
>  drivers/net/mlx5/mlx5.h                  |  5 ++-
>  drivers/net/mlx5/mlx5_flow.c             | 47 +++++++++++++++++++++---
>  drivers/net/mlx5/mlx5_rx.c               |  2 +-
>  drivers/net/mlx5/mlx5_rx.h               |  1 +
>  drivers/net/mlx5/mlx5_rxtx_vec_altivec.h | 16 ++++----
>  drivers/net/mlx5/mlx5_rxtx_vec_neon.h    |  6 +--
>  drivers/net/mlx5/mlx5_rxtx_vec_sse.h     |  6 +--
>  drivers/net/mlx5/mlx5_trigger.c          |  4 +-
>  drivers/net/sfc/sfc_dp.c                 | 14 +------
>  lib/ethdev/rte_ethdev.c                  |  5 +++
>  lib/ethdev/rte_flow.c                    | 27 ++++++++++++++
>  lib/ethdev/rte_flow.h                    | 18 ++++++++-
>  lib/ethdev/rte_flow_driver.h             |  6 +++
>  lib/ethdev/version.map                   |  1 +
>  16 files changed, 128 insertions(+), 41 deletions(-)
> 


More information about the dev mailing list