From: Eric Dumazet <eric.dumazet@gmail.com>
To: Jamal Hadi Salim <jhs@mojatatu.com>,
Joe Stringer <joe@wand.net.nz>,
Eric Dumazet <eric.dumazet@gmail.com>,
Florian Westphal <fw@strlen.de>
Cc: netdev <netdev@vger.kernel.org>,
john fastabend <john.fastabend@gmail.com>,
Daniel Borkmann <daniel@iogearbox.net>,
Lorenz Bauer <lmb@cloudflare.com>,
Jakub Sitnicki <jakub@cloudflare.com>,
Paolo Abeni <pabeni@redhat.com>
Subject: Re: Removing skb_orphan() from ip_rcv_core()
Date: Mon, 24 Jun 2019 18:49:14 +0200 [thread overview]
Message-ID: <d2692f14-6ac7-1335-3359-d397fbe1676f@gmail.com> (raw)
In-Reply-To: <ab745372-35eb-8bb8-30a4-0e861af27ac2@mojatatu.com>
On 6/24/19 7:47 AM, Jamal Hadi Salim wrote:
> On 2019-06-21 1:58 p.m., Joe Stringer wrote:
>> Hi folks, picking this up again..
> [..]
>> During LSFMM, it seemed like no-one knew quite why the skb_orphan() is
>> necessary in that path in the current version of the code, and that we
>> may be able to remove it. Florian, I know you weren't in the room for
>> that discussion, so raising it again now with a stack trace, Do you
>> have some sense what's going on here and whether there's a path
>> towards removing it from this path or allowing the skb->sk to be
>> retained during ip_rcv() in some conditions?
>
>
> Sorry - I havent followed the discussion but saw your email over
> the weekend and wanted to be at work to refresh my memory on some
> code. For maybe 2-3 years we have deployed the tproxy
> equivalent as a tc action on ingress (with no netfilter dependency).
>
> And, of course, we had to work around that specific code you are
> referring to - we didnt remove it. The tc action code increments
> the sk refcount and sets the tc index. The net core doesnt orphan
> the skb if a speacial tc index value is set (see attached patch)
>
> I never bothered up streaming the patch because the hack is a bit embarrassing (but worked ;->); and never posted the action code
> either because i thought this was just us that had this requirement.
> I am glad other people see the need for this feature. Is there effort
> to make this _not_ depend on iptables/netfilter? I am guessing if you
> want to do this from ebpf (tc or xdp) that is a requirement.
> Our need was with tcp at the time; so left udp dependency on netfilter
> alone.
>
Well, I would simply remove the skb_orphan() call completely.
next prev parent reply other threads:[~2019-06-24 16:49 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-06-21 17:58 Removing skb_orphan() from ip_rcv_core() Joe Stringer
2019-06-21 20:59 ` Florian Westphal
2019-06-25 3:17 ` Joe Stringer
2019-06-25 6:37 ` Eric Dumazet
2019-06-25 9:35 ` Daniel Borkmann
2019-06-25 17:03 ` Eric Dumazet
2019-06-25 18:20 ` Joe Stringer
2019-06-22 0:36 ` Eric Dumazet
2019-06-24 14:47 ` Jamal Hadi Salim
2019-06-24 16:49 ` Eric Dumazet [this message]
2019-06-25 10:55 ` Jamal Hadi Salim
2019-06-25 3:26 ` Joe Stringer
2019-06-25 11:06 ` Jamal Hadi Salim
2019-06-25 18:29 ` Joe Stringer
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=d2692f14-6ac7-1335-3359-d397fbe1676f@gmail.com \
--to=eric.dumazet@gmail.com \
--cc=daniel@iogearbox.net \
--cc=fw@strlen.de \
--cc=jakub@cloudflare.com \
--cc=jhs@mojatatu.com \
--cc=joe@wand.net.nz \
--cc=john.fastabend@gmail.com \
--cc=lmb@cloudflare.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.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).