Netdev List
 help / color / mirror / Atom feed
From: Sieng Piaw Liew <liew.s.piaw@gmail.com>
To: Eric Dumazet <eric.dumazet@gmail.com>
Cc: Florian Fainelli <f.fainelli@gmail.com>,
	bcm-kernel-feedback-list@broadcom.com, netdev@vger.kernel.org,
	liew.s.piaw@gmail.com
Subject: Re: [PATCH net-next] bcm63xx_enet: batch process rx path
Date: Wed, 9 Dec 2020 11:33:14 +0800	[thread overview]
Message-ID: <20201209033314.GA38@DESKTOP-8REGVGF.localdomain> (raw)
In-Reply-To: <3caedd41-669e-94be-9214-e93eed5ae073@gmail.com>

On Fri, Dec 04, 2020 at 10:50:45AM +0100, Eric Dumazet wrote:
> 
> 
> On 12/4/20 6:46 AM, Sieng Piaw Liew wrote:
> > Use netif_receive_skb_list to batch process rx skb.
> > Tested on BCM6328 320 MHz using iperf3 -M 512, increasing performance
> > by 12.5%.
> > 
> 
> 
> 
> Well, the real question is why you do not simply use GRO,
> to get 100% performance gain or more for TCP flows.
> 
> 
> netif_receive_skb_list() is no longer needed,
> GRO layer already uses batching for non TCP packets.
> 
> We probably should mark is deprecated.
> 
> diff --git a/drivers/net/ethernet/broadcom/bcm63xx_enet.c b/drivers/net/ethernet/broadcom/bcm63xx_enet.c
> index 916824cca3fda194c42fefec7f514ced1a060043..6fdbe231b7c1b27f523889bda8a20ab7eaab65a6 100644
> --- a/drivers/net/ethernet/broadcom/bcm63xx_enet.c
> +++ b/drivers/net/ethernet/broadcom/bcm63xx_enet.c
> @@ -391,7 +391,7 @@ static int bcm_enet_receive_queue(struct net_device *dev, int budget)
>                 skb->protocol = eth_type_trans(skb, dev);
>                 dev->stats.rx_packets++;
>                 dev->stats.rx_bytes += len;
> -               netif_receive_skb(skb);
> +               napi_gro_receive_skb(&priv->napi, skb);
>  
>         } while (--budget > 0);
>  

The bcm63xx router SoC does not have enough CPU power nor hardware
accelerator to process checksum validation fast enough for GRO/GSO.

I have tested napi_gro_receive() on LAN-WAN setup. The resulting
bandwidth dropped from 95Mbps wire speed down to 80Mbps. And it's
inconsistent, with spikes and drops of >5Mbps.

The ag71xx driver for ath79 router SoC reverted its use for the same
reason.
http://lists.infradead.org/pipermail/lede-commits/2017-October/004864.html

  reply	other threads:[~2020-12-09  3:34 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-12-04  5:46 [PATCH net-next] bcm63xx_enet: batch process rx path Sieng Piaw Liew
2020-12-04  5:46 ` [PATCH net-next] bcm63xx_enet: add BQL support Sieng Piaw Liew
2020-12-04 18:27   ` Florian Fainelli
2020-12-04  5:46 ` [PATCH net-next] bcm63xx_enet: alloc rx skb with NET_IP_ALIGN Sieng Piaw Liew
2020-12-04 18:28   ` Florian Fainelli
2020-12-04  5:46 ` [PATCH net-next] bcm63xx_enet: convert to build_skb Sieng Piaw Liew
2020-12-04 10:14   ` Eric Dumazet
2020-12-04  9:50 ` [PATCH net-next] bcm63xx_enet: batch process rx path Eric Dumazet
2020-12-09  3:33   ` Sieng Piaw Liew [this message]
2020-12-04 18:24 ` Florian Fainelli

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20201209033314.GA38@DESKTOP-8REGVGF.localdomain \
    --to=liew.s.piaw@gmail.com \
    --cc=bcm-kernel-feedback-list@broadcom.com \
    --cc=eric.dumazet@gmail.com \
    --cc=f.fainelli@gmail.com \
    --cc=netdev@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox