> > On Fri, 12 Jun 2020 14:17:46 +0000 > Ciara Loftus <ciara.lof...@intel.com> wrote: > > > This commit makes some changes to the AF_XDP PMD in an effort to > improve > > its packet loss characteristics. > > > > 1. In the case of failed transmission due to inability to reserve a tx > > descriptor, the PMD now pulls from the completion ring, issues a syscall > > in which the kernel attempts to complete outstanding tx operations, then > > tries to reserve the tx descriptor again. Prior to this we dropped the > > packet after the syscall and didn't try to re-reserve. > > > > 2. During completion ring cleanup, always pull as many entries as possible > > from the ring as opposed to the batch size or just how many packets > > we're going to attempt to send. Keeping the completion ring emptier > should > > reduce failed transmissions in the kernel, as the kernel requires space in > > the completion ring to successfully tx. > > > > 3. Size the fill ring as twice the receive ring size which may help reduce > > allocation failures in the driver. > > > > With these changes, a benchmark which measured the packet rate at > which > > 0.01% packet loss could be reached improved from ~0.1G to ~3Gbps. > > > > Signed-off-by: Ciara Loftus <ciara.lof...@intel.com> > > You might want to add the ability to emulate a tx_free threshold > by pulling more completions earlier.
Thanks for the suggestion. I've implemented it in the v2. Ciara