[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CANn89iJm3Pokx2hJy4af-frhV2+cadRYBSydG2Pc5w3C7d8RrA@mail.gmail.com>
Date: Wed, 17 Apr 2024 13:58:37 +0200
From: Eric Dumazet <edumazet@...gle.com>
To: Jason Xing <kerneljasonxing@...il.com>
Cc: kuba@...nel.org, pabeni@...hat.com, davem@...emloft.net, horms@...nel.org,
netdev@...r.kernel.org, Jason Xing <kernelxing@...cent.com>
Subject: Re: [PATCH net-next v2 2/3] net: rps: protect filter locklessly
On Wed, Apr 17, 2024 at 1:52 PM Eric Dumazet <edumazet@...gle.com> wrote:
>
> @@ -4668,7 +4668,7 @@ bool rps_may_expire_flow(struct net_device *dev,
> u16 rxq_index,
> cpu = READ_ONCE(rflow->cpu);
> if (rflow->filter == filter_id && cpu < nr_cpu_ids &&
> ((int)(READ_ONCE(per_cpu(softnet_data,
> cpu).input_queue_head) -
> - READ_ONCE(rflow->last_qtail)) <
> + rflow->last_qtail) <
> (int)(10 * flow_table->mask)))
> expire = false;
> }
Oh well, rps_may_expire_flow() might be called from other contexts, so
only the READ_ONCE()
from get_rps_cpu() is not really necessary.
Powered by blists - more mailing lists