[PATCH net-next 4/7] net: dsa: free orig skb on rcv if reallocated

2017-05-30 Thread Vivien Didelot
If the receive function of a tagger reallocated the SKB, the original SKB is currently not freed. Fix this and free it on both copy or error. Signed-off-by: Vivien Didelot --- net/dsa/dsa.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/net/dsa/dsa.c b/net/dsa/dsa.c

[PATCH net-next 6/7] net: dsa: remove useless copy of tagger xmit

2017-05-30 Thread Vivien Didelot
The dsa_slave_priv structure holds a copy of the dsa_device_ops xmit function. It is always assigned to the switch tree xmit function. Remove this useless copy. Signed-off-by: Vivien Didelot <vivien.dide...@savoirfairelinux.com> --- net/dsa/dsa_priv.h | 3 --- net/dsa/slave.c| 4 +

[PATCH net-next 5/7] net: dsa: remove useless goto label in tagger rcv

2017-05-30 Thread Vivien Didelot
Many rcv functions from net/dsa/tag_*.c have a useless out_drop goto label which simply returns NULL. Kill it in favor of the obvious. Signed-off-by: Vivien Didelot <vivien.dide...@savoirfairelinux.com> --- net/dsa/tag_brcm.c| 11 --- net/dsa/tag_dsa.c | 13 + n

[PATCH net-next 6/7] net: dsa: remove useless copy of tagger xmit

2017-05-30 Thread Vivien Didelot
The dsa_slave_priv structure holds a copy of the dsa_device_ops xmit function. It is always assigned to the switch tree xmit function. Remove this useless copy. Signed-off-by: Vivien Didelot --- net/dsa/dsa_priv.h | 3 --- net/dsa/slave.c| 4 +--- 2 files changed, 1 insertion(+), 6

[PATCH net-next 5/7] net: dsa: remove useless goto label in tagger rcv

2017-05-30 Thread Vivien Didelot
Many rcv functions from net/dsa/tag_*.c have a useless out_drop goto label which simply returns NULL. Kill it in favor of the obvious. Signed-off-by: Vivien Didelot --- net/dsa/tag_brcm.c| 11 --- net/dsa/tag_dsa.c | 13 + net/dsa/tag_edsa.c| 13

Re: [PATCH] net: dsa: mv88e6xxx: Add missing static to stub functions

2017-05-29 Thread Vivien Didelot
obal2.h:117:12: error: 'mv88e6xxx_g2_pvt_write' defined > but not used [-Werror=unused-function] > > Fixes: c21fbe29f858 ("net: dsa: mv88e6xxx: Add missing static to stub > functions") > Signed-off-by: Arnd Bergmann <a...@arndb.de> Reviewed-by: Vivien Didelot <vivien.dide...@savoirfairelinux.com> Thanks, Vivien

Re: [PATCH] net: dsa: mv88e6xxx: Add missing static to stub functions

2017-05-29 Thread Vivien Didelot
xx_g2_pvt_write' defined > but not used [-Werror=unused-function] > > Fixes: c21fbe29f858 ("net: dsa: mv88e6xxx: Add missing static to stub > functions") > Signed-off-by: Arnd Bergmann Reviewed-by: Vivien Didelot Thanks, Vivien

[PATCH net-next] net: dsa: mv88e6xxx: handle SERDES error appropriately

2017-05-26 Thread Vivien Didelot
("dsa: mv88e6xxx: Enable/Disable SERDES on port enable/disable") Signed-off-by: Vivien Didelot <vivien.dide...@savoirfairelinux.com> --- drivers/net/dsa/mv88e6xxx/chip.c | 19 +++ 1 file changed, 7 insertions(+), 12 deletions(-) diff --git a/drivers/net/dsa/mv88e6xxx/

[PATCH net-next] net: dsa: mv88e6xxx: handle SERDES error appropriately

2017-05-26 Thread Vivien Didelot
("dsa: mv88e6xxx: Enable/Disable SERDES on port enable/disable") Signed-off-by: Vivien Didelot --- drivers/net/dsa/mv88e6xxx/chip.c | 19 +++ 1 file changed, 7 insertions(+), 12 deletions(-) diff --git a/drivers/net/dsa/mv88e6xxx/chip.c b/drivers/net/dsa/mv88e6xxx/ch

[PATCH net-next 1/3] net: dsa: mv88e6xxx: provide a PHY setup helper

2017-05-26 Thread Vivien Didelot
Similarly to the VTU, PVT and ATU setup, provide a mv88e6xxx_phy_setup helper which wraps mv88e6xxx_ppu_enable, so that no more PPU-related functions are exposed outside of phy.c. Thus make mv88e6xxx_ppu_enable static. Signed-off-by: Vivien Didelot <vivien.dide...@savoirfairelinux.

[PATCH net-next 1/3] net: dsa: mv88e6xxx: provide a PHY setup helper

2017-05-26 Thread Vivien Didelot
Similarly to the VTU, PVT and ATU setup, provide a mv88e6xxx_phy_setup helper which wraps mv88e6xxx_ppu_enable, so that no more PPU-related functions are exposed outside of phy.c. Thus make mv88e6xxx_ppu_enable static. Signed-off-by: Vivien Didelot --- drivers/net/dsa/mv88e6xxx/chip.c | 11

[PATCH net-next 0/3] net: dsa: mv88e6xxx: PHY nitpicks

