From: Eric Dumazet <eric.dumazet@gmail.com>
To: Herbert Xu <herbert@gondor.apana.org.au>
Cc: David Ward <david.ward@ll.mit.edu>, netdev@vger.kernel.org
Subject: Re: [PATCH net-next] xfrm: Call IP receive handler directly for inbound tunnel-mode packets
Date: Mon, 02 Jan 2012 09:18:02 +0100 [thread overview]
Message-ID: <1325492282.2526.32.camel@edumazet-laptop> (raw)
In-Reply-To: <20120102072828.GA5380@gondor.apana.org.au>
Le lundi 02 janvier 2012 à 18:28 +1100, Herbert Xu a écrit :
> You can't do this as this may cause stack overruns if we nest
> too deeply.
>
I was considering adding a generic helper, for tunneling,
taking into account the depth for current packet.
[ calling netif_receive_skb() instead of netif_rx(), to solve the OOO
problem occurring on SMP when interrupts are spreaded on several cpus ]
We could use the delta between skb->data and skb->head as an estimation
of this depth, in order not adding a new skb field ?
#define DEPTH_THRESHOLD (NET_SKB_PAD + 64)
static inline void netif_reinject(struct sk_buff *skb)
{
if (skb->data - skb->head < DEPTH_THRESHOLD)
netif_receive_skb(skb);
else
netif_rx(skb);
}
next prev parent reply other threads:[~2012-01-02 8:18 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-01-02 3:32 [PATCH net-next] xfrm: Call IP receive handler directly for inbound tunnel-mode packets David Ward
2012-01-02 7:28 ` Herbert Xu
2012-01-02 8:18 ` Eric Dumazet [this message]
2012-01-03 17:56 ` David Miller
2012-01-02 19:52 ` Ward, David - 0663 - MITLL
2012-01-11 4:45 ` 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=1325492282.2526.32.camel@edumazet-laptop \
--to=eric.dumazet@gmail.com \
--cc=david.ward@ll.mit.edu \
--cc=herbert@gondor.apana.org.au \
--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