lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <MN2PR21MB12957D66D4DB4B3B7BAEFCA5CA4C9@MN2PR21MB1295.namprd21.prod.outlook.com>
Date:   Fri, 16 Apr 2021 17:10:51 +0000
From:   Haiyang Zhang <haiyangz@...rosoft.com>
To:     Stephen Hemminger <stephen@...workplumber.org>,
        Dexuan Cui <decui@...rosoft.com>
CC:     "davem@...emloft.net" <davem@...emloft.net>,
        "kuba@...nel.org" <kuba@...nel.org>,
        KY Srinivasan <kys@...rosoft.com>,
        Stephen Hemminger <sthemmin@...rosoft.com>,
        "wei.liu@...nel.org" <wei.liu@...nel.org>,
        Wei Liu <liuwe@...rosoft.com>,
        "netdev@...r.kernel.org" <netdev@...r.kernel.org>,
        "leon@...nel.org" <leon@...nel.org>,
        "andrew@...n.ch" <andrew@...n.ch>,
        "bernd@...rovitsch.priv.at" <bernd@...rovitsch.priv.at>,
        "rdunlap@...radead.org" <rdunlap@...radead.org>,
        Shachar Raindel <shacharr@...rosoft.com>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        "linux-hyperv@...r.kernel.org" <linux-hyperv@...r.kernel.org>
Subject: RE: [PATCH v7 net-next] net: mana: Add a driver for Microsoft Azure
 Network Adapter (MANA)



> -----Original Message-----
> From: Stephen Hemminger <stephen@...workplumber.org>
> Sent: Friday, April 16, 2021 12:40 PM
> To: Dexuan Cui <decui@...rosoft.com>
> Cc: davem@...emloft.net; kuba@...nel.org; KY Srinivasan
> <kys@...rosoft.com>; Haiyang Zhang <haiyangz@...rosoft.com>; Stephen
> Hemminger <sthemmin@...rosoft.com>; wei.liu@...nel.org; Wei Liu
> <liuwe@...rosoft.com>; netdev@...r.kernel.org; leon@...nel.org;
> andrew@...n.ch; bernd@...rovitsch.priv.at; rdunlap@...radead.org;
> Shachar Raindel <shacharr@...rosoft.com>; linux-kernel@...r.kernel.org;
> linux-hyperv@...r.kernel.org
> Subject: Re: [PATCH v7 net-next] net: mana: Add a driver for Microsoft Azure
> Network Adapter (MANA)
> 
> On Thu, 15 Apr 2021 23:07:05 -0700
> Dexuan Cui <decui@...rosoft.com> wrote:
> 
> > diff --git a/drivers/net/hyperv/netvsc_drv.c
> b/drivers/net/hyperv/netvsc_drv.c
> > index 7349a70af083..f682a5572d84 100644
> > --- a/drivers/net/hyperv/netvsc_drv.c
> > +++ b/drivers/net/hyperv/netvsc_drv.c
> > @@ -2297,6 +2297,7 @@ static struct net_device *get_netvsc_byslot(const
> struct net_device *vf_netdev)
> >  {
> >  	struct device *parent = vf_netdev->dev.parent;
> >  	struct net_device_context *ndev_ctx;
> > +	struct net_device *ndev;
> >  	struct pci_dev *pdev;
> >  	u32 serial;
> >
> > @@ -2319,8 +2320,17 @@ static struct net_device
> *get_netvsc_byslot(const struct net_device *vf_netdev)
> >  		if (!ndev_ctx->vf_alloc)
> >  			continue;
> >
> > -		if (ndev_ctx->vf_serial == serial)
> > -			return hv_get_drvdata(ndev_ctx->device_ctx);
> > +		if (ndev_ctx->vf_serial != serial)
> > +			continue;
> > +
> > +		ndev = hv_get_drvdata(ndev_ctx->device_ctx);
> > +		if (ndev->addr_len != vf_netdev->addr_len ||
> > +		    memcmp(ndev->perm_addr, vf_netdev->perm_addr,
> > +			   ndev->addr_len) != 0)
> > +			continue;
> > +
> > +		return ndev;
> > +
> >  	}
> >
> >  	netdev_notice(vf_netdev,
> 
> 
> This probably should be a separate patch.
> I think it is trying to address the case of VF discovery in Hyper-V/Azure where
> the reported
> VF from Hypervisor is bogus or confused.

This is for the Multi vPorts feature of MANA driver, which allows one VF to 
create multiple vPorts (NICs). They have the same PCI device and same VF 
serial number, but different MACs. 

So we put the change in one patch to avoid distro vendors missing this 
change when backporting the MANA driver.

Thanks,
- Haiyang

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