2017-05-26 Thread Vivien Didelot
This patchset isolates more PPU code into phy.c and makes distinction between PHY Registers read and write implementations vs. generic PHY routines. Vivien Didelot (3): net: dsa: mv88e6xxx: provide a PHY setup helper net: dsa: mv88e6xxx: rename PHY PPU accessors net: dsa: mv88e6xxx: rename

[PATCH net-next 2/3] net: dsa: mv88e6xxx: rename PHY PPU accessors

2017-05-26 Thread Vivien Didelot
the signatures of implementation specific and generic PHY functions in the phy.h header. Signed-off-by: Vivien Didelot <vivien.dide...@savoirfairelinux.com> --- drivers/net/dsa/mv88e6xxx/chip.c | 16 drivers/net/dsa/mv88e6xxx/phy.c | 4 ++-- drivers/net/dsa/mv88e6xxx/phy.h

[PATCH net-next 0/3] net: dsa: mv88e6xxx: PHY nitpicks

2017-05-26 Thread Vivien Didelot
This patchset isolates more PPU code into phy.c and makes distinction between PHY Registers read and write implementations vs. generic PHY routines. Vivien Didelot (3): net: dsa: mv88e6xxx: provide a PHY setup helper net: dsa: mv88e6xxx: rename PHY PPU accessors net: dsa: mv88e6xxx: rename

[PATCH net-next 2/3] net: dsa: mv88e6xxx: rename PHY PPU accessors

2017-05-26 Thread Vivien Didelot
the signatures of implementation specific and generic PHY functions in the phy.h header. Signed-off-by: Vivien Didelot --- drivers/net/dsa/mv88e6xxx/chip.c | 16 drivers/net/dsa/mv88e6xxx/phy.c | 4 ++-- drivers/net/dsa/mv88e6xxx/phy.h | 11 +++ 3 files changed, 17 insertions

[PATCH net-next 3/3] net: dsa: mv88e6xxx: rename PHY PPU functions

2017-05-26 Thread Vivien Didelot
Respect the implicit naming convention used in all register sets specific files, by renaming the mv88e6xxx_ppu_* functions with the mv88e6xxx_phy_* prefix. This is simply a s/xxx_ppu/xxx_phy_ppu/ substitution. Signed-off-by: Vivien Didelot <vivien.dide...@savoirfairelinux.com> --- drive

[PATCH net-next 3/3] net: dsa: mv88e6xxx: rename PHY PPU functions

2017-05-26 Thread Vivien Didelot
Respect the implicit naming convention used in all register sets specific files, by renaming the mv88e6xxx_ppu_* functions with the mv88e6xxx_phy_* prefix. This is simply a s/xxx_ppu/xxx_phy_ppu/ substitution. Signed-off-by: Vivien Didelot --- drivers/net/dsa/mv88e6xxx/phy.c | 38

[PATCH net-next] net: dsa: remove dev arg of dsa_register_switch

2017-05-26 Thread Vivien Didelot
argument of the dsa_register_switch and _dsa_register_switch functions. Signed-off-by: Vivien Didelot <vivien.dide...@savoirfairelinux.com> --- drivers/net/dsa/b53/b53_common.c | 2 +- drivers/net/dsa/dsa_loop.c | 2 +- drivers/net/dsa/lan9303-core.c | 2 +- drivers/net/dsa/mt7530

[PATCH net-next] net: dsa: remove dev arg of dsa_register_switch

2017-05-26 Thread Vivien Didelot
argument of the dsa_register_switch and _dsa_register_switch functions. Signed-off-by: Vivien Didelot --- drivers/net/dsa/b53/b53_common.c | 2 +- drivers/net/dsa/dsa_loop.c | 2 +- drivers/net/dsa/lan9303-core.c | 2 +- drivers/net/dsa/mt7530.c | 2 +- drivers/net/dsa/mv88e6x

[PATCH net-next] net: dsa: remove dsa_port_is_bridged

2017-05-26 Thread Vivien Didelot
The helper is only used once and makes the code more complicated that it should. Remove it and reorganize the variables so that it fits on 80 columns. Signed-off-by: Vivien Didelot <vivien.dide...@savoirfairelinux.com> --- net/dsa/slave.c | 13 - 1 file changed, 4 insertions

[PATCH net-next] net: dsa: remove dsa_port_is_bridged

2017-05-26 Thread Vivien Didelot
The helper is only used once and makes the code more complicated that it should. Remove it and reorganize the variables so that it fits on 80 columns. Signed-off-by: Vivien Didelot --- net/dsa/slave.c | 13 - 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/net/dsa

[PATCH net-next] net: dsa: b53: remove unused dev argument

2017-05-26 Thread Vivien Didelot
The port net device passed to b53_fdb_copy is not used. Remove it. Signed-off-by: Vivien Didelot <vivien.dide...@savoirfairelinux.com> --- drivers/net/dsa/b53/b53_common.c | 8 +++- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/drivers/net/dsa/b53/b53_common.c b/drive

[PATCH net-next] net: dsa: b53: remove unused dev argument

2017-05-26 Thread Vivien Didelot
The port net device passed to b53_fdb_copy is not used. Remove it. Signed-off-by: Vivien Didelot --- drivers/net/dsa/b53/b53_common.c | 8 +++- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/drivers/net/dsa/b53/b53_common.c b/drivers/net/dsa/b53/b53_common.c index

[PATCH net-next] net: dsa: support cross-chip ageing time

