Re: [PATCH] tcp: fix race condition when creating child sockets from syncookies

From: Eric Dumazet
Date: Fri Oct 23 2020 - 12:36:53 EST


On Fri, Oct 23, 2020 at 6:06 PM Ricardo Dias <rdias@xxxxxxxxxx> wrote:

> And what about the loopback interface? Why couldn't the loopback
> interface also use a single RX queue?
>

Loopback is using a per-cpu queue, with no crossing, for efficiency.

That means : whenever a packet is sent on lo interface from CPU X, it
is put on CPU X backlog queue.

If the connect() and sendmsg() are run from different cpus, then the
ACK (from last packet of 3WH) and the data packet might land on
different queues.