diff mbox series

[11/19] net/mlx5: removing port representator support

Message ID 20210927133450.10653-12-srikanth.k@oneconvergence.com (mailing list archive)
State Superseded, archived
Delegated to: Raslan Darawsheh
Headers show
Series MLX5 FreeBSD support | expand

Checks

Context Check Description
ci/checkpatch success coding style OK

Commit Message

Srikanth Kaka Sept. 27, 2021, 1:34 p.m. UTC
Removing port representator support from mlx5_get_ifname

Signed-off-by: Srikanth Kaka <srikanth.k@oneconvergence.com>
Signed-off-by: Vag Singh <vag.singh@oneconvergence.com>
Signed-off-by: Anand Thulasiram <avelu@juniper.net>
---
 drivers/net/mlx5/freebsd/mlx5_ethdev_os.c | 20 +-------------------
 1 file changed, 1 insertion(+), 19 deletions(-)
diff mbox series

Patch

diff --git a/drivers/net/mlx5/freebsd/mlx5_ethdev_os.c b/drivers/net/mlx5/freebsd/mlx5_ethdev_os.c
index 03ae2e4aa9..268649d16c 100644
--- a/drivers/net/mlx5/freebsd/mlx5_ethdev_os.c
+++ b/drivers/net/mlx5/freebsd/mlx5_ethdev_os.c
@@ -131,8 +131,6 @@  struct ethtool_link_settings {
 /**
  * Get interface name from private structure.
  *
- * This is a port representor-aware version of mlx5_get_ifname_sysfs().
- *
  * @param[in] dev
  *   Pointer to Ethernet device.
  * @param[out] ifname
@@ -145,26 +143,10 @@  int
 mlx5_get_ifname(const struct rte_eth_dev *dev, char (*ifname)[MLX5_NAMESIZE])
 {
 	struct mlx5_priv *priv = dev->data->dev_private;
-	unsigned int ifindex;
 
 	MLX5_ASSERT(priv);
 	MLX5_ASSERT(priv->sh);
-	if (priv->master && priv->sh->bond.ifindex > 0) {
-		memcpy(ifname, priv->sh->bond.ifname, MLX5_NAMESIZE);
-		return 0;
-	}
-	ifindex = mlx5_ifindex(dev);
-	if (!ifindex) {
-		if (!priv->representor)
-			return mlx5_get_ifname_sysfs(priv->sh->ibdev_path,
-						     *ifname);
-		rte_errno = ENXIO;
-		return -rte_errno;
-	}
-	if (if_indextoname(ifindex, &(*ifname)[0]))
-		return 0;
-	rte_errno = errno;
-	return -rte_errno;
+	return mlx5_get_ifname_sysfs(priv->sh->ibdev_path, *ifname);
 }
 
 /**