net: bcmasp: add support for GRO
Subsystems (3)
Florian Fainelli
maintainerv2 cover net: bcmasp: add support for GRO
These two patches add support for GRO software interrupt coalescing, kudos to Zak for doing this on bcmgenet first.
before:
00:03:31 CPU %usr %nice %sys %iowait %irq %soft %steal
%guest %idle
00:03:32 all 0.00 0.00 1.51 0.00 0.50 7.29 0.00 0.00 90.70
after:
00:02:35 CPU %usr %nice %sys %iowait %irq %soft %steal
%guest %idle
00:02:36 all 0.25 0.00 1.26 0.00 0.50 7.29 0.00 0.00 90.70
Changes in v2:
- corrected net_device variable in the scope
Florian Fainelli (2):
net: bcmasp: Utilize napi_complete_done() return value
net: bcmasp: enable GRO software interrupt coalescing by default
drivers/net/ethernet/broadcom/asp2/bcmasp_intf.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
Signature · 1 line
2.34.1
Florian Fainelli
maintainerPATCH v2 1/2 net: bcmasp: Utilize 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/asp2/bcmasp_intf.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)
drivers/net/ethernet/broadcom/asp2/bcmasp_intf.c +1 -3
@@ -605,10 +605,8 @@ static int bcmasp_rx_poll(struct napi_struct *napi, int budget)bcmasp_intf_rx_desc_write (intf, intf->rx_edpkt_dma_read); -if (processed < budget) { -napi_complete_done (&intf->rx_napi, processed); +if (processed < budget &&napi_complete_done (&intf->rx_napi, processed))bcmasp_enable_rx_irq (intf,1 ); - }return processed; }
Signature · 1 line
2.34.1
Re: [PATCH net-next v2 1/2] net: bcmasp: Utilize napi_complete_done() return value
Quoted 10 lines · Florian Fainelli
Make use of the return value from
napi_complete_done(). This allows users to use thegro_flush_timeoutandnapi_defer_hard_irqssysfs attributes for configuring software interrupt coalescing.Signed-off-by Florian Fainelli <[email protected]>Reviewed-by Justin Chen <[email protected]>--- drivers/net/ethernet/broadcom/asp2/bcmasp_intf.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)
Florian Fainelli
maintainerPATCH v2 2/2 net: bcmasp: enable GRO software interrupt coalescing by default
In reply to Florian FainelliUtilize netdev_sw_irq_coalesce_default_on() to provide conservative default settings for GRO software interrupt coalescing.
--- drivers/net/ethernet/broadcom/asp2/bcmasp_intf.c | 2 ++ 1 file changed, 2 insertions(+)
drivers/net/ethernet/broadcom/asp2/bcmasp_intf.c +2 -0
@@ -1279,6 +1279,8 @@ struct bcmasp_intf *bcmasp_interface_create(struct bcmasp_priv *priv, ndev->hw_features |= ndev->features; ndev->needed_headroom +=sizeof (struct bcmasp_pkt_offload ); +netdev_sw_irq_coalesce_default_on (ndev); +return intf; err_free_netdev:
Signature · 1 line
2.34.1
Re: [PATCH net-next v2 2/2] net: bcmasp: enable GRO software interrupt coalescing by default
Quoted 14 lines · Florian Fainelli
Utilize
netdev_sw_irq_coalesce_default_on()to provide conservative default settings for GRO software interrupt coalescing.Signed-off-by Florian Fainelli <[email protected]>Reviewed-by Justin Chen <[email protected]>--- drivers/net/ethernet/broadcom/asp2/bcmasp_intf.c | 2 ++ 1 file changed, 2 insertions(+)drivers/net/ethernet/broadcom/asp2/bcmasp_intf.c +0
-0
drivers/net/ethernet/broadcom/asp2/bcmasp_intf.c struct bcmasp_intf *bcmasp_interface_create(struct bcmasp_priv *priv, · line 1284
Quoted 6 lines
drivers/net/ethernet/broadcom/asp2/bcmasp_intf.c +2
-0@@ -1279,6 +1279,8 @@ struct bcmasp_intf *bcmasp_interface_create(struct bcmasp_priv *priv, ndev->hw_features |= ndev->features; ndev->needed_headroom +=sizeof (struct bcmasp_pkt_offload ); +netdev_sw_irq_coalesce_default_on (ndev); +return intf;
Just to make it explicit to other readers: netdev_sw_irq_coalesce_default_on appears to be called before register_netdev, as the documentation for netdev_sw_irq_coalesce_default_on describes.
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 10 lines · On Wed, 11 Jun 2025 14:27:28 -0700 you wrote:
These two patches add support for GRO software interrupt coalescing, kudos to Zak for doing this on bcmgenet first.
before:
00:03:31 CPU %usr %nice %sys %iowait %irq %soft %steal
%guest %idle
00:03:32 all 0.00 0.00 1.51 0.00 0.50 7.29 0.00 0.00 90.70[...]
Here is the summary with links:
- [net-next,v2,1/2] net: bcmasp: Utilize napi_complete_done() return value
https://git.kernel.org/netdev/net-next/c/391859cb17f5 - [net-next,v2,2/2] net: bcmasp: enable GRO software interrupt coalescing by default https://git.kernel.org/netdev/net-next/c/b0f5b1682957
You are awesome, thank you!
Signature · 2 lines
Deet-doot-dot, I am a bot. https://korg.docs.kernel.org/patchwork/pwbot.html