]> git.baikalelectronics.ru Git - kernel.git/commit
Merge branch 'af-xdp-tx-batch'
authorDaniel Borkmann <daniel@iogearbox.net>
Tue, 17 Nov 2020 21:07:40 +0000 (22:07 +0100)
committerDaniel Borkmann <daniel@iogearbox.net>
Tue, 17 Nov 2020 21:08:09 +0000 (22:08 +0100)
commitc82becab06e19be6c1294c50fac8ae17abffe39d
treefd8b06d91a34b79b6f9b456ed2d6509033f39e1b
parent0e43714fedc77bff3b09a339c6f61a56ca5f1f43
parent47ccaa04c4824bcb3e03367e22c4574ed72e7b35
Merge branch 'af-xdp-tx-batch'

Magnus Karlsson says:

====================
This patch set improves the performance of mainly the Tx processing of
AF_XDP sockets. Though, patch 3 also improves the Rx path. All in all,
this patch set improves the throughput of the l2fwd xdpsock application
by around 11%. If we just take a look at Tx processing part, it is
improved by 35% to 40%.

Hopefully the new batched Tx interfaces should be of value to other
drivers implementing AF_XDP zero-copy support. But patch #3 is generic
and will improve performance of all drivers when using AF_XDP sockets
(under the premises explained in that patch).

@Daniel. In patch 3, I apply all the padding required to hinder the
adjacency prefetcher to prefetch the wrong things. After this patch
set, I will submit another patch set that introduces
____cacheline_padding_in_smp in include/linux/cache.h according to your
suggestions. The last patch in that patch set will then convert the
explicit paddings that we have now to ____cacheline_padding_in_smp.

v2 -> v3:
* Fixed #pragma warning with clang and defined a loop_unrolled_for macro
  for easier readability [lkp, Nick]
* Simplified invalid descriptor handling in xskq_cons_read_desc_batch()

v1 -> v2:
* Removed added parameter in i40e_setup_tx_descriptors and adopted a
  simpler solution [Maciej]
* Added test for !xs in xsk_tx_peek_release_desc_batch() [John]
* Simplified return path in xsk_tx_peek_release_desc_batch() [John]
* Dropped patch #1 in v1 that introduced lazy completions. Hopefully
  this is not needed when we get busy poll [Jakub]
* Iterate over local variable in xskq_prod_reserve_addr_batch() for
  improved performance
* Fixed the fallback path in xsk_tx_peek_release_desc_batch() so that
  it also produces a batch of descriptors, albeit by using the slower
  (but more general) older code. This improves the performance of the
  case when multiple sockets are sharing the same device and queue id.
====================

Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>