2017-05-23 Thread Vivien Didelot
nel/debug/mv88e6xxx/sw*/age_time 15000 15000 15000 zii-rev-c# cat /sys/kernel/debug/mv88e6xxx/sw*/age_time 18750 18750 Signed-off-by: Vivien Didelot <vivien.dide...@savoirfairelinux.com> --- net/dsa/dsa_priv.h | 1 - net/dsa/port.c | 1 - net/dsa/switch.c |

[PATCH net-next] net: dsa: support cross-chip ageing time

2017-05-23 Thread Vivien Didelot
nel/debug/mv88e6xxx/sw*/age_time 15000 15000 15000 zii-rev-c# cat /sys/kernel/debug/mv88e6xxx/sw*/age_time 18750 18750 Signed-off-by: Vivien Didelot --- net/dsa/dsa_priv.h | 1 - net/dsa/port.c | 1 - net/dsa/switch.c | 4 3 files changed, 6 deletions(-) diff --

Re: [PATCH net-next 17/20] net: dsa: add notifier for ageing time

2017-05-22 Thread Vivien Didelot
Hi Florian, Florian Fainelli <f.faine...@gmail.com> writes: > On 05/19/2017 02:00 PM, Vivien Didelot wrote: >> This patch keeps the port-wide ageing time handling code in >> dsa_port_ageing_time, pushes the requested ageing time value in a new >> switch fabric notific

Re: [PATCH net-next 17/20] net: dsa: add notifier for ageing time

2017-05-22 Thread Vivien Didelot
Hi Florian, Florian Fainelli writes: > On 05/19/2017 02:00 PM, Vivien Didelot wrote: >> This patch keeps the port-wide ageing time handling code in >> dsa_port_ageing_time, pushes the requested ageing time value in a new >> switch fabric notification, and moves the sw

[PATCH net-next 06/20] net: dsa: change scope of VLAN handlers

2017-05-19 Thread Vivien Didelot
Change the scope of the switchdev VLAN object handlers from the DSA slave device to the generic DSA port, so that the future port-wide API can also be used for other port types, such as CPU and DSA links. Signed-off-by: Vivien Didelot <vivien.dide...@savoirfairelinux.com> --- net/dsa/s

[PATCH net-next 06/20] net: dsa: change scope of VLAN handlers

2017-05-19 Thread Vivien Didelot
Change the scope of the switchdev VLAN object handlers from the DSA slave device to the generic DSA port, so that the future port-wide API can also be used for other port types, such as CPU and DSA links. Signed-off-by: Vivien Didelot --- net/dsa/slave.c | 40

[PATCH net-next 03/20] net: dsa: change scope of bridging code

2017-05-19 Thread Vivien Didelot
Now that the bridge join and leave functions only deal with a DSA port, change their scope from the DSA slave net_device to the DSA generic dsa_port. Signed-off-by: Vivien Didelot <vivien.dide...@savoirfairelinux.com> --- net/dsa/slave.c | 36 +--- 1 file c

[PATCH net-next 03/20] net: dsa: change scope of bridging code

2017-05-19 Thread Vivien Didelot
Now that the bridge join and leave functions only deal with a DSA port, change their scope from the DSA slave net_device to the DSA generic dsa_port. Signed-off-by: Vivien Didelot --- net/dsa/slave.c | 36 +--- 1 file changed, 17 insertions(+), 19 deletions

[PATCH net-next 18/20] net: dsa: add FDB notifier

2017-05-19 Thread Vivien Didelot
Add two new DSA_NOTIFIER_FDB_ADD and DSA_NOTIFIER_FDB_DEL events to notify not only a single switch, but all switches of a the fabric when an FDB entry is added or removed. For the moment, keep the current behavior and ignore other switches. Signed-off-by: Vivien Didelot <vivien.d

[PATCH net-next 09/20] net: dsa: move port state setters

2017-05-19 Thread Vivien Didelot
Add a new port.c file to hold all DSA port-wide logic. This patch moves in the code which sets a port state. Signed-off-by: Vivien Didelot <vivien.dide...@savoirfairelinux.com> --- net/dsa/Makefile | 2 +- net/dsa/dsa_priv.h | 5 + net/dsa/port.c

[PATCH net-next 02/20] net: dsa: change scope of notifier call chain

2017-05-19 Thread Vivien Didelot
Change the scope of the fabric notification helper from the DSA slave to the DSA port, since this is a DSA layer specific notion, that can be used by non-slave ports (CPU and DSA). Signed-off-by: Vivien Didelot <vivien.dide...@savoirfairelinux.com> --- net/dsa/slave.c | 9 -

[PATCH net-next 18/20] net: dsa: add FDB notifier

2017-05-19 Thread Vivien Didelot
Add two new DSA_NOTIFIER_FDB_ADD and DSA_NOTIFIER_FDB_DEL events to notify not only a single switch, but all switches of a the fabric when an FDB entry is added or removed. For the moment, keep the current behavior and ignore other switches. Signed-off-by: Vivien Didelot --- net/dsa/dsa_priv.h

[PATCH net-next 09/20] net: dsa: move port state setters

2017-05-19 Thread Vivien Didelot
Add a new port.c file to hold all DSA port-wide logic. This patch moves in the code which sets a port state. Signed-off-by: Vivien Didelot --- net/dsa/Makefile | 2 +- net/dsa/dsa_priv.h | 5 + net/dsa/port.c | 55 ++ net/dsa

[PATCH net-next 02/20] net: dsa: change scope of notifier call chain

