From: Maciej Fijalkowski <maciej.fijalkowski@intel.com>
To: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
Cc: <s.shtylyov@omp.ru>, <davem@davemloft.net>, <edumazet@google.com>,
<kuba@kernel.org>, <pabeni@redhat.com>, <netdev@vger.kernel.org>,
<linux-renesas-soc@vger.kernel.org>
Subject: Re: [PATCH net-next v2 1/2] net: renesas: rswitch: Use napi_gro_receive() in RX
Date: Tue, 6 Jun 2023 19:50:50 +0200 [thread overview]
Message-ID: <ZH9x+qhVtqd+q3VM@boxer> (raw)
In-Reply-To: <20230606085558.1708766-2-yoshihiro.shimoda.uh@renesas.com>
On Tue, Jun 06, 2023 at 05:55:57PM +0900, Yoshihiro Shimoda wrote:
> This hardware can receive multiple frames so that using
> napi_gro_receive() instead of netif_receive_skb() gets good
> performance of RX.
>
> Signed-off-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
Reviewed-by: Maciej Fijalkowski <maciej.fijalkowski@intel.com>
> ---
> drivers/net/ethernet/renesas/rswitch.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/net/ethernet/renesas/rswitch.c b/drivers/net/ethernet/renesas/rswitch.c
> index aace87139cea..7bb0a6d594a0 100644
> --- a/drivers/net/ethernet/renesas/rswitch.c
> +++ b/drivers/net/ethernet/renesas/rswitch.c
> @@ -729,7 +729,7 @@ static bool rswitch_rx(struct net_device *ndev, int *quota)
> }
> skb_put(skb, pkt_len);
> skb->protocol = eth_type_trans(skb, ndev);
> - netif_receive_skb(skb);
> + napi_gro_receive(&rdev->napi, skb);
Some other optmization which you could do later on is to improve
rswitch_next_queue_index() as it is used on a per packet basis.
> rdev->ndev->stats.rx_packets++;
> rdev->ndev->stats.rx_bytes += pkt_len;
>
> --
> 2.25.1
>
>
next prev parent reply other threads:[~2023-06-06 17:51 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-06-06 8:55 [PATCH net-next v2 0/2] net: renesas: rswitch: Improve perfromance of TX/RX Yoshihiro Shimoda
2023-06-06 8:55 ` [PATCH net-next v2 1/2] net: renesas: rswitch: Use napi_gro_receive() in RX Yoshihiro Shimoda
2023-06-06 17:50 ` Maciej Fijalkowski [this message]
2023-06-07 1:00 ` Yoshihiro Shimoda
2023-06-06 8:55 ` [PATCH net-next v2 2/2] net: renesas: rswitch: Use hardware pause features Yoshihiro Shimoda
2023-06-06 17:54 ` Maciej Fijalkowski
2023-06-06 23:57 ` Yoshihiro Shimoda
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=ZH9x+qhVtqd+q3VM@boxer \
--to=maciej.fijalkowski@intel.com \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=kuba@kernel.org \
--cc=linux-renesas-soc@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=s.shtylyov@omp.ru \
--cc=yoshihiro.shimoda.uh@renesas.com \
/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