Re: [PATCH iproute2-next v2 0/2] bridge: vlan: add compressvlans manpage

2024-03-22 Thread Nikolay Aleksandrov
On 3/22/24 14:39, Date Huang wrote: Hi maintainers I followed Nikolay and Jiri's comment and updated the patch to v2. Please check it. Your cover letter should contain an overview of what the set is doing. Date Huang (2): bridge: vlan: fix compressvlans usage bridge: vlan: add

Re: [PATCH iproute2-next v2 1/2] bridge: vlan: fix compressvlans usage

2024-03-22 Thread Nikolay Aleksandrov
tamp] | -n[etns] name |\n" -"-c[ompressvlans] -color -p[retty] -j[son] }\n"); +"-com[pressvlans] -c[olor] -p[retty] -j[son] }\n"); exit(-1); } Acked-by: Nikolay Aleksandrov

Re: [PATCH iproute2-next v2 2/2] bridge: vlan: fix compressvlans usage

2024-03-22 Thread Nikolay Aleksandrov
On 3/22/24 14:39, Date Huang wrote: Add the missing 'compressvlans' to man page Signed-off-by: Date Huang --- man/man8/bridge.8 | 6 ++ 1 file changed, 6 insertions(+) diff --git a/man/man8/bridge.8 b/man/man8/bridge.8 index eeea4073..bb02bd27 100644 --- a/man/man8/bridge.8 +++

Re: [PATCH] bridge: vlan: fix compressvlans manpage and usage

2024-03-22 Thread Nikolay Aleksandrov
On 3/22/24 10:56, Date Huang wrote: Add the missing 'compressvlans' to man page. Fix the incorrect short opt for compressvlans and color in usage. Signed-off-by: Date Huang --- Hi, This should be targeted at iproute2. Nit below, bridge/bridge.c | 2 +- man/man8/bridge.8 | 5 + 2

Re: [PATCH net-next 9/9] selftests: vxlan_mdb: Add MDB bulk deletion test

2023-12-18 Thread Nikolay Aleksandrov
insertions(+), 2 deletions(-) Acked-by: Nikolay Aleksandrov

Re: [PATCH net-next 8/9] selftests: bridge_mdb: Add MDB bulk deletion test

2023-12-18 Thread Nikolay Aleksandrov
insertions(+), 2 deletions(-) Acked-by: Nikolay Aleksandrov

Re: [PATCH net-next 7/9] rtnetlink: bridge: Enable MDB bulk deletion

2023-12-18 Thread Nikolay Aleksandrov
); rtnl_register(PF_BRIDGE, RTM_NEWMDB, rtnl_mdb_add, NULL, 0); - rtnl_register(PF_BRIDGE, RTM_DELMDB, rtnl_mdb_del, NULL, 0); + rtnl_register(PF_BRIDGE, RTM_DELMDB, rtnl_mdb_del, NULL, + RTNL_FLAG_BULK_DEL_SUPPORTED); } Acked-by: Nikolay Aleksandrov

Re: [PATCH net-next 6/9] vxlan: mdb: Add MDB bulk deletion support

2023-12-18 Thread Nikolay Aleksandrov
/vxlan/vxlan_mdb.c | 174 +- drivers/net/vxlan/vxlan_private.h | 2 + 3 files changed, 153 insertions(+), 24 deletions(-) Acked-by: Nikolay Aleksandrov

Re: [PATCH net-next 5/9] bridge: mdb: Add MDB bulk deletion support

2023-12-18 Thread Nikolay Aleksandrov
| 133 net/bridge/br_private.h | 8 +++ 3 files changed, 142 insertions(+) Acked-by: Nikolay Aleksandrov

Re: [PATCH net-next 4/9] rtnetlink: bridge: Invoke MDB bulk deletion when needed

2023-12-18 Thread Nikolay Aleksandrov
l_bulk(dev, tb, extack); + } + if (!dev->netdev_ops->ndo_mdb_del) { NL_SET_ERR_MSG(extack, "Device does not support MDB operations"); return -EOPNOTSUPP; Acked-by: Nikolay Aleksandrov

Re: [PATCH net-next 3/9] net: Add MDB bulk deletion device operation

2023-12-18 Thread Nikolay Aleksandrov
sk_buff *skb, struct netlink_callback *cb); Acked-by: Nikolay Aleksandrov

Re: [PATCH net-next 2/9] rtnetlink: bridge: Use a different policy for MDB bulk delete

2023-12-18 Thread Nikolay Aleksandrov
++-- 1 file changed, 49 insertions(+), 2 deletions(-) Acked-by: Nikolay Aleksandrov

Re: [PATCH net-next 1/9] bridge: add MDB state mask uAPI attribute

2023-12-18 Thread Nikolay Aleksandrov
, }; #define MDBE_ATTR_MAX (__MDBE_ATTR_MAX - 1) Acked-by: Nikolay Aleksandrov

[Bridge] [PATCH net-next] net: bridge: fill in MODULE_DESCRIPTION()

2023-10-27 Thread Nikolay Aleksandrov
Fill in bridge's module description. Suggested-by: Jakub Kicinski Signed-off-by: Nikolay Aleksandrov --- net/bridge/br.c | 1 + 1 file changed, 1 insertion(+) diff --git a/net/bridge/br.c b/net/bridge/br.c index a6e94ceb7c9a..cda9d7871f72 100644 --- a/net/bridge/br.c +++ b/net/bridge/br.c

