Message ID | 1661906071-29508-8-git-send-email-longli@linuxonhyperv.com (mailing list archive) |
---|---|
State | Not Applicable |
Delegated to: | Netdev Maintainers |
Headers | show |
Series | Introduce Microsoft Azure Network Adapter (MANA) RDMA driver | expand |
Context | Check | Description |
---|---|---|
netdev/tree_selection | success | Guessing tree name failed - patch did not apply |
> -----Original Message----- > From: longli@linuxonhyperv.com <longli@linuxonhyperv.com> > Sent: Tuesday, August 30, 2022 8:34 PM > To: KY Srinivasan <kys@microsoft.com>; Haiyang Zhang > <haiyangz@microsoft.com>; Stephen Hemminger > <sthemmin@microsoft.com>; Wei Liu <wei.liu@kernel.org>; Dexuan Cui > <decui@microsoft.com>; David S. Miller <davem@davemloft.net>; Jakub > Kicinski <kuba@kernel.org>; Paolo Abeni <pabeni@redhat.com>; Jason > Gunthorpe <jgg@ziepe.ca>; Leon Romanovsky <leon@kernel.org>; > edumazet@google.com; shiraz.saleem@intel.com; Ajay Sharma > <sharmaajay@microsoft.com> > Cc: linux-hyperv@vger.kernel.org; netdev@vger.kernel.org; linux- > kernel@vger.kernel.org; linux-rdma@vger.kernel.org; Long Li > <longli@microsoft.com> > Subject: [Patch v5 07/12] net: mana: Record port number in netdev > > From: Long Li <longli@microsoft.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@microsoft.com> > Signed-off-by: Long Li <longli@microsoft.com> Acked-by: Haiyang Zhang <haiyangz@microsoft.com>
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);