[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1661906071-29508-8-git-send-email-longli@linuxonhyperv.com>
Date: Tue, 30 Aug 2022 17:34:26 -0700
From: longli@...uxonhyperv.com
To: "K. Y. Srinivasan" <kys@...rosoft.com>,
Haiyang Zhang <haiyangz@...rosoft.com>,
Stephen Hemminger <sthemmin@...rosoft.com>,
Wei Liu <wei.liu@...nel.org>, Dexuan Cui <decui@...rosoft.com>,
"David S. Miller" <davem@...emloft.net>,
Jakub Kicinski <kuba@...nel.org>,
Paolo Abeni <pabeni@...hat.com>,
Jason Gunthorpe <jgg@...pe.ca>,
Leon Romanovsky <leon@...nel.org>, edumazet@...gle.com,
shiraz.saleem@...el.com, Ajay Sharma <sharmaajay@...rosoft.com>
Cc: linux-hyperv@...r.kernel.org, netdev@...r.kernel.org,
linux-kernel@...r.kernel.org, linux-rdma@...r.kernel.org,
Long Li <longli@...rosoft.com>
Subject: [Patch v5 07/12] net: mana: Record port number in netdev
From: Long Li <longli@...rosoft.com>
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@...rosoft.com>
Signed-off-by: Long Li <longli@...rosoft.com>
---
drivers/net/ethernet/microsoft/mana/mana_en.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/net/ethernet/microsoft/mana/mana_en.c b/drivers/net/ethernet/microsoft/mana/mana_en.c
index 4c771ce59108..eeddd4ab2fa4 100644
--- a/drivers/net/ethernet/microsoft/mana/mana_en.c
+++ b/drivers/net/ethernet/microsoft/mana/mana_en.c
@@ -1988,6 +1988,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);
--
2.17.1
Powered by blists - more mailing lists