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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <03177710937042bb93dfbf3237394a91@realtek.com>
Date: Tue, 3 Sep 2024 02:51:43 +0000
From: Larry Chiu <larry.chiu@...ltek.com>
To: Jakub Kicinski <kuba@...nel.org>, Justin Lai <justinlai0215@...ltek.com>
CC: "davem@...emloft.net" <davem@...emloft.net>,
        "edumazet@...gle.com"
	<edumazet@...gle.com>,
        "pabeni@...hat.com" <pabeni@...hat.com>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        "netdev@...r.kernel.org" <netdev@...r.kernel.org>,
        "andrew@...n.ch"
	<andrew@...n.ch>,
        "jiri@...nulli.us" <jiri@...nulli.us>,
        "horms@...nel.org"
	<horms@...nel.org>,
        "rkannoth@...vell.com" <rkannoth@...vell.com>,
        "jdamato@...tly.com" <jdamato@...tly.com>,
        Ping-Ke Shih <pkshih@...ltek.com>
Subject: RE: [PATCH net-next v29 07/13] rtase: Implement a function to receive packets



> -----Original Message-----
> From: Jakub Kicinski <kuba@...nel.org>
> Sent: Tuesday, September 3, 2024 10:04 AM
> To: Justin Lai <justinlai0215@...ltek.com>
> Cc: davem@...emloft.net; edumazet@...gle.com; pabeni@...hat.com;
> linux-kernel@...r.kernel.org; netdev@...r.kernel.org; andrew@...n.ch;
> jiri@...nulli.us; horms@...nel.org; rkannoth@...vell.com;
> jdamato@...tly.com; Ping-Ke Shih <pkshih@...ltek.com>; Larry Chiu
> <larry.chiu@...ltek.com>
> Subject: Re: [PATCH net-next v29 07/13] rtase: Implement a function to
> receive packets
> 
> 
> External mail.
> 
> 
> 
> On Thu, 29 Aug 2024 11:48:26 +0800 Justin Lai wrote:
> > +             skb->dev = dev;
> 
> no need to assign skb->dev = dev; eth_type_trans() will do it for you

Thanks, we will remove it.

> 
> > +             skb_put(skb, pkt_size);
> > +             skb_mark_for_recycle(skb);
> > +             skb->protocol = eth_type_trans(skb, dev);
> > +
> > +             if (skb->pkt_type == PACKET_MULTICAST)
> > +                     tp->stats.multicast++;
> > +
> > +             rtase_rx_vlan_skb(desc, skb);
> > +             rtase_rx_skb(ring, skb);
> > +
> > +             dev_sw_netstats_rx_add(dev, pkt_size);
> > +
> > +skip_process_pkt:
> > +             workdone++;
> > +             cur_rx++;
> > +             entry = cur_rx % RTASE_NUM_DESC;
> > +             desc = ring->desc + sizeof(union rtase_rx_desc) * entry;
> > +     } while (workdone != budget);
> 
> The check needs to be at the start of the function.
> NAPI can be called with budget of 0 to limit the processing
> to just Tx cleanup. In that case no packet should be received.

OK, we will use a for loop instead.


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