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: <20160701183713.GB11348@colbert.idosch.org>
Date:	Fri, 1 Jul 2016 21:37:13 +0300
From:	Ido Schimmel <idosch@...lanox.com>
To:	David Ahern <dsa@...ulusnetworks.com>
CC:	Jiri Pirko <jiri@...nulli.us>, <netdev@...r.kernel.org>,
	<davem@...emloft.net>, <yotamg@...lanox.com>, <eladr@...lanox.com>,
	<nogahf@...lanox.com>, <ogerlitz@...lanox.com>,
	<sfeldma@...il.com>, <roopa@...ulusnetworks.com>,
	<andy@...yhouse.net>, <tgraf@...g.ch>, <jhs@...atatu.com>,
	<linville@...driver.com>, <ivecera@...hat.com>
Subject: Re: [patch net-next 11/42] mlxsw: spectrum: Add router interface
 struct

Fri, Jul 01, 2016 at 07:16:23PM IDT, dsa@...ulusnetworks.com wrote:
>On 7/1/16 8:04 AM, Jiri Pirko wrote:
>> @@ -327,6 +333,19 @@ mlxsw_sp_port_vport_find_by_fid(const struct mlxsw_sp_port *mlxsw_sp_port,
>>  	return NULL;
>>  }
>>
>> +static inline struct mlxsw_sp_rif *
>> +mlxsw_sp_rif_find_by_dev(const struct mlxsw_sp *mlxsw_sp,
>> +			 const struct net_device *dev)
>> +{
>> +	int i;
>> +
>> +	for (i = 0; i < MLXSW_SP_RIF_MAX; i++)
>> +		if (mlxsw_sp->rifs[i] && mlxsw_sp->rifs[i]->dev == dev)
>> +			return mlxsw_sp->rifs[i];
>> +
>> +	return NULL;
>> +}
>> +
>
>Why not add the rif to mlxsw_sp_port which is the priv data for a mlxsw dev?

We create 'mlxsw_sp_port' for physical ports and vPorts (VLAN netdevs),
but not for master devices such as bridge and team, which can also be
assigned RIFs. The reason for this is that in most cases any bridge /
team setting eventually needs to be programmed to the device via each
slave 'mlxsw_sp_port'. You can see, for example, that in our netdev
notification block we simply propagate team/bond CHANGEUPPER to each
slave port.

Thanks for taking the time to review this!

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