[PATCH net-next 1/4] net: dsa: move up phy enabling in core

2017-09-22 Thread Vivien Didelot
bcm_sf2 is currently the only driver using the phy argument passed to .port_enable. It resets the state machine if the phy has been hard reset. This check is generic and can be moved to DSA core. Signed-off-by: Vivien Didelot --- drivers/net/dsa/bcm_sf2.c | 16 +--- net/dsa/slave.c

[PATCH net-next 3/4] net: dsa: make slave close symmetrical to open

2017-09-22 Thread Vivien Didelot
the master device. Signed-off-by: Vivien Didelot <vivien.dide...@savoirfairelinux.com> --- net/dsa/slave.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/net/dsa/slave.c b/net/dsa/slave.c index 6290741e496a..235a5c95dfcc 100644 --- a/net/dsa/slave.c +++ b/n

[PATCH net-next 3/4] net: dsa: make slave close symmetrical to open

2017-09-22 Thread Vivien Didelot
the master device. Signed-off-by: Vivien Didelot --- net/dsa/slave.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/net/dsa/slave.c b/net/dsa/slave.c index 6290741e496a..235a5c95dfcc 100644 --- a/net/dsa/slave.c +++ b/net/dsa/slave.c @@ -144,6 +144,11 @@ static int

[PATCH net-next 2/4] net: dsa: remove phy arg from port enable/disable

2017-09-22 Thread Vivien Didelot
The .port_enable and .port_disable functions are meant to deal with the switch ports only, and no driver is using the phy argument anyway. Remove it. Signed-off-by: Vivien Didelot <vivien.dide...@savoirfairelinux.com> --- drivers/net/dsa/b53/b53_common.c | 6 +++--- drivers/net/d

[PATCH net-next 2/4] net: dsa: remove phy arg from port enable/disable

2017-09-22 Thread Vivien Didelot
The .port_enable and .port_disable functions are meant to deal with the switch ports only, and no driver is using the phy argument anyway. Remove it. Signed-off-by: Vivien Didelot --- drivers/net/dsa/b53/b53_common.c | 6 +++--- drivers/net/dsa/b53/b53_priv.h | 4 ++-- drivers

[PATCH net-next 0/4] net: dsa: simplify port enabling

2017-09-22 Thread Vivien Didelot
This patchset removes the unnecessary PHY device argument in port enable/disable switch operations, makes slave open and close symmetrical and finally provides helpers for enabling or disabling a DSA port. Vivien Didelot (4): net: dsa: move up phy enabling in core net: dsa: remove phy arg

[PATCH net-next 0/4] net: dsa: simplify port enabling

2017-09-22 Thread Vivien Didelot
This patchset removes the unnecessary PHY device argument in port enable/disable switch operations, makes slave open and close symmetrical and finally provides helpers for enabling or disabling a DSA port. Vivien Didelot (4): net: dsa: move up phy enabling in core net: dsa: remove phy arg

[PATCH net-next 4/4] net: dsa: add port enable and disable helpers

2017-09-22 Thread Vivien Didelot
Provide dsa_port_enable and dsa_port_disable helpers to respectively enable and disable a switch port. This makes the dsa_port_set_state_now helper static. Signed-off-by: Vivien Didelot <vivien.dide...@savoirfairelinux.com> --- net/dsa/dsa_priv.h | 3 ++- net/dsa/port.c

[PATCH net-next 4/4] net: dsa: add port enable and disable helpers

2017-09-22 Thread Vivien Didelot
Provide dsa_port_enable and dsa_port_disable helpers to respectively enable and disable a switch port. This makes the dsa_port_set_state_now helper static. Signed-off-by: Vivien Didelot --- net/dsa/dsa_priv.h | 3 ++- net/dsa/port.c | 31 ++- net/dsa/slave.c

Re: [PATCH net-next 1/2] net: dsa: lan9303: Move tag setup to new lan9303_setup_tagging