2017-05-19 Thread Vivien Didelot
Change the scope of the fabric notification helper from the DSA slave to the DSA port, since this is a DSA layer specific notion, that can be used by non-slave ports (CPU and DSA). Signed-off-by: Vivien Didelot --- net/dsa/slave.c | 9 - 1 file changed, 4 insertions(+), 5 deletions

[PATCH net-next 15/20] net: dsa: move VLAN handlers

2017-05-19 Thread Vivien Didelot
Move the DSA port code which handles VLAN objects in port.c, where it belongs. Signed-off-by: Vivien Didelot <vivien.dide...@savoirfairelinux.com> --- net/dsa/dsa_priv.h | 8 net/dsa/port.c | 41 + net/dsa/slave.c

[PATCH net-next 15/20] net: dsa: move VLAN handlers

2017-05-19 Thread Vivien Didelot
Move the DSA port code which handles VLAN objects in port.c, where it belongs. Signed-off-by: Vivien Didelot --- net/dsa/dsa_priv.h | 8 net/dsa/port.c | 41 + net/dsa/slave.c| 41 - 3 files

[PATCH net-next 13/20] net: dsa: move FDB handlers

2017-05-19 Thread Vivien Didelot
Move the DSA port code which handles FDB objects in port.c, where it belongs. Signed-off-by: Vivien Didelot <vivien.dide...@savoirfairelinux.com> --- net/dsa/dsa_priv.h | 7 +++ net/dsa/port.c | 40 net/dsa/slave.c

[PATCH net-next 07/20] net: dsa: change scope of VLAN filtering setter

2017-05-19 Thread Vivien Didelot
Change the scope of the switchdev VLAN filtering attribute setter from the DSA slave device to the generic DSA port, so that the future port-wide API can also be used for other port types, such as CPU and DSA links. Signed-off-by: Vivien Didelot <vivien.dide...@savoirfairelinux.com> --- n

[PATCH net-next 13/20] net: dsa: move FDB handlers

2017-05-19 Thread Vivien Didelot
Move the DSA port code which handles FDB objects in port.c, where it belongs. Signed-off-by: Vivien Didelot --- net/dsa/dsa_priv.h | 7 +++ net/dsa/port.c | 40 net/dsa/slave.c| 42 -- 3 files changed

[PATCH net-next 07/20] net: dsa: change scope of VLAN filtering setter

2017-05-19 Thread Vivien Didelot
Change the scope of the switchdev VLAN filtering attribute setter from the DSA slave device to the generic DSA port, so that the future port-wide API can also be used for other port types, such as CPU and DSA links. Signed-off-by: Vivien Didelot --- net/dsa/slave.c | 15 +++ 1 file

[PATCH net-next 14/20] net: dsa: move MDB handlers

2017-05-19 Thread Vivien Didelot
Move the DSA port code which handles MDB objects in port.c, where it belongs. Signed-off-by: Vivien Didelot <vivien.dide...@savoirfairelinux.com> --- net/dsa/dsa_priv.h | 7 +++ net/dsa/port.c | 40 net/dsa/slave.c

[PATCH net-next 14/20] net: dsa: move MDB handlers

2017-05-19 Thread Vivien Didelot
Move the DSA port code which handles MDB objects in port.c, where it belongs. Signed-off-by: Vivien Didelot --- net/dsa/dsa_priv.h | 7 +++ net/dsa/port.c | 40 net/dsa/slave.c| 41 - 3 files changed

[PATCH net-next 19/20] net: dsa: add MDB notifier

2017-05-19 Thread Vivien Didelot
Add two new DSA_NOTIFIER_MDB_ADD and DSA_NOTIFIER_MDB_DEL events to notify not only a single switch, but all switches of a the fabric when an MDB entry is added or removed. For the moment, keep the current behavior and ignore other switches. Signed-off-by: Vivien Didelot <vivien.d

[PATCH net-next 16/20] net: dsa: move notifier info to private header

2017-05-19 Thread Vivien Didelot
don't care about the values, and this will prevent future conflicts when adding (and sorting) new events. Signed-off-by: Vivien Didelot <vivien.dide...@savoirfairelinux.com> --- include/net/dsa.h | 10 -- net/dsa/dsa_priv.h | 12 2 files changed, 12 insertions(

[PATCH net-next 19/20] net: dsa: add MDB notifier

2017-05-19 Thread Vivien Didelot
Add two new DSA_NOTIFIER_MDB_ADD and DSA_NOTIFIER_MDB_DEL events to notify not only a single switch, but all switches of a the fabric when an MDB entry is added or removed. For the moment, keep the current behavior and ignore other switches. Signed-off-by: Vivien Didelot --- net/dsa/dsa_priv.h

[PATCH net-next 16/20] net: dsa: move notifier info to private header

2017-05-19 Thread Vivien Didelot
don't care about the values, and this will prevent future conflicts when adding (and sorting) new events. Signed-off-by: Vivien Didelot --- include/net/dsa.h | 10 -- net/dsa/dsa_priv.h | 12 2 files changed, 12 insertions(+), 10 deletions(-) diff --git a/include/net/dsa.h

[PATCH net-next 12/20] net: dsa: move ageing time setter

2017-05-19 Thread Vivien Didelot
Move the DSA port code which sets a port ageing time in port.c, where it belongs. Signed-off-by: Vivien Didelot <vivien.dide...@savoirfairelinux.com> --- net/dsa/dsa_priv.h | 2 ++ net/dsa/port.c | 40 net/dsa/slave.c