Re: [Bridge] [PATCH net-next v2 09/13] bridge: mcast: Add MDB get support

2023-10-26 Thread Nikolay Aleksandrov
/br_private.h | 9 +++ 3 files changed, 168 insertions(+) Acked-by: Nikolay Aleksandrov

Re: [Bridge] [PATCH net-next v2 07/13] bridge: add MDB get uAPI attributes

2023-10-26 Thread Nikolay Aleksandrov
] u32 Signed-off-by: Ido Schimmel --- Notes: v2: * Add comment. include/uapi/linux/if_bridge.h | 18 ++ 1 file changed, 18 insertions(+) Acked-by: Nikolay Aleksandrov

Re: [Bridge] [PATCH iproute2-next v5] iplink: bridge: Add support for bridge FDB learning limits

2023-10-19 Thread Nikolay Aleksandrov
14625-1-jnixdorf-...@avm.de/ Changes in v2: - Sent out the first corresponding iproute2 patches. - Link to v1: https://lore.kernel.org/netdev/20230515085046.4457-1-jnixdorf-...@avm.de/ --- ip/iplink_bridge.c| 21 + man/man8/ip-link.8.in | 10 ++ 2 files changed, 31 insertions(+) Acked-by: Nikolay Aleksandrov

Re: [Bridge] [PATCH net-next 09/13] bridge: mcast: Add MDB get support

2023-10-17 Thread Nikolay Aleksandrov
On 10/17/23 14:03, Ido Schimmel wrote: On Tue, Oct 17, 2023 at 12:24:44PM +0300, Nikolay Aleksandrov wrote: On 10/16/23 16:12, Ido Schimmel wrote: Implement support for MDB get operation by looking up a matching MDB entry, allocating the skb according to the entry's size and then filling

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

2023-10-17 Thread Nikolay Aleksandrov
] = { + [IFLA_BR_UNSPEC]= { .strict_start_type = + IFLA_BR_FDB_N_LEARNED }, [IFLA_BR_FORWARD_DELAY] = { .type = NLA_U32 }, [IFLA_BR_HELLO_TIME]= { .type = NLA_U32 }, [IFLA_BR_MAX_AGE] = { .type = NLA_U32 }, Acked-by: Nikolay

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

2023-10-17 Thread Nikolay Aleksandrov
1500 [...] [...] fdb_n_learned 256 fdb_max_learned 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(-) Acked-by: Nikolay Aleksandrov

Re: [Bridge] [PATCH net-next 13/13] selftests: vxlan_mdb: Use MDB get instead of dump

2023-10-17 Thread Nikolay Aleksandrov
On 10/16/23 16:12, Ido Schimmel wrote: Test the new MDB get functionality by converting dump and grep to MDB get. Signed-off-by: Ido Schimmel --- tools/testing/selftests/net/test_vxlan_mdb.sh | 108 +- 1 file changed, 54 insertions(+), 54 deletions(-) Acked-by: Nikolay

Re: [Bridge] [PATCH net-next 12/13] selftests: bridge_mdb: Use MDB get instead of dump

2023-10-17 Thread Nikolay Aleksandrov
On 10/16/23 16:12, Ido Schimmel wrote: Test the new MDB get functionality by converting dump and grep to MDB get. Signed-off-by: Ido Schimmel --- .../selftests/net/forwarding/bridge_mdb.sh| 184 +++--- 1 file changed, 71 insertions(+), 113 deletions(-) Acked-by: Nikolay

Re: [Bridge] [PATCH net-next 11/13] rtnetlink: Add MDB get support

2023-10-17 Thread Nikolay Aleksandrov
+++- 1 file changed, 88 insertions(+), 1 deletion(-) Acked-by: Nikolay Aleksandrov

Re: [Bridge] [PATCH net-next 10/13] vxlan: mdb: Add MDB get support

2023-10-17 Thread Nikolay Aleksandrov
/vxlan_mdb.c | 150 ++ drivers/net/vxlan/vxlan_private.h | 2 + 3 files changed, 153 insertions(+) Acked-by: Nikolay Aleksandrov

Re: [Bridge] [PATCH net-next 09/13] bridge: mcast: Add MDB get support

2023-10-17 Thread Nikolay Aleksandrov
On 10/16/23 16:12, Ido Schimmel wrote: Implement support for MDB get operation by looking up a matching MDB entry, allocating the skb according to the entry's size and then filling in the response. The operation is performed under the bridge multicast lock to ensure that the entry does not

Re: [Bridge] [PATCH net-next 08/13] net: Add MDB get device operation

2023-10-17 Thread Nikolay Aleksandrov
, struct nlmsghdr *nlh, u16 flags, Acked-by: Nikolay Aleksandrov

Re: [Bridge] [PATCH net-next 07/13] bridge: add MDB get uAPI attributes

2023-10-17 Thread Nikolay Aleksandrov
On 10/16/23 16:12, Ido Schimmel wrote: Add MDB get attributes that correspond to the MDB set attributes used in RTM_NEWMDB messages. Specifically, add 'MDBA_GET_ENTRY' which will hold a 'struct br_mdb_entry' and 'MDBA_GET_ENTRY_ATTRS' which will hold 'MDBE_ATTR_*' attributes that are used as

Re: [Bridge] [PATCH net-next 06/13] vxlan: mdb: Factor out a helper for remote entry size calculation

2023-10-17 Thread Nikolay Aleksandrov
+++- 1 file changed, 19 insertions(+), 9 deletions(-) Acked-by: Nikolay Aleksandrov

Re: [Bridge] [PATCH net-next 05/13] vxlan: mdb: Adjust function arguments

2023-10-17 Thread Nikolay Aleksandrov
--- drivers/net/vxlan/vxlan_mdb.c | 10 -- 1 file changed, 4 insertions(+), 6 deletions(-) Acked-by: Nikolay Aleksandrov

Re: [Bridge] [PATCH net-next 04/13] bridge: mcast: Rename MDB entry get function

2023-10-17 Thread Nikolay Aleksandrov
+- net/bridge/br_input.c | 2 +- net/bridge/br_multicast.c | 5 +++-- net/bridge/br_private.h | 10 ++ 4 files changed, 11 insertions(+), 8 deletions(-) Acked-by: Nikolay Aleksandrov

Re: [Bridge] [PATCH net-next 03/13] bridge: mcast: Factor out a helper for PG entry size calculation

2023-10-17 Thread Nikolay Aleksandrov
*/ + rtnl_mdb_nlmsg_pg_size(pg); +} + void br_mdb_notify(struct net_device *dev, struct net_bridge_mdb_entry *mp, struct net_bridge_port_group *pg, Acked-by: Nikolay Aleksandrov

Re: [Bridge] [PATCH net-next 02/13] bridge: mcast: Account for missing attributes

2023-10-17 Thread Nikolay Aleksandrov
) + +/* MDBA_MDB_ENTRY_INFO */ +nla_total_size(sizeof(struct br_mdb_entry)) + +/* MDBA_MDB_EATTR_TIMER */ +nla_total_size(sizeof(u32)); if (!pg) goto out; Acked-by: Nikolay Aleksandrov

