Re: [PATCH net] selftests: forwarding: skip if kernel not support setting bridge fdb learning limit

2024-07-23 Thread Johannes Nixdorf
2.45.0 Thanks for the fix. I also assumed that it's fine to depend on new features after trying to find out how those feature tests are usually done from the surrounding tests and their history. The code looks right to me, and seems to behave as expected when feeding it data with and without fdb_n_learned. Reviewed-by: Johannes Nixdorf

[PATCH net-next v5 1/5] net: bridge: Set BR_FDB_ADDED_BY_USER early in fdb_add_entry

2023-10-16 Thread Johannes Nixdorf
In preparation of the following fdb limit for dynamically learned entries, allow fdb_create to detect that the entry was added by the user. This way it can skip applying the limit in this case. Reviewed-by: Ido Schimmel Acked-by: Nikolay Aleksandrov Signed-off-by: Johannes Nixdorf --- net

[PATCH net-next v5 2/5] net: bridge: Track and limit dynamically learned FDB entries

2023-10-16 Thread Johannes Nixdorf
Ido Schimmel Acked-by: Nikolay Aleksandrov Signed-off-by: Johannes Nixdorf --- net/bridge/br_fdb.c | 35 +-- net/bridge/br_private.h | 4 2 files changed, 37 insertions(+), 2 deletions(-) diff --git a/net/bridge/br_fdb.c b/net/bridge/br_fdb.c in

[PATCH net-next v5 5/5] selftests: forwarding: bridge_fdb_learning_limit: Add a new selftest

2023-10-16 Thread Johannes Nixdorf
Add a suite covering the fdb_n_learned and fdb_max_learned bridge features, touching all special cases in accounting at least once. Acked-by: Nikolay Aleksandrov Signed-off-by: Johannes Nixdorf --- tools/testing/selftests/net/forwarding/Makefile| 3 +- .../net/forwarding

[PATCH net-next v5 0/5] bridge: Add a limit on learned FDB entries

2023-10-16 Thread Johannes Nixdorf
-by: Johannes Nixdorf --- Changes in v5: - Set IFLA_BR_FDB_N_LEARNED to NLA_REJECT (from review) - Moved the strict_start_type-commit after the netlink change, used the new attribute. (from review) - Dropped the new build time config option. (from review) - Link to v4: https

[PATCH net-next v5 4/5] net: bridge: Set strict_start_type for br_policy

2023-10-16 Thread Johannes Nixdorf
Set any new attributes added to br_policy to be parsed strictly, to prevent userspace from passing garbage. Signed-off-by: Johannes Nixdorf --- net/bridge/br_netlink.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/net/bridge/br_netlink.c b/net/bridge/br_netlink.c index 0c3cf6e6dea2

[PATCH net-next v5 3/5] net: bridge: Add netlink knobs for number / max learned FDB entries

2023-10-16 Thread Johannes Nixdorf
256 Signed-off-by: Johannes Nixdorf --- include/uapi/linux/if_link.h | 2 ++ net/bridge/br_netlink.c | 15 ++- 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/include/uapi/linux/if_link.h b/include/uapi/linux/if_link.h index ce3117df9cec..0486f314c176 100644 --- a

Re: [PATCH net-next v4 2/6] net: bridge: Set strict_start_type for br_policy

2023-09-22 Thread Johannes Nixdorf
On Thu, Sep 21, 2023 at 01:14:43PM +0300, Nikolay Aleksandrov wrote: > On 9/21/23 10:23, Johannes Nixdorf wrote: > > On Wed, Sep 20, 2023 at 01:46:02PM +0300, Nikolay Aleksandrov wrote: > > > On 9/19/23 11:12, Johannes Nixdorf wrote: > > > > Set any new attributes a

Re: [PATCH net-next v4 2/6] net: bridge: Set strict_start_type for br_policy

2023-09-21 Thread Johannes Nixdorf
On Wed, Sep 20, 2023 at 01:46:02PM +0300, Nikolay Aleksandrov wrote: > On 9/19/23 11:12, Johannes Nixdorf wrote: > > Set any new attributes added to br_policy to be parsed strictly, to > > prevent userspace from passing garbage. > > > > Signed-off-by: Johannes Nixdor

Re: [PATCH net-next v4 5/6] net: bridge: Add a configurable default FDB learning limit

