[PATCH net-next mlxsw v2 6/7] mlxsw: Respin SPAN on switchdev events

Petr Machata petrm at mellanox.com
Wed Apr 25 18:57:54 AEST 2018


Ido Schimmel <idosch at mellanox.com> writes:

> On Wed, Apr 25, 2018 at 01:08:17AM +0200, Petr Machata wrote:
>>  	switch (obj->id) {
>>  	case SWITCHDEV_OBJ_ID_PORT_VLAN:
>> -		err = mlxsw_sp_port_vlans_add(mlxsw_sp_port,
>> -					      SWITCHDEV_OBJ_PORT_VLAN(obj),
>> -					      trans);
>> +		vlan = SWITCHDEV_OBJ_PORT_VLAN(obj);
>> +		err = mlxsw_sp_port_vlans_add(mlxsw_sp_port, vlan, trans);
>> +		if (switchdev_trans_ph_commit(trans))
>> +			mlxsw_sp_span_respin(mlxsw_sp_port->mlxsw_sp, vlan);
>
> I thought about it again. I think that instead of propagating the VLAN
> everywhere, we can keep the code generic and simply schedule the respin
> using a workqueue.

OK, I'll do it like that.


More information about the Linux-mlxsw mailing list