Re: [Bridge] [PATCH net-next 01/13] bridge: mcast: Dump MDB entries even when snooping is disabled

2023-10-17 Thread Nikolay Aleksandrov
; struct nlattr *nest, *nest2; - if (!br_opt_get(br, BROPT_MULTICAST_ENABLED)) - return 0; - nest = nla_nest_start_noflag(skb, MDBA_MDB); if (nest == NULL) return -EMSGSIZE; Finally! Thanks :) this has been a long-standing annoyance. Acked-by: Nikolay

Re: [Bridge] [PATCH net-next 00/11] Extend VXLAN driver to support FDB flushing

2023-10-10 Thread Nikolay Aleksandrov
h.sh Nice use of the flush api. :) The set looks good to me. For the set: Acked-by: Nikolay Aleksandrov

Re: [Bridge] [PATCH] bridge: MTU auto tuning ignores IFLA_MTU on NEWLINK

2023-09-28 Thread Nikolay Aleksandrov
On 9/27/23 11:10, Nikolay Aleksandrov wrote: On 9/27/23 10:57, Trent Lloyd wrote: Commit 804b854d374e ("net: bridge: disable bridge MTU auto tuning if it was set manually") disabled auto-tuning of the bridge MTU when the MTU was explicitly set by the user, however that would only h

Re: [Bridge] [PATCH] bridge: MTU auto tuning ignores IFLA_MTU on NEWLINK

2023-09-27 Thread Nikolay Aleksandrov
On 9/27/23 11:10, Nikolay Aleksandrov wrote: On 9/27/23 10:57, Trent Lloyd wrote: Commit 804b854d374e ("net: bridge: disable bridge MTU auto tuning if it was set manually") disabled auto-tuning of the bridge MTU when the MTU was explicitly set by the user, however that would only h

Re: [Bridge] [PATCH] bridge: MTU auto tuning ignores IFLA_MTU on NEWLINK

2023-09-27 Thread Nikolay Aleksandrov
On 9/27/23 10:57, Trent Lloyd wrote: Commit 804b854d374e ("net: bridge: disable bridge MTU auto tuning if it was set manually") disabled auto-tuning of the bridge MTU when the MTU was explicitly set by the user, however that would only happen when the MTU was set after creation. This commit

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

2023-09-21 Thread Nikolay Aleksandrov
On 9/21/23 15:41, Nikolay Aleksandrov wrote: On 9/19/23 11:12, Johannes Nixdorf wrote: The previous patch added accounting and a limit for the number of dynamically learned FDB entries per bridge. However it did not provide means to actually configure those bounds or read back the count

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

2023-09-21 Thread Nikolay Aleksandrov
On 9/19/23 11:12, Johannes Nixdorf wrote: The previous patch added accounting and a limit for the number of dynamically learned FDB entries per bridge. However it did not provide means to actually configure those bounds or read back the count. This patch does that. Two new netlink attributes

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

2023-09-21 Thread Nikolay Aleksandrov
On 9/21/23 11:06, Johannes Nixdorf wrote: 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

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

2023-09-21 Thread Nikolay Aleksandrov
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 added to br_policy to be parsed strictly, to prevent userspace from passing garbage. Signed-off-by: Johannes Nixdorf

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

