* [PATCH net-next] Adding switchdev ageing notification on port bridged
@ 2015-10-19 12:37 Elad Raz
2015-10-19 14:07 ` Jiri Pirko
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Elad Raz @ 2015-10-19 12:37 UTC (permalink / raw)
To: Jiri Pirko, davem, netdev
Cc: Ido Schimmel, Or Gerlitz, Elad Raz, Scott Feldman, Jiri Pirko
Configure ageing time to the HW for newly bridged device
CC: Scott Feldman <sfeldma@gmail.com>
CC: Jiri Pirko <jiri@resnulli.us>
Signed-off-by: Elad Raz <eladr@mellanox.com>
---
net/bridge/br_stp_if.c | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git a/net/bridge/br_stp_if.c b/net/bridge/br_stp_if.c
index 4ca449a..fa53d7a 100644
--- a/net/bridge/br_stp_if.c
+++ b/net/bridge/br_stp_if.c
@@ -15,6 +15,7 @@
#include <linux/kmod.h>
#include <linux/etherdevice.h>
#include <linux/rtnetlink.h>
+#include <net/switchdev.h>
#include "br_private.h"
#include "br_private_stp.h"
@@ -35,11 +36,22 @@ static inline port_id br_make_port_id(__u8 priority, __u16 port_no)
/* called under bridge lock */
void br_init_port(struct net_bridge_port *p)
{
+ struct switchdev_attr attr = {
+ .id = SWITCHDEV_ATTR_ID_BRIDGE_AGEING_TIME,
+ .flags = SWITCHDEV_F_SKIP_EOPNOTSUPP | SWITCHDEV_F_DEFER,
+ .u.ageing_time = p->br->ageing_time,
+ };
+ int err;
+
p->port_id = br_make_port_id(p->priority, p->port_no);
br_become_designated_port(p);
br_set_state(p, BR_STATE_BLOCKING);
p->topology_change_ack = 0;
p->config_pending = 0;
+
+ err = switchdev_port_attr_set(p->dev, &attr);
+ if (err)
+ netdev_err(p->dev, "failed to set HW ageing time\n");
}
/* called under bridge lock */
--
2.4.3
^ permalink raw reply related [flat|nested] 4+ messages in thread* Re: [PATCH net-next] Adding switchdev ageing notification on port bridged
2015-10-19 12:37 [PATCH net-next] Adding switchdev ageing notification on port bridged Elad Raz
@ 2015-10-19 14:07 ` Jiri Pirko
2015-10-19 18:10 ` Scott Feldman
2015-10-21 14:51 ` David Miller
2 siblings, 0 replies; 4+ messages in thread
From: Jiri Pirko @ 2015-10-19 14:07 UTC (permalink / raw)
To: Elad Raz; +Cc: Jiri Pirko, davem, netdev, Ido Schimmel, Or Gerlitz,
Scott Feldman
Mon, Oct 19, 2015 at 02:37:25PM CEST, eladr@mellanox.com wrote:
>Configure ageing time to the HW for newly bridged device
>
>CC: Scott Feldman <sfeldma@gmail.com>
>CC: Jiri Pirko <jiri@resnulli.us>
>Signed-off-by: Elad Raz <eladr@mellanox.com>
Acked-by: Jiri Pirko <jiri@mellanox.com>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH net-next] Adding switchdev ageing notification on port bridged
2015-10-19 12:37 [PATCH net-next] Adding switchdev ageing notification on port bridged Elad Raz
2015-10-19 14:07 ` Jiri Pirko
@ 2015-10-19 18:10 ` Scott Feldman
2015-10-21 14:51 ` David Miller
2 siblings, 0 replies; 4+ messages in thread
From: Scott Feldman @ 2015-10-19 18:10 UTC (permalink / raw)
To: Elad Raz
Cc: Jiri Pirko, David S. Miller, Netdev, Ido Schimmel, Or Gerlitz,
Jiri Pirko
On Mon, Oct 19, 2015 at 5:37 AM, Elad Raz <eladr@mellanox.com> wrote:
> Configure ageing time to the HW for newly bridged device
>
> CC: Scott Feldman <sfeldma@gmail.com>
> CC: Jiri Pirko <jiri@resnulli.us>
> Signed-off-by: Elad Raz <eladr@mellanox.com>
Acked-by: Scott Feldman <sfeldma@gmail.com>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH net-next] Adding switchdev ageing notification on port bridged
2015-10-19 12:37 [PATCH net-next] Adding switchdev ageing notification on port bridged Elad Raz
2015-10-19 14:07 ` Jiri Pirko
2015-10-19 18:10 ` Scott Feldman
@ 2015-10-21 14:51 ` David Miller
2 siblings, 0 replies; 4+ messages in thread
From: David Miller @ 2015-10-21 14:51 UTC (permalink / raw)
To: eladr; +Cc: jiri, netdev, idosch, ogerlitz, sfeldma, jiri
From: Elad Raz <eladr@mellanox.com>
Date: Mon, 19 Oct 2015 15:37:25 +0300
> Configure ageing time to the HW for newly bridged device
>
> CC: Scott Feldman <sfeldma@gmail.com>
> CC: Jiri Pirko <jiri@resnulli.us>
> Signed-off-by: Elad Raz <eladr@mellanox.com>
Applied, thanks.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2015-10-21 14:35 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-10-19 12:37 [PATCH net-next] Adding switchdev ageing notification on port bridged Elad Raz
2015-10-19 14:07 ` Jiri Pirko
2015-10-19 18:10 ` Scott Feldman
2015-10-21 14:51 ` David Miller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox