• Magnus Karlsson's avatar
    i40e: optimize AF_XDP Tx completion path · 5574ff7b
    Magnus Karlsson authored
    Improve the performance of the AF_XDP zero-copy Tx completion
    path. When there are no XDP buffers being sent using XDP_TX or
    XDP_REDIRECT, we do not have go through the SW ring to clean up any
    entries since the AF_XDP path does not use these. In these cases, just
    fast forward the next-to-use counter and skip going through the SW
    ring. The limit on the maximum number of entries to complete is also
    removed since the algorithm is now O(1). To simplify the code path, the
    maximum number of entries to complete for the XDP path is therefore
    also increased from 256 to 512 (the default number of Tx HW
    descriptors). This should be fine since the completion in the XDP path
    is faster than in the SKB path that has 256 as the maximum number.
    
    This patch provides around 4% throughput improvement for the l2fwd
    application in xdpsock on my machine.
    Signed-off-by: default avatarMagnus Karlsson <magnus.karlsson@intel.com>
    Reviewed-by: default avatarSridhar Samudrala <sridhar.samudrala@intel.com>
    Tested-by: default avatarAndrew Bowers <andrewx.bowers@intel.com>
    Signed-off-by: default avatarTony Nguyen <anthony.l.nguyen@intel.com>
    5574ff7b
i40e_txrx.h 17.4 KB