public inbox for netdev@vger.kernel.org 
 help / color / mirror / Atom feed
From: Jiri Pirko <jiri@resnulli•us>
To: netdev@vger•kernel.org
Cc: davem@davemloft•net, idosch@mellanox•com, eladr@mellanox•com,
	yotamg@mellanox•com, stephen@networkplumber•org,
	Jiri Pirko <jiri@mellanox•com>
Subject: [patch net] switchdev: bridge: Pass ageing time as clock_t instead of jiffies
Date: Mon, 21 Dec 2015 09:56:01 +0100	[thread overview]
Message-ID: <1450688161-4792-1-git-send-email-jiri@resnulli.us> (raw)

From: Ido Schimmel <idosch@mellanox•com>

The bridge's ageing time is offloaded to hardware when:
	1) A port joins a bridge
	2) The ageing time of the bridge is changed

In the first case the ageing time is offloaded as jiffies, but in the
second case it's offloaded as clock_t, which is what existing switchdev
drivers expect to receive.

Fixes: 6ac311ae8bfb ("Adding switchdev ageing notification on port bridged")
Signed-off-by: Ido Schimmel <idosch@mellanox•com>
Signed-off-by: Jiri Pirko <jiri@mellanox•com>
---
 net/bridge/br_stp_if.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/net/bridge/br_stp_if.c b/net/bridge/br_stp_if.c
index 5396ff08..12045de 100644
--- a/net/bridge/br_stp_if.c
+++ b/net/bridge/br_stp_if.c
@@ -39,7 +39,7 @@ 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,
+		.u.ageing_time = jiffies_to_clock_t(p->br->ageing_time),
 	};
 	int err;
 
-- 
2.4.3

             reply	other threads:[~2015-12-21  8:56 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-12-21  8:56 Jiri Pirko [this message]
2015-12-21 15:53 ` [patch net] switchdev: bridge: Pass ageing time as clock_t instead of jiffies David Ahern
2015-12-21 16:50   ` Ido Schimmel
2015-12-22 20:57 ` David Miller

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1450688161-4792-1-git-send-email-jiri@resnulli.us \
    --to=jiri@resnulli$(echo .)us \
    --cc=davem@davemloft$(echo .)net \
    --cc=eladr@mellanox$(echo .)com \
    --cc=idosch@mellanox$(echo .)com \
    --cc=jiri@mellanox$(echo .)com \
    --cc=netdev@vger$(echo .)kernel.org \
    --cc=stephen@networkplumber$(echo .)org \
    --cc=yotamg@mellanox$(echo .)com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox