net: dsa: support switchdev ageing time attr
authorVivien Didelot <vivien.didelot@savoirfairelinux.com>
Tue, 19 Jul 2016 00:45:38 +0000 (20:45 -0400)
committerDavid S. Miller <davem@davemloft.net>
Wed, 20 Jul 2016 02:42:01 +0000 (19:42 -0700)
commit34a79f63bbe49c888f95e75dd759685a238556b6
tree1ca00fd6bc27ee95e40434e2c3a6e0d5b33daf4d
parent8ec61c7f7c6c75943e8c785729bd8de3440d158c
net: dsa: support switchdev ageing time attr

Add a new function for DSA drivers to handle the switchdev
SWITCHDEV_ATTR_ID_BRIDGE_AGEING_TIME attribute.

The ageing time is passed as milliseconds.

Also because we can have multiple logical bridges on top of a physical
switch and ageing time are switch-wide, call the driver function with
the fastest ageing time in use on the chip instead of the requested one.

Signed-off-by: Vivien Didelot <vivien.didelot@savoirfairelinux.com>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/net/dsa.h
net/dsa/slave.c