[PATCH net-next 12/20] net: dsa: move ageing time setter

2017-05-19 Thread Vivien Didelot
Move the DSA port code which sets a port ageing time in port.c, where it belongs. Signed-off-by: Vivien Didelot --- net/dsa/dsa_priv.h | 2 ++ net/dsa/port.c | 40 net/dsa/slave.c| 40 3 files changed, 42

[PATCH net-next 10/20] net: dsa: move bridging routines

2017-05-19 Thread Vivien Didelot
Move the DSA port code which bridges a port in port.c, where it belongs. Signed-off-by: Vivien Didelot <vivien.dide...@savoirfairelinux.com> --- net/dsa/dsa_priv.h | 2 ++ net/dsa/port.c | 58 ++ net/dsa/slave.c

[PATCH net-next 17/20] net: dsa: add notifier for ageing time

2017-05-19 Thread Vivien Didelot
that the target port belongs to can be programmed, but all switches composing the switch fabric. For the moment, keep the current behavior and ignore other switches. Signed-off-by: Vivien Didelot <vivien.dide...@savoirfairelinux.com> --- net/dsa/dsa_priv.h | 8 net/dsa/port.c

[PATCH net-next 10/20] net: dsa: move bridging routines

2017-05-19 Thread Vivien Didelot
Move the DSA port code which bridges a port in port.c, where it belongs. Signed-off-by: Vivien Didelot --- net/dsa/dsa_priv.h | 2 ++ net/dsa/port.c | 58 ++ net/dsa/slave.c| 57 - 3

[PATCH net-next 17/20] net: dsa: add notifier for ageing time

2017-05-19 Thread Vivien Didelot
that the target port belongs to can be programmed, but all switches composing the switch fabric. For the moment, keep the current behavior and ignore other switches. Signed-off-by: Vivien Didelot --- net/dsa/dsa_priv.h | 8 net/dsa/port.c | 37 - net/dsa

[PATCH net-next 00/20] net: dsa: distribute switch events

2017-05-19 Thread Vivien Didelot
a distributed configuration, but for the moment, each switch chip ignores events from other chips of the fabric, to keep the current behavior. The next patch series will add support for cross-chip configuration of bridge ageing time, VLAN and MAC address databases operations, etc. Vivien Didelot

[PATCH net-next 00/20] net: dsa: distribute switch events

2017-05-19 Thread Vivien Didelot
a distributed configuration, but for the moment, each switch chip ignores events from other chips of the fabric, to keep the current behavior. The next patch series will add support for cross-chip configuration of bridge ageing time, VLAN and MAC address databases operations, etc. Vivien Didelot

[PATCH net-next 01/20] net: dsa: change scope of STP state setter

2017-05-19 Thread Vivien Didelot
separate the DSA logic from the slave device handling. Signed-off-by: Vivien Didelot <vivien.dide...@savoirfairelinux.com> --- net/dsa/slave.c | 44 ++-- 1 file changed, 22 insertions(+), 22 deletions(-) diff --git a/net/dsa/slave.c b/net/dsa/slave.c

[PATCH net-next 01/20] net: dsa: change scope of STP state setter

2017-05-19 Thread Vivien Didelot
separate the DSA logic from the slave device handling. Signed-off-by: Vivien Didelot --- net/dsa/slave.c | 44 ++-- 1 file changed, 22 insertions(+), 22 deletions(-) diff --git a/net/dsa/slave.c b/net/dsa/slave.c index 91236d602301..403d1dfe7f50 100644 --- a/net

[PATCH net-next 04/20] net: dsa: change scope of FDB handlers

2017-05-19 Thread Vivien Didelot
Change the scope of the switchdev FDB object handlers from the DSA slave device to the generic DSA port, so that the future port-wide API can also be used for other port types, such as CPU and DSA links. Signed-off-by: Vivien Didelot <vivien.dide...@savoirfairelinux.com> --- net/dsa/slave.

[PATCH net-next 04/20] net: dsa: change scope of FDB handlers

2017-05-19 Thread Vivien Didelot
Change the scope of the switchdev FDB object handlers from the DSA slave device to the generic DSA port, so that the future port-wide API can also be used for other port types, such as CPU and DSA links. Signed-off-by: Vivien Didelot --- net/dsa/slave.c | 50

[PATCH net-next 05/20] net: dsa: change scope of MDB handlers

2017-05-19 Thread Vivien Didelot
Change the scope of the switchdev MDB object handlers from the DSA slave device to the generic DSA port, so that the future port-wide API can also be used for other port types, such as CPU and DSA links. Signed-off-by: Vivien Didelot <vivien.dide...@savoirfairelinux.com> --- net/dsa/slave.

[PATCH net-next 11/20] net: dsa: move VLAN filtering setter

2017-05-19 Thread Vivien Didelot
Move the DSA port code which sets VLAN filtering on a port in port.c, where it belongs. Signed-off-by: Vivien Didelot <vivien.dide...@savoirfairelinux.com> --- net/dsa/dsa_priv.h | 2 ++ net/dsa/port.c | 16 net/dsa/slave.c| 16 3 files chang

[PATCH net-next 05/20] net: dsa: change scope of MDB handlers

2017-05-19 Thread Vivien Didelot
Change the scope of the switchdev MDB object handlers from the DSA slave device to the generic DSA port, so that the future port-wide API can also be used for other port types, such as CPU and DSA links. Signed-off-by: Vivien Didelot --- net/dsa/slave.c | 41

