lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date: Wed, 7 Jun 2023 01:00:24 +0000
From: Yoshihiro Shimoda <yoshihiro.shimoda.uh@...esas.com>
To: Maciej Fijalkowski <maciej.fijalkowski@...el.com>
CC: "s.shtylyov@....ru" <s.shtylyov@....ru>, "davem@...emloft.net"
	<davem@...emloft.net>, "edumazet@...gle.com" <edumazet@...gle.com>,
	"kuba@...nel.org" <kuba@...nel.org>, "pabeni@...hat.com" <pabeni@...hat.com>,
	"netdev@...r.kernel.org" <netdev@...r.kernel.org>,
	"linux-renesas-soc@...r.kernel.org" <linux-renesas-soc@...r.kernel.org>
Subject: RE: [PATCH net-next v2 1/2] net: renesas: rswitch: Use
 napi_gro_receive() in RX

Hello Maciej,

> From: Maciej Fijalkowski, Sent: Wednesday, June 7, 2023 2:51 AM
> 
> 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@...esas.com>
> 
> Reviewed-by: Maciej Fijalkowski <maciej.fijalkowski@...el.com>

Thank you for your review!

> > ---
> >  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.

Thank you for your suggestion! I'll try this later.

Best regards,
Yoshihiro Shimoda

> >  		rdev->ndev->stats.rx_packets++;
> >  		rdev->ndev->stats.rx_bytes += pkt_len;
> >
> > --
> > 2.25.1
> >
> >

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