Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1445740 > unrolled thread

[PATCH net] net: switchdev: change ageing_time type to clock_t

Started byVivien Didelot <vivien.didelot@savoirfairelinux.com>
First post2016-07-18 21:10 +0200
Last post2016-07-20 01:50 +0200
Articles 2 — 2 participants

Back to article view | Back to linux.kernel


Contents

  [PATCH net] net: switchdev: change ageing_time type to clock_t Vivien Didelot <vivien.didelot@savoirfairelinux.com> - 2016-07-18 21:10 +0200
    Re: [PATCH net] net: switchdev: change ageing_time type to clock_t David Miller <davem@davemloft.net> - 2016-07-20 01:50 +0200

#1445740 — [PATCH net] net: switchdev: change ageing_time type to clock_t

FromVivien Didelot <vivien.didelot@savoirfairelinux.com>
Date2016-07-18 21:10 +0200
Subject[PATCH net] net: switchdev: change ageing_time type to clock_t
Message-ID<rWm5r-1OZ-13@gated-at.bofh.it>
The switchdev value for the SWITCHDEV_ATTR_ID_BRIDGE_AGEING_TIME
attribute is a clock_t and requires to use helpers such as
clock_t_to_jiffies() to convert to milliseconds.

Change ageing_time type from u32 to clock_t to make it explicit.

Fixes: f55ac58ae64c ("switchdev: add bridge ageing_time attribute")
Signed-off-by: Vivien Didelot <vivien.didelot@savoirfairelinux.com>
---
 include/net/switchdev.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/net/switchdev.h b/include/net/switchdev.h
index 9023e3e..62f6a96 100644
--- a/include/net/switchdev.h
+++ b/include/net/switchdev.h
@@ -60,7 +60,7 @@ struct switchdev_attr {
 		struct netdev_phys_item_id ppid;	/* PORT_PARENT_ID */
 		u8 stp_state;				/* PORT_STP_STATE */
 		unsigned long brport_flags;		/* PORT_BRIDGE_FLAGS */
-		u32 ageing_time;			/* BRIDGE_AGEING_TIME */
+		clock_t ageing_time;			/* BRIDGE_AGEING_TIME */
 		bool vlan_filtering;			/* BRIDGE_VLAN_FILTERING */
 	} u;
 };
-- 
2.9.0

[toc] | [next] | [standalone]


#1446800

FromDavid Miller <davem@davemloft.net>
Date2016-07-20 01:50 +0200
Message-ID<rWMVX-22W-5@gated-at.bofh.it>
In reply to#1445740
From: Vivien Didelot <vivien.didelot@savoirfairelinux.com>
Date: Mon, 18 Jul 2016 15:02:06 -0400

> The switchdev value for the SWITCHDEV_ATTR_ID_BRIDGE_AGEING_TIME
> attribute is a clock_t and requires to use helpers such as
> clock_t_to_jiffies() to convert to milliseconds.
> 
> Change ageing_time type from u32 to clock_t to make it explicit.
> 
> Fixes: f55ac58ae64c ("switchdev: add bridge ageing_time attribute")
> Signed-off-by: Vivien Didelot <vivien.didelot@savoirfairelinux.com>

Applied.

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web