Re: [Bridge] [PATCH net-next v4 07/12] net: rtnetlink: add NLM_F_BULK support to rtnl_fdb_del

2022-04-13 Thread Ido Schimmel
On Wed, Apr 13, 2022 at 03:21:54PM +0300, Nikolay Aleksandrov wrote: > On 13/04/2022 15:20, Ido Schimmel wrote: > > On Wed, Apr 13, 2022 at 01:51:57PM +0300, Nikolay Aleksandrov wrote: > >> When NLM_F_BULK is specified in a fdb del message we need to handle it > >> differently. First since this is

Re: [Bridge] [PATCH net-next v4 07/12] net: rtnetlink: add NLM_F_BULK support to rtnl_fdb_del

2022-04-13 Thread Nikolay Aleksandrov
On 13/04/2022 15:20, Ido Schimmel wrote: > On Wed, Apr 13, 2022 at 01:51:57PM +0300, Nikolay Aleksandrov wrote: >> When NLM_F_BULK is specified in a fdb del message we need to handle it >> differently. First since this is a new call we can strictly validate the >> passed attributes, at first only

Re: [Bridge] [PATCH net-next v4 05/12] net: rtnetlink: add bulk delete support flag

2022-04-13 Thread Nikolay Aleksandrov
On 13/04/2022 15:06, Ido Schimmel wrote: > On Wed, Apr 13, 2022 at 01:51:55PM +0300, Nikolay Aleksandrov wrote: >> Add a new rtnl flag (RTNL_FLAG_BULK_DEL_SUPPORTED) which is used to >> verify that the delete operation allows bulk object deletion. Also emit >> a warning if anyone tries to set it

Re: [Bridge] [PATCH net-next v4 07/12] net: rtnetlink: add NLM_F_BULK support to rtnl_fdb_del

2022-04-13 Thread Ido Schimmel
On Wed, Apr 13, 2022 at 01:51:57PM +0300, Nikolay Aleksandrov wrote: > When NLM_F_BULK is specified in a fdb del message we need to handle it > differently. First since this is a new call we can strictly validate the > passed attributes, at first only ifindex and vlan are allowed as these > will

Re: [Bridge] [PATCH net-next v4 05/12] net: rtnetlink: add bulk delete support flag

2022-04-13 Thread Ido Schimmel
On Wed, Apr 13, 2022 at 01:51:55PM +0300, Nikolay Aleksandrov wrote: > Add a new rtnl flag (RTNL_FLAG_BULK_DEL_SUPPORTED) which is used to > verify that the delete operation allows bulk object deletion. Also emit > a warning if anyone tries to set it for non-delete kind. > > Suggested-by: David

Re: [Bridge] [PATCH net-next v4 00/12] net: bridge: add flush filtering support

2022-04-13 Thread patchwork-bot+netdevbpf
Hello: This series was applied to netdev/net-next.git (master) by David S. Miller : On Wed, 13 Apr 2022 13:51:50 +0300 you wrote: > Hi, > This patch-set adds support to specify filtering conditions for a bulk > delete (flush) operation. This version uses a new nlmsghdr delete flag > called

[Bridge] [PATCH net-next v4 12/12] net: bridge: fdb: add support for flush filtering based on ifindex and vlan

2022-04-13 Thread Nikolay Aleksandrov
Add support for fdb flush filtering based on destination ifindex and vlan id. The ifindex must either match a port's device ifindex or the bridge's. The vlan support is trivial since it's already validated by rtnl_fdb_del, we just need to fill it in. Signed-off-by: Nikolay Aleksandrov --- v2:

[Bridge] [PATCH net-next v4 10/12] net: rtnetlink: add ndm flags and state mask attributes

2022-04-13 Thread Nikolay Aleksandrov
Add ndm flags/state masks which will be used for bulk delete filtering. All of these are used by the bridge and vxlan drivers. Also minimal attr policy validation is added, it is up to ndo_fdb_del_bulk implementers to further validate them. Signed-off-by: Nikolay Aleksandrov ---

[Bridge] [PATCH net-next v4 09/12] net: bridge: fdb: add support for fine-grained flushing

2022-04-13 Thread Nikolay Aleksandrov
Add the ability to specify exactly which fdbs to be flushed. They are described by a new structure - net_bridge_fdb_flush_desc. Currently it can match on port/bridge ifindex, vlan id and fdb flags. It is used to describe the existing dynamic fdb flush operation. Note that this flush operation

[Bridge] [PATCH net-next v4 08/12] net: bridge: fdb: add ndo_fdb_del_bulk

