Subject: Re: [patch net-next v2 10/10] rocker: implement L2 bridge offloading

From: Jamal Hadi Salim <[email-masked]>
Date: Mon, 10 Nov 2014 07:27:14 -0500

On 11/10/14 03:46, Scott Feldman wrote:

>
> IFLA_BRPORT_LEARNING is u8 attr and we're only using lower bit to turn
> learning on/off.  Maybe we can use another bit to indicate learning to
> be done in sw or hw.  I don't think adding another bit would break
> existing iproute2.
>
> LEARNING_ENABLED    (1 << 0)
> LEARNING_HW              (1 << 1)
>
> Would this work?
>

Yes to making it a bit. But:
This is not *learning*. You are doing a *sync*.
Those are two different things.

Learning on/off exists today. It signals to the L2 whether you
should learn or not.
I like the way fdb_add/del work with a flag which says
it is the software and/or offloaded version. Please keep that
semantic.
What you are doing above is letting the hardware learn then
syncing to software. You need a different flag there. something
like:

SYNC_HW_FDB (1<<1)

cheers,
jamal