mlx4_en: use net_device dev_id to indicate port number
Subsystems (3)
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
@@ -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]
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_deviceconatins 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.Signed-off-by Eli Cohen <eli-VPRAkNaXOzVS1MOuV/[email protected]>
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