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]
Message-Id: <20080622.193043.243787410.davem@davemloft.net>
Date:	Sun, 22 Jun 2008 19:30:43 -0700 (PDT)
From:	David Miller <davem@...emloft.net>
To:	wangchen@...fujitsu.com
Cc:	netdev@...r.kernel.org, vinay@...ux.vnet.ibm.com,
	krkumar2@...ibm.com, matheos.worku@....com
Subject: Re: [PATCH 2/2]: niu: Manage TX backlog in-driver.

From: Wang Chen <wangchen@...fujitsu.com>
Date: Mon, 23 Jun 2008 10:04:45 +0800

> David Miller said the following on 2008-6-23 7:16:
> > +
> > +		while ((skb = __skb_dequeue(&rp->tx_backlog)) != NULL)
> > +			dev_kfree_skb(skb);
> 
> How about __skb_queue_purge(&rp->tx_backlog);

Sure, I can use that, thanks for the suggestion.

> > +static void __niu_tx_queue_backlog(struct niu *np, struct tx_ring_info *rp,
> > +				   struct sk_buff *skb)
> > +{
> > +	if (skb_queue_len(&rp->tx_backlog) < np->dev->tx_queue_len)
> > +		__skb_queue_tail(&rp->tx_backlog, skb);
> 
> Do we need lock to proteck tx_backlog?
> How about use skb_queue_tail()?

That would just grab another lock (the sk_buff_head one), and the
overall goal of these changes is to decrease the number of locks taken
to TX packets and purge the TX ring during completions.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