mirror of
https://github.com/openwrt/openwrt.git
synced 2024-12-23 07:22:33 +00:00
7b7d8fe60d
Manually rebased: backport-5.10/610-v5.13-32-net-ethernet-mtk_eth_soc-add-support-for-initializin.patch hack-5.10/645-netfilter-connmark-introduce-set-dscpmark.patch Removed upstreamed: pending-5.10/706-netfilter-nf_flow_table-add-missing-locking.patch[1] All other patches automatically rebased. 1. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v5.10.157&id=b8e494240e69f91517256adcd6fda62d0671772d Signed-off-by: John Audia <therealgraysky@proton.me>
43 lines
1.5 KiB
Diff
43 lines
1.5 KiB
Diff
From ec5be4f79026282925ae383caa431a8d41e3456a Mon Sep 17 00:00:00 2001
|
|
From: Tobias Waldekranz <tobias@waldekranz.com>
|
|
Date: Sat, 16 Jan 2021 02:25:10 +0100
|
|
Subject: [PATCH] net: bridge: switchdev: Include local flag in FDB
|
|
notifications
|
|
|
|
Some switchdev drivers, notably DSA, ignore all dynamically learned
|
|
address notifications (!added_by_user) as these are autonomously added
|
|
by the switch. Previously, such a notification was indistinguishable
|
|
from a local address notification. Include a local bit in the
|
|
notification so that the two classes can be discriminated.
|
|
|
|
This allows DSA-like devices to add local addresses to the hardware
|
|
FDB (with the CPU as the destination), thereby avoiding flows towards
|
|
the CPU being flooded by the switch as unknown unicast.
|
|
|
|
Signed-off-by: Tobias Waldekranz <tobias@waldekranz.com>
|
|
---
|
|
include/net/switchdev.h | 1 +
|
|
net/bridge/br_switchdev.c | 1 +
|
|
2 files changed, 2 insertions(+)
|
|
|
|
--- a/include/net/switchdev.h
|
|
+++ b/include/net/switchdev.h
|
|
@@ -226,6 +226,7 @@ struct switchdev_notifier_fdb_info {
|
|
const unsigned char *addr;
|
|
u16 vid;
|
|
u8 added_by_user:1,
|
|
+ local:1,
|
|
offloaded:1;
|
|
};
|
|
|
|
--- a/net/bridge/br_switchdev.c
|
|
+++ b/net/bridge/br_switchdev.c
|
|
@@ -109,6 +109,7 @@ br_switchdev_fdb_notify(const struct net
|
|
.addr = fdb->key.addr.addr,
|
|
.vid = fdb->key.vlan_id,
|
|
.added_by_user = test_bit(BR_FDB_ADDED_BY_USER, &fdb->flags),
|
|
+ .local = test_bit(BR_FDB_LOCAL, &fdb->flags),
|
|
.offloaded = test_bit(BR_FDB_OFFLOADED, &fdb->flags),
|
|
};
|
|
|