diff options
author | 2022-11-03 12:16:24 -0700 | |
---|---|---|
committer | 2022-11-10 07:57:26 +0200 | |
commit | d44089e555ffe63a49cc6e94d0c03d933e413059 (patch) | |
tree | e5121f520d782eb55f4083dba240e8dd1d6fd2ef /drivers/net | |
parent | net: mana: Export Work Queue functions for use by RDMA driver (diff) | |
download | linux-d44089e555ffe63a49cc6e94d0c03d933e413059.tar.gz linux-d44089e555ffe63a49cc6e94d0c03d933e413059.tar.bz2 linux-d44089e555ffe63a49cc6e94d0c03d933e413059.zip |
net: mana: Record port number in netdev
The port number is useful for user-mode application to identify this
net device based on port index. Set to the correct value in ndev.
Reviewed-by: Dexuan Cui <decui@microsoft.com>
Signed-off-by: Long Li <longli@microsoft.com>
Link: https://lore.kernel.org/r/1667502990-2559-7-git-send-email-longli@linuxonhyperv.com
Acked-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Leon Romanovsky <leonro@nvidia.com>
Diffstat (limited to 'drivers/net')
-rw-r--r-- | drivers/net/ethernet/microsoft/mana/mana_en.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/net/ethernet/microsoft/mana/mana_en.c b/drivers/net/ethernet/microsoft/mana/mana_en.c index 6ad4bc8cbc99..b6303a43fa7c 100644 --- a/drivers/net/ethernet/microsoft/mana/mana_en.c +++ b/drivers/net/ethernet/microsoft/mana/mana_en.c @@ -2133,6 +2133,7 @@ static int mana_probe_port(struct mana_context *ac, int port_idx, ndev->max_mtu = ndev->mtu; ndev->min_mtu = ndev->mtu; ndev->needed_headroom = MANA_HEADROOM; + ndev->dev_port = port_idx; SET_NETDEV_DEV(ndev, gc->dev); netif_carrier_off(ndev); |