[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1274302191.3148.2.camel@lsx.localdomain>
Date: Wed, 19 May 2010 22:49:51 +0200
From: Thomas Graf <tgraf@...hat.com>
To: Neil Horman <nhorman@...driver.com>
Cc: Neil Horman <nhorman@...hat.com>,
Eric Dumazet <eric.dumazet@...il.com>,
Herbert Xu <herbert@...dor.hengli.com.au>,
"David S. Miller" <davem@...emloft.net>, netdev@...r.kernel.org
Subject: Re: tun: Use netif_receive_skb instead of netif_rx
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.
--
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