From: Thomas Graf <tgraf@redhat.com>
To: Neil Horman <nhorman@tuxdriver.com>
Cc: Neil Horman <nhorman@redhat.com>,
Eric Dumazet <eric.dumazet@gmail.com>,
Herbert Xu <herbert@gondor.hengli.com.au>,
"David S. Miller" <davem@davemloft.net>,
netdev@vger.kernel.org
Subject: Re: tun: Use netif_receive_skb instead of netif_rx
Date: Wed, 19 May 2010 22:49:51 +0200 [thread overview]
Message-ID: <1274302191.3148.2.camel@lsx.localdomain> (raw)
In-Reply-To: <20100519180053.GC26519@hmsreliant.think-freely.org>
On Wed, 2010-05-19 at 14:00 -0400, Neil Horman wrote:
> I'm currently testing this, unfortunately, and its not breaking anything, but it
> doesn't allow cgroups to classify frames comming from tun interfaces. I'm still
> investigating, but I think the issue is that, because we call local_bh_disable
> with this patch, we wind up raising the count at SOFTIRQ_OFFSET in preempt_count
> for the task. Since the cgroup classifier has this check:
>
> if (softirq_count() != SOFTIRQ_OFFSET))
> return -1;
>
> We still fail to classify the frame. the cgroup classifier is assuming that any
> frame arriving with a softirq count of 1 means we came directly from the
> dev_queue_xmit routine and is safe to check current(). Any less than that, and
> something is wrong (as we at least need the local_bh_disable in dev_queue_xmit),
> and any more implies that we have nested calls to local_bh_disable, meaning
> we're really handling a softirq context.
It is a hack but the only method to check for softirq context I found. I
would favor using a flag if there was one.
next prev parent reply other threads:[~2010-05-19 20:50 UTC|newest]
Thread overview: 55+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-05-19 7:57 tun: Use netif_receive_skb instead of netif_rx Herbert Xu
2010-05-19 8:09 ` Eric Dumazet
2010-05-19 8:18 ` Eric Dumazet
2010-05-19 8:21 ` Herbert Xu
2010-05-19 12:05 ` Neil Horman
2010-05-19 12:55 ` Neil Horman
2010-05-19 18:00 ` Neil Horman
2010-05-19 20:24 ` Neil Horman
2010-05-19 20:49 ` Thomas Graf [this message]
2010-05-19 21:00 ` Brian Bloniarz
2010-05-20 2:55 ` David Miller
2010-05-20 2:57 ` Herbert Xu
2010-05-20 3:05 ` David Miller
2010-05-20 3:34 ` Herbert Xu
2010-05-20 3:42 ` Herbert Xu
2010-05-20 3:46 ` David Miller
2010-05-20 4:54 ` Eric Dumazet
2010-05-20 5:01 ` Herbert Xu
2010-05-20 5:15 ` Eric Dumazet
2010-05-20 5:20 ` Herbert Xu
2010-05-20 5:36 ` Eric Dumazet
2010-05-20 5:46 ` Herbert Xu
2010-05-20 6:03 ` Eric Dumazet
2010-05-20 6:11 ` Herbert Xu
2010-05-20 6:19 ` Herbert Xu
2010-05-20 6:52 ` Herbert Xu
2010-05-20 8:10 ` Thomas Graf
2010-05-20 9:40 ` Thomas Graf
2010-05-24 6:44 ` David Miller
2010-05-20 17:29 ` Neil Horman
2010-05-20 23:16 ` Herbert Xu
2010-05-21 0:39 ` Neil Horman
2010-05-21 1:02 ` Herbert Xu
2010-05-21 1:16 ` Herbert Xu
2010-05-24 6:44 ` David Miller
2010-05-21 5:49 ` David Miller
2010-05-21 10:51 ` Neil Horman
2010-05-21 11:08 ` Herbert Xu
2010-05-21 12:59 ` Neil Horman
2010-05-21 16:40 ` Neil Horman
2010-05-22 1:49 ` cls_cgroup: Store classid in struct sock Herbert Xu
2010-05-22 12:26 ` Neil Horman
2010-05-24 5:42 ` Herbert Xu
2010-05-24 6:44 ` David Miller
2010-05-24 6:55 ` David Miller
2010-05-24 7:07 ` Herbert Xu
2010-05-24 7:14 ` David Miller
2010-05-24 11:09 ` Neil Horman
2010-05-24 11:24 ` Herbert Xu
2010-05-19 14:10 ` tun: Use netif_receive_skb instead of netif_rx Eric Dumazet
2010-05-19 14:31 ` Neil Horman
2010-05-19 8:20 ` Herbert Xu
2010-05-19 8:27 ` Eric Dumazet
2010-05-19 8:44 ` Herbert Xu
2010-05-19 20:14 ` David Miller
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=1274302191.3148.2.camel@lsx.localdomain \
--to=tgraf@redhat.com \
--cc=davem@davemloft.net \
--cc=eric.dumazet@gmail.com \
--cc=herbert@gondor.hengli.com.au \
--cc=netdev@vger.kernel.org \
--cc=nhorman@redhat.com \
--cc=nhorman@tuxdriver.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).