2023-09-20 Thread Nikolay Aleksandrov
/bridge_fdb_learning_limit.sh| 283 + 2 files changed, 285 insertions(+), 1 deletion(-) Always nice to see new tests. Thanks, Acked-by: Nikolay Aleksandrov

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

2023-09-20 Thread Nikolay Aleksandrov
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 created bridges by default. The limit is only a soft default setting and overrideable on a per bridge basis

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

2023-09-20 Thread Nikolay Aleksandrov
On 9/19/23 11:12, Johannes Nixdorf wrote: The previous patch added accounting and a limit for the number of dynamically learned FDB entries per bridge. However it did not provide means to actually configure those bounds or read back the count. This patch does that. Two new netlink attributes

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

2023-09-20 Thread Nikolay Aleksandrov
yes on this one. Acked-by: Nikolay Aleksandrov

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

2023-09-20 Thread Nikolay Aleksandrov
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 Nixdorf --- net/bridge/br_netlink.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/net/bridge/br_netlink.c

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

2023-09-20 Thread Nikolay Aleksandrov
- fdb->used = jiffies; if (modified) { if (refresh) Acked-by: Nikolay Aleksandrov

Re: [Bridge] [PATCH net] net: bridge: use DEV_STATS_INC()

2023-09-18 Thread Nikolay Aleksandrov
Reported by Kernel Concurrency Sanitizer on: CPU: 0 PID: 14848 Comm: kworker/u4:11 Not tainted 6.6.0-rc1-syzkaller-00236-gad8a69f361b9 #0 Fixes: 1c29fc4989bc ("[BRIDGE]: keep track of received multicast packets") Reported-by: syzbot Signed-off-by: Eric Dumazet Cc: Roopa Prabhu Cc: Niko

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

2023-09-14 Thread Nikolay Aleksandrov
On 9/5/23 14:47, Johannes Nixdorf wrote: A malicious actor behind one bridge port may spam the kernel with packets with a random source MAC address, each of which will create an FDB entry, each of which is a dynamic allocation in the kernel. There are roughly 2^48 different MAC addresses,

Re: [Bridge] [PATCH] net: bridge: Fix refcnt issues in dev_ioctl

2023-08-22 Thread Nikolay Aleksandrov
On 8/20/23 01:50, Ziqi Zhao wrote: On Sat, Aug 19, 2023 at 12:25:15PM +0300, Nikolay Aleksandrov wrote: Hi Nik, Thank you so much for reviewing the patch and getting back to me! IIRC there was no bug, it was a false-positive. The reference is held a bit longer but then released, so the device

Re: [Bridge] [PATCH] net: bridge: Fix refcnt issues in dev_ioctl

2023-08-19 Thread Nikolay Aleksandrov
Hi Ziqi, On 8/19/23 11:10, Ziqi Zhao wrote: In the bug reported by Syzbot, certain bridge devices would have a leaked reference created by race conditions in dev_ioctl, specifically, under SIOCBRADDIF or SIOCBRDELIF operations. The reference leak would How would it leak a reference, could you

Re: [Bridge] [PATCH net-next] bridge: Remove unused declaration br_multicast_set_hash_max()

2023-07-27 Thread Nikolay Aleksandrov
st *brmctx, unsigned long val); #if IS_ENABLED(CONFIG_IPV6) Acked-by: Nikolay Aleksandrov

Re: [Bridge] [RFC PATCH net-next 3/4] bridge: Add backup nexthop ID support

2023-07-13 Thread Nikolay Aleksandrov
On 13/07/2023 12:33, Nikolay Aleksandrov wrote: On 13/07/2023 10:09, Ido Schimmel wrote: Add a new bridge port attribute that allows attaching a nexthop object ID to an skb that is redirected to a backup bridge port with VLAN tunneling enabled. Specifically, when redirecting a known unicast

Re: [Bridge] [RFC PATCH net-next 4/4] selftests: net: Add bridge backup port and backup nexthop ID test

2023-07-13 Thread Nikolay Aleksandrov
/selftests/net/Makefile | 1 + .../selftests/net/test_bridge_backup_port.sh | 759 ++ 2 files changed, 760 insertions(+) create mode 100755 tools/testing/selftests/net/test_bridge_backup_port.sh Well explained Acked-by: Nikolay Aleksandrov

Re: [Bridge] [RFC PATCH net-next 3/4] bridge: Add backup nexthop ID support

