|
|
Log in / Subscribe / Register

bng_en: enhancements for RX and TX datapath

From:  Bhargava Marreddy <bhargava.marreddy-AT-broadcom.com>
To:  davem-AT-davemloft.net, edumazet-AT-google.com, kuba-AT-kernel.org, pabeni-AT-redhat.com, andrew+netdev-AT-lunn.ch, horms-AT-kernel.org
Subject:  [v6, net-next 0/8] bng_en: enhancements for RX and TX datapath
Date:  Sat, 24 Jan 2026 01:04:56 +0530
Message-ID:  <20260123193504.285573-1-bhargava.marreddy@broadcom.com>
Cc:  netdev-AT-vger.kernel.org, linux-kernel-AT-vger.kernel.org, michael.chan-AT-broadcom.com, pavan.chebbi-AT-broadcom.com, vsrama-krishna.nemani-AT-broadcom.com, vikas.gupta-AT-broadcom.com, ajit.khaparde-AT-broadcom.com, Bhargava Marreddy <bhargava.marreddy-AT-broadcom.com>
Archive-link:  Article

Hi,

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

Changes from:
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/CANXQDtaLFQc3XRrLEH2AytcZv...
    - 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  |  408 ++++-
 .../net/ethernet/broadcom/bnge/bnge_netdev.h  |  120 +-
 .../net/ethernet/broadcom/bnge/bnge_txrx.c    | 1621 +++++++++++++++++
 .../net/ethernet/broadcom/bnge/bnge_txrx.h    |  126 ++
 8 files changed, 2750 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




Copyright © 2026, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds