> -----Original Message----- > From: Bing Zhao <bi...@nvidia.com> > Sent: Thursday, October 22, 2020 17:07 > To: viachesl...@mellanox.com; ma...@mellanox.com > Cc: dev@dpdk.org; Ori Kam <or...@nvidia.com>; Raslan Darawsheh > <rasl...@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 <bi...@nvidia.com> Acked-by: Viacheslav Ovsiienko <viachesl...@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(+) >