]> git.baikalelectronics.ru Git - kernel.git/commit
net/mlx5e: use indirect calls wrapper for the rx packet handler
authorPaolo Abeni <pabeni@redhat.com>
Wed, 12 Jun 2019 10:18:36 +0000 (12:18 +0200)
committerDavid S. Miller <davem@davemloft.net>
Fri, 14 Jun 2019 22:35:17 +0000 (15:35 -0700)
commit00425104c63283d26421486a98455b95f776b71d
tree821f090c2965bc686322532b016f9330556d5acb
parent9eb9daaf02b364f07cfdd4e415aed0251af4134d
net/mlx5e: use indirect calls wrapper for the rx packet handler

We can avoid another indirect call per packet wrapping the rx
handler call with the proper helper.

To ensure that even the last listed direct call experience
measurable gain, despite the additional conditionals we must
traverse before reaching it, I tested reversing the order of the
listed options, with performance differences below noise level.

Together with the previous indirect call patch, this gives
~6% performance improvement in raw UDP tput.

v2 -> v3:
 - use only the direct calls always available regardless of
   the mlx5 build options
 - drop the direct call list macro, to keep the code as simple
   as possible for future rework

v1 -> v2:
 - update the direct call list and use a macro to define it,
   as per Saeed suggestion. An intermediated additional
   macro is needed to allow arg list expansion

Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Acked-by: Saeed Mahameed <saeedm@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/mellanox/mlx5/core/en_rx.c