[PATCH net-next 11/20] net: dsa: move VLAN filtering setter

2017-05-19 Thread Vivien Didelot
Move the DSA port code which sets VLAN filtering on a port in port.c, where it belongs. Signed-off-by: Vivien Didelot --- net/dsa/dsa_priv.h | 2 ++ net/dsa/port.c | 16 net/dsa/slave.c| 16 3 files changed, 18 insertions(+), 16 deletions(-) diff

[PATCH net-next 20/20] net: dsa: add VLAN notifier

2017-05-19 Thread Vivien Didelot
Add two new DSA_NOTIFIER_VLAN_ADD and DSA_NOTIFIER_VLAN_DEL events to notify not only a single switch, but all switches of a the fabric when an VLAN entry is added or removed. For the moment, keep the current behavior and ignore other switches. Signed-off-by: Vivien Didelot <vivien.d

[PATCH net-next 08/20] net: dsa: change scope of ageing time setter

2017-05-19 Thread Vivien Didelot
hus their addresses cannot be NULL. Remove the useless check in dsa_fastest_ageing_time. Signed-off-by: Vivien Didelot <vivien.dide...@savoirfairelinux.com> --- net/dsa/slave.c | 16 +++- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/net/dsa/slave.c b/net/dsa/slav

[PATCH net-next 20/20] net: dsa: add VLAN notifier

2017-05-19 Thread Vivien Didelot
Add two new DSA_NOTIFIER_VLAN_ADD and DSA_NOTIFIER_VLAN_DEL events to notify not only a single switch, but all switches of a the fabric when an VLAN entry is added or removed. For the moment, keep the current behavior and ignore other switches. Signed-off-by: Vivien Didelot --- net/dsa

[PATCH net-next 08/20] net: dsa: change scope of ageing time setter

2017-05-19 Thread Vivien Didelot
hus their addresses cannot be NULL. Remove the useless check in dsa_fastest_ageing_time. Signed-off-by: Vivien Didelot --- net/dsa/slave.c | 16 +++- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/net/dsa/slave.c b/net/dsa/slave.c index 216eb38a847d..b0150f79dcdd 100644 --- a/

Re: [PATCH net-next 3/6] net: bridge: break if __br_mdb_del fails

2017-05-18 Thread Vivien Didelot
Hi Nikolay, Nikolay Aleksandrov writes: >> OK good to know. That intention wasn't obvious. I can make __br_mdb_del >> return void instead? What about the rest of the patchset if I do so? > > If you make it return void we will not be able to return proper error value

Re: [PATCH net-next 3/6] net: bridge: break if __br_mdb_del fails

2017-05-18 Thread Vivien Didelot
Hi Nikolay, Nikolay Aleksandrov writes: >> OK good to know. That intention wasn't obvious. I can make __br_mdb_del >> return void instead? What about the rest of the patchset if I do so? > > If you make it return void we will not be able to return proper error value > when doing a single

Re: [PATCH net-next 3/6] net: bridge: break if __br_mdb_del fails

2017-05-18 Thread Vivien Didelot
Hi Nikolay, Nikolay Aleksandrov writes: >> err = __br_mdb_del(br, entry); >> -if (!err) >> -__br_mdb_notify(dev, p, entry, RTM_DELMDB); >> +if (err) >> +

Re: [PATCH net-next 3/6] net: bridge: break if __br_mdb_del fails

2017-05-18 Thread Vivien Didelot
Hi Nikolay, Nikolay Aleksandrov writes: >> err = __br_mdb_del(br, entry); >> -if (!err) >> -__br_mdb_notify(dev, p, entry, RTM_DELMDB); >> +if (err) >> +break; >> +

[PATCH net-next 6/6] net: bridge: add br_mdb_do

2017-05-17 Thread Vivien Didelot
Now that the two functions br_mdb_add and br_mdb_del are identical, keep a single function named br_mdb_do and register it for both RTM_NEWMDB and RTM_DELMDB message types. Signed-off-by: Vivien Didelot <vivien.dide...@savoirfairelinux.com> --- net/bridge/br_mdb.

[PATCH net-next 6/6] net: bridge: add br_mdb_do

2017-05-17 Thread Vivien Didelot
Now that the two functions br_mdb_add and br_mdb_del are identical, keep a single function named br_mdb_do and register it for both RTM_NEWMDB and RTM_DELMDB message types. Signed-off-by: Vivien Didelot --- net/bridge/br_mdb.c | 61 + 1 file

[PATCH net-next 5/6] net: bridge: get msgtype from nlmsghdr in mdb ops

2017-05-17 Thread Vivien Didelot
Retrieve the message type from the nlmsghdr structure instead of hardcoding it in both br_mdb_add and br_mdb_del. Signed-off-by: Vivien Didelot <vivien.dide...@savoirfairelinux.com> --- net/bridge/br_mdb.c | 10 ++ 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/net/

[PATCH net-next 5/6] net: bridge: get msgtype from nlmsghdr in mdb ops

2017-05-17 Thread Vivien Didelot
Retrieve the message type from the nlmsghdr structure instead of hardcoding it in both br_mdb_add and br_mdb_del. Signed-off-by: Vivien Didelot --- net/bridge/br_mdb.c | 10 ++ 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/net/bridge/br_mdb.c b/net/bridge/br_mdb.c index

