[v7, net-next 0/8] bng_en: enhancements for RX and TX datapath

Bhargava Marreddy posted 8 patches 1 week, 2 days ago
drivers/net/ethernet/broadcom/bnge/Makefile   |    3 +-
.../net/ethernet/broadcom/bnge/bnge_hw_def.h  |  446 +++++
.../ethernet/broadcom/bnge/bnge_hwrm_lib.c    |   65 +
.../ethernet/broadcom/bnge/bnge_hwrm_lib.h    |    2 +
.../net/ethernet/broadcom/bnge/bnge_netdev.c  |  409 +++-
.../net/ethernet/broadcom/bnge/bnge_netdev.h  |  121 +-
.../net/ethernet/broadcom/bnge/bnge_txrx.c    | 1645 +++++++++++++++++
.../net/ethernet/broadcom/bnge/bnge_txrx.h    |  126 ++
8 files changed, 2776 insertions(+), 41 deletions(-)
create mode 100644 drivers/net/ethernet/broadcom/bnge/bnge_hw_def.h
create mode 100644 drivers/net/ethernet/broadcom/bnge/bnge_txrx.c
create mode 100644 drivers/net/ethernet/broadcom/bnge/bnge_txrx.h
[v7, net-next 0/8] bng_en: enhancements for RX and TX datapath
Posted by Bhargava Marreddy 1 week, 2 days ago
Hi,

This series enhances the bng_en driver by adding:
1. Tx support (standard + TSO)
2. Rx support (standard + LRO/TPA)

Changes from:
v6->v7:
 - Addressed netdev.ai feedback shared by Jakub Kicinski by adding bounds
   check in bnge_tpa_agg() to prevent agg_arr overflow.

v5->v6:
 - Addressed netdev.ai feedback shared by Jakub Kicinski:
    - Fixed AGG buffer leak in the non-copy (large packet) allocation path.
    - Corrected TPA ID mask (0-1023) to prevent out-of-bounds array access.
 - Refactored bnge_hw_def.h:
    - Removed unused macros and migrated to BIT() and GENMASK().
 - Retained DMA sync in buffer reuse path:
    https://lore.kernel.org/netdev/CANXQDtaLFQc3XRrLEH2AytcZvkeUdD9AW8=KUwqGQvM+=Q6M2w@mail.gmail.com/
    - Retained dma_sync_single_for_device() in the buffer reuse path.
      Further review confirmed the sync is necessary for hardware ownership
      transfer even for read-only CPU access.

v4->v5
 Addressed comments from Paolo Abeni
 - Fixed mixed whitespace and tab usage
 - Reverse Christmas Tree style
 - Replaced bitfields with bool
 - Dropped redundant DMA sync to device
 - Implemented ndo_features_check() to move length
   and num_frag validation out of the Tx path
 - Dropped redundant queue mapping check in Tx path

 Addressed comments from Paolo Abeni and Andrew Lunn
 - Positioned macros before their associated structs
 - Migrated to BIT() and GENMASK() macros
 - Optimized DMA sync scope to packet length instead of full buffer

 Addressed comments from ALOK TIWARI
 - Fixed a typo in a comment.
 - Updated macro to require all arguments to be passed explicitly

v3->v4
 - Scoped the series to RX and TX datapath per Jakub Kicinski's comments.
 - Dropped IS_ERR() per Alok Tiwari's comments.

v2->v3
 Addressed comments from Andrew Lunn
   - Apply Rev-xmas fix in several places.
   - Correct ethtool-speed comment to reflect accurate behavior.

 Addressed comments from ALOK TIWARI
   - Remove duplicate definition of RX_CMP_L2_ERRORS.
   - Fix macro by adding the required arguments.
   - Add newline for clarity/formatting.

 Addressed kernel test robot warning
   - Fix compilation error: removed unused variable gro

 Moved hw specific structs to appropriate header file

v1->v2
 Removed unused function bnge_alloc_rx_page()
 Removed inline keywords from couple of functions
 Removed some stats related code that doesn't applicable (missed_irqs)
 Addressed kernel test robot warning
    - Fixed compilation issue with CONFIG_INET is not set

Bhargava Marreddy (8):
  bng_en: Extend bnge_set_ring_params() for rx-copybreak
  bng_en: Add RX support
  bng_en: Handle an HWRM completion request
  bng_en: Add TX support
  bng_en: Add ndo_features_check support
  bng_en: Add support to handle AGG events
  bng_en: Add TPA related functions
  bng_en: Add support for TPA events

 drivers/net/ethernet/broadcom/bnge/Makefile   |    3 +-
 .../net/ethernet/broadcom/bnge/bnge_hw_def.h  |  446 +++++
 .../ethernet/broadcom/bnge/bnge_hwrm_lib.c    |   65 +
 .../ethernet/broadcom/bnge/bnge_hwrm_lib.h    |    2 +
 .../net/ethernet/broadcom/bnge/bnge_netdev.c  |  409 +++-
 .../net/ethernet/broadcom/bnge/bnge_netdev.h  |  121 +-
 .../net/ethernet/broadcom/bnge/bnge_txrx.c    | 1645 +++++++++++++++++
 .../net/ethernet/broadcom/bnge/bnge_txrx.h    |  126 ++
 8 files changed, 2776 insertions(+), 41 deletions(-)
 create mode 100644 drivers/net/ethernet/broadcom/bnge/bnge_hw_def.h
 create mode 100644 drivers/net/ethernet/broadcom/bnge/bnge_txrx.c
 create mode 100644 drivers/net/ethernet/broadcom/bnge/bnge_txrx.h

-- 
2.47.3