2017-09-21 Thread Vivien Didelot
, otherwise LGTM: Reviewed-by: Vivien Didelot <vivien.dide...@savoirfairelinux.com> > +/* forward special tagged packets from port 0 to port 1 *or* port 2 */ > +static int lan9303_setup_tagging(struct lan9303 *chip) > +{ > + int ret; > + /* enable defining the destination por

Re: [PATCH net-next 1/2] net: dsa: lan9303: Move tag setup to new lan9303_setup_tagging

2017-09-21 Thread Vivien Didelot
Hi Egil, Egil Hjelmeland writes: > Prepare for next patch: > Move tag setup from lan9303_separate_ports() to new function > lan9303_setup_tagging() > > Signed-off-by: Egil Hjelmeland Minor styling issues, otherwise LGTM: Reviewed-by: Vivien Didelot > +/* forward special t

Re: [PATCH net-next 2/2] net: dsa: lan9303: Add basic offloading of unicast traffic

2017-09-21 Thread Vivien Didelot
Hjelmeland <pri...@egil-hjelmeland.no> Styling nitpicks below, other than that, the patch LGTM: Reviewed-by: Vivien Didelot <vivien.dide...@savoirfairelinux.com> > #include > #include > #include > +#include It's nice to order header inclusions alphabetic

Re: [PATCH net-next 2/2] net: dsa: lan9303: Add basic offloading of unicast traffic

2017-09-21 Thread Vivien Didelot
other than that, the patch LGTM: Reviewed-by: Vivien Didelot > #include > #include > #include > +#include It's nice to order header inclusions alphabetically. > > #include "lan9303.h" > > @@ -146,6 +147,7 @@ > # define LAN9303_SWE_PORT_STA

[PATCH net-next] net: dsa: add port fdb dump

2017-09-20 Thread Vivien Didelot
Dumping a DSA port's FDB entries is not specific to a DSA slave, so add a dsa_port_fdb_dump function, similarly to dsa_port_fdb_add and dsa_port_fdb_del. Signed-off-by: Vivien Didelot <vivien.dide...@savoirfairelinux.com> --- net/dsa/dsa_priv.h | 1 + net/dsa/port.c | 11 ++

[PATCH net-next] net: dsa: add port fdb dump

2017-09-20 Thread Vivien Didelot
Dumping a DSA port's FDB entries is not specific to a DSA slave, so add a dsa_port_fdb_dump function, similarly to dsa_port_fdb_add and dsa_port_fdb_del. Signed-off-by: Vivien Didelot --- net/dsa/dsa_priv.h | 1 + net/dsa/port.c | 11 +++ net/dsa/slave.c| 9 ++--- 3 files

[PATCH net-next] net: dsa: better scoping of slave functions

2017-09-20 Thread Vivien Didelot
A few DSA slave functions take a dsa_slave_priv pointer as first argument, whereas the scope of the slave.c functions is the slave net_device structure. Fix this and rename dsa_netpoll_send_skb to dsa_slave_netpoll_send_skb. Signed-off-by: Vivien Didelot <vivien.dide...@savoirfairelinux.

[PATCH net-next] net: dsa: better scoping of slave functions

2017-09-20 Thread Vivien Didelot
A few DSA slave functions take a dsa_slave_priv pointer as first argument, whereas the scope of the slave.c functions is the slave net_device structure. Fix this and rename dsa_netpoll_send_skb to dsa_slave_netpoll_send_skb. Signed-off-by: Vivien Didelot --- net/dsa/slave.c | 29

[PATCH net-next] net: dsa: use dedicated CPU port

2017-09-20 Thread Vivien Didelot
Each port in DSA has its own dedicated CPU port currently available in its parent switch's ds->ports[port].cpu_dp. Use it instead of getting the unique tree CPU port, which will be deprecated soon. Signed-off-by: Vivien Didelot <vivien.dide...@savoirfairelinux.com> --- drivers/ne

[PATCH net-next] net: dsa: use dedicated CPU port

2017-09-20 Thread Vivien Didelot
Each port in DSA has its own dedicated CPU port currently available in its parent switch's ds->ports[port].cpu_dp. Use it instead of getting the unique tree CPU port, which will be deprecated soon. Signed-off-by: Vivien Didelot --- drivers/net/dsa/b53/b53_common.c | 4 ++-- drivers/net/

Re: [PATCH net-next] net: dsa: Utilize dsa_slave_dev_check()

2017-09-20 Thread Vivien Didelot
master() and renaming dsa_slave_dev_check() to netdev_is_dsa_slave(). In the meantime, looks good! Reviewed-by: Vivien Didelot <vivien.dide...@savoirfairelinux.com>

Re: [PATCH net-next] net: dsa: Utilize dsa_slave_dev_check()

2017-09-20 Thread Vivien Didelot
dsa_slave(). In the meantime, looks good! Reviewed-by: Vivien Didelot

[PATCH net-next 4/4] net: dsa: move master ethtool code

2017-09-19 Thread Vivien Didelot
with master net device specific code. Signed-off-by: Vivien Didelot <vivien.dide...@savoirfairelinux.com> --- net/dsa/Makefile | 2 +- net/dsa/dsa.c | 28 - net/dsa/dsa2.c | 4 +- net/dsa/dsa_priv.h | 7 ++-- net/dsa/legacy.c | 4 +- net/dsa/master.c

[PATCH net-next 4/4] net: dsa: move master ethtool code

2017-09-19 Thread Vivien Didelot
with master net device specific code. Signed-off-by: Vivien Didelot --- net/dsa/Makefile | 2 +- net/dsa/dsa.c | 28 - net/dsa/dsa2.c | 4 +- net/dsa/dsa_priv.h | 7 ++-- net/dsa/legacy.c | 4 +- net/dsa/master.c | 120

[PATCH net-next 0/4] net: dsa: move master ethtool code

2017-09-19 Thread Vivien Didelot
better control of the master device and support for multiple CPU ports. Vivien Didelot (4): net: dsa: remove copy of master ethtool_ops net: dsa: setup master ethtool unconditionally net: dsa: setup master ethtool after dsa_ptr net: dsa: move master ethtool code include/net/dsa.h | 1 - net

[PATCH net-next 0/4] net: dsa: move master ethtool code

2017-09-19 Thread Vivien Didelot
better control of the master device and support for multiple CPU ports. Vivien Didelot (4): net: dsa: remove copy of master ethtool_ops net: dsa: setup master ethtool unconditionally net: dsa: setup master ethtool after dsa_ptr net: dsa: move master ethtool code include/net/dsa.h | 1 - net

[PATCH net-next 2/4] net: dsa: setup master ethtool unconditionally

2017-09-19 Thread Vivien Didelot
When a DSA switch tree is meant to be applied, it already has a CPU port. Thus remove the condition of dst->cpu_dp. Moreover, the next lines access dst->cpu_dp unconditionally. Signed-off-by: Vivien Didelot <vivien.dide...@savoirfairelinux.com> --- net/dsa/dsa2.c | 14 +-

[PATCH net-next 2/4] net: dsa: setup master ethtool unconditionally

2017-09-19 Thread Vivien Didelot
When a DSA switch tree is meant to be applied, it already has a CPU port. Thus remove the condition of dst->cpu_dp. Moreover, the next lines access dst->cpu_dp unconditionally. Signed-off-by: Vivien Didelot --- net/dsa/dsa2.c | 14 +- 1 file changed, 5 insertions(+), 9 del

[PATCH net-next 3/4] net: dsa: setup master ethtool after dsa_ptr

2017-09-19 Thread Vivien Didelot
cleared. Signed-off-by: Vivien Didelot <vivien.dide...@savoirfairelinux.com> --- net/dsa/dsa2.c | 12 +++- net/dsa/legacy.c | 10 +++--- 2 files changed, 10 insertions(+), 12 deletions(-) diff --git a/net/dsa/dsa2.c b/net/dsa/dsa2.c index bd19304f862f..032f8bc3e788 100644 ---

[PATCH net-next 3/4] net: dsa: setup master ethtool after dsa_ptr

2017-09-19 Thread Vivien Didelot
cleared. Signed-off-by: Vivien Didelot --- net/dsa/dsa2.c | 12 +++- net/dsa/legacy.c | 10 +++--- 2 files changed, 10 insertions(+), 12 deletions(-) diff --git a/net/dsa/dsa2.c b/net/dsa/dsa2.c index bd19304f862f..032f8bc3e788 100644 --- a/net/dsa/dsa2.c +++ b/net/dsa/dsa2.c

[PATCH net-next 1/4] net: dsa: remove copy of master ethtool_ops

2017-09-19 Thread Vivien Didelot
as well as its needed functions before calling them. Signed-off-by: Vivien Didelot <vivien.dide...@savoirfairelinux.com> --- include/net/dsa.h | 1 - net/dsa/dsa.c | 8 net/dsa/slave.c | 19 +++ 3 files changed, 15 insertions(+), 13 deletions(-) diff --git a/i

[PATCH net-next 1/4] net: dsa: remove copy of master ethtool_ops

2017-09-19 Thread Vivien Didelot
as well as its needed functions before calling them. Signed-off-by: Vivien Didelot --- include/net/dsa.h | 1 - net/dsa/dsa.c | 8 net/dsa/slave.c | 19 +++ 3 files changed, 15 insertions(+), 13 deletions(-) diff --git a/include/net/dsa.h b/include/net/dsa.h index

Re: [PATCH net-next v2 02/10] net: dsa: debugfs: add tree

2017-09-08 Thread Vivien Didelot
ks, Vivien -- Beginning of the patch -- This commit adds the boiler plate to create a DSA related debug filesystem entry as well as a "tree" file, containing the tree index. # cat switch1/tree 0 Signed-off-by: Vivien Didelot <vivien.dide...@savoirfairelinux.com> Reviewed-b

Re: [PATCH net-next v2 02/10] net: dsa: debugfs: add tree

2017-09-08 Thread Vivien Didelot
ks, Vivien -- Beginning of the patch -- This commit adds the boiler plate to create a DSA related debug filesystem entry as well as a "tree" file, containing the tree index. # cat switch1/tree 0 Signed-off-by: Vivien Didelot Reviewed-by: Florian Fai

Re: [PATCH net-next v2 02/10] net: dsa: debugfs: add tree

2017-09-08 Thread Vivien Didelot
Hi Greg, Can I ask for a quick review of this patch as well? It's the one adding the boilerplate for a single debugfs file, and I'm pretty sure it can be reduced somehow. Also more important, you will notice what seems to be a bug to me: I can read or write a file even if I didn't mask the

Re: [PATCH net-next v2 02/10] net: dsa: debugfs: add tree

2017-09-08 Thread Vivien Didelot
Hi Greg, Can I ask for a quick review of this patch as well? It's the one adding the boilerplate for a single debugfs file, and I'm pretty sure it can be reduced somehow. Also more important, you will notice what seems to be a bug to me: I can read or write a file even if I didn't mask the

Re: [PATCH net-next v2 01/10] net: dsa: add debugfs interface

2017-09-08 Thread Vivien Didelot
Hi Greg, Greg KH writes: > I agree you shouldn't be using debugfs for this, but in the future, if > you do write debugfs code, please take the following review into > account: Humm sorry I may not have given enough details. This was really meant for debug and dev

Re: [PATCH net-next v2 01/10] net: dsa: add debugfs interface

2017-09-08 Thread Vivien Didelot
Hi Greg, Greg KH writes: > I agree you shouldn't be using debugfs for this, but in the future, if > you do write debugfs code, please take the following review into > account: Humm sorry I may not have given enough details. This was really meant for debug and dev only, because DSA makes it

Re: [PATCH RFC 0/6] Modify KSZ9477 DSA driver in preparation to add other KSZ switch drivers.

2017-09-08 Thread Vivien Didelot
Hi Tristram, tristram...@microchip.com writes: > From: Tristram Ha > > This series of patches is to modify the original KSZ9477 DSA driver so that > other KSZ switch drivers can be added and use the common code. Please see

Re: [PATCH RFC 0/6] Modify KSZ9477 DSA driver in preparation to add other KSZ switch drivers.

2017-09-08 Thread Vivien Didelot
Hi Tristram, tristram...@microchip.com writes: > From: Tristram Ha > > This series of patches is to modify the original KSZ9477 DSA driver so that > other KSZ switch drivers can be added and use the common code. Please see Documentation/process/submitting-patches.rst. Use a correct formatting

[PATCH net-next 1/4] net: dsa: introduce dsa_master

2017-08-31 Thread Vivien Didelot
to a dsa_port (i.e. the switch device side) and a pointer to the master interface (i.e. the SoC CPU side). The structure will be extended with master-specific data such as the tagging operations or the master ethtool_ops copies. Signed-off-by: Vivien Didelot <vivien.dide...@savoirfairelinux.

[PATCH net-next 1/4] net: dsa: introduce dsa_master

2017-08-31 Thread Vivien Didelot
to a dsa_port (i.e. the switch device side) and a pointer to the master interface (i.e. the SoC CPU side). The structure will be extended with master-specific data such as the tagging operations or the master ethtool_ops copies. Signed-off-by: Vivien Didelot --- drivers/net/dsa/b53/b53_common.c | 4

[PATCH net-next 2/4] net: dsa: move master ethtool ops in dsa_master

2017-08-31 Thread Vivien Didelot
. Also the ethtool ops were the only remaining users for master->port->netdev thus remove this assignment now. Signed-off-by: Vivien Didelot <vivien.dide...@savoirfairelinux.com> --- include/net/dsa.h | 9 ++--- net/dsa/dsa.c | 28 -- net/dsa/dsa2.c | 4

[PATCH net-next 2/4] net: dsa: move master ethtool ops in dsa_master

2017-08-31 Thread Vivien Didelot
. Also the ethtool ops were the only remaining users for master->port->netdev thus remove this assignment now. Signed-off-by: Vivien Didelot --- include/net/dsa.h | 9 ++--- net/dsa/dsa.c | 28 -- net/dsa/dsa2.c | 4 +- net/dsa/dsa_priv.h | 5 +-- net/dsa/le

[PATCH net-next 3/4] net: dsa: change dsa_ptr for a dsa_master

2017-08-31 Thread Vivien Didelot
operations are specific to the DSA master port and not the whole switch tree, move the tag_ops pointer in dsa_master. Finally change the dsa_ptr from dsa_switch_tree to a dsa_master. Signed-off-by: Vivien Didelot <vivien.dide...@savoirfairelinux.com> --- include/linux/netdevice.h | 4 ++-- i

[PATCH net-next 3/4] net: dsa: change dsa_ptr for a dsa_master

2017-08-31 Thread Vivien Didelot
operations are specific to the DSA master port and not the whole switch tree, move the tag_ops pointer in dsa_master. Finally change the dsa_ptr from dsa_switch_tree to a dsa_master. Signed-off-by: Vivien Didelot --- include/linux/netdevice.h | 4 ++-- include/net/dsa.h

[PATCH net-next 0/4] net: dsa: add master interface

2017-08-31 Thread Vivien Didelot
copy and the tagging protocol used to pass frames with the associated slave ports. The dsa_ptr is changed to a dsa_master instance, and each DSA slave now has a pointer to a master port. This is a step forward better control over the CPU conduit and support for multiple CPU ports. Vivien Didelot

[PATCH net-next 0/4] net: dsa: add master interface

2017-08-31 Thread Vivien Didelot
copy and the tagging protocol used to pass frames with the associated slave ports. The dsa_ptr is changed to a dsa_master instance, and each DSA slave now has a pointer to a master port. This is a step forward better control over the CPU conduit and support for multiple CPU ports. Vivien Didelot

[PATCH net-next 4/4] net: dsa: assign a master to slave ports

2017-08-31 Thread Vivien Didelot
Because each DSA slave port may use a different DSA master port, add a pointer to a master in the slave structure. This is a preparatory patch for multiple CPU ports. Signed-off-by: Vivien Didelot <vivien.dide...@savoirfairelinux.com> --- net/dsa/dsa_priv.h | 7 ++- net/dsa/slave.c

[PATCH net-next 4/4] net: dsa: assign a master to slave ports

2017-08-31 Thread Vivien Didelot
Because each DSA slave port may use a different DSA master port, add a pointer to a master in the slave structure. This is a preparatory patch for multiple CPU ports. Signed-off-by: Vivien Didelot --- net/dsa/dsa_priv.h | 7 ++- net/dsa/slave.c| 33 ++--- 2

Re: [PATCH net-next v2 00/10] net: dsa: add generic debugfs interface

2017-08-29 Thread Vivien Didelot
Hi David, Jiri, Jiri Pirko <j...@resnulli.us> writes: > Tue, Aug 29, 2017 at 06:38:37AM CEST, da...@davemloft.net wrote: >>From: Vivien Didelot <vivien.dide...@savoirfairelinux.com> >>Date: Mon, 28 Aug 2017 15:17:38 -0400 >> >>> This patch series ad

Re: [PATCH net-next v2 00/10] net: dsa: add generic debugfs interface

2017-08-29 Thread Vivien Didelot
Hi David, Jiri, Jiri Pirko writes: > Tue, Aug 29, 2017 at 06:38:37AM CEST, da...@davemloft.net wrote: >>From: Vivien Didelot >>Date: Mon, 28 Aug 2017 15:17:38 -0400 >> >>> This patch series adds a generic debugfs interface for the DSA >>> framework,

[PATCH net-next v2 07/10] net: dsa: restore mdb dump

2017-08-28 Thread Vivien Didelot
The same dsa_fdb_dump_cb_t callback is used since there is no distinction to do between FDB and MDB entries at this layer. Implement mv88e6xxx_port_mdb_dump so that multicast addresses associated to a switch port can be dumped. Signed-off-by: Vivien Didelot <vivien.dide...@savoirfairelinux.

[PATCH net-next v2 07/10] net: dsa: restore mdb dump

2017-08-28 Thread Vivien Didelot
The same dsa_fdb_dump_cb_t callback is used since there is no distinction to do between FDB and MDB entries at this layer. Implement mv88e6xxx_port_mdb_dump so that multicast addresses associated to a switch port can be dumped. Signed-off-by: Vivien Didelot Reviewed-by: Andrew Lunn

[PATCH net-next v2 01/10] net: dsa: add debugfs interface

2017-08-28 Thread Vivien Didelot
:00 port5 drwxr-xr-x 2 root root 0 Jan 1 00:00 port6 Future patches will add entry files to these directories. Signed-off-by: Vivien Didelot <vivien.dide...@savoirfairelinux.com> --- include/net/dsa.h | 7 net/dsa/Kconfig| 14 +++ net/dsa/Makefile | 1 + net/dsa/deb

[PATCH net-next v2 01/10] net: dsa: add debugfs interface

2017-08-28 Thread Vivien Didelot
:00 port5 drwxr-xr-x 2 root root 0 Jan 1 00:00 port6 Future patches will add entry files to these directories. Signed-off-by: Vivien Didelot --- include/net/dsa.h | 7 net/dsa/Kconfig| 14 +++ net/dsa/Makefile | 1 + net/dsa/debugfs.c | 118

[PATCH net-next v2 08/10] net: dsa: debugfs: add port mdb

2017-08-28 Thread Vivien Didelot
Add a debug filesystem "mdb" entry to query a port's hardware MDB entries through the .port_mdb_dump switch operation. This is really convenient to query directly the hardware or inspect DSA or CPU links, since these ports are not exposed to userspace. Signed-off-by: Vivien Didelot &l

[PATCH net-next v2 08/10] net: dsa: debugfs: add port mdb

2017-08-28 Thread Vivien Didelot
Add a debug filesystem "mdb" entry to query a port's hardware MDB entries through the .port_mdb_dump switch operation. This is really convenient to query directly the hardware or inspect DSA or CPU links, since these ports are not exposed to userspace. Signed-off-by: Vivien Didelot

[PATCH net-next v2 10/10] net: dsa: debugfs: add port vlan

2017-08-28 Thread Vivien Didelot
a CPU port: # cat port5/vlan vid 1 untagged pvid vid 42 tagged Signed-off-by: Vivien Didelot <vivien.dide...@savoirfairelinux.com> Reviewed-by: Florian Fainelli <f.faine...@gmail.com> Reviewed-by: Andrew Lunn <and...@lunn.ch> --- net/dsa/debugfs.c | 29 +

[PATCH net-next v2 10/10] net: dsa: debugfs: add port vlan

2017-08-28 Thread Vivien Didelot
a CPU port: # cat port5/vlan vid 1 untagged pvid vid 42 tagged Signed-off-by: Vivien Didelot Reviewed-by: Florian Fainelli Reviewed-by: Andrew Lunn --- net/dsa/debugfs.c | 29 + 1 file changed, 29 insertions(+) diff --git a/net/dsa/debugfs.c

[PATCH net-next v2 02/10] net: dsa: debugfs: add tree

2017-08-28 Thread Vivien Didelot
This commit adds the boiler plate to create a DSA related debug filesystem entry as well as a "tree" file, containing the tree index. # cat switch1/tree 0 Signed-off-by: Vivien Didelot <vivien.dide...@savoirfairelinux.com> Reviewed-by: Florian Fainelli <f.faine...@

[PATCH net-next v2 02/10] net: dsa: debugfs: add tree

2017-08-28 Thread Vivien Didelot
This commit adds the boiler plate to create a DSA related debug filesystem entry as well as a "tree" file, containing the tree index. # cat switch1/tree 0 Signed-off-by: Vivien Didelot Reviewed-by: Florian Fainelli Reviewed-by: Andrew Lunn --- net/dsa/debug

[PATCH net-next v2 00/10] net: dsa: add generic debugfs interface

2017-08-28 Thread Vivien Didelot
otocol to string helper - use %pM to print MAC addresses - explicit "tagged" VLANs Vivien Didelot (10): net: dsa: add debugfs interface net: dsa: debugfs: add tree net: dsa: debugfs: add tag_protocol net: dsa: debugfs: add port stats net: dsa: debugfs: add port regs net: d

[PATCH net-next v2 00/10] net: dsa: add generic debugfs interface

2017-08-28 Thread Vivien Didelot
otocol to string helper - use %pM to print MAC addresses - explicit "tagged" VLANs Vivien Didelot (10): net: dsa: add debugfs interface net: dsa: debugfs: add tree net: dsa: debugfs: add tag_protocol net: dsa: debugfs: add port stats net: dsa: debugfs: add port regs net: d

[PATCH net-next v2 09/10] net: dsa: restore VLAN dump

2017-08-28 Thread Vivien Didelot
This commit defines a dsa_vlan_dump_cb_t callback, similar to the FDB dump callback and partly reverts commit a0b6b8c9fa3c ("net: dsa: Remove support for vlan dump from DSA's drivers") to restore the DSA drivers VLAN dump operations. Signed-off-by: Vivien Didelot &l

[PATCH net-next v2 09/10] net: dsa: restore VLAN dump

2017-08-28 Thread Vivien Didelot
This commit defines a dsa_vlan_dump_cb_t callback, similar to the FDB dump callback and partly reverts commit a0b6b8c9fa3c ("net: dsa: Remove support for vlan dump from DSA's drivers") to restore the DSA drivers VLAN dump operations. Signed-off-by: Vivien Didelot Reviewed-by: Floria

[PATCH net-next v2 03/10] net: dsa: debugfs: add tag_protocol

2017-08-28 Thread Vivien Didelot
tocol enum to a string. Signed-off-by: Vivien Didelot <vivien.dide...@savoirfairelinux.com> --- include/net/dsa.h | 26 ++ net/dsa/debugfs.c | 23 +++ 2 files changed, 49 insertions(+) diff --git a/include/net/dsa.h b/include/net/dsa.h index 7341178319

[PATCH net-next v2 03/10] net: dsa: debugfs: add tag_protocol

2017-08-28 Thread Vivien Didelot
tocol enum to a string. Signed-off-by: Vivien Didelot --- include/net/dsa.h | 26 ++ net/dsa/debugfs.c | 23 +++ 2 files changed, 49 insertions(+) diff --git a/include/net/dsa.h b/include/net/dsa.h index 7341178319f5..1309ba0376ae 100644 --- a/include/net/d

[PATCH net-next v2 04/10] net: dsa: debugfs: add port stats

2017-08-28 Thread Vivien Didelot
n_discards : 0 sw_in_filtered : 0 sw_in_filtered : 0 sw_out_filtered : 0 sw_out_filtered : 216 Signed-off-by: Vivien Didelot <vivien.dide...@savoirfairelinux.com> Reviewed-by: Florian Fainelli <f.faine...@gmail.com> Reviewed-by: Andre

[PATCH net-next v2 05/10] net: dsa: debugfs: add port regs

2017-08-28 Thread Vivien Didelot
00 Signed-off-by: Vivien Didelot <vivien.dide...@savoirfairelinux.com> Reviewed-by: Florian Fainelli <f.faine...@gmail.com> Reviewed-by: Andrew Lunn <and...@lunn.ch> --- net/dsa/debugfs.c | 39 +++ 1 file changed, 39 insertions(+) diff --git a

[PATCH net-next v2 04/10] net: dsa: debugfs: add port stats

2017-08-28 Thread Vivien Didelot
n_discards : 0 sw_in_filtered : 0 sw_in_filtered : 0 sw_out_filtered : 0 sw_out_filtered : 216 Signed-off-by: Vivien Didelot Reviewed-by: Florian Fainelli Reviewed-by: Andrew Lunn --- net/dsa/debugfs.c | 43

[PATCH net-next v2 05/10] net: dsa: debugfs: add port regs

2017-08-28 Thread Vivien Didelot
00 Signed-off-by: Vivien Didelot Reviewed-by: Florian Fainelli Reviewed-by: Andrew Lunn --- net/dsa/debugfs.c | 39 +++ 1 file changed, 39 insertions(+) diff --git a/net/dsa/debugfs.c b/net/dsa/debugfs.c index 997bbc8eb502..7b299c9d9892 100644 --- a/net/dsa

[PATCH net-next v2 06/10] net: dsa: debugfs: add port fdb

2017-08-28 Thread Vivien Didelot
2:34:56:78:90:ab unicast static Signed-off-by: Vivien Didelot <vivien.dide...@savoirfairelinux.com> Reviewed-by: Florian Fainelli <f.faine...@gmail.com> Reviewed-by: Andrew Lunn <and...@lunn.ch> --- net/dsa/debugfs.c | 31 +++ 1 file changed, 31 ins

[PATCH net-next v2 06/10] net: dsa: debugfs: add port fdb

2017-08-28 Thread Vivien Didelot
2:34:56:78:90:ab unicast static Signed-off-by: Vivien Didelot Reviewed-by: Florian Fainelli Reviewed-by: Andrew Lunn --- net/dsa/debugfs.c | 31 +++ 1 file changed, 31 insertions(+) diff --git a/net/dsa/debugfs.c b/net/dsa/debugfs.c index 7b299c9d9892..59c09a67b

[PATCH net-next 06/11] net: dsa: debugfs: add port registers

2017-08-14 Thread Vivien Didelot
00 Signed-off-by: Vivien Didelot <vivien.dide...@savoirfairelinux.com> --- net/dsa/debugfs.c | 39 +++ 1 file changed, 39 insertions(+) diff --git a/net/dsa/debugfs.c b/net/dsa/debugfs.c index 5f91b4423404..012fcf466cc1 100644 --- a/net/dsa/debugfs

[PATCH net-next 05/11] net: dsa: debugfs: add port stats

2017-08-14 Thread Vivien Didelot
n_discards : 0 sw_in_filtered : 0 sw_in_filtered : 0 sw_out_filtered : 0 sw_out_filtered : 216 Signed-off-by: Vivien Didelot <vivien.dide...@savoirfairelinux.com> --- net/dsa/debugfs.c | 43 +++ 1

[PATCH net-next 06/11] net: dsa: debugfs: add port registers

2017-08-14 Thread Vivien Didelot
00 Signed-off-by: Vivien Didelot --- net/dsa/debugfs.c | 39 +++ 1 file changed, 39 insertions(+) diff --git a/net/dsa/debugfs.c b/net/dsa/debugfs.c index 5f91b4423404..012fcf466cc1 100644 --- a/net/dsa/debugfs.c +++ b/net/dsa/debugfs.c @@ -109,6 +109,40 @@

[PATCH net-next 05/11] net: dsa: debugfs: add port stats

2017-08-14 Thread Vivien Didelot
n_discards : 0 sw_in_filtered : 0 sw_in_filtered : 0 sw_out_filtered : 0 sw_out_filtered : 216 Signed-off-by: Vivien Didelot --- net/dsa/debugfs.c | 43 +++ 1 file changed, 43 insertions(+) diff --git

[PATCH net-next 07/11] net: dsa: debugfs: add port fdb

2017-08-14 Thread Vivien Didelot
12:34:56:78:90:abstaticunicast Signed-off-by: Vivien Didelot <vivien.dide...@savoirfairelinux.com> --- net/dsa/debugfs.c | 36 1 file changed, 36 insertions(+) diff --git a/net/dsa/debugfs.c b/net/dsa/debugfs.c index 012fcf466cc1..8204c62dc9c1

[PATCH net-next 07/11] net: dsa: debugfs: add port fdb

2017-08-14 Thread Vivien Didelot
12:34:56:78:90:abstaticunicast Signed-off-by: Vivien Didelot --- net/dsa/debugfs.c | 36 1 file changed, 36 insertions(+) diff --git a/net/dsa/debugfs.c b/net/dsa/debugfs.c index 012fcf466cc1..8204c62dc9c1 100644 --- a/net/dsa/debugfs.c +++ b/net/dsa

[PATCH net-next 02/11] net: dsa: add debugfs interface

2017-08-14 Thread Vivien Didelot
:00 port5 drwxr-xr-x 2 root root 0 Jan 1 00:00 port6 Future patches will add entry files to these directories. Signed-off-by: Vivien Didelot <vivien.dide...@savoirfairelinux.com> --- include/net/dsa.h | 7 net/dsa/Kconfig| 14 +++ net/dsa/Makefile | 1 + net/dsa/deb

[PATCH net-next 02/11] net: dsa: add debugfs interface

2017-08-14 Thread Vivien Didelot
:00 port5 drwxr-xr-x 2 root root 0 Jan 1 00:00 port6 Future patches will add entry files to these directories. Signed-off-by: Vivien Didelot --- include/net/dsa.h | 7 net/dsa/Kconfig| 14 +++ net/dsa/Makefile | 1 + net/dsa/debugfs.c | 121

[PATCH net-next 08/11] net: dsa: restore mdb dump

2017-08-14 Thread Vivien Didelot
The same dsa_fdb_dump_cb_t callback is used since there is no distinction to do between FDB and MDB entries at this layer. Implement mv88e6xxx_port_mdb_dump so that multicast addresses associated to a switch port can be dumped. Signed-off-by: Vivien Didelot <vivien.dide...@savoirfairelinux.

[PATCH net-next 08/11] net: dsa: restore mdb dump

2017-08-14 Thread Vivien Didelot
The same dsa_fdb_dump_cb_t callback is used since there is no distinction to do between FDB and MDB entries at this layer. Implement mv88e6xxx_port_mdb_dump so that multicast addresses associated to a switch port can be dumped. Signed-off-by: Vivien Didelot --- drivers/net/dsa/mv88e6xxx/chip.c

[PATCH net-next 10/11] net: dsa: restore VLAN dump

2017-08-14 Thread Vivien Didelot
This commit defines a dsa_vlan_dump_cb_t callback, similar to the FDB dump callback and partly reverts commit a0b6b8c9fa3c ("net: dsa: Remove support for vlan dump from DSA's drivers") to restore the DSA drivers VLAN dump operations. Signed-off-by: Vivien Didelot &l

[PATCH net-next 10/11] net: dsa: restore VLAN dump

2017-08-14 Thread Vivien Didelot
This commit defines a dsa_vlan_dump_cb_t callback, similar to the FDB dump callback and partly reverts commit a0b6b8c9fa3c ("net: dsa: Remove support for vlan dump from DSA's drivers") to restore the DSA drivers VLAN dump operations. Signed-off-by: Vivien Didelot --- drivers/n

[PATCH net-next 11/11] net: dsa: debugfs: add port vlan

2017-08-14 Thread Vivien Didelot
a CPU port: # cat port5/vlan vid 1 vid 42 pvid Signed-off-by: Vivien Didelot <vivien.dide...@savoirfairelinux.com> --- net/dsa/debugfs.c | 33 + 1 file changed, 33 insertions(+) diff --git a/net/dsa/debugfs.c b/net/dsa/debugfs.c index 98c5068d20

[PATCH net-next 11/11] net: dsa: debugfs: add port vlan

2017-08-14 Thread Vivien Didelot
a CPU port: # cat port5/vlan vid 1 vid 42 pvid Signed-off-by: Vivien Didelot --- net/dsa/debugfs.c | 33 + 1 file changed, 33 insertions(+) diff --git a/net/dsa/debugfs.c b/net/dsa/debugfs.c index 98c5068d20da..b00942368d29 100644 --- a/net/dsa/debug

[PATCH net-next 09/11] net: dsa: debugfs: add port mdb

2017-08-14 Thread Vivien Didelot
Add a debug filesystem "mdb" entry to query a port's hardware MDB entries through the .port_mdb_dump switch operation. This is really convenient to query directly the hardware or inspect DSA or CPU links, since these ports are not exposed to userspace. Signed-off-by: Vivien Didelot &l

[PATCH net-next 09/11] net: dsa: debugfs: add port mdb

2017-08-14 Thread Vivien Didelot
Add a debug filesystem "mdb" entry to query a port's hardware MDB entries through the .port_mdb_dump switch operation. This is really convenient to query directly the hardware or inspect DSA or CPU links, since these ports are not exposed to userspace. Signed-off-by: Vivien Didelot --

[PATCH net-next 00/11] net: dsa: add generic debugfs interface

2017-08-14 Thread Vivien Didelot
: 6: 005f 6: 003f 7: 002a 7: 002a ... where switch0 port5 and port6 are CPU and DSA ports of a ZII Rev B. Vivien Didelot (11): net: dsa: legacy: assign dst->applied net: dsa: add debugfs interface net: dsa: debugfs: add t

[PATCH net-next 04/11] net: dsa: debugfs: add tag_protocol

2017-08-14 Thread Vivien Didelot
Add a debug filesystem "tag_protocol" entry to query the switch tagging protocol through the .get_tag_protocol operation. # cat switch1/tag_protocol EDSA Signed-off-by: Vivien Didelot <vivien.dide...@savoirfairelinux.com> --- net/ds

[PATCH net-next 00/11] net: dsa: add generic debugfs interface

2017-08-14 Thread Vivien Didelot
: 6: 005f 6: 003f 7: 002a 7: 002a ... where switch0 port5 and port6 are CPU and DSA ports of a ZII Rev B. Vivien Didelot (11): net: dsa: legacy: assign dst->applied net: dsa: add debugfs interface net: dsa: debugfs: add t

[PATCH net-next 04/11] net: dsa: debugfs: add tag_protocol

2017-08-14 Thread Vivien Didelot
Add a debug filesystem "tag_protocol" entry to query the switch tagging protocol through the .get_tag_protocol operation. # cat switch1/tag_protocol EDSA Signed-off-by: Vivien Didelot --- net/dsa/debugfs.c | 54 ++ 1 file c

[PATCH net-next 03/11] net: dsa: debugfs: add tree

2017-08-14 Thread Vivien Didelot
This commit adds the boiler plate to create a DSA related debug filesystem entry as well as a "tree" file, containing the tree index. # cat switch1/tree 0 Signed-off-by: Vivien Didelot <vivien.dide...@savoirfairelinux.com> --- net/dsa

[PATCH net-next 03/11] net: dsa: debugfs: add tree

2017-08-14 Thread Vivien Didelot
This commit adds the boiler plate to create a DSA related debug filesystem entry as well as a "tree" file, containing the tree index. # cat switch1/tree 0 Signed-off-by: Vivien Didelot --- net/dsa/debugfs.c | 108 ++ 1 fi

[PATCH net-next 01/11] net: dsa: legacy: assign dst->applied

2017-08-14 Thread Vivien Didelot
The "applied" boolean of the dsa_switch_tree is only set in the new bindings. This patch sets it in the legacy code as well. Signed-off-by: Vivien Didelot <vivien.dide...@savoirfairelinux.com> --- net/dsa/legacy.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/net/dsa/le

[PATCH net-next 01/11] net: dsa: legacy: assign dst->applied

2017-08-14 Thread Vivien Didelot
The "applied" boolean of the dsa_switch_tree is only set in the new bindings. This patch sets it in the legacy code as well. Signed-off-by: Vivien Didelot --- net/dsa/legacy.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/net/dsa/legacy.c b/net/dsa/legacy.c index 91

[PATCH net] net: dsa: ksz: fix skb freeing

2017-08-09 Thread Vivien Didelot
is not freed, and the original skb will be freed twice. To fix that, move skb_put_padto inside both branches of the skb_tailroom condition, before freeing the original skb, and free the copy on error. Signed-off-by: Vivien Didelot <vivien.dide...@savoirfairelinux.com> --- net/dsa/tag_ksz.

[PATCH net] net: dsa: ksz: fix skb freeing

2017-08-09 Thread Vivien Didelot
is not freed, and the original skb will be freed twice. To fix that, move skb_put_padto inside both branches of the skb_tailroom condition, before freeing the original skb, and free the copy on error. Signed-off-by: Vivien Didelot --- net/dsa/tag_ksz.c | 13 + 1 file changed, 9 insertions

Re: [PATCH 0/4] net-next: dsa: fix flow dissection

2017-08-09 Thread Vivien Didelot
letter.) The commit title prefix represents the most impacted subsystem, here "net: dsa: xxx" would map the net/dsa/ or drivers/net/dsa directories. Other than that, the whole patchset LGTM: Reviewed-by: Vivien Didelot <vivien.dide...@savoirfairelinux.com> Thanks, Vivien

<    1   2   3   4   5   6   7   8   9   10   >