linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net-next v2 0/2] net: bcmasp: add support for GRO
@ 2025-06-11 21:27 Florian Fainelli
  2025-06-11 21:27 ` [PATCH net-next v2 1/2] net: bcmasp: Utilize napi_complete_done() return value Florian Fainelli
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Florian Fainelli @ 2025-06-11 21:27 UTC (permalink / raw)
  To: netdev
  Cc: Florian Fainelli, Justin Chen, Andrew Lunn, David S. Miller,
	Eric Dumazet, Jakub Kicinski, Paolo Abeni,
	open list:BROADCOM ASP 2.0 ETHERNET DRIVER, open list

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(-)

-- 
2.34.1


^ permalink raw reply	[flat|nested] 6+ messages in thread

* [PATCH net-next v2 1/2] net: bcmasp: Utilize napi_complete_done() return value
  2025-06-11 21:27 [PATCH net-next v2 0/2] net: bcmasp: add support for GRO Florian Fainelli
@ 2025-06-11 21:27 ` Florian Fainelli
  2025-06-12 20:22   ` Joe Damato
  2025-06-11 21:27 ` [PATCH net-next v2 2/2] net: bcmasp: enable GRO software interrupt coalescing by default Florian Fainelli
  2025-06-13  1:30 ` [PATCH net-next v2 0/2] net: bcmasp: add support for GRO patchwork-bot+netdevbpf
  2 siblings, 1 reply; 6+ messages in thread
From: Florian Fainelli @ 2025-06-11 21:27 UTC (permalink / raw)
  To: netdev
  Cc: Florian Fainelli, Justin Chen, Andrew Lunn, David S. Miller,
	Eric Dumazet, Jakub Kicinski, Paolo Abeni,
	open list:BROADCOM ASP 2.0 ETHERNET DRIVER, open list

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.

Signed-off-by: Florian Fainelli <florian.fainelli@broadcom.com>
Reviewed-by: Justin Chen <justin.chen@broadcom.com>
---
 drivers/net/ethernet/broadcom/asp2/bcmasp_intf.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/net/ethernet/broadcom/asp2/bcmasp_intf.c b/drivers/net/ethernet/broadcom/asp2/bcmasp_intf.c
index 0d61b8580d72..7dc28166d337 100644
--- a/drivers/net/ethernet/broadcom/asp2/bcmasp_intf.c
+++ b/drivers/net/ethernet/broadcom/asp2/bcmasp_intf.c
@@ -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;
 }
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [PATCH net-next v2 2/2] net: bcmasp: enable GRO software interrupt coalescing by default
  2025-06-11 21:27 [PATCH net-next v2 0/2] net: bcmasp: add support for GRO Florian Fainelli
  2025-06-11 21:27 ` [PATCH net-next v2 1/2] net: bcmasp: Utilize napi_complete_done() return value Florian Fainelli
@ 2025-06-11 21:27 ` Florian Fainelli
  2025-06-12 20:33   ` Joe Damato
  2025-06-13  1:30 ` [PATCH net-next v2 0/2] net: bcmasp: add support for GRO patchwork-bot+netdevbpf
  2 siblings, 1 reply; 6+ messages in thread
From: Florian Fainelli @ 2025-06-11 21:27 UTC (permalink / raw)
  To: netdev
  Cc: Florian Fainelli, Justin Chen, Andrew Lunn, David S. Miller,
	Eric Dumazet, Jakub Kicinski, Paolo Abeni,
	open list:BROADCOM ASP 2.0 ETHERNET DRIVER, open list

Utilize netdev_sw_irq_coalesce_default_on() to provide conservative
default settings for GRO software interrupt coalescing.

Signed-off-by: Florian Fainelli <florian.fainelli@broadcom.com>
Reviewed-by: Justin Chen <justin.chen@broadcom.com>
---
 drivers/net/ethernet/broadcom/asp2/bcmasp_intf.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/net/ethernet/broadcom/asp2/bcmasp_intf.c b/drivers/net/ethernet/broadcom/asp2/bcmasp_intf.c
index 7dc28166d337..a6ea477bce3c 100644
--- a/drivers/net/ethernet/broadcom/asp2/bcmasp_intf.c
+++ b/drivers/net/ethernet/broadcom/asp2/bcmasp_intf.c
@@ -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:
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH net-next v2 1/2] net: bcmasp: Utilize napi_complete_done() return value
  2025-06-11 21:27 ` [PATCH net-next v2 1/2] net: bcmasp: Utilize napi_complete_done() return value Florian Fainelli
