Add more functionality to BNGE
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: | [v8, net-next 00/10] Add more functionality to BNGE | |
Date: | Fri, 19 Sep 2025 23:17:31 +0530 | |
Message-ID: | <20250919174742.24969-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, Bhargava Marreddy <bhargava.marreddy-AT-broadcom.com> | |
Archive-link: | Article |
Hi, This patch series adds the infrastructure to make the netdevice functional. It allocates data structures for core resources, followed by their initialisation and registration with the firmware. The core resources include the RX, TX, AGG, CMPL, and NQ rings, as well as the VNIC. RX/TX functionality will be introduced in the next patch series to keep this one at a reviewable size. Changes from: v7->v8 Addressed comments from Jakub Kicinski - Ensured buffer post fails when minimum fill level isn't met. Few functions related to buffer posting got impacted and their return type for error handling. Addressed comments from Simon Horman: - Fixed lack of error return when memory allocation fails. - Fixed max_t(int, ...) usage by switching to max() for unsigned data. Addressed comments from Alok Tiwari - Fixed type of the variable ring_type. - Made the netdev pointer access more direct. v6->v7 Addressed comments from Jakub Kicinski: - Removed NULL checks that are not applicable to the current patches but will be required when additional features are introduced in future. - Handled unwinding at a higher level rather than in the deep call stac v5->v6 Addressed comments from Jakub Kicinski: - Add appropriate error handling in several functions - Enable device lock for bnge netdev ops v4->v5 Addressed comments from Alok Tiwari - Remove the redundant `size` assignment v3->v4 Addressed a comment from Jakub Kicinski: - To handle the page pool for both RX and AGG rings - Use the appropriate page allocation mechanism for the AGG ring when PAGE_SIZE is larger v2->v3 Addressed a comment from Jakub Kicinski: - Changed uses of atomic_t to refcount_t v1->v2 Addressed warnings and errors in the patch series. Thanks, Bhargava Marreddy (10): bng_en: make bnge_alloc_ring() self-unwind on failure bng_en: Add initial support for RX and TX rings bng_en: Add initial support for CP and NQ rings bng_en: Introduce VNIC bng_en: Initialise core resources bng_en: Allocate packet buffers bng_en: Allocate stat contexts bng_en: Register rings with the firmware bng_en: Register default VNIC bng_en: Configure default VNIC drivers/net/ethernet/broadcom/Kconfig | 1 + drivers/net/ethernet/broadcom/bnge/bnge.h | 27 + .../net/ethernet/broadcom/bnge/bnge_core.c | 16 + drivers/net/ethernet/broadcom/bnge/bnge_db.h | 34 + .../ethernet/broadcom/bnge/bnge_hwrm_lib.c | 482 ++++ .../ethernet/broadcom/bnge/bnge_hwrm_lib.h | 31 + .../net/ethernet/broadcom/bnge/bnge_netdev.c | 2217 +++++++++++++++++ .../net/ethernet/broadcom/bnge/bnge_netdev.h | 250 +- .../net/ethernet/broadcom/bnge/bnge_resc.c | 6 +- .../net/ethernet/broadcom/bnge/bnge_resc.h | 2 + .../net/ethernet/broadcom/bnge/bnge_rmem.c | 67 +- .../net/ethernet/broadcom/bnge/bnge_rmem.h | 14 + 12 files changed, 3140 insertions(+), 7 deletions(-) create mode 100644 drivers/net/ethernet/broadcom/bnge/bnge_db.h -- 2.47.3