Skip to contentSkip to conversation

net: bcmgenet: add support for GRO software interrupt coalescing

PATCH Applied Zak Kemble 2 participants 4 messages Jun 10, 2025 – Jun 12, 2025

Subsystems (3)
lore
Share & tools
lore

Zak Kemble

author
#0 lore raw

cover net: bcmgenet: add support for GRO software interrupt coalescing

Reposting as requested here https://lore.kernel.org/all/[email protected]

Hey, these patches enable support for software IRQ coalescing and GRO aggregation and applies conservative defaults which can help improve system and network performance by reducing the number of hardware interrupts and improving GRO aggregation ratio.

Zak Kemble (2):
net: bcmgenet: use napi_complete_done return value
net: bcmgenet: enable GRO software interrupt coalescing by default

 drivers/net/ethernet/broadcom/genet/bcmgenet.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
Signature · 1 line
2.39.5
author
#1 lore raw

PATCH 1/2 net: bcmgenet: use napi_complete_done return value

Make use of the return value from napi_complete_done(). This allows users to use the gro_flush_timeout and napi_defer_hard_irqs sysfs attributes for configuring software interrupt coalescing.

---
 drivers/net/ethernet/broadcom/genet/bcmgenet.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
drivers/net/ethernet/broadcom/genet/bcmgenet.c +1 -3
index fa0077bc6..cc9bdd244 100644
@@ -2472,10 +2472,8 @@ static int bcmgenet_rx_poll(struct napi_struct *napi, int budget)
 
 	work_done = bcmgenet_desc_rx(ring, budget);
 
-	if (work_done < budget) {
-		napi_complete_done(napi, work_done);
+	if (work_done < budget && napi_complete_done(napi, work_done))
 		bcmgenet_rx_ring_int_enable(ring);
-	}
 
 	if (ring->dim.use_dim) {
 		dim_update_sample(ring->dim.event_ctr, ring->dim.packets,
Signature · 1 line
2.39.5
author
#2 lore raw

PATCH 2/2 net: bcmgenet: enable GRO software interrupt coalescing by default

In reply to Zak Kemble

Apply conservative defaults.

---
 drivers/net/ethernet/broadcom/genet/bcmgenet.c | 2 ++
 1 file changed, 2 insertions(+)
drivers/net/ethernet/broadcom/genet/bcmgenet.c +2 -0
index cc9bdd244..4f40f6afe 100644
@@ -3986,6 +3986,8 @@ static int bcmgenet_probe(struct platform_device *pdev)
 	dev->hw_features |= dev->features;
 	dev->vlan_features |= dev->features;
 
+	netdev_sw_irq_coalesce_default_on(dev);
+
 	/* Request the WOL interrupt and advertise suspend if available */
 	priv->wol_irq_disabled = true;
 	if (priv->wol_irq > 0) {
Signature · 1 line
2.39.5
#3 lore raw
In reply to Zak Kemble
This series was applied to netdev/net-next.git (main) by Jakub Kicinski <[email protected]>:

Hello:

This series was applied to netdev/net-next.git (main) by Jakub Kicinski <[email protected]>:

Quoted 8 lines · On Tue, 10 Jun 2025 23:04:01 +0100 you wrote:

Reposting as requested here https://lore.kernel.org/all/[email protected]

Hey, these patches enable support for software IRQ coalescing and GRO aggregation and applies conservative defaults which can help improve system and network performance by reducing the number of hardware interrupts and improving GRO aggregation ratio.

[...]

Here is the summary with links:
- [net-next,1/2] net: bcmgenet: use napi_complete_done return value

    https://git.kernel.org/netdev/net-next/c/28ed9bed5fb2
  - [net-next,2/2] net: bcmgenet: enable GRO software interrupt coalescing by default
    https://git.kernel.org/netdev/net-next/c/078bb22cfc65

You are awesome, thank you!

Signature · 2 lines
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html