@ 2025-06-12 20:22   ` Joe Damato
  0 siblings, 0 replies; 6+ messages in thread
From: Joe Damato @ 2025-06-12 20:22 UTC (permalink / raw)
  To: Florian Fainelli
  Cc: netdev, Justin Chen, Andrew Lunn, David S. Miller, Eric Dumazet,
	Jakub Kicinski, Paolo Abeni,
	open list:BROADCOM ASP 2.0 ETHERNET DRIVER, open list

On Wed, Jun 11, 2025 at 02:27:29PM -0700, Florian Fainelli wrote:
> 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.
> 
> Signed-off-by: Florian Fainelli <florian.fainelli@broadcom.com>
> Reviewed-by: Justin Chen <justin.chen@broadcom.com>
> ---
>  drivers/net/ethernet/broadcom/asp2/bcmasp_intf.c | 4 +---
>  1 file changed, 1 insertion(+), 3 deletions(-)
> 

Reviewed-by: Joe Damato <joe@dama.to>

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH net-next v2 2/2] net: bcmasp: enable GRO software interrupt coalescing by default
  2025-06-11 21:27 ` [PATCH net-next v2 2/2] net: bcmasp: enable GRO software interrupt coalescing by default Florian Fainelli
@ 2025-06-12 20:33   ` Joe Damato
  0 siblings, 0 replies; 6+ messages in thread
From: Joe Damato @ 2025-06-12 20:33 UTC (permalink / raw)
  To: Florian Fainelli
  Cc: netdev, Justin Chen, Andrew Lunn, David S. Miller, Eric Dumazet,
	Jakub Kicinski, Paolo Abeni,
	open list:BROADCOM ASP 2.0 ETHERNET DRIVER, open list

On Wed, Jun 11, 2025 at 02:27:30PM -0700, Florian Fainelli wrote:
> Utilize netdev_sw_irq_coalesce_default_on() to provide conservative
> default settings for GRO software interrupt coalescing.
> 
> Signed-off-by: Florian Fainelli <florian.fainelli@broadcom.com>
> Reviewed-by: Justin Chen <justin.chen@broadcom.com>
> ---
>  drivers/net/ethernet/broadcom/asp2/bcmasp_intf.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/drivers/net/ethernet/broadcom/asp2/bcmasp_intf.c b/drivers/net/ethernet/broadcom/asp2/bcmasp_intf.c
> index 7dc28166d337..a6ea477bce3c 100644
> --- a/drivers/net/ethernet/broadcom/asp2/bcmasp_intf.c
> +++ b/drivers/net/ethernet/broadcom/asp2/bcmasp_intf.c
> @@ -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.

Reviewed-by: Joe Damato <joe@dama.to>

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH net-next v2 0/2] net: bcmasp: add support for GRO
  2025-06-11 21:27 [PATCH net-next v2 0/2] net: bcmasp: add support for GRO Florian Fainelli
  2025-06-11 21:27 ` [PATCH net-next v2 1/2] net: bcmasp: Utilize napi_complete_done() return value Florian Fainelli
  2025-06-11 21:27 ` [PATCH net-next v2 2/2] net: bcmasp: enable GRO software interrupt coalescing by default Florian Fainelli
@ 2025-06-13  1:30 ` patchwork-bot+netdevbpf
  2 siblings, 0 replies; 6+ messages in thread
From: patchwork-bot+netdevbpf @ 2025-06-13  1:30 UTC (permalink / raw)
  To: Florian Fainelli
  Cc: netdev, justin.chen, andrew+netdev, davem, edumazet, kuba, pabeni,
	bcm-kernel-feedback-list, linux-kernel

Hello:

This series was applied to netdev/net-next.git (main)
by Jakub Kicinski <kuba@kernel.org>:

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!
-- 
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html



^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2025-06-13  1:30 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-06-11 21:27 [PATCH net-next v2 0/2] net: bcmasp: add support for GRO Florian Fainelli
2025-06-11 21:27 ` [PATCH net-next v2 1/2] net: bcmasp: Utilize napi_complete_done() return value Florian Fainelli
2025-06-12 20:22   ` Joe Damato
2025-06-11 21:27 ` [PATCH net-next v2 2/2] net: bcmasp: enable GRO software interrupt coalescing by default Florian Fainelli
2025-06-12 20:33   ` Joe Damato
2025-06-13  1:30 ` [PATCH net-next v2 0/2] net: bcmasp: add support for GRO patchwork-bot+netdevbpf

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).