[dpdk-dev] [PATCH v2 3/6] net/mlx5: add support to get hairpin peer ports

Slava Ovsiienko viacheslavo at nvidia.com
Mon Oct 26 10:29:32 CET 2020


> -----Original Message-----
> From: Bing Zhao <bingz at nvidia.com>
> Sent: Thursday, October 22, 2020 17:07
> To: viacheslavo at mellanox.com; matan at mellanox.com
> Cc: dev at dpdk.org; Ori Kam <orika at nvidia.com>; Raslan Darawsheh
> <rasland at nvidia.com>
> Subject: [PATCH v2 3/6] net/mlx5: add support to get hairpin peer ports
> 
> In real-life business, one device could be attached and detached dynamically.
> The hairpin configuration of this port to/from all the other ports should be
> enabled and disabled accordingly.
> 
> The RTE ethdev lib and PMD should provide this ability to get the peer ports
> list in case that the application doesn't save it. It is recommended that the size
> of the array to save the port IDs is as large as the "RTE_MAX_ETHPORTS" to
> have the maximal capacity.
> 
> The order of the peer port IDs may be different from that during hairpin
> queues set in the initialization stage. The peer port ID could be the same as the
> current device port ID when the hairpin peer ports contain itself - the single
> port hairpin.
> 
> The application should check the ports' status and decide if the peer port
> should be bound / unbound when starting / stopping the current device.
> 
> Signed-off-by: Bing Zhao <bingz at nvidia.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo at nvidia.com>

> ---
>  drivers/net/mlx5/linux/mlx5_os.c |  2 +
>  drivers/net/mlx5/mlx5.h          |  2 +
>  drivers/net/mlx5/mlx5_trigger.c  | 89
> ++++++++++++++++++++++++++++++++++++++++
>  3 files changed, 93 insertions(+)
> 


More information about the dev mailing list