mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH v1 0/2] net: bcmgenet: add support for GRO software interrupt coalescing
@ 2025-06-09 21:08 Zak Kemble
  2025-06-09 21:08 ` [PATCH v1 1/2] net: bcmgenet: use napi_complete_done return value Zak Kemble
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Zak Kemble @ 2025-06-09 21:08 UTC (permalink / raw)
  To: Doug Berger, Florian Fainelli,
	Broadcom internal kernel review list, Andrew Lunn,
	David S. Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni,
	netdev, linux-kernel
  Cc: Zak Kemble

Reposting as requested here https://lore.kernel.org/all/20250531224853.1339-1-zakkemble@gmail.com

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

-- 
2.39.5


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

* [PATCH v1 1/2] net: bcmgenet: use napi_complete_done return value
  2025-06-09 21:08 [PATCH v1 0/2] net: bcmgenet: add support for GRO software interrupt coalescing Zak Kemble
@ 2025-06-09 21:08 ` Zak Kemble
  2025-06-09 21:08 ` [PATCH v1 2/2] net: bcmgenet: enable GRO software interrupt coalescing by default Zak Kemble
  2025-06-09 21:10 ` [PATCH v1 0/2] net: bcmgenet: add support for GRO software interrupt coalescing Florian Fainelli
  2 siblings, 0 replies; 7+ messages in thread
From: Zak Kemble @ 2025-06-09 21:08 UTC (permalink / raw)
  To: Doug Berger, Florian Fainelli,
	Broadcom internal kernel review list, Andrew Lunn,
	David S. Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni,
	netdev, linux-kernel
  Cc: Zak Kemble

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: Zak Kemble <zakkemble@gmail.com>
---
 drivers/net/ethernet/broadcom/genet/bcmgenet.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/net/ethernet/broadcom/genet/bcmgenet.c b/drivers/net/ethernet/broadcom/genet/bcmgenet.c
index fa0077bc6..cc9bdd244 100644
--- a/drivers/net/ethernet/broadcom/genet/bcmgenet.c
+++ b/drivers/net/ethernet/broadcom/genet/bcmgenet.c
@@ -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,
-- 
2.39.5


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

* [PATCH v1 2/2] net: bcmgenet: enable GRO software interrupt coalescing by default
  2025-06-09 21:08 [PATCH v1 0/2] net: bcmgenet: add support for GRO software interrupt coalescing Zak Kemble
  2025-06-09 21:08 ` [PATCH v1 1/2] net: bcmgenet: use napi_complete_done return value Zak Kemble
@ 2025-06-09 21:08 ` Zak Kemble
  2025-06-09 21:10 ` [PATCH v1 0/2] net: bcmgenet: add support for GRO software interrupt coalescing Florian Fainelli
  2 siblings, 0 replies; 7+ messages in thread
From: Zak Kemble @ 2025-06-09 21:08 UTC (permalink / raw)
  To: Doug Berger, Florian Fainelli,
	Broadcom internal kernel review list, Andrew Lunn,
	David S. Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni,
	netdev, linux-kernel
  Cc: Zak Kemble

Apply conservative defaults.

Signed-off-by: Zak Kemble <zakkemble@gmail.com>
---
 drivers/net/ethernet/broadcom/genet/bcmgenet.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/net/ethernet/broadcom/genet/bcmgenet.c b/drivers/net/ethernet/broadcom/genet/bcmgenet.c
index cc9bdd244..4f40f6afe 100644
--- a/drivers/net/ethernet/broadcom/genet/bcmgenet.c
+++ b/drivers/net/ethernet/broadcom/genet/bcmgenet.c
@@ -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) {
-- 
2.39.5


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

* Re: [PATCH v1 0/2] net: bcmgenet: add support for GRO software interrupt coalescing
  2025-06-09 21:08 [PATCH v1 0/2] net: bcmgenet: add support for GRO software interrupt coalescing Zak Kemble
  2025-06-09 21:08 ` [PATCH v1 1/2] net: bcmgenet: use napi_complete_done return value Zak Kemble
  2025-06-09 21:08 ` [PATCH v1 2/2] net: bcmgenet: enable GRO software interrupt coalescing by default Zak Kemble
@ 2025-06-09 21:10 ` Florian Fainelli
  2 siblings, 0 replies; 7+ messages in thread
From: Florian Fainelli @ 2025-06-09 21:10 UTC (permalink / raw)
  To: Zak Kemble, Doug Berger, Florian Fainelli,
	Broadcom internal kernel review list, Andrew Lunn,
	David S. Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni,
	netdev, linux-kernel

Hi Zak,

On 6/9/25 14:08, Zak Kemble wrote:
> Reposting as requested here https://lore.kernel.org/all/20250531224853.1339-1-zakkemble@gmail.com
> 
> 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.

Since I gave you Tested-by and Reviewed-by tags, you should have been 
amending your commits with such tags, also you should be specifying the 
tree you are targeting, in that case it is "net-next", so the patches 
should be:

[PATCH net-next 0/2]
   [PATCH net-next 1/2] ...
   [PATCH net-next 2/2] ...

