Skip to contentSkip to conversation

mlx4_en: use net_device dev_id to indicate port number

PATCH In review Eli Cohen 2 participants 2 messages May 27, 2010 – May 31, 2010 1 message not in the archive

Subsystems (3)
lore
Share & tools
lore

Eli Cohen

author
#0 lore raw

PATCH 1/1 mlx4_en: use net_device dev_id to indicate port number

Today, there are no means to know which port of a hardware device a netdev interface uses. struct net_device conatins a field, dev_id, that can be used for that. Use this field to save the port number in ConnectX that is being used by the net device; port numbers are zero based.

---
 drivers/net/mlx4/en_netdev.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
drivers/net/mlx4/en_netdev.c +1 -0
index 6c2b15b..ab1d480 100644
@@ -978,6 +978,7 @@ int mlx4_en_init_netdev(struct mlx4_en_dev *mdev, int port,
 	}
 
 	SET_NETDEV_DEV(dev, &mdev->dev->pdev->dev);
+	dev->dev_id =  port - 1;
 
 	/*
 	 * Initialize driver private data
Signature · 6 lines
1.7.1

--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

A message that is not in the archive (sent off-list or not yet received): 20100527055624.GA18736-8YAHvHwT2UEvbXDkjdHOrw/[email protected]

#2 lore raw

From: Eli Cohen <eli-VPRAkNaXOzVS1MOuV/[email protected]>
Date: Thu, 27 May 2010 08:56:24 +0300

Quoted 6 lines

Today, there are no means to know which port of a hardware device a netdev interface uses. struct net_device conatins a field, dev_id, that can be used for that. Use this field to save the port number in ConnectX that is being used by the net device; port numbers are zero based.

Applied.
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html