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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Fri, 11 Jun 2021 15:43:37 +0000
From:   Parav Pandit <parav@...dia.com>
To:     Loic Poulain <loic.poulain@...aro.org>
CC:     "kuba@...nel.org" <kuba@...nel.org>,
        "davem@...emloft.net" <davem@...emloft.net>,
        "netdev@...r.kernel.org" <netdev@...r.kernel.org>,
        "johannes.berg@...el.com" <johannes.berg@...el.com>,
        "leon@...nel.org" <leon@...nel.org>,
        "m.chetan.kumar@...el.com" <m.chetan.kumar@...el.com>,
        Sergey Ryazanov <ryazanov.s.a@...il.com>
Subject: RE: [PATCH net-next v2 2/3] rtnetlink: add
 IFLA_PARENT_[DEV|DEV_BUS]_NAME


> From: Loic Poulain <loic.poulain@...aro.org>
> Sent: Friday, June 11, 2021 8:37 PM
> 
> Hi Parav,
> 
> On Fri, 11 Jun 2021 at 15:01, Parav Pandit <parav@...dia.com> wrote:
> >
> >
> >
> > > From: Loic Poulain <loic.poulain@...aro.org>
> > > Sent: Thursday, June 10, 2021 11:15 PM
> > >
> > > From: Johannes Berg <johannes.berg@...el.com>
> > >
> > > In some cases, for example in the upcoming WWAN framework changes,
> > > there's no natural "parent netdev", so sometimes dummy netdevs are
> > > created or similar. IFLA_PARENT_DEV_NAME is a new attribute intended
> > > to contain a device (sysfs, struct device) name that can be used
> > > instead when creating a new netdev, if the rtnetlink family implements it.
> > >
> > > As suggested by Parav Pandit, we also introduce
> > > IFLA_PARENT_DEV_BUS_NAME attribute in order to uniquely identify a
> > > device on the system (with bus/name pair).
> > >
> > > ip-link(8) support for the generic parent device attributes will
> > > help us avoid code duplication, so no other link type will require a
> > > custom code to handle the parent name attribute. E.g. the WWAN
> > > interface creation command will looks like this:
> > >
> > > $ ip link add wwan0-1 parent-dev wwan0 type wwan channel-id 1
> > >
> > > So, some future subsystem (or driver) FOO will have an interface
> > > creation command that looks like this:
> > >
> > > $ ip link add foo1-3 parent-dev foo1 type foo bar-id 3 baz-type Y
> > >
> > > Below is an example of dumping link info of a random device with
> > > these new
> > > attributes:
> > >
> > > $ ip --details link show wlp0s20f3
> > >   4: wlp0s20f3: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc
> > > noqueue
> > >      state UP mode DORMANT group default qlen 1000
> > >      ...
> > >      parent_devname 0000:00:14.3 parent_busname pci
> >
> > Showing bus first followed device is more preferred approach to see
> hierarchy.
> > Please change their sequence.
> >
> > You should drop "name" suffix.
> > "parent_bus" and "parent_dev" are just fine.
> 
> Do you think it can also be dropped for the IFLA symbol (IFLA_PARENT_DEV
> && IFLA_PARENT_BUS_NAME).
IFLA symbol with _NAME is fine as it covers what the field is.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