public inbox for netdev@vger.kernel.org 
 help / color / mirror / Atom feed
From: roopa <roopa@cumulusnetworks•com>
To: Siva Mannem <siva.mannem.lnx@gmail•com>
Cc: netdev@vger•kernel.org,
	Scott Feldman <sfeldma@cumulusnetworks•com>,
	Jiri Pirko <jiri@resnulli•us>
Subject: Re: [PATCH net-next] bridge: Let bridge not age 'externally' learnt FDB entries, they are removed when 'external' entity notifies the aging
Date: Tue, 03 Feb 2015 07:11:29 -0800	[thread overview]
Message-ID: <54D0E521.6070100@cumulusnetworks.com> (raw)
In-Reply-To: <1422897714-5956-1-git-send-email-siva.mannem.lnx@gmail.com>

On 2/2/15, 9:21 AM, Siva Mannem wrote:
>   When 'learned_sync' flag is turned on, the offloaded switch
>   port syncs learned MAC addresses to bridge's FDB via switchdev notifier
>   (NETDEV_SWITCH_FDB_ADD). Currently, FDB entries learnt via this mechanism are
>   wrongly being deleted by bridge aging logic. This patch ensures that FDB
>   entries synced from offloaded switch ports are not deleted by bridging logic.
>   Such entries can only be deleted via switchdev notifier
>   (NETDEV_SWITCH_FDB_DEL).

Your patch seems right and maintains symmetry for fdb add/del of 
externally learnt entries.
However, this could be made configurable. I think some drivers may rely 
on bridge driver aging these entries (The default setting needs more 
thought).
I am not sure what rocker does (CC'ed rocker maintainers). But, our 
driver does rely on the bridge driver aging these entries by default.
>
> Signed-off-by: Siva Mannem <siva.mannem.lnx@gmail•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 08bf04b..6eb94b5 100644
> --- a/net/bridge/br_fdb.c
> +++ b/net/bridge/br_fdb.c
> @@ -280,7 +280,7 @@ void br_fdb_cleanup(unsigned long _data)
>   
>   		hlist_for_each_entry_safe(f, n, &br->hash[i], hlist) {
>   			unsigned long this_timer;
> -			if (f->is_static)
> +			if (f->is_static || f->added_by_external_learn)
>   				continue;
>   			this_timer = f->updated + delay;
>   			if (time_before_eq(this_timer, jiffies))

  reply	other threads:[~2015-02-03 15:11 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-02-02 17:21 [PATCH net-next] bridge: Let bridge not age 'externally' learnt FDB entries, they are removed when 'external' entity notifies the aging Siva Mannem
2015-02-03 15:11 ` roopa [this message]
2015-02-04  8:02   ` Siva Mannem
2015-02-04 16:19     ` roopa
2015-02-05  7:13       ` Scott Feldman
2015-02-05  7:53         ` David Miller
2015-02-05 10:26           ` Siva Mannem
2015-02-05 11:05             ` B Viswanath
2015-02-05 17:10               ` Scott Feldman
2015-02-05 17:55                 ` Scott Feldman
2015-02-05 18:31                   ` B Viswanath
2015-02-06  1:45                     ` Scott Feldman
2015-02-06  3:27                       ` Siva Mannem
2015-02-07  5:53                         ` Scott Feldman
2015-02-04 21:51 ` 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=54D0E521.6070100@cumulusnetworks.com \
    --to=roopa@cumulusnetworks$(echo .)com \
    --cc=jiri@resnulli$(echo .)us \
    --cc=netdev@vger$(echo .)kernel.org \
    --cc=sfeldma@cumulusnetworks$(echo .)com \
    --cc=siva.mannem.lnx@gmail$(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