etc.

Please wait 24hrs before reposting an updated version with the tags and 
proper prefixing, thanks!
-- 
Florian


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

* Re: [PATCH v1 0/2] net: bcmgenet: add support for GRO software interrupt coalescing
  2025-06-02 19:00 ` Florian Fainelli
@ 2025-06-09 20:35   ` Florian Fainelli
  0 siblings, 0 replies; 7+ messages in thread
From: Florian Fainelli @ 2025-06-09 20:35 UTC (permalink / raw)
  To: Zak Kemble, Doug Berger, Broadcom internal kernel review list,
	Andrew Lunn, David S. Miller, Eric Dumazet, Jakub Kicinski,
	Paolo Abeni, netdev, linux-kernel

On 6/2/25 12:00, Florian Fainelli wrote:
> Hi Zak,
> 
> On 5/31/25 15:48, Zak Kemble wrote:
>> 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.
> 
> Without this patch, seeing the following with an iperf3 server running 
> at a gigabit link:
> 
> 00:18:19     CPU    %usr   %nice    %sys %iowait    %irq   %soft  %steal 
>   %guest   %idle
> 00:18:20     all    0.53    0.00    9.36    0.00    8.56   18.98    0.00 
>     0.00   62.57
> 
> and with your patches applied:
> 
> 00:00:56     CPU    %usr   %nice    %sys %iowait    %irq   %soft  %steal 
>   %guest   %idle
> 00:00:57     all    0.00    0.00    3.29    0.00    1.01    7.34    0.00 
>     0.00   88.35
> 
> so definitively helping, thanks!
> 
> Tested-by: Florian Fainelli <florian.fainelli@broadcom.com>
> Reviewed-by: Florian Fainelli <florian.fainelli@broadcom.com>
> 
> You will have to repost once net-next opens though:
> 
> https://patchwork.hopto.org/net-next.html
> 
> Thanks!

Zak, do you mind re-posting now that net-next is open? Thanks!
-- 
Florian

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

* Re: [PATCH v1 0/2] net: bcmgenet: add support for GRO software interrupt coalescing
  2025-05-31 22:48 Zak Kemble
@ 2025-06-02 19:00 ` Florian Fainelli
  2025-06-09 20:35   ` Florian Fainelli
  0 siblings, 1 reply; 7+ messages in thread
From: Florian Fainelli @ 2025-06-02 19:00 UTC (permalink / raw)
  To: Zak Kemble, Doug Berger, Broadcom internal kernel review list,
	Andrew Lunn, David S. Miller, Eric Dumazet, Jakub Kicinski,
	Paolo Abeni, netdev, linux-kernel

Hi Zak,

On 5/31/25 15:48, Zak Kemble wrote:
> 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.

Without this patch, seeing the following with an iperf3 server running 
at a gigabit link:

00:18:19     CPU    %usr   %nice    %sys %iowait    %irq   %soft  %steal 
  %guest   %idle
00:18:20     all    0.53    0.00    9.36    0.00    8.56   18.98    0.00 
    0.00   62.57

and with your patches applied:

00:00:56     CPU    %usr   %nice    %sys %iowait    %irq   %soft  %steal 
  %guest   %idle
00:00:57     all    0.00    0.00    3.29    0.00    1.01    7.34    0.00 
    0.00   88.35

so definitively helping, thanks!

Tested-by: Florian Fainelli <florian.fainelli@broadcom.com>
Reviewed-by: Florian Fainelli <florian.fainelli@broadcom.com>

You will have to repost once net-next opens though:

https://patchwork.hopto.org/net-next.html

Thanks!
-- 
Florian

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

* [PATCH v1 0/2] net: bcmgenet: add support for GRO software interrupt coalescing
@ 2025-05-31 22:48 Zak Kemble
  2025-06-02 19:00 ` Florian Fainelli
  0 siblings, 1 reply; 7+ messages in thread
From: Zak Kemble @ 2025-05-31 22:48 UTC (permalink / raw)
  To: Doug Berger, Florian Fainelli,
	Broadcom internal kernel review list, Andrew Lunn,
	David S. Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni,
	netdev, linux-kernel
  Cc: Zak Kemble

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

-- 
2.39.5


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

end of thread, other threads:[~2025-06-09 21:10 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-06-09 21:08 [PATCH v1 0/2] net: bcmgenet: add support for GRO software interrupt coalescing Zak Kemble
2025-06-09 21:08 ` [PATCH v1 1/2] net: bcmgenet: use napi_complete_done return value Zak Kemble
2025-06-09 21:08 ` [PATCH v1 2/2] net: bcmgenet: enable GRO software interrupt coalescing by default Zak Kemble
2025-06-09 21:10 ` [PATCH v1 0/2] net: bcmgenet: add support for GRO software interrupt coalescing Florian Fainelli
  -- strict thread matches above, loose matches on Subject: below --
2025-05-31 22:48 Zak Kemble
2025-06-02 19:00 ` Florian Fainelli
2025-06-09 20:35   ` Florian Fainelli

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®