2023-07-13 Thread Nikolay Aleksandrov
Acked-by: Nikolay Aleksandrov diff --git a/include/uapi/linux/if_link.h b/include/uapi/linux/if_link.h index 0f6a0fe09bdb..ce3117df9cec 100644 --- a/include/uapi/linux/if_link.h +++ b/include/uapi/linux/if_link.h @@ -570,6 +570,7 @@ enum { IFLA_BRPORT_MCAST_N_GROUPS

Re: [Bridge] [RFC PATCH net-next 2/4] vxlan: Add support for nexthop ID metadata

2023-07-13 Thread Nikolay Aleksandrov
associated with this ID. Signed-off-by: Ido Schimmel --- drivers/net/vxlan/vxlan_core.c | 44 ++ 1 file changed, 44 insertions(+) LGTM Acked-by: Nikolay Aleksandrov

Re: [Bridge] [RFC PATCH net-next 1/4] ip_tunnels: Add nexthop ID field to ip_tunnel_key

2023-07-13 Thread Nikolay Aleksandrov
*/ + u32 nhid; __be16 tp_src; __be16 tp_dst; __u8flow_flags; Reviewed-by: Nikolay Aleksandrov

Re: [Bridge] [PATCH v2 net] bridge: Add extack warning when enabling STP in netns.

2023-07-12 Thread Nikolay Aleksandrov
ge/br_stp_if.c > @@ -201,6 +201,9 @@ int br_stp_set_enabled(struct net_bridge *br, unsigned > long val, > { > ASSERT_RTNL(); > > + if (!net_eq(dev_net(br->dev), _net)) > + NL_SET_ERR_MSG_MOD(extack, "STP does not work in non-root > netns"); > + > if (br_mrp_enabled(br)) { > NL_SET_ERR_MSG_MOD(extack, > "STP can't be enabled if MRP is already > enabled"); Thanks, Acked-by: Nikolay Aleksandrov

Re: [Bridge] [PATCH v1 net] bridge: Return an error when enabling STP in netns.

2023-07-12 Thread Nikolay Aleksandrov
On 12/07/2023 17:48, Ido Schimmel wrote: > On Tue, Jul 11, 2023 at 04:54:15PM -0700, Kuniyuki Iwashima wrote: >> When we create an L2 loop on a bridge in netns, we will see packets storm >> even if STP is enabled. >> >> # unshare -n >> # ip link add br0 type bridge >> # ip link add veth0

Re: [Bridge] [PATCH v1 net] bridge: Return an error when enabling STP in netns.

2023-07-12 Thread Nikolay Aleksandrov
, _net)) { > + NL_SET_ERR_MSG_MOD(extack, "STP can't be enabled in non-root > netns"); > + return -EINVAL; > + } > + > if (br_mrp_enabled(br)) { > NL_SET_ERR_MSG_MOD(extack, > "STP can't b

Re: [Bridge] [PATCH net-next v2 2/3] bridge: Add a limit on learned FDB entries

2023-06-22 Thread Nikolay Aleksandrov
On 22/06/2023 15:27, Nikolay Aleksandrov wrote: > On 20/06/2023 16:35, Johannes Nixdorf wrote: >> On Tue, Jun 20, 2023 at 09:55:31AM +0300, Nikolay Aleksandrov wrote: >>> On 6/19/23 10:14, Johannes Nixdorf wrote: >>>> +/* Set a FDB flag that implies the entr

Re: [Bridge] [PATCH net-next v2 2/3] bridge: Add a limit on learned FDB entries

2023-06-22 Thread Nikolay Aleksandrov
On 20/06/2023 16:35, Johannes Nixdorf wrote: > On Tue, Jun 20, 2023 at 09:55:31AM +0300, Nikolay Aleksandrov wrote: >> On 6/19/23 10:14, Johannes Nixdorf wrote: >>> +/* Set a FDB flag that implies the entry was not learned, and account >>> + * for ch

Re: [Bridge] [PATCH net-next v2 3/3] net: bridge: Add a configurable default FDB learning limit

2023-06-20 Thread Nikolay Aleksandrov
On 6/19/23 10:14, Johannes Nixdorf wrote: This adds 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 overridable per bridge using

Re: [Bridge] [PATCH net-next v2 2/3] bridge: Add a limit on learned FDB entries

2023-06-20 Thread Nikolay Aleksandrov
On 6/19/23 10:14, Johannes Nixdorf wrote: A malicious actor behind one bridge port may spam the kernel with packets with a random source MAC address, each of which will create an FDB entry, each of which is a dynamic allocation in the kernel. There are roughly 2^48 different MAC addresses,

Re: [Bridge] [PATCH iproute2 3/7] bridge: make print_vlan_info static

2023-06-01 Thread Nikolay Aleksandrov
LAN, > @@ -1309,7 +1310,7 @@ static int vlan_global_show(int argc, char **argv) > return 0; > } > > -void print_vlan_info(struct rtattr *tb, int ifindex) > +static void print_vlan_info(struct rtattr *tb, int ifindex) > { > struct rtattr *i, *list = tb; > int rem = RTA_PAYLOAD(list); Thanks, Acked-by: Nikolay Aleksandrov

Re: [Bridge] [PATCH net-next v2 7/8] mlxsw: spectrum_flower: Add ability to match on layer 2 miss

2023-05-29 Thread Nikolay Aleksandrov
.h| 3 ++- > .../net/ethernet/mellanox/mlxsw/spectrum_acl_flex_keys.c| 2 ++ > drivers/net/ethernet/mellanox/mlxsw/spectrum_flower.c | 6 ++ > 4 files changed, 7 insertions(+), 5 deletions(-) > Reviewed-by: Nikolay Aleksandrov

Re: [Bridge] [PATCH net-next v2 6/8] mlxsw: spectrum_flower: Do not force matching on iif

2023-05-29 Thread Nikolay Aleksandrov
index != 0x) { > NL_SET_ERR_MSG_MOD(extack, "Unsupported ingress ifindex mask"); > return -EINVAL; Reviewed-by: Nikolay Aleksandrov

Re: [Bridge] [PATCH net-next v2 5/8] mlxsw: spectrum_flower: Split iif parsing to a separate function

2023-05-29 Thread Nikolay Aleksandrov
ate function to avoid nesting. No > functional changes intended. > > Signed-off-by: Ido Schimmel > --- > > Notes: > v2: > * New patch. > > .../ethernet/mellanox/mlxsw/spectrum_flower.c | 54 +++ > 1 file changed, 33 insertions(+), 21 deletions(-) > Reviewed-by: Nikolay Aleksandrov

Re: [Bridge] [PATCH net-next v2 8/8] selftests: forwarding: Add layer 2 miss test cases

2023-05-29 Thread Nikolay Aleksandrov
r. > > .../testing/selftests/net/forwarding/Makefile | 1 + > .../net/forwarding/tc_flower_l2_miss.sh | 350 ++ > 2 files changed, 351 insertions(+) > create mode 100755 > tools/testing/selftests/net/forwarding/tc_flower_l2_miss.sh Reviewed-by: Nikolay Aleksandrov

Re: [Bridge] [PATCH net-next v2 3/8] net/sched: flower: Allow matching on layer 2 miss

2023-05-29 Thread Nikolay Aleksandrov
> > # ./tc_skb_ext_tc.py > tc_skb_ext_tc reference count is 0 > > Signed-off-by: Ido Schimmel > --- > > Notes: > v2: > * Split flow_dissector changes to a previous patch. > * Use tc skb extension instead of 'skb->l2_miss'. > > include/uapi/linux/pkt_cls.h | 2 ++ > net/sched/cls_flower.c | 30 -- > 2 files changed, 30 insertions(+), 2 deletions(-) Reviewed-by: Nikolay Aleksandrov

Re: [Bridge] [PATCH net-next v2 2/8] flow_dissector: Dissect layer 2 miss from tc skb extension

2023-05-29 Thread Nikolay Aleksandrov
ssector.h | 2 ++ > net/core/flow_dissector.c| 10 ++ > 2 files changed, 12 insertions(+) > Reviewed-by: Nikolay Aleksandrov

Re: [Bridge] [PATCH net-next v2 1/8] skbuff: bridge: Add layer 2 miss indication

2023-05-29 Thread Nikolay Aleksandrov
t; v2: > * Use tc skb extension instead of adding a bit to the skb. > * Do not mark broadcast packets as they never perform a lookup and > therefore never incur a miss. > > include/linux/skbuff.h | 1 + > net/bridge/br_device.c | 1 + > net/bridge/br_forward.c | 3 +++ > net/bridge/br_input.c | 1 + > net/bridge/br_private.h | 27 +++ > 5 files changed, 33 insertions(+) > Nice approach. Acked-by: Nikolay Aleksandrov

Re: [Bridge] [PATCH net-next 1/5] skbuff: bridge: Add layer 2 miss indication

2023-05-23 Thread Nikolay Aleksandrov
On 23/05/2023 11:10, Ido Schimmel wrote: > On Fri, May 19, 2023 at 02:52:18PM -0700, Jakub Kicinski wrote: >> On Fri, 19 May 2023 16:51:48 +0300 Ido Schimmel wrote: >>> diff --git a/net/bridge/br_input.c b/net/bridge/br_input.c >>> index fc17b9fd93e6..274e55455b15 100644 >>> ---

Re: [Bridge] [PATCH net-next 1/5] skbuff: bridge: Add layer 2 miss indication

2023-05-21 Thread Nikolay Aleksandrov
On 19/05/2023 16:51, Ido Schimmel wrote: > On Thu, May 18, 2023 at 07:08:47PM +0300, Nikolay Aleksandrov wrote: >> On 18/05/2023 14:33, Ido Schimmel wrote: >>> diff --git a/net/bridge/br_input.c b/net/bridge/br_input.c >>> index fc17b9fd93e6..d8ab5890cbe6 100644 >

Re: [Bridge] [PATCH net-next 1/5] skbuff: bridge: Add layer 2 miss indication

2023-05-18 Thread Nikolay Aleksandrov
On 18/05/2023 14:33, Ido Schimmel wrote: > Allow the bridge driver to mark packets that did not match a layer 2 > entry during forwarding by adding a 'l2_miss' bit to the skb. > > Clear the bit whenever a packet enters the bridge (received from a > bridge port or transmitted via the bridge) and

Re: [Bridge] [PATCH 3/4] bridge: always declare tunnel functions

2023-05-17 Thread Nikolay Aleksandrov
> 1 file changed, 4 insertions(+), 4 deletions(-) > This should be for -net. Fixes: 188c67dd1906 ("net: bridge: vlan options: add support for tunnel id dumping") Fixes: 569da0822808 ("net: bridge: vlan options: add support for tunnel mapping set/del") Acked-by: Nikolay Aleksandrov Thanks, Nik

Re: [Bridge] [PATCH net-next 1/2] bridge: Add a limit on FDB entries

2023-05-16 Thread Nikolay Aleksandrov
On 16/05/2023 14:10, Vladimir Oltean wrote: > On Tue, May 16, 2023 at 02:04:30PM +0300, Nikolay Aleksandrov wrote: >> That was one of the questions actually. More that I'm thinking about this, >> the more >> I want to break it apart by type because we discussed being able

Re: [Bridge] [PATCH net-next 1/2] bridge: Add a limit on FDB entries

2023-05-16 Thread Nikolay Aleksandrov
On 16/05/2023 13:55, Vladimir Oltean wrote: > On Tue, May 16, 2023 at 01:47:47PM +0300, Nikolay Aleksandrov wrote: >> Having the current count is just a helper, if you have a high limit dumping >> the table >> and counting might take awhile. Thanks for the feedback, then we'l

Re: [Bridge] [PATCH net-next 1/2] bridge: Add a limit on FDB entries

2023-05-16 Thread Nikolay Aleksandrov
On 16/05/2023 13:44, Vladimir Oltean wrote: > On Tue, May 16, 2023 at 01:32:05PM +0300, Nikolay Aleksandrov wrote: >> Let's take a step back, I wasn't suggesting we start with a full-fledged >> switchdev >> implementation. :) I meant only to see if the minimum global lim

Re: [Bridge] [PATCH net-next 1/2] bridge: Add a limit on FDB entries

2023-05-16 Thread Nikolay Aleksandrov
On 16/05/2023 13:21, Vladimir Oltean wrote: > Hi, > > On Tue, May 16, 2023 at 11:56:41AM +0300, Nikolay Aleksandrov wrote: >> Hmm.. perhaps we can add a flag mask of entries to count. Initially it can be >> only dynamic entries. We should include more people in this di

Re: [Bridge] [PATCH net-next 1/2] bridge: Add a limit on FDB entries

2023-05-16 Thread Nikolay Aleksandrov
On 16/05/2023 11:53, Johannes Nixdorf wrote: > On Tue, May 16, 2023 at 11:38:11AM +0300, Nikolay Aleksandrov wrote: >> On 15/05/2023 11:50, Johannes Nixdorf wrote: >>> A malicious actor behind one bridge port may spam the kernel with packets >>> with a random source

Re: [Bridge] [PATCH net-next 1/2] bridge: Add a limit on FDB entries

2023-05-16 Thread Nikolay Aleksandrov
On 15/05/2023 11:50, Johannes Nixdorf wrote: > A malicious actor behind one bridge port may spam the kernel with packets > with a random source MAC address, each of which will create an FDB entry, > each of which is a dynamic allocation in the kernel. > > There are roughly 2^48 different MAC

Re: [Bridge] [PATCH net-next 1/2] bridge: Add a limit on FDB entries

2023-05-16 Thread Nikolay Aleksandrov
On 16/05/2023 11:12, Johannes Nixdorf wrote: [snip] >>> return -EMSGSIZE; >>> >>> #ifdef CONFIG_BRIDGE_VLAN_FILTERING >>> diff --git a/net/bridge/br_private.h b/net/bridge/br_private.h >>> index 2119729ded2b..64fb359c6e3e 100644 >>> --- a/net/bridge/br_private.h >>> +++

Re: [Bridge] [PATCH net-next 2/2] bridge: Add a sysctl to limit new brides FDB entries

2023-05-16 Thread Nikolay Aleksandrov
On 15/05/2023 14:27, Johannes Nixdorf wrote: > On Mon, May 15, 2023 at 12:35:47PM +0300, Nikolay Aleksandrov wrote: >> On 15/05/2023 11:50, Johannes Nixdorf wrote: >>> This is a convenience setting, which allows the administrator to limit >>> the default limit of

Re: [Bridge] [PATCH net-next 1/2] bridge: Add a limit on FDB entries

2023-05-16 Thread Nikolay Aleksandrov
On 16/05/2023 11:12, Johannes Nixdorf wrote: > Hi, > > On Mon, May 15, 2023 at 12:35:03PM +0300, Nikolay Aleksandrov wrote: >> On 15/05/2023 11:50, Johannes Nixdorf wrote: >>> A malicious actor behind one bridge port may spam the kernel with packets >>> with

Re: [Bridge] [PATCH net-next 2/2] bridge: Add a sysctl to limit new brides FDB entries

2023-05-15 Thread Nikolay Aleksandrov
vate.h | 9 + > 3 files changed, 95 insertions(+), 1 deletion(-) > The bridge doesn't need private sysctls. Netlink is enough. Nacked-by: Nikolay Aleksandrov

Re: [Bridge] [PATCH net-next 1/2] bridge: Add a limit on FDB entries

2023-05-15 Thread Nikolay Aleksandrov
On 15/05/2023 11:50, Johannes Nixdorf wrote: > A malicious actor behind one bridge port may spam the kernel with packets > with a random source MAC address, each of which will create an FDB entry, > each of which is a dynamic allocation in the kernel. > > There are roughly 2^48 different MAC

Re: [Bridge] [Question] Any plan to write/update the bridge doc?

2023-04-25 Thread Nikolay Aleksandrov
On 24/04/2023 18:46, Ido Schimmel wrote: > On Mon, Apr 24, 2023 at 05:25:08PM +0800, Hangbin Liu wrote: >> Hi, >> >> Maybe someone already has asked. The only official Linux bridge document I >> got is a very ancient wiki page[1] or the ip link man page[2][3]. As there >> are >> many bridge

Re: [Bridge] [RFC PATCH net-next 0/9] bridge: Add per-{Port, VLAN} neighbor suppression

2023-04-19 Thread Nikolay Aleksandrov
.c | 1 + > net/bridge/br_vlan_options.c | 20 +- > net/core/rtnetlink.c | 2 +- > tools/testing/selftests/net/Makefile | 1 + > .../net/test_bridge_neigh_suppress.sh | 862 ++ > 15 files changed, 936 insertions(+), 19 deletions(-) > create mode 100755 tools/testing/selftests/net/test_bridge_neigh_suppress.sh > The set looks good to me, nicely split and pretty straight-forward. For the set: Acked-by: Nikolay Aleksandrov

Re: [Bridge] [PATCH net-next] net/bridge: add drop reasons for bridge forwarding

2023-04-11 Thread Nikolay Aleksandrov
On 06/04/2023 14:30, yang.yan...@zte.com.cn wrote: > From: xu xin > > This creates six drop reasons as follows, which will help users know the > specific reason why bridge drops the packets when forwarding. > > 1) SKB_DROP_REASON_BRIDGE_FWD_NO_BACKUP_PORT: failed to get a backup >port link

Re: [Bridge] [PATCH v2 net-next 6/6] selftests: forwarding: add dynamic FDB test

2023-03-30 Thread Nikolay Aleksandrov
On 30/03/2023 13:29, Hans Schultz wrote: > On Thu, Mar 30, 2023 at 09:37, Ido Schimmel wrote: >> On Tue, Mar 28, 2023 at 09:30:08PM +0200, Hans Schultz wrote: >>> >>> Sorry, but I have sent you several emails telling you about the problems >>> I have with running the selftests due to changes in

Re: [Bridge] Multicast: handling of STA disconnect

2023-03-20 Thread Nikolay Aleksandrov
rsion in their own FW to reduce CPU. > > So, the best way is to have MCAST_TO_UCAST enabled and MDB will become > per station, so we can delete MDB on disconnect. Shall, I create one > patch for review? > > Thanks, > UjjaL Roy > > On Mon, Mar 20, 2023 at 5:38 PM Nikolay

Re: [Bridge] Multicast: handling of STA disconnect

2023-03-20 Thread Nikolay Aleksandrov
On 20/03/2023 13:45, Ujjal Roy wrote: > Hi Nikolay, > > I have some query on multicast. When streams running on an STA and STA > disconnected due to some reason. So, until the MDB is timed out the > stream will be forwarded to the port and in turn to the driver and > dropps there as no such STA.

Re: [Bridge] [PATCH net-next v2 09/11] vxlan: Add MDB data path support

2023-03-16 Thread Nikolay Aleksandrov
| 15 > drivers/net/vxlan/vxlan_mdb.c | 114 ++ > drivers/net/vxlan/vxlan_private.h | 6 ++ > 3 files changed, 135 insertions(+) > Reviewed-by: Nikolay Aleksandrov

Re: [Bridge] [PATCH net-next 11/11] selftests: net: Add VXLAN MDB test

2023-03-14 Thread Nikolay Aleksandrov
sting/selftests/net/config|1 + > tools/testing/selftests/net/test_vxlan_mdb.sh | 2318 + > 3 files changed, 2320 insertions(+) > create mode 100755 tools/testing/selftests/net/test_vxlan_mdb.sh > Wohoo, nice! Reviewed-by: Nikolay Aleksandrov

Re: [Bridge] [PATCH net-next 10/11] vxlan: Enable MDB support

2023-03-14 Thread Nikolay Aleksandrov
ndo_fdb_get= vxlan_fdb_get, > + .ndo_mdb_add= vxlan_mdb_add, > + .ndo_mdb_del= vxlan_mdb_del, > + .ndo_mdb_dump = vxlan_mdb_dump, > .ndo_fill_metadata_dst = vxlan_fill_metadata_dst, > }; > Reviewed-by: Nikolay Aleksandrov

Re: [Bridge] [PATCH net-next 09/11] vxlan: Add MDB data path support

2023-03-14 Thread Nikolay Aleksandrov
On 13/03/2023 16:53, Ido Schimmel wrote: > Integrate MDB support into the Tx path of the VXLAN driver, allowing it > to selectively forward IP multicast traffic according to the matched MDB > entry. > > If MDB entries are configured (i.e., 'VXLAN_F_MDB' is set) and the > packet is an IP multicast

Re: [Bridge] [PATCH net-next 08/11] vxlan: mdb: Add an internal flag to indicate MDB usage

2023-03-14 Thread Nikolay Aleksandrov
t; --- > drivers/net/vxlan/vxlan_mdb.c | 7 +++ > include/net/vxlan.h | 1 + > 2 files changed, 8 insertions(+) > Reviewed-by: Nikolay Aleksandrov

Re: [Bridge] [PATCH net-next 07/11] vxlan: mdb: Add MDB control path support

2023-03-14 Thread Nikolay Aleksandrov
xlan/vxlan_mdb.c | 1341 + > drivers/net/vxlan/vxlan_private.h | 31 + > include/net/vxlan.h |5 + > include/uapi/linux/if_bridge.h| 10 + > 6 files changed, 1396 insertions(+), 1 deletion(-) > create mode 100644 drivers/net/vxlan/vxlan_mdb.c Reviewed-by: Nikolay Aleksandrov

Re: [Bridge] [PATCH net-next 06/11] vxlan: Expose vxlan_xmit_one()

2023-03-14 Thread Nikolay Aleksandrov
gt; drivers/net/vxlan/vxlan_private.h | 2 ++ > 2 files changed, 4 insertions(+), 3 deletions(-) > Reviewed-by: Nikolay Aleksandrov

  1   2   3   4   5   6   7   8   9   10   >