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: <20151202075427.GA2355@nanopsycho.orion>
Date:	Wed, 2 Dec 2015 08:54:27 +0100
From:	Jiri Pirko <jiri@...nulli.us>
To:	Or Gerlitz <gerlitz.or@...il.com>
Cc:	Linux Netdev List <netdev@...r.kernel.org>,
	David Miller <davem@...emloft.net>,
	Ido Schimmel <idosch@...lanox.com>,
	Elad Raz <eladr@...lanox.com>, yotamg@...lanox.com,
	Or Gerlitz <ogerlitz@...lanox.com>
Subject: Re: [patch net-next 07/26] net: add possibility to pass information
 about upper device via notifier

Wed, Dec 02, 2015 at 06:28:35AM CET, gerlitz.or@...il.com wrote:
>On Tue, Dec 1, 2015 at 3:48 PM, Jiri Pirko <jiri@...nulli.us> wrote:
>> From: Jiri Pirko <jiri@...lanox.com>
>>
>> Sometimes the drivers and other code would find it handy to know some
>> internal information about upper device being changed. So allow upper-code
>> to pass information down to notifier listeners during linking.
>[...]
>> diff --git a/drivers/net/bonding/bond_main.c b/drivers/net/bonding/bond_main.c
>> index 9240157..fa3ed1d 100644
>> --- a/drivers/net/bonding/bond_main.c
>> +++ b/drivers/net/bonding/bond_main.c
>> @@ -1204,7 +1204,7 @@ static int bond_master_upper_dev_link(struct net_device *bond_dev,
>>  {
>>         int err;
>>
>> -       err = netdev_master_upper_dev_link(slave_dev, bond_dev, slave);
>> +       err = netdev_master_upper_dev_link(slave_dev, bond_dev, slave, NULL);
>>         if (err)
>>                 return err;
>>         slave_dev->flags |= IFF_SLAVE;
>> diff --git a/drivers/net/team/team.c b/drivers/net/team/team.c
>> index b37f8d1..f7b6ff7 100644
>> --- a/drivers/net/team/team.c
>> +++ b/drivers/net/team/team.c
>> @@ -1083,7 +1083,7 @@ static int team_upper_dev_link(struct net_device *dev,
>>  {
>>         int err;
>>
>> -       err = netdev_master_upper_dev_link(port_dev, dev, NULL);
>> +       err = netdev_master_upper_dev_link(port_dev, dev, NULL, NULL);
>>         if (err)
>>                 return err;
>>         port_dev->priv_flags |= IFF_TEAM_PORT;
>> diff --git a/drivers/net/vrf.c b/drivers/net/vrf.c
>> index 59c5bdd..8944a49 100644
>> --- a/drivers/net/vrf.c
>> +++ b/drivers/net/vrf.c
>> @@ -624,7 +624,7 @@ static int do_vrf_add_slave(struct net_device *dev, struct net_device *port_dev)
>>                 goto out_fail;
>>         }
>>
>> -       ret = netdev_master_upper_dev_link(port_dev, dev, NULL);
>> +       ret = netdev_master_upper_dev_link(port_dev, dev, NULL, NULL);
>>         if (ret < 0)
>>                 goto out_unregister;
>>
>> diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h
>> index cca4111..a55be5b 100644
>> --- a/include/linux/netdevice.h
>> +++ b/include/linux/netdevice.h
>> @@ -2161,6 +2161,7 @@ struct netdev_notifier_changeupper_info {
>>         struct net_device *upper_dev; /* new upper dev */
>>         bool master; /* is upper dev master */
>>         bool linking; /* is the nofication for link or unlink */
>> +       void *upper_info; /* is upper dev info */
>
>not sure to follow what did you mean by "is upper dev info"...
>
>maybe remove the "is" and just make it "upper dev info"?

I just followed previous lines.

>
>>  };
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