All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH net-next] bridge: don't indicate expiry on NTF_EXT_LEARNED fdb entries
@ 2017-02-16 21:38 Roopa Prabhu
  2017-02-17  9:30 ` Ido Schimmel
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Roopa Prabhu @ 2017-02-16 21:38 UTC (permalink / raw)
  To: davem; +Cc: netdev, nikolay, jiri, idosch

From: Roopa Prabhu <roopa@cumulusnetworks.com>

added_by_external_learn fdb entries are added and expired by
external entities like switchdev driver or external controllers.
ageing is already disabled for such entries. Hence, don't
indicate expiry for such fdb entries.

CC: Nikolay Aleksandrov <nikolay@cumulusnetworks.com>
CC: Jiri Pirko <jiri@resnulli.us>
CC: Ido Schimmel <idosch@mellanox.com>
Signed-off-by: Roopa Prabhu <roopa@cumulusnetworks.com>
---
 net/bridge/br_fdb.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/net/bridge/br_fdb.c b/net/bridge/br_fdb.c
index 4ac1157..4f598dc 100644
--- a/net/bridge/br_fdb.c
+++ b/net/bridge/br_fdb.c
@@ -65,7 +65,7 @@ static inline unsigned long hold_time(const struct net_bridge *br)
 static inline int has_expired(const struct net_bridge *br,
 				  const struct net_bridge_fdb_entry *fdb)
 {
-	return !fdb->is_static &&
+	return !fdb->is_static && !fdb->added_by_external_learn &&
 		time_before_eq(fdb->updated + hold_time(br), jiffies);
 }
 
-- 
1.7.10.4

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH net-next] bridge: don't indicate expiry on NTF_EXT_LEARNED fdb entries
  2017-02-16 21:38 [PATCH net-next] bridge: don't indicate expiry on NTF_EXT_LEARNED fdb entries Roopa Prabhu
@ 2017-02-17  9:30 ` Ido Schimmel
  2017-02-17  9:36 ` Nikolay Aleksandrov
  2017-02-17 18:57 ` David Miller
  2 siblings, 0 replies; 4+ messages in thread
From: Ido Schimmel @ 2017-02-17  9:30 UTC (permalink / raw)
  To: Roopa Prabhu; +Cc: davem, netdev, nikolay, jiri, idosch

On Thu, Feb 16, 2017 at 01:38:04PM -0800, Roopa Prabhu wrote:
> From: Roopa Prabhu <roopa@cumulusnetworks.com>
> 
> added_by_external_learn fdb entries are added and expired by
> external entities like switchdev driver or external controllers.
> ageing is already disabled for such entries. Hence, don't
> indicate expiry for such fdb entries.
> 
> CC: Nikolay Aleksandrov <nikolay@cumulusnetworks.com>
> CC: Jiri Pirko <jiri@resnulli.us>
> CC: Ido Schimmel <idosch@mellanox.com>
> Signed-off-by: Roopa Prabhu <roopa@cumulusnetworks.com>

Reviewed-by: Ido Schimmel <idosch@mellanox.com>
Tested-by: Ido Schimmel <idosch@mellanox.com>

Thanks!

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH net-next] bridge: don't indicate expiry on NTF_EXT_LEARNED fdb entries
  2017-02-16 21:38 [PATCH net-next] bridge: don't indicate expiry on NTF_EXT_LEARNED fdb entries Roopa Prabhu
  2017-02-17  9:30 ` Ido Schimmel
@ 2017-02-17  9:36 ` Nikolay Aleksandrov
  2017-02-17 18:57 ` David Miller
  2 siblings, 0 replies; 4+ messages in thread
From: Nikolay Aleksandrov @ 2017-02-17  9:36 UTC (permalink / raw)
  To: Roopa Prabhu, davem; +Cc: netdev, jiri, idosch

On 16/02/17 22:38, Roopa Prabhu wrote:
> From: Roopa Prabhu <roopa@cumulusnetworks.com>
> 
> added_by_external_learn fdb entries are added and expired by
> external entities like switchdev driver or external controllers.
> ageing is already disabled for such entries. Hence, don't
> indicate expiry for such fdb entries.
> 
> CC: Nikolay Aleksandrov <nikolay@cumulusnetworks.com>
> CC: Jiri Pirko <jiri@resnulli.us>
> CC: Ido Schimmel <idosch@mellanox.com>
> Signed-off-by: Roopa Prabhu <roopa@cumulusnetworks.com>
> ---
>  net/bridge/br_fdb.c |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/net/bridge/br_fdb.c b/net/bridge/br_fdb.c
> index 4ac1157..4f598dc 100644
> --- a/net/bridge/br_fdb.c
> +++ b/net/bridge/br_fdb.c
> @@ -65,7 +65,7 @@ static inline unsigned long hold_time(const struct net_bridge *br)
>  static inline int has_expired(const struct net_bridge *br,
>  				  const struct net_bridge_fdb_entry *fdb)
>  {
> -	return !fdb->is_static &&
> +	return !fdb->is_static && !fdb->added_by_external_learn &&
>  		time_before_eq(fdb->updated + hold_time(br), jiffies);
>  }
>  
> 

Good catch,

Reviewed-by: Nikolay Aleksandrov <nikolay@cumulusnetworks.com>

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH net-next] bridge: don't indicate expiry on NTF_EXT_LEARNED fdb entries
  2017-02-16 21:38 [PATCH net-next] bridge: don't indicate expiry on NTF_EXT_LEARNED fdb entries Roopa Prabhu
  2017-02-17  9:30 ` Ido Schimmel
  2017-02-17  9:36 ` Nikolay Aleksandrov
@ 2017-02-17 18:57 ` David Miller
  2 siblings, 0 replies; 4+ messages in thread
From: David Miller @ 2017-02-17 18:57 UTC (permalink / raw)
  To: roopa; +Cc: netdev, nikolay, jiri, idosch

From: Roopa Prabhu <roopa@cumulusnetworks.com>
Date: Thu, 16 Feb 2017 13:38:04 -0800

> From: Roopa Prabhu <roopa@cumulusnetworks.com>
> 
> added_by_external_learn fdb entries are added and expired by
> external entities like switchdev driver or external controllers.
> ageing is already disabled for such entries. Hence, don't
> indicate expiry for such fdb entries.
> 
> CC: Nikolay Aleksandrov <nikolay@cumulusnetworks.com>
> CC: Jiri Pirko <jiri@resnulli.us>
> CC: Ido Schimmel <idosch@mellanox.com>
> Signed-off-by: Roopa Prabhu <roopa@cumulusnetworks.com>

Applied.

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2017-02-17 18:57 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-02-16 21:38 [PATCH net-next] bridge: don't indicate expiry on NTF_EXT_LEARNED fdb entries Roopa Prabhu
2017-02-17  9:30 ` Ido Schimmel
2017-02-17  9:36 ` Nikolay Aleksandrov
2017-02-17 18:57 ` David Miller

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.