From: Arnd Bergmann <arnd@arndb•de>
To: David Miller <davem@davemloft•net>
Cc: herbert@gondor•apana.org.au, mashirle@us•ibm.com,
netdev@vger•kernel.org, mwagner@redhat•com
Subject: Re: macvtap: Limit packet queue length
Date: Fri, 23 Jul 2010 09:28:08 +0200 [thread overview]
Message-ID: <201007230928.09064.arnd@arndb.de> (raw)
In-Reply-To: <20100722.125808.232541418.davem@davemloft.net>
On Thursday 22 July 2010, David Miller wrote:
> 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.
But this is the receive path, not transmit, so a packet coming from an
external NIC never goes through dev_hard_start_xmit.
Arnd
next prev parent reply other threads:[~2010-07-23 7:28 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
2010-07-23 7:28 ` Arnd Bergmann [this message]
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=201007230928.09064.arnd@arndb.de \
--to=arnd@arndb$(echo .)de \
--cc=davem@davemloft$(echo .)net \
--cc=herbert@gondor$(echo .)apana.org.au \
--cc=mashirle@us$(echo .)ibm.com \
--cc=mwagner@redhat$(echo .)com \
--cc=netdev@vger$(echo .)kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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