Re: [PATCH v2 net-next v2 12/12] net: dsa: mv88e6xxx: add support for DSA ageing time

2016-07-18 Thread Andrew Lunn
> OK. I think caching per-port (and thus per-bridge) ageing time would do > the trick and keep DSA drivers simple. What about the following patch? Hi Vivien This looks good. I would suggest you do some testing with a printk, and force some topology changes, just to make sure it works how we think

Re: [PATCH v2 net-next v2 12/12] net: dsa: mv88e6xxx: add support for DSA ageing time

2016-07-18 Thread Vivien Didelot
Hi Andrew, Andrew Lunn writes: > On Mon, Jul 18, 2016 at 03:59:38PM -0400, Vivien Didelot wrote: >> Andrew Lunn writes: >> >> >> Nope, the bridge ageing time is not per-port, even though switchdev ops >> >> are per-port by design. This is a switch-wide attribute. >> > >> > So you are saying th

Re: [PATCH v2 net-next v2 12/12] net: dsa: mv88e6xxx: add support for DSA ageing time

2016-07-18 Thread Andrew Lunn
On Mon, Jul 18, 2016 at 03:59:38PM -0400, Vivien Didelot wrote: > Andrew Lunn writes: > > >> Nope, the bridge ageing time is not per-port, even though switchdev ops > >> are per-port by design. This is a switch-wide attribute. > > > > So you are saying the core is doing all the reference counting

Re: [PATCH v2 net-next v2 12/12] net: dsa: mv88e6xxx: add support for DSA ageing time

2016-07-18 Thread Vivien Didelot
Andrew Lunn writes: >> Nope, the bridge ageing time is not per-port, even though switchdev ops >> are per-port by design. This is a switch-wide attribute. > > So you are saying the core is doing all the reference counting, etc, > when swapping between fast and slow ageing? I don't see how checki

Re: [PATCH v2 net-next v2 12/12] net: dsa: mv88e6xxx: add support for DSA ageing time

2016-07-18 Thread Andrew Lunn
> Nope, the bridge ageing time is not per-port, even though switchdev ops > are per-port by design. This is a switch-wide attribute. So you are saying the core is doing all the reference counting, etc, when swapping between fast and slow ageing? Andrew

Re: [PATCH v2 net-next v2 12/12] net: dsa: mv88e6xxx: add support for DSA ageing time

2016-07-18 Thread Vivien Didelot
Hi Andrew, Andrew Lunn writes: > This is way too simplistic. > > The switchdev call is per port. This manipulates the whole switch. We > need to somehow handle the difference. > > I've not look at the bridge code, but i assume it initially sets each > port to a long age time, probably 5 minutes.

Re: [PATCH v2 net-next v2 12/12] net: dsa: mv88e6xxx: add support for DSA ageing time

2016-07-18 Thread Andrew Lunn
On Mon, Jul 18, 2016 at 02:46:28PM -0400, Vivien Didelot wrote: > Implement the DSA driver function to configure the bridge ageing time. > > Signed-off-by: Vivien Didelot > --- > drivers/net/dsa/mv88e6xxx/chip.c | 14 ++ > 1 file changed, 14 insertions(+) > > diff --git a/drivers/ne

[PATCH v2 net-next v2 12/12] net: dsa: mv88e6xxx: add support for DSA ageing time

2016-07-18 Thread Vivien Didelot
Implement the DSA driver function to configure the bridge ageing time. Signed-off-by: Vivien Didelot --- drivers/net/dsa/mv88e6xxx/chip.c | 14 ++ 1 file changed, 14 insertions(+) diff --git a/drivers/net/dsa/mv88e6xxx/chip.c b/drivers/net/dsa/mv88e6xxx/chip.c index e2627a8..2101241