From: Florian Fainelli <f.fainelli@gmail.com>
To: Sieng Piaw Liew <liew.s.piaw@gmail.com>
Cc: bcm-kernel-feedback-list@broadcom.com, netdev@vger.kernel.org,
linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH net-next v3 6/7] bcm63xx_enet: convert to build_skb
Date: Wed, 6 Jan 2021 09:08:20 -0800 [thread overview]
Message-ID: <95d9b489-5228-717c-ac47-29308fc7b97e@gmail.com> (raw)
In-Reply-To: <20210106144208.1935-7-liew.s.piaw@gmail.com>
On 1/6/21 6:42 AM, Sieng Piaw Liew wrote:
> We can increase the efficiency of rx path by using buffers to receive
> packets then build SKBs around them just before passing into the network
> stack. In contrast, preallocating SKBs too early reduces CPU cache
> efficiency.
>
> Check if we're in NAPI context when refilling RX. Normally we're almost
> always running in NAPI context. Dispatch to napi_alloc_frag directly
> instead of relying on netdev_alloc_frag which does the same but
> with the overhead of local_bh_disable/enable.
>
> Tested on BCM6328 320 MHz and iperf3 -M 512 to measure packet/sec
> performance. Included netif_receive_skb_list and NET_IP_ALIGN
> optimizations.
>
> Before:
> [ ID] Interval Transfer Bandwidth Retr
> [ 4] 0.00-10.00 sec 49.9 MBytes 41.9 Mbits/sec 197 sender
> [ 4] 0.00-10.00 sec 49.3 MBytes 41.3 Mbits/sec receiver
>
> After:
> [ ID] Interval Transfer Bandwidth Retr
> [ 4] 0.00-30.00 sec 171 MBytes 47.8 Mbits/sec 272 sender
> [ 4] 0.00-30.00 sec 170 MBytes 47.6 Mbits/sec receiver
>
> Signed-off-by: Sieng Piaw Liew <liew.s.piaw@gmail.com>
Acked-by: Florian Fainelli <f.fainelli@gmail.com>
--
Florian
next prev parent reply other threads:[~2021-01-06 17:09 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-01-06 14:42 [PATCH net-next v3 0/7] bcm63xx_enet: major makeover of driver Sieng Piaw Liew
2021-01-06 14:42 ` [PATCH net-next v3 1/7] bcm63xx_enet: batch process rx path Sieng Piaw Liew
2021-01-06 17:04 ` Florian Fainelli
2021-01-06 14:42 ` [PATCH net-next v3 2/7] bcm63xx_enet: add BQL support Sieng Piaw Liew
2021-01-06 17:05 ` Florian Fainelli
2021-01-06 14:42 ` [PATCH net-next v3 3/7] bcm63xx_enet: add xmit_more support Sieng Piaw Liew
2021-01-06 17:05 ` Florian Fainelli
2021-01-06 14:42 ` [PATCH net-next v3 4/7] bcm63xx_enet: alloc rx skb with NET_IP_ALIGN Sieng Piaw Liew
2021-01-06 17:06 ` Florian Fainelli
2021-01-06 14:42 ` [PATCH net-next v3 5/7] bcm63xx_enet: consolidate rx SKB ring cleanup code Sieng Piaw Liew
2021-01-06 17:07 ` Florian Fainelli
2021-01-06 14:42 ` [PATCH net-next v3 6/7] bcm63xx_enet: convert to build_skb Sieng Piaw Liew
2021-01-06 17:08 ` Florian Fainelli [this message]
2021-01-06 14:42 ` [PATCH net-next v3 7/7] bcm63xx_enet: improve rx loop Sieng Piaw Liew
2021-01-06 17:08 ` Florian Fainelli
2021-01-06 17:03 ` [PATCH net-next v3 0/7] bcm63xx_enet: major makeover of driver Florian Fainelli
2021-01-07 20:41 ` Jakub Kicinski
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=95d9b489-5228-717c-ac47-29308fc7b97e@gmail.com \
--to=f.fainelli@gmail.com \
--cc=bcm-kernel-feedback-list@broadcom.com \
--cc=liew.s.piaw@gmail.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--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