On Thu, 5 Nov 2020 15:17:50 +0100 Magnus Karlsson wrote: > > I feel like this needs a big fat warning somewhere. > > > > It's perfectly fine to never complete TCP packets, but AF_XDP could be > > used to implement protocols in user space. What if someone wants to > > implement something like TSQ? > > I might misunderstand you, but with TSQ here (for something that > bypasses qdisk and any buffering and just goes straight to the driver) > you mean the ability to have just a few buffers outstanding and > continuously reuse these? If so, that is likely best achieved by > setting a low Tx queue size on the NIC. Note that even without this > patch, completions could be delayed. Though this patch makes that the > normal case. In any way, I think this calls for some improved > documentation. TSQ tries to limit the amount of data the TCP stack queues into TC/sched and drivers. Say 1MB ~ 16 GSO frames. It will not queue more data until some of the transfer is reported as completed. IIUC you're allowing up to 64 descriptors to linger without reporting back that the transfer is done. That means that user space implementing a scheme similar to TSQ may see its transfers stalled.