2022-04-13 Thread Nikolay Aleksandrov
Add a minimal ndo_fdb_del_bulk implementation which flushes all entries. Support for more fine-grained filtering will be added in the following patches. Signed-off-by: Nikolay Aleksandrov --- v4: don't rename br_fdb_flush net/bridge/br_device.c | 1 + net/bridge/br_fdb.c | 23

[Bridge] [PATCH net-next v4 07/12] net: rtnetlink: add NLM_F_BULK support to rtnl_fdb_del

2022-04-13 Thread Nikolay Aleksandrov
When NLM_F_BULK is specified in a fdb del message we need to handle it differently. First since this is a new call we can strictly validate the passed attributes, at first only ifindex and vlan are allowed as these will be the initially supported filter attributes, any other attribute is rejected.

[Bridge] [PATCH net-next v4 06/12] net: add ndo_fdb_del_bulk

2022-04-13 Thread Nikolay Aleksandrov
Add a new netdev op called ndo_fdb_del_bulk, it will be later used for driver-specific bulk delete implementation dispatched from rtnetlink. The first user will be the bridge, we need it to signal to rtnetlink from the driver that we support bulk delete operation (NLM_F_BULK). Signed-off-by:

[Bridge] [PATCH net-next v4 02/12] net: rtnetlink: add helper to extract msg type's kind

2022-04-13 Thread Nikolay Aleksandrov
Add a helper which extracts the msg type's kind using the kind mask (0x3). Signed-off-by: Nikolay Aleksandrov --- v4: new patch include/net/rtnetlink.h | 6 ++ net/core/rtnetlink.c| 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/include/net/rtnetlink.h

[Bridge] [PATCH net-next v4 05/12] net: rtnetlink: add bulk delete support flag

2022-04-13 Thread Nikolay Aleksandrov
Add a new rtnl flag (RTNL_FLAG_BULK_DEL_SUPPORTED) which is used to verify that the delete operation allows bulk object deletion. Also emit a warning if anyone tries to set it for non-delete kind. Suggested-by: David Ahern Signed-off-by: Nikolay Aleksandrov --- v4: new patch

[Bridge] [PATCH net-next v4 03/12] net: rtnetlink: use BIT for flag values

2022-04-13 Thread Nikolay Aleksandrov
Use BIT to define flag values. Signed-off-by: Nikolay Aleksandrov --- v4: new patch include/net/rtnetlink.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/net/rtnetlink.h b/include/net/rtnetlink.h index c51c5ff7f7e2..0bf622409aaa 100644 ---

[Bridge] [PATCH net-next v4 01/12] net: rtnetlink: add msg kind names

2022-04-13 Thread Nikolay Aleksandrov
Add rtnl kind names instead of using raw values. We'll need to check for DEL kind later to validate bulk flag support. Signed-off-by: Nikolay Aleksandrov --- v4: new patch include/net/rtnetlink.h | 7 +++ net/core/rtnetlink.c| 6 +++--- 2 files changed, 10 insertions(+), 3 deletions(-)

[Bridge] [PATCH net-next v4 04/12] net: netlink: add NLM_F_BULK delete request modifier

2022-04-13 Thread Nikolay Aleksandrov
Add a new delete request modifier called NLM_F_BULK which, when supported, would cause the request to delete multiple objects. The flag is a convenient way to signal that a multiple delete operation is requested which can be gradually added to different delete requests. In order to make sure older

[Bridge] [PATCH net-next v4 00/12] net: bridge: add flush filtering support

