[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CADKFtnRa71WH4WC5tipGAAWK9hiqWcA85AT_jz_L4kcGzorh7Q@mail.gmail.com>
Date: Mon, 31 Mar 2025 14:58:12 -0700
From: Jordan Rife <jrife@...gle.com>
To: Martin KaFai Lau <martin.lau@...ux.dev>
Cc: netdev@...r.kernel.org, bpf@...r.kernel.org,
Daniel Borkmann <daniel@...earbox.net>, Yonghong Song <yonghong.song@...ux.dev>,
Aditi Ghag <aditi.ghag@...valent.com>
Subject: Re: [RFC PATCH bpf-next 0/3] Avoid skipping sockets with socket iterators
> > array scanning could be slow, but since changes to a bucket should be
> > rare, one optimization could be to only compare to the saved socket
> > cookies if the bucket has changed since it was last seen. I think
> > saving and checking the head, tail, and size of the bucket's linked
> > list should be sufficient for this?
>
> Not sure if head, tail, and size stay the same is enough to imply the bucket('s
> linked list) has not changed. I think tcp may be ok since I currently don't see
> a way to re-bind() a bind()-ed socket without close()-ing it. I don't know about
> the connected UDP...etc.
Yeah, forget about the head/tail/size thing. I think I was still
waking up when I typed this :). A linear scan through the cookie list
should be enough as you say.
> I think udp should be easier to begin with for PoC.
Ack, sg. I'll start with UDP iterators.
-Jordan
Powered by blists - more mailing lists