From: Andy Gospodarek <go...@broadcom.com>

This RFC converts the adaptive interrupt moderation library from the
mlx5_en driver into a library so it can be used by any driver.  The last
patch in this set adds support for interrupt moderation in the bnxt_en
driver.

The main purpose of this code in the mlx5_en driver is to allow an
administrator to make sure that default coalesce settings are optimized
for low latency, but quickly adapt to handle high throughput traffic and
optimize how many packets are received during each napi poll.

For any new driver the following changes would be needed to use this
library:

- add elements in ring struct to track items needed by this library
- create function that can be called to actually set coalesce settings
  for the driver

My main reason for making this an RFC is that I would like verification
from Mellanox that the performance of their driver does not change in a
unintended way.  I did some basic testing (netperf) and did not note a
statistically significant change in throughput or CPU utilization before
and after this set.  

Credit to Rob Rice and Lee Reed for doing some of the initial proof of
concept and testing for this patch.

Andy Gospodarek (9):
  mlx5_en: move interrupt moderation structs to new file
  mlx5_en: move interrupt moderation forward delcarations
  mlx5_en: remove rq references in mlx5e_rx_am
  mlx5_en: move AM logic enums
  mlx5_en: move generic functions to new file
  mlx5_en: rename en_rx_am.h to net_rx_am.h
  mlx5_en: remove Mellanox references in AM code
  net: move adaptive interrpt coalescing code to lib/
  bnxt_en: add support for software adaptive interrupt moderation

 drivers/net/ethernet/broadcom/bnxt/Makefile        |   2 +-
 drivers/net/ethernet/broadcom/bnxt/bnxt.c          |  51 ++++
 drivers/net/ethernet/broadcom/bnxt/bnxt.h          |  34 ++-
 drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c  |   7 +
 drivers/net/ethernet/broadcom/bnxt/bnxt_rx_am.c    |  32 +++
 drivers/net/ethernet/mellanox/mlx5/core/en.h       |  43 +--
 .../net/ethernet/mellanox/mlx5/core/en_ethtool.c   |   6 +-
 drivers/net/ethernet/mellanox/mlx5/core/en_main.c  |  18 +-
 drivers/net/ethernet/mellanox/mlx5/core/en_rep.c   |   4 +-
 drivers/net/ethernet/mellanox/mlx5/core/en_rx_am.c | 298 +-------------------
 drivers/net/ethernet/mellanox/mlx5/core/en_txrx.c  |   5 +-
 include/linux/mlx5/mlx5_ifc.h                      |   6 -
 include/linux/net_rx_am.h                          | 109 ++++++++
 lib/Makefile                                       |   2 +-
 lib/net_rx_am.c                                    | 306 +++++++++++++++++++++
 15 files changed, 558 insertions(+), 365 deletions(-)
 create mode 100644 drivers/net/ethernet/broadcom/bnxt/bnxt_rx_am.c
 create mode 100644 include/linux/net_rx_am.h
 create mode 100644 lib/net_rx_am.c

-- 
2.7.4

Reply via email to