2022-04-13 Thread Nikolay Aleksandrov
Hi, This patch-set adds support to specify filtering conditions for a bulk delete (flush) operation. This version uses a new nlmsghdr delete flag called NLM_F_BULK in combination with a new ndo_fdb_del_bulk op which is used to signal that the driver supports bulk deletes (that avoids pushing

Re: [Bridge] [PATCH RFC net-next 08/13] net: bridge: avoid classifying unknown multicast as mrouters_only

2022-04-13 Thread Joachim Wiberg
On Wed, Apr 13, 2022 at 12:00, Nikolay Aleksandrov wrote: > On 13/04/2022 11:55, Nikolay Aleksandrov wrote: >> On 13/04/2022 11:51, Joachim Wiberg wrote: >>> So, if I add a bridge flag, default off as you mentioned out earlier, >>> which changes the default behavior of MCAST_FLOOD, then you'd be

Re: [Bridge] [PATCH RFC net-next 01/13] net: bridge: add control of bum flooding to bridge itself

2022-04-13 Thread Joachim Wiberg
On Wed, Apr 13, 2022 at 12:58, Nikolay Aleksandrov wrote: > On 13/04/2022 12:51, Joachim Wiberg wrote: >> Interesting, you mean by speculatively setting local_rcv = true and >> postpone the decsion to br_pass_frame_up(), right? Yeah that would >> indeed be a bit more work. > Yes, I was thinking

Re: [Bridge] [PATCH RFC net-next 04/13] net: bridge: netlink support for controlling BUM flooding to bridge

2022-04-13 Thread Joachim Wiberg
On Tue, Apr 12, 2022 at 21:24, Nikolay Aleksandrov wrote: > On 11/04/2022 16:38, Joachim Wiberg wrote: >> The messy part is in br_setport(), which re-indents a large block of >> code for the port settings. To reduce code duplication a few new >> variables have been added; new_flags and dev. The

Re: [Bridge] [PATCH RFC net-next 01/13] net: bridge: add control of bum flooding to bridge itself

2022-04-13 Thread Nikolay Aleksandrov
On 13/04/2022 12:51, Joachim Wiberg wrote: > On Tue, Apr 12, 2022 at 21:27, Nikolay Aleksandrov > wrote: >> On 11/04/2022 16:38, Joachim Wiberg wrote: >>> @@ -526,6 +526,10 @@ void br_dev_setup(struct net_device *dev) >>> br->bridge_ageing_time = br->ageing_time = BR_DEFAULT_AGEING_TIME; >>>

Re: [Bridge] [PATCH RFC net-next 01/13] net: bridge: add control of bum flooding to bridge itself

2022-04-13 Thread Joachim Wiberg
On Tue, Apr 12, 2022 at 21:27, Nikolay Aleksandrov wrote: > On 11/04/2022 16:38, Joachim Wiberg wrote: >> @@ -526,6 +526,10 @@ void br_dev_setup(struct net_device *dev) >> br->bridge_ageing_time = br->ageing_time = BR_DEFAULT_AGEING_TIME; >> dev->max_mtu = ETH_MAX_MTU; >> +

Re: [Bridge] [PATCH RFC net-next 03/13] net: bridge: minor refactor of br_setlink() for readability

2022-04-13 Thread Joachim Wiberg
On Tue, Apr 12, 2022 at 21:36, Nikolay Aleksandrov wrote: > On 11/04/2022 16:38, Joachim Wiberg wrote: >> The br_setlink() function extracts the struct net_bridge pointer a bit >> sloppy. It's easy to interpret the code wrong. This patch attempts to >> clear things up a bit. > I think you can

Re: [Bridge] [PATCH RFC net-next 08/13] net: bridge: avoid classifying unknown multicast as mrouters_only

2022-04-13 Thread Nikolay Aleksandrov
On 13/04/2022 11:55, Nikolay Aleksandrov wrote: > On 13/04/2022 11:51, Joachim Wiberg wrote: >> On Tue, Apr 12, 2022 at 20:37, Nikolay Aleksandrov >> wrote: >>> On 12/04/2022 20:27, Joachim Wiberg wrote: [snip] From this I'd like to argue that our current behavior in the bridge is

Re: [Bridge] [PATCH RFC net-next 08/13] net: bridge: avoid classifying unknown multicast as mrouters_only

2022-04-13 Thread Nikolay Aleksandrov
On 13/04/2022 11:51, Joachim Wiberg wrote: > On Tue, Apr 12, 2022 at 20:37, Nikolay Aleksandrov > wrote: >> On 12/04/2022 20:27, Joachim Wiberg wrote: >>> [snip] >>> From this I'd like to argue that our current behavior in the bridge is >>> wrong. To me it's clear that, since we have a

Re: [Bridge] [PATCH RFC net-next 08/13] net: bridge: avoid classifying unknown multicast as mrouters_only

2022-04-13 Thread Joachim Wiberg
On Tue, Apr 12, 2022 at 20:37, Nikolay Aleksandrov wrote: > On 12/04/2022 20:27, Joachim Wiberg wrote: >> [snip] >> From this I'd like to argue that our current behavior in the bridge is >> wrong. To me it's clear that, since we have a confiugration option, we >> should forward unknown IP

Re: [Bridge] [PATCH net-next v3 0/8] net: bridge: add flush filtering support

2022-04-13 Thread Nikolay Aleksandrov
On 13/04/2022 05:04, David Ahern wrote: > On 4/12/22 7:22 AM, Nikolay Aleksandrov wrote: >> Hi, >> This patch-set adds support to specify filtering conditions for a bulk >> delete (flush) operation. This version uses a new nlmsghdr delete flag >> called NLM_F_BULK in combination with a new