[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CANn89iJWp25E0ej5M4_9WhZtGqzOkKeXQ8-cWTAE02EzTR9ydw@mail.gmail.com>
Date: Thu, 18 Jan 2024 19:46:27 +0100
From: Eric Dumazet <edumazet@...gle.com>
To: Willem de Bruijn <willemdebruijn.kernel@...il.com>
Cc: "David S . Miller" <davem@...emloft.net>, Jakub Kicinski <kuba@...nel.org>,
Paolo Abeni <pabeni@...hat.com>, Willem de Bruijn <willemb@...gle.com>, David Ahern <dsahern@...nel.org>,
netdev@...r.kernel.org, eric.dumazet@...il.com
Subject: Re: [PATCH v2 net] udp: fix busy polling
On Thu, Jan 18, 2024 at 7:43 PM Willem de Bruijn
<willemdebruijn.kernel@...il.com> wrote:
>
>
> Perhaps simpler without a variable?
>
> if (!skb_queue_empty_lockless(&sk->sk_receive_queue))
> return true;
>
> if (sk_is_udp(sk) &&
> !skb_queue_empty_lockless(&udp_sk(sk)->reader_queue))
> return true;
>
> return sk_busy_loop_timeout(sk, start_time);
Of course, for some reason my brain was stuck with the negations ;)
I will send a v3 later.
Powered by blists - more mailing lists