From: David Miller <davem@davemloft.net>
To: herbert@gondor.apana.org.au
Cc: mashirle@us.ibm.com, netdev@vger.kernel.org, arnd@arndb.de,
mwagner@redhat.com
Subject: Re: macvtap: Limit packet queue length
Date: Thu, 22 Jul 2010 12:58:08 -0700 (PDT) [thread overview]
Message-ID: <20100722.125808.232541418.davem@davemloft.net> (raw)
In-Reply-To: <20100722160731.GA30723@gondor.apana.org.au>
From: Herbert Xu <herbert@gondor.apana.org.au>
Date: Fri, 23 Jul 2010 00:07:31 +0800
> On Thu, Jul 22, 2010 at 08:59:58AM -0700, Shirley Ma wrote:
>> On Thu, 2010-07-22 at 14:41 +0800, Herbert Xu wrote:
>> > {
>> > struct macvtap_queue *q = macvtap_get_queue(dev, skb);
>> > if (!q)
>> > - return -ENOLINK;
>> > + goto drop;
>> > +
>> > + if (skb_queue_len(&q->sk.sk_receive_queue) >=
>> > dev->tx_queue_len)
>> > + goto drop;
>> >
>>
>> Do we need to orphan skb here, just like tun?
>
> We could, but that is orthogonal to the problem at hand so feel
> free to do that in another patch.
These days, the stack pre-orphans all packets sent to ->ndo_start_xmit()
in dev_hard_start_xmit() as long as socket based TX timestamping is not
active for the packet.
next prev parent reply other threads:[~2010-07-22 19:57 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-07-22 6:41 macvtap: Limit packet queue length Herbert Xu
2010-07-22 7:44 ` Herbert Xu
2010-07-22 7:47 ` Chris Wright
2010-07-22 9:30 ` Arnd Bergmann
2010-07-22 16:05 ` Shirley Ma
2010-07-22 16:08 ` Herbert Xu
2010-07-22 18:42 ` Shirley Ma
2010-07-22 20:09 ` David Miller
2010-07-22 15:59 ` Shirley Ma
2010-07-22 16:07 ` Herbert Xu
2010-07-22 19:58 ` David Miller [this message]
2010-07-23 7:28 ` Arnd Bergmann
2010-07-23 7:58 ` Herbert Xu
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=20100722.125808.232541418.davem@davemloft.net \
--to=davem@davemloft.net \
--cc=arnd@arndb.de \
--cc=herbert@gondor.apana.org.au \
--cc=mashirle@us.ibm.com \
--cc=mwagner@redhat.com \
--cc=netdev@vger.kernel.org \
/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).