[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <Y9aJom7VhuqY+1+X@shredder>
Date: Sun, 29 Jan 2023 16:58:42 +0200
From: Ido Schimmel <idosch@...dia.com>
To: Nikolay Aleksandrov <razor@...ckwall.org>
Cc: Petr Machata <petrm@...dia.com>,
"David S. Miller" <davem@...emloft.net>,
Eric Dumazet <edumazet@...gle.com>,
Jakub Kicinski <kuba@...nel.org>,
Paolo Abeni <pabeni@...hat.com>,
Roopa Prabhu <roopa@...dia.com>, netdev@...r.kernel.org,
bridge@...ts.linux-foundation.org
Subject: Re: [PATCH net-next 08/16] net: bridge: Add netlink knobs for number
/ maximum MDB entries
Thanks for the review, Nik!
On Sun, Jan 29, 2023 at 12:07:31PM +0200, Nikolay Aleksandrov wrote:
> On 26/01/2023 19:01, Petr Machata wrote:
> > +static int
> > +br_multicast_pmctx_ngroups_set_max(struct net_bridge_mcast_port *pmctx,
> > + u32 max, struct netlink_ext_ack *extack)
> > +{
> > + if (max && max < pmctx->mdb_n_entries) {
> > + NL_SET_ERR_MSG_FMT_MOD(extack, "Can't set mcast_max_groups=%u, which is below mcast_n_groups=%u",
> > + max, pmctx->mdb_n_entries);
>
> Why not? All new entries will be rejected anyway, at most some will expire and make room.
Looking at the code of the global limit ('mcast_hash_max') and also
testing it, I see that the above is not enforced there either so doing
what you suggest will at least make the port and port-vlan limits
consistent with the global limit in this regard.
>
> > + return -EINVAL;
> > + }
> > +
> > + pmctx->mdb_max_entries = max;
> > + return 0;
> > +}
Powered by blists - more mailing lists