Re: [Bridge] [PATCH net-next v2 1/9] net: ndo_bridge_setlink: Add extack

2018-12-12 Thread Ivan Vecera
On 12. 12. 18 18:02, Petr Machata wrote: Drivers may not be able to implement a VLAN addition or reconfiguration. In those cases it's desirable to explain to the user that it was rejected (and why). To that end, add extack argument to ndo_bridge_setlink. Adapt all users to that change.

Re: [Bridge] [PATCH net-next v2 0/9] Pass extack to SWITCHDEV_PORT_OBJ_ADD

2018-12-12 Thread David Miller
From: Petr Machata Date: Wed, 12 Dec 2018 17:02:46 + > Drivers may need to do validation as a result of port object addition. > An example is mlxsw, which needs to check the configuration of a VXLAN > device attached to an offloaded bridge. Without a mapped VLAN, the > invalidity of the

[Bridge] [PATCH net-next] Documentation: networking: Clarify switchdev devices behavior

2018-12-12 Thread Florian Fainelli
This patch provides details on the expected behavior of switchdev enabled network devices when operating in a "stand alone" mode, as well as when being bridge members. This clarifies a number of things that recently came up during a bug fixing session on the b53 DSA switch driver. Signed-off-by:

Re: [Bridge] Correct PVID behavior with bridge's VLAN filtering on/off?

2018-12-12 Thread Florian Fainelli
On 12/12/18 1:02 AM, Ido Schimmel wrote: > On Tue, Dec 11, 2018 at 11:48:21AM -0800, Florian Fainelli wrote: >> Hi Nikolay, Roopa, Jiri, Ido, >> >> When a bridge has vlan_filtering=0 and notifies a switch driver through >> HOST_OBJ_MDB about MC addresses that the CPU/management port is >>

[Bridge] [PATCH net-next v2 8/9] selftests: mlxsw: extack: Test VLAN add on a VXLAN device

2018-12-12 Thread Petr Machata
Test mapping a VLAN at a VXLAN device that can't be offloaded. Signed-off-by: Petr Machata Acked-by: Jiri Pirko Reviewed-by: Ido Schimmel --- .../testing/selftests/drivers/net/mlxsw/extack.sh | 31 ++ 1 file changed, 31 insertions(+) diff --git

[Bridge] [PATCH net-next v2 9/9] selftests: mlxsw: extack: Test VLAN add on a port device

2018-12-12 Thread Petr Machata
Test mapping a VLAN at a port device such that on the same VLAN, there already is an unoffloadable VXLAN device. Signed-off-by: Petr Machata Acked-by: Jiri Pirko Reviewed-by: Ido Schimmel --- .../testing/selftests/drivers/net/mlxsw/extack.sh | 30 ++ 1 file changed, 30

[Bridge] [PATCH net-next v2 7/9] mlxsw: spectrum_switchdev: Propagate extack on port VLAN events

2018-12-12 Thread Petr Machata
After switchdev_handle_port_obj_add() was extended in a preceding patch, mlxsw_sp_port_obj_add() now takes an extack argument. Propagate it further by extending a callee chain from mlxsw_sp_port_vlans_add(), via mlxsw_sp_bridge_port_vlan_add() via mlxsw_sp_port_vlan_bridge_join() via

[Bridge] [PATCH net-next v2 6/9] mlxsw: spectrum_switchdev: Propagate extack on VXLAN VLAN events

2018-12-12 Thread Petr Machata
Now that VLAN port object addition notifications carry an extack, propagate it from mlxsw_sp_switchdev_vxlan_vlans_add() through mlxsw_sp_switchdev_vxlan_vlan_add() to mlxsw_sp_bridge_8021q_vxlan_join(). This code path is used when a VLAN is added to a VXLAN netdevice that cannot be offloaded.

[Bridge] [PATCH net-next v2 5/9] net: switchdev: Add extack to switchdev_handle_port_obj_add() callback

2018-12-12 Thread Petr Machata
Drivers use switchdev_handle_port_obj_add() to handle recursive descent through lower devices. Change this function prototype to take add_cb that itself takes an extack argument. Decode extack from switchdev_notifier_port_obj_info and pass it to add_cb. Update mlxsw and ocelot drivers which use

[Bridge] [PATCH net-next v2 3/9] net: switchdev: Add extack argument to switchdev_port_obj_add()

2018-12-12 Thread Petr Machata
After the previous patch, bridge driver has extack argument available to pass to switchdev. Therefore extend switchdev_port_obj_add() with this argument, updating all callers, and passing the argument through to switchdev_port_obj_notify(). Signed-off-by: Petr Machata Acked-by: Jiri Pirko

[Bridge] [PATCH net-next v2 4/9] net: switchdev: Add extack to struct switchdev_notifier_info

2018-12-12 Thread Petr Machata
In order to pass extack to the drivers that need it, add an extack field to struct switchdev_notifier_info, and an extack argument to the function call_switchdev_blocking_notifiers(). Also add a helper function switchdev_notifier_info_to_extack(). Signed-off-by: Petr Machata Acked-by: Jiri Pirko

[Bridge] [PATCH net-next v2 2/9] net: bridge: Propagate extack to switchdev

2018-12-12 Thread Petr Machata
ndo_bridge_setlink has been updated in the previous patch to have extack available, and changelink RTNL op has had this argument since the time extack was added. Propagate both through the bridge driver to eventually reach br_switchdev_port_vlan_add(), where it will be used by subsequent patches.

[Bridge] [PATCH net-next v2 1/9] net: ndo_bridge_setlink: Add extack

2018-12-12 Thread Petr Machata
Drivers may not be able to implement a VLAN addition or reconfiguration. In those cases it's desirable to explain to the user that it was rejected (and why). To that end, add extack argument to ndo_bridge_setlink. Adapt all users to that change. Following patches will use the new argument in the

[Bridge] [PATCH net-next v2 0/9] Pass extack to SWITCHDEV_PORT_OBJ_ADD

2018-12-12 Thread Petr Machata
Drivers may need to do validation as a result of port object addition. An example is mlxsw, which needs to check the configuration of a VXLAN device attached to an offloaded bridge. Without a mapped VLAN, the invalidity of the device is not important, but as soon as a pvid, untagged VLAN is

Re: [Bridge] [PATCH net-next 2/9] net: bridge: Propagate extack to switchdev

2018-12-12 Thread Nikolay Aleksandrov
On 12/12/2018 13:52, Petr Machata wrote: > ndo_bridge_setlink has been updated in the previous patch to have extack > available, and changelink RTNL op has had this argument since the time > extack was added. Propagate both through the bridge driver to eventually > reach

Re: [Bridge] Correct PVID behavior with bridge's VLAN filtering on/off?

2018-12-12 Thread Ido Schimmel
On Tue, Dec 11, 2018 at 11:48:21AM -0800, Florian Fainelli wrote: > Hi Nikolay, Roopa, Jiri, Ido, > > When a bridge has vlan_filtering=0 and notifies a switch driver through > HOST_OBJ_MDB about MC addresses that the CPU/management port is > interested in getting MC traffic for, I am seeing that