[PATCH net-next 4/6] net: bridge: add __br_mdb_do

2017-05-17 Thread Vivien Didelot
o need to pass it twice. Signed-off-by: Vivien Didelot <vivien.dide...@savoirfairelinux.com> --- net/bridge/br_mdb.c | 33 +++-- 1 file changed, 23 insertions(+), 10 deletions(-) diff --git a/net/bridge/br_mdb.c b/net/bridge/br_mdb.c index 24fb4179..a72d5e6

[PATCH net-next 4/6] net: bridge: add __br_mdb_do

2017-05-17 Thread Vivien Didelot
o need to pass it twice. Signed-off-by: Vivien Didelot --- net/bridge/br_mdb.c | 33 +++-- 1 file changed, 23 insertions(+), 10 deletions(-) diff --git a/net/bridge/br_mdb.c b/net/bridge/br_mdb.c index 24fb4179..a72d5e6f339f 100644 --- a/net/bridge/br_mdb.c +++

[PATCH net-next 1/6] net: bridge: pass net_bridge_port to __br_mdb_add

2017-05-17 Thread Vivien Didelot
The __br_mdb_add function uses exactly the same mechanism as its caller br_mdb_add to retrieve the net_bridge_port pointer from br_mdb_entry. Remove it and pass directly the net_bridge_port pointer to __br_mdb_add. Signed-off-by: Vivien Didelot <vivien.dide...@savoirfairelinux.com> --

[PATCH net-next 1/6] net: bridge: pass net_bridge_port to __br_mdb_add

2017-05-17 Thread Vivien Didelot
The __br_mdb_add function uses exactly the same mechanism as its caller br_mdb_add to retrieve the net_bridge_port pointer from br_mdb_entry. Remove it and pass directly the net_bridge_port pointer to __br_mdb_add. Signed-off-by: Vivien Didelot --- net/bridge/br_mdb.c | 18

[PATCH net-next 2/6] net: bridge: check multicast bridge only once

2017-05-17 Thread Vivien Didelot
-by: Vivien Didelot <vivien.dide...@savoirfairelinux.com> --- net/bridge/br_mdb.c | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/net/bridge/br_mdb.c b/net/bridge/br_mdb.c index bef0331f46a4..d20a01622b20 100644 --- a/net/bridge/br_mdb.c +++ b/net/bridge/br

[PATCH net-next 2/6] net: bridge: check multicast bridge only once

2017-05-17 Thread Vivien Didelot
-by: Vivien Didelot --- net/bridge/br_mdb.c | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/net/bridge/br_mdb.c b/net/bridge/br_mdb.c index bef0331f46a4..d20a01622b20 100644 --- a/net/bridge/br_mdb.c +++ b/net/bridge/br_mdb.c @@ -548,9 +548,6 @@ static int __br_mdb_add

[PATCH net-next 3/6] net: bridge: break if __br_mdb_del fails

2017-05-17 Thread Vivien Didelot
Be symmetric with br_mdb_add and break if __br_mdb_del returns an error. Signed-off-by: Vivien Didelot <vivien.dide...@savoirfairelinux.com> --- net/bridge/br_mdb.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/net/bridge/br_mdb.c b/net/bridge/br_mdb.c

[PATCH net-next 3/6] net: bridge: break if __br_mdb_del fails

2017-05-17 Thread Vivien Didelot
Be symmetric with br_mdb_add and break if __br_mdb_del returns an error. Signed-off-by: Vivien Didelot --- net/bridge/br_mdb.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/net/bridge/br_mdb.c b/net/bridge/br_mdb.c index d20a01622b20..24fb4179 100644 --- a/net

[PATCH net-next 0/6] net: bridge: factorize MDB new and del functions

2017-05-17 Thread Vivien Didelot
and simplify the MDB handling code. Vivien Didelot (6): net: bridge: pass net_bridge_port to __br_mdb_add net: bridge: check multicast bridge only once net: bridge: break if __br_mdb_del fails net: bridge: add __br_mdb_do net: bridge: get msgtype from nlmsghdr in mdb ops net: bridge: add

[PATCH net-next 0/6] net: bridge: factorize MDB new and del functions

2017-05-17 Thread Vivien Didelot
and simplify the MDB handling code. Vivien Didelot (6): net: bridge: pass net_bridge_port to __br_mdb_add net: bridge: check multicast bridge only once net: bridge: break if __br_mdb_del fails net: bridge: add __br_mdb_do net: bridge: get msgtype from nlmsghdr in mdb ops net: bridge: add

[PATCH net-next 1/3] net: dsa: include dsa.h only once

2017-05-17 Thread Vivien Didelot
-off-by: Vivien Didelot <vivien.dide...@savoirfairelinux.com> --- net/dsa/dsa.c | 2 +- net/dsa/dsa2.c| 2 +- net/dsa/dsa_priv.h| 1 + net/dsa/legacy.c | 2 +- net/dsa/slave.c | 2 +- net/dsa/switch.c | 3 ++- net/dsa/tag_brcm.c| 2 +- net/dsa/tag

[PATCH net-next 1/3] net: dsa: include dsa.h only once

2017-05-17 Thread Vivien Didelot
-off-by: Vivien Didelot --- net/dsa/dsa.c | 2 +- net/dsa/dsa2.c| 2 +- net/dsa/dsa_priv.h| 1 + net/dsa/legacy.c | 2 +- net/dsa/slave.c | 2 +- net/dsa/switch.c | 3 ++- net/dsa/tag_brcm.c| 2 +- net/dsa/tag_dsa.c | 2 +- net/dsa/tag_edsa.c| 2

