On Fri, Apr 30, 2021 at 7:24 PM Dan Siemon <dan@xxxxxxxxxxxxx> wrote: > > When an AF_XDP based application is overloaded, it is preferable for > the application to: > * Service the Rx ring as fast as it can and drop in the application if > required? > * Let the Rx ring fill up and let the NIC drop? Let the NIC drop, since this is much faster. And always process Tx first, if you have such a component. This alleviates buffering problems and makes sure you get as much as possible out of the system to the devices that want your packets. You generally want to get as many packets through your whole processing pipeline, not trying to receive as many packets as possible (and not getting them the whole way through). > > This is mostly a performance/PPS question. Obviously the application > loses the ability to directly count the drops if the NIC drops among > other limitations. You will not be able to keep up counting anyway :-). It is not possible to count all drops in user-space (or the kernel). You would need HW support for this. Just think of blasting 162 Mpps at one port and trying to count the drops in the CPU. Would need a lot of cores for just that. > If it makes a difference, the use case is only i40e right now. >