From: Alexander Bluhm Subject: Re: TCP parallel input preview To: Vitaliy Makkoveev Cc: tech@openbsd.org Date: Mon, 20 Jan 2025 20:25:29 +0100 On Mon, Jan 20, 2025 at 09:00:08PM +0300, Vitaliy Makkoveev wrote: > Is is such necessary? I suspect extra shifts on some architectures. > > > On 20 Jan 2025, at 20:36, Alexander Bluhm wrote: > > > > - u_int ph_ifidx; /* rcv interface index */ > > + u_int16_t ph_ifidx; /* rcv interface index */ I think there are issues when making the mbuf header larger. Like TCP ACK packets not fitting in a single mbuf. I tried to use ph_cookie but that did not work. It feels like something else might use it in concurently. So either add more paramters to if_input() function pointers and pass the softnet down, or fixing the ph_cookie approach, or making interface index 16 bit thoughout the stack, or use pkthdr_pf pad[1] instead, or some other bright idea. At least my diff shows that we can avoid lock flipping and that is the solution for single stream performance. bluhm