2023-09-21 Thread Johannes Nixdorf
On Wed, Sep 20, 2023 at 02:00:27PM +0300, Nikolay Aleksandrov wrote: > On 9/19/23 11:12, Johannes Nixdorf wrote: > > Add a Kconfig option to configure a default FDB learning limit system > > wide, so a distributor building a special purpose kernel can limit all > > creat

Re: [PATCH net-next v4 4/6] net: bridge: Add netlink knobs for number / max learned FDB entries

2023-09-21 Thread Johannes Nixdorf
On Wed, Sep 20, 2023 at 01:50:32PM +0300, Nikolay Aleksandrov wrote: > On 9/19/23 11:12, Johannes Nixdorf wrote: > > [...] > > diff --git a/net/bridge/br_netlink.c b/net/bridge/br_netlink.c > > index 505683ef9a26..f5d49a05e61b 100644 > > --- a/net/bridge/br_net

[PATCH net-next v4 5/6] net: bridge: Add a configurable default FDB learning limit

2023-09-19 Thread Johannes Nixdorf
Add a Kconfig option to configure a default FDB learning limit system wide, so a distributor building a special purpose kernel can limit all created bridges by default. The limit is only a soft default setting and overrideable on a per bridge basis using netlink. Signed-off-by: Johannes Nixdorf

[PATCH net-next v4 1/6] net: bridge: Set BR_FDB_ADDED_BY_USER early in fdb_add_entry

2023-09-19 Thread Johannes Nixdorf
In preparation of the following fdb limit for dynamically learned entries, allow fdb_create to detect that the entry was added by the user. This way it can skip applying the limit in this case. Signed-off-by: Johannes Nixdorf --- net/bridge/br_fdb.c | 7 --- 1 file changed, 4 insertions

[RFC PATCH iproute2-next v4] iplink: bridge: Add sup20230919-fdb_limit-v4-0-1a2a59694...@avm.der bridge FDB learning limits

2023-09-19 Thread Johannes Nixdorf
linkinfo": { "info_kind": "bridge", "info_data": { ... "fdb_n_learned": 2, "fdb_max_learned": 1024, ... } }, ... } ] Signed-off-by: Johannes Nixdorf --- I will r

[PATCH net-next v4 4/6] net: bridge: Add netlink knobs for number / max learned FDB entries

2023-09-19 Thread Johannes Nixdorf
256 Signed-off-by: Johannes Nixdorf --- include/uapi/linux/if_link.h | 2 ++ net/bridge/br_netlink.c | 15 ++- 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/include/uapi/linux/if_link.h b/include/uapi/linux/if_link.h index ce3117df9cec..0486f314c176 100644 --- a

[PATCH net-next v4 0/6] bridge: Add a limit on learned FDB entries

2023-09-19 Thread Johannes Nixdorf
/ Signed-off-by: Johannes Nixdorf --- Changes in v4: - Added the new test to the Makefile. (from review) - Removed _entries from the names. (from iproute2 review, in some places only for consistency) - Wrapped the lines at 80 chars, except when longer lines are consistent with neighbouring code

[PATCH net-next v4 3/6] net: bridge: Track and limit dynamically learned FDB entries

2023-09-19 Thread Johannes Nixdorf
-by: Johannes Nixdorf --- net/bridge/br_fdb.c | 35 +-- net/bridge/br_private.h | 4 2 files changed, 37 insertions(+), 2 deletions(-) diff --git a/net/bridge/br_fdb.c b/net/bridge/br_fdb.c index f517ea92132c..cf77e71e026f 100644 --- a/net/bridge/br_fdb.c +++ b/

[PATCH net-next v4 6/6] selftests: forwarding: bridge_fdb_learning_limit: Add a new selftest

2023-09-19 Thread Johannes Nixdorf
Add a suite covering the fdb_n_learned and fdb_max_learned bridge features, touching all special cases in accounting at least once. Signed-off-by: Johannes Nixdorf --- tools/testing/selftests/net/forwarding/Makefile| 3 +- .../net/forwarding/bridge_fdb_learning_limit.sh| 283

[PATCH net-next v4 2/6] net: bridge: Set strict_start_type for br_policy

2023-09-19 Thread Johannes Nixdorf
Set any new attributes added to br_policy to be parsed strictly, to prevent userspace from passing garbage. Signed-off-by: Johannes Nixdorf --- net/bridge/br_netlink.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/net/bridge/br_netlink.c b/net/bridge/br_netlink.c index 10f0d33d8ccf