mbox series

[net-next,v2,0/2] net: bridge: multicast: per-port EHT hosts limit

Message ID 20210126093533.441338-1-razor@blackwall.org
Headers show
Series net: bridge: multicast: per-port EHT hosts limit | expand

Message

Nikolay Aleksandrov Jan. 26, 2021, 9:35 a.m. UTC
From: Nikolay Aleksandrov <nikolay@nvidia.com>

Hi,
This set adds a simple configurable per-port EHT tracked hosts limit.
Patch 01 adds a default limit of 512 tracked hosts per-port, since the EHT
changes are still only in net-next that shouldn't be a problem. Then
patch 02 adds the ability to configure and retrieve the hosts limit
and to retrieve the current number of tracked hosts per port.
Let's be on the safe side and limit the number of tracked hosts by
default while allowing the user to increase that limit if needed.

v2: patch 2: move br_multicast_eht_set_hosts_limit() to br_multicast_eht.c,
             no functional change

Thanks,
 Nik

Nikolay Aleksandrov (2):
  net: bridge: multicast: add per-port EHT hosts limit
  net: bridge: multicast: make tracked EHT hosts limit configurable

 include/uapi/linux/if_link.h      |  2 ++
 net/bridge/br_multicast.c         |  1 +
 net/bridge/br_multicast_eht.c     | 22 ++++++++++++++++++++++
 net/bridge/br_netlink.c           | 19 ++++++++++++++++++-
 net/bridge/br_private.h           |  2 ++
 net/bridge/br_private_mcast_eht.h | 28 ++++++++++++++++++++++++++++
 net/bridge/br_sysfs_if.c          | 26 ++++++++++++++++++++++++++
 net/core/rtnetlink.c              |  2 +-
 8 files changed, 100 insertions(+), 2 deletions(-)

Comments

Jakub Kicinski Jan. 28, 2021, 1:42 a.m. UTC | #1
On Tue, 26 Jan 2021 11:35:31 +0200 Nikolay Aleksandrov wrote:
> From: Nikolay Aleksandrov <nikolay@nvidia.com>

> 

> Hi,

> This set adds a simple configurable per-port EHT tracked hosts limit.

> Patch 01 adds a default limit of 512 tracked hosts per-port, since the EHT

> changes are still only in net-next that shouldn't be a problem. Then

> patch 02 adds the ability to configure and retrieve the hosts limit

> and to retrieve the current number of tracked hosts per port.

> Let's be on the safe side and limit the number of tracked hosts by

> default while allowing the user to increase that limit if needed.


Applied, thanks!

I'm curious that you add those per-port sysfs files, is this a matter
of policy for the bridge? Seems a bit like a waste of memory at this
point.
patchwork-bot+netdevbpf@kernel.org Jan. 28, 2021, 2:50 a.m. UTC | #2
Hello:

This series was applied to netdev/net-next.git (refs/heads/master):

On Tue, 26 Jan 2021 11:35:31 +0200 you wrote:
> From: Nikolay Aleksandrov <nikolay@nvidia.com>

> 

> Hi,

> This set adds a simple configurable per-port EHT tracked hosts limit.

> Patch 01 adds a default limit of 512 tracked hosts per-port, since the EHT

> changes are still only in net-next that shouldn't be a problem. Then

> patch 02 adds the ability to configure and retrieve the hosts limit

> and to retrieve the current number of tracked hosts per port.

> Let's be on the safe side and limit the number of tracked hosts by

> default while allowing the user to increase that limit if needed.

> 

> [...]


Here is the summary with links:
  - [net-next,v2,1/2] net: bridge: multicast: add per-port EHT hosts limit
    https://git.kernel.org/netdev/net-next/c/89268b056ed1
  - [net-next,v2,2/2] net: bridge: multicast: make tracked EHT hosts limit configurable
    https://git.kernel.org/netdev/net-next/c/2dba407f994e

You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
Nikolay Aleksandrov Jan. 28, 2021, 9:12 a.m. UTC | #3
On 28/01/2021 03:42, Jakub Kicinski wrote:
> On Tue, 26 Jan 2021 11:35:31 +0200 Nikolay Aleksandrov wrote:

>> From: Nikolay Aleksandrov <nikolay@nvidia.com>

>>

>> Hi,

>> This set adds a simple configurable per-port EHT tracked hosts limit.

>> Patch 01 adds a default limit of 512 tracked hosts per-port, since the EHT

>> changes are still only in net-next that shouldn't be a problem. Then

>> patch 02 adds the ability to configure and retrieve the hosts limit

>> and to retrieve the current number of tracked hosts per port.

>> Let's be on the safe side and limit the number of tracked hosts by

>> default while allowing the user to increase that limit if needed.

> 

> Applied, thanks!

> 

> I'm curious that you add those per-port sysfs files, is this a matter

> of policy for the bridge? Seems a bit like a waste of memory at this

> point.

> 


Indeed, that's how historically new port and bridge options are added.
They're all exposed via sysfs. I wonder if we should just draw the line
and continue with netlink-only attributes. Perhaps we should add a comment
about it for anyone adding new ones.

Since this is in net-next I can send a follow up to drop the sysfs part
and another to add that comment.

WDYT?

Cheers,
 Nik
Jakub Kicinski Jan. 28, 2021, 6:52 p.m. UTC | #4
On Thu, 28 Jan 2021 11:12:26 +0200 Nikolay Aleksandrov wrote:
> On 28/01/2021 03:42, Jakub Kicinski wrote:

> > On Tue, 26 Jan 2021 11:35:31 +0200 Nikolay Aleksandrov wrote:  

> >> From: Nikolay Aleksandrov <nikolay@nvidia.com>

> >>

> >> Hi,

> >> This set adds a simple configurable per-port EHT tracked hosts limit.

> >> Patch 01 adds a default limit of 512 tracked hosts per-port, since the EHT

> >> changes are still only in net-next that shouldn't be a problem. Then

> >> patch 02 adds the ability to configure and retrieve the hosts limit

> >> and to retrieve the current number of tracked hosts per port.

> >> Let's be on the safe side and limit the number of tracked hosts by

> >> default while allowing the user to increase that limit if needed.  

> > 

> > Applied, thanks!

> > 

> > I'm curious that you add those per-port sysfs files, is this a matter

> > of policy for the bridge? Seems a bit like a waste of memory at this

> > point.

> 

> Indeed, that's how historically new port and bridge options are added.

> They're all exposed via sysfs. I wonder if we should just draw the line

> and continue with netlink-only attributes. Perhaps we should add a comment

> about it for anyone adding new ones.

> 

> Since this is in net-next I can send a follow up to drop the sysfs part

> and another to add that comment.

> 

> WDYT?


SGTM!