Nikolay Aleksandrov
2022-Feb-24 11:26 UTC
[Bridge] [PATCH 1/1 net-next] net: bridge: add support for host l2 mdb entries
On 23/02/2022 19:24, Joachim Wiberg wrote:> This patch expands on the earlier work on layer-2 mdb entries by adding > support for host entries. Due to the fact that host joined entries do > not have any flag field, we infer the permanent flag when reporting the > entries to userspace, which otherwise would be listed as 'temp'. > > Before patch: > > ~# bridge mdb add dev br0 port br0 grp 01:00:00:c0:ff:ee permanent > Error: bridge: Flags are not allowed for host groups. > ~# bridge mdb add dev br0 port br0 grp 01:00:00:c0:ff:ee > Error: bridge: Only permanent L2 entries allowed. > > After patch: > > ~# bridge mdb add dev br0 port br0 grp 01:00:00:c0:ff:ee permanent > ~# bridge mdb show > dev br0 port br0 grp 01:00:00:c0:ff:ee permanent vid 1 > > Signed-off-by: Joachim Wiberg <troglobit at gmail.com> > --- > net/bridge/br_mdb.c | 8 +++++--- > 1 file changed, 5 insertions(+), 3 deletions(-) >It would be nice to add a selftest for L2 entries. You can send it as a follow-up. The patch looks good to me. Acked-by: Nikolay Aleksandrov <razor at blackwall.org>
Joachim Wiberg
2022-Feb-24 13:59 UTC
[Bridge] [PATCH 1/1 net-next] net: bridge: add support for host l2 mdb entries
On Thu, Feb 24, 2022 at 13:26, Nikolay Aleksandrov <razor at blackwall.org> wrote:> On 23/02/2022 19:24, Joachim Wiberg wrote: >> This patch expands on the earlier work on layer-2 mdb entries by adding >> support for host entries. > It would be nice to add a selftest for L2 entries. You can send it as a follow-up.OK, will do! It's on my immediate backlog. Thanks /Joachim
Jakub Kicinski
2022-Feb-24 16:06 UTC
[Bridge] [PATCH 1/1 net-next] net: bridge: add support for host l2 mdb entries
On Thu, 24 Feb 2022 13:26:22 +0200 Nikolay Aleksandrov wrote:> On 23/02/2022 19:24, Joachim Wiberg wrote: > > This patch expands on the earlier work on layer-2 mdb entries by adding > > support for host entries. Due to the fact that host joined entries do > > not have any flag field, we infer the permanent flag when reporting the > > entries to userspace, which otherwise would be listed as 'temp'. > > > > Before patch: > > > > ~# bridge mdb add dev br0 port br0 grp 01:00:00:c0:ff:ee permanent > > Error: bridge: Flags are not allowed for host groups. > > ~# bridge mdb add dev br0 port br0 grp 01:00:00:c0:ff:ee > > Error: bridge: Only permanent L2 entries allowed. > > > > After patch: > > > > ~# bridge mdb add dev br0 port br0 grp 01:00:00:c0:ff:ee permanent > > ~# bridge mdb show > > dev br0 port br0 grp 01:00:00:c0:ff:ee permanent vid 1 > > > > Signed-off-by: Joachim Wiberg <troglobit at gmail.com> > > It would be nice to add a selftest for L2 entries. You can send it as a follow-up.Let's wait for that, also checkpatch says you need to balance brackets to hold kernel coding style.> Acked-by: Nikolay Aleksandrov <razor at blackwall.org>