From: David Miller <davem@davemloft.net>
To: wangchen@cn.fujitsu.com
Cc: netdev@vger.kernel.org, vinay@linux.vnet.ibm.com,
krkumar2@in.ibm.com, matheos.worku@sun.com
Subject: Re: [PATCH 2/2]: niu: Manage TX backlog in-driver.
Date: Sun, 22 Jun 2008 19:30:43 -0700 (PDT) [thread overview]
Message-ID: <20080622.193043.243787410.davem@davemloft.net> (raw)
In-Reply-To: <485F04BD.6090601@cn.fujitsu.com>
From: Wang Chen <wangchen@cn.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.
prev parent reply other threads:[~2008-06-23 2:30 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-06-22 23:16 [PATCH 2/2]: niu: Manage TX backlog in-driver David Miller
2008-06-23 2:04 ` Wang Chen
2008-06-23 2:30 ` David Miller [this message]
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=20080622.193043.243787410.davem@davemloft.net \
--to=davem@davemloft.net \
--cc=krkumar2@in.ibm.com \
--cc=matheos.worku@sun.com \
--cc=netdev@vger.kernel.org \
--cc=vinay@linux.vnet.ibm.com \
--cc=wangchen@cn.fujitsu.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;
as well as URLs for NNTP newsgroup(s).