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: <20171219154405.5bb35eff@xeon-e3>
Date:   Tue, 19 Dec 2017 15:44:05 -0800
From:   Stephen Hemminger <stephen@...workplumber.org>
To:     Jakub Kicinski <jakub.kicinski@...ronome.com>
Cc:     "Samudrala, Sridhar" <sridhar.samudrala@...el.com>,
        netdev@...r.kernel.org, Stephen Hemminger <sthemmin@...rosoft.com>
Subject: Re: [RFC] hv_netvsc: automatically name slave VF network device

On Tue, 19 Dec 2017 15:20:57 -0800
Jakub Kicinski <jakub.kicinski@...ronome.com> wrote:

> On Tue, 19 Dec 2017 14:50:17 -0800, Stephen Hemminger wrote:
> > On Tue, 19 Dec 2017 14:44:37 -0800
> > "Samudrala, Sridhar" <sridhar.samudrala@...el.com> wrote:
> >   
> > >  -static void __netvsc_vf_setup(struct net_device *ndev,    
> > > > -			      struct net_device *vf_netdev)
> > > > -{
> > > > -	int ret;
> > > > +	/* set the name of VF device based on upper device name */
> > > > +	snprintf(vf_name, IFNAMSIZ, "%s_vf", ndev->name);
> > > > +	ret = dev_change_name(vf_netdev, vf_name);
> > > > +	if (ret != 0)
> > > > +		netdev_warn(vf_netdev,
> > > > +			    "can not rename device: (%d)\n", ret);      
> > > 
> > > It is possible that upper device name can change after this call.  I 
> > > noticed this
> > > when i tried this approach with virtio_net.
> > > 
> > > Also, what should happen if the upper device is unloaded? Should we rename
> > > the VF name?    
> > 
> > Yes upper device can change name. So sure, netdevice could trap that
> > in callback (it already has notifier) and rename VF. Will add that in V2.
> > 
> > If upper device is unloaded then it is already decoupled from the VF.
> > There is no good value to change it back to. The orignal name probably
> > has been reused by then.  
> 
> Both of those issues would be solved by just exposing phys_port_name
> from the VF driver, and letting systemd do its thing independent of 
> magic bonds.
> 
> Reluctance to do driver work aside :/

The port name for Mellanox driver is already set in the driver as a numeric value.
It indicates which port is used.
This won't work.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