[PATCH net-next 0/3] net: dsa: headers cleanup

2017-05-17 Thread Vivien Didelot
typedef defined by switchdev. Vivien Didelot (3): net: dsa: include dsa.h only once net: dsa: include switchdev.h only once net: dsa: use switchdev_obj_dump_cb_t everywhere drivers/net/dsa/b53/b53_common.c | 7 +++ drivers/net/dsa/b53/b53_priv.h | 4 ++-- drivers/net/dsa/bcm_sf2.c

[PATCH net-next 0/3] net: dsa: headers cleanup

2017-05-17 Thread Vivien Didelot
typedef defined by switchdev. Vivien Didelot (3): net: dsa: include dsa.h only once net: dsa: include switchdev.h only once net: dsa: use switchdev_obj_dump_cb_t everywhere drivers/net/dsa/b53/b53_common.c | 7 +++ drivers/net/dsa/b53/b53_priv.h | 4 ++-- drivers/net/dsa/bcm_sf2.c

[PATCH net-next 2/3] net: dsa: include switchdev.h only once

2017-05-17 Thread Vivien Didelot
DSA drivers and core use switchdev. Include switchdev.h only once, in the dsa.h public header, so that inclusion in DSA drivers or forward declarations of switchdev structures in not necessary anymore. Signed-off-by: Vivien Didelot <vivien.dide...@savoirfairelinux.com> --- drivers/net/d

[PATCH net-next 2/3] net: dsa: include switchdev.h only once

2017-05-17 Thread Vivien Didelot
DSA drivers and core use switchdev. Include switchdev.h only once, in the dsa.h public header, so that inclusion in DSA drivers or forward declarations of switchdev structures in not necessary anymore. Signed-off-by: Vivien Didelot --- drivers/net/dsa/b53/b53_common.c | 1 - drivers/net/dsa

[PATCH net-next 3/3] net: dsa: use switchdev_obj_dump_cb_t everywhere

2017-05-17 Thread Vivien Didelot
Now that the DSA public header includes switchdev.h, use the provided switchdev_obj_dump_cb_t typedef for the object dump callback. Signed-off-by: Vivien Didelot <vivien.dide...@savoirfairelinux.com> --- drivers/net/dsa/b53/b53_common.c | 6 +++--- drivers/net/dsa/b53/b53_priv.h

[PATCH net-next 3/3] net: dsa: use switchdev_obj_dump_cb_t everywhere

2017-05-17 Thread Vivien Didelot
Now that the DSA public header includes switchdev.h, use the provided switchdev_obj_dump_cb_t typedef for the object dump callback. Signed-off-by: Vivien Didelot --- drivers/net/dsa/b53/b53_common.c | 6 +++--- drivers/net/dsa/b53/b53_priv.h | 4 ++-- drivers/net/dsa/dsa_loop.c | 2

[PATCH net-next] net: dsa: store CPU port pointer in the tree

2017-05-16 Thread Vivien Didelot
dp->ds/ and s/dst->cpu_port/dst->cpu_dp->index/. Signed-off-by: Vivien Didelot <vivien.dide...@savoirfairelinux.com> --- drivers/net/dsa/b53/b53_common.c | 4 ++-- drivers/net/dsa/bcm_sf2.c| 4 ++-- drivers/net/dsa/mv88e6060.c | 2 +- drivers/net/dsa/qca8k.c

[PATCH net-next] net: dsa: store CPU port pointer in the tree

2017-05-16 Thread Vivien Didelot
dp->ds/ and s/dst->cpu_port/dst->cpu_dp->index/. Signed-off-by: Vivien Didelot --- drivers/net/dsa/b53/b53_common.c | 4 ++-- drivers/net/dsa/bcm_sf2.c| 4 ++-- drivers/net/dsa/mv88e6060.c | 2 +- drivers/net/dsa/qca8k.c | 2 +- include/net/dsa.h

[PATCH net-next v2 03/18] net: dsa: mv88e6xxx: move VTU Operation accessors

2017-05-01 Thread Vivien Didelot
Move the helper functions to access the Global 1 VTU Operation register to a new global1_vtu.c file, and get rid of the old underscore prefix naming convention. This file will be extended will all VTU/STU related code. Signed-off-by: Vivien Didelot <vivien.dide...@savoirfairelinux.com> Re

[PATCH net-next v2 01/18] net: dsa: mv88e6xxx: add max VID to info

2017-05-01 Thread Vivien Didelot
. This makes the MV88E6XXX_FLAG_VTU obsolete, thus remove it. Signed-off-by: Vivien Didelot <vivien.dide...@savoirfairelinux.com> Reviewed-by: Andrew Lunn <and...@lunn.ch> --- drivers/net/dsa/mv88e6xxx/chip.c | 38 ++- drivers/net/dsa/mv88e6xxx/mv88

[PATCH net-next v2 03/18] net: dsa: mv88e6xxx: move VTU Operation accessors

2017-05-01 Thread Vivien Didelot
Move the helper functions to access the Global 1 VTU Operation register to a new global1_vtu.c file, and get rid of the old underscore prefix naming convention. This file will be extended will all VTU/STU related code. Signed-off-by: Vivien Didelot Reviewed-by: Andrew Lunn --- drivers/net/dsa

<    6   7   8   9   10   11   12   13   14   15   >