[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <9191f1863f272c11703995aaf83814f57dd38327.camel@redhat.com>
Date: Thu, 08 Feb 2024 10:46:09 +0100
From: Paolo Abeni <pabeni@...hat.com>
To: Keqi Wang <wangkeqi_chris@....com>, davem@...emloft.net,
edumazet@...gle.com, kuba@...nel.org
Cc: netdev@...r.kernel.org, linux-kernel@...r.kernel.org, kernel test robot
<oliver.sang@...el.com>, Anjali Kulkarni <anjali.k.kulkarni@...cle.com>
Subject: Re: [PATCH] connector/cn_proc: cn_netlink_has_listeners replaces
proc_event_num_listeners
On Sun, 2024-02-04 at 16:22 +0800, Keqi Wang wrote:
> It is not accurate to reset proc_event_num_listeners according to
> cn_netlink_send_mult() return value -ESRCH.
>
> In the case of stress-ng netlink-proc, -ESRCH will always be returned,
> because netlink_broadcast_filtered will return -ESRCH,
> which may cause stress-ng netlink-proc performance degradation.
>
> proc_event_num_listeners cannot accurately reflect whether
> the listener exists, so add cn_netlink_has_listeners() functon
> and use that instead of proc_event_num_listeners.
Adding Anjali for awareness, as the last active developer in this area.
This change looks really invasive for a net fix. It's not trivially
clear to me if the change of accounting schema will bring or not
unintended functional/behavioural changes.
What about a simple revert of the blamed commit, and target net-next
with this kind of change?
> @@ -396,10 +404,10 @@ static void cn_proc_ack(int err, int rcvd_seq, int rcvd_ack)
> static void cn_proc_mcast_ctl(struct cn_msg *msg,
> struct netlink_skb_parms *nsp)
> {
> - enum proc_cn_mcast_op mc_op = 0, prev_mc_op = 0;
> + enum proc_cn_mcast_op mc_op = 0;
> struct proc_input *pinput = NULL;
> enum proc_cn_event ev_type = 0;
> - int err = 0, initial = 0;
> + int err = 0;
> struct sock *sk = NULL;
Minor nit: the above breaks the reverse xmas tree order
Cheers,
Paolo
Powered by blists - more mailing lists