netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Eric Dumazet <eric.dumazet@gmail.com>
To: Daniel Borkmann <daniel@iogearbox.net>,
	Joe Stringer <joe@wand.net.nz>, Florian Westphal <fw@strlen.de>
Cc: netdev <netdev@vger.kernel.org>,
	john fastabend <john.fastabend@gmail.com>,
	Lorenz Bauer <lmb@cloudflare.com>,
	Jakub Sitnicki <jakub@cloudflare.com>,
	Paolo Abeni <pabeni@redhat.com>, Flavio Leitner <fbl@redhat.com>,
	ast@kernel.org
Subject: Re: Removing skb_orphan() from ip_rcv_core()
Date: Tue, 25 Jun 2019 19:03:36 +0200	[thread overview]
Message-ID: <5f916eb2-9971-f3a8-fac8-b4b51cd881b0@gmail.com> (raw)
In-Reply-To: <4deff7d7-cc10-090d-86f2-850148fdf032@iogearbox.net>



On 6/25/19 2:35 AM, Daniel Borkmann wrote:

> 
> But wasn't the whole point of 9c4c325252c5 ("skbuff: preserve sock reference when
> scrubbing the skb.") to defer orphaning to as late as possible? If I'm not missing
> anything, then above would reintroduce the issues that 9c4c325252c5 was trying to
> solve wrt TSQ/XPS/etc when skb was sent via veth based data path to cross netns and
> then forwarded to phys dev for transmission; meaning, skb->sk is lost at the point
> of dev_queue_xmit() for the latter. A side-effect this would also have is that this
> changes behavior again for tc egress programs sitting on phys dev (e.g. querying
> sock cookie or other related features).


Unless we can detect/decide that a packet going through veth pair is going to be locally
consumed, or forwarded to a physical device (another ndo_start_xmit()), we need
to skb_orphan() the packet, exactly the same way than loopback ndo_start_xmit()

(We could have setups where these packets going through lo interface could be forwarded
to a NIC...)

Backpressure is a best effort, we should not make it an absolute requirement and
prevent doing early demux as early as possible in RX path.

 

  reply	other threads:[~2019-06-25 17:03 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 [this message]
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
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=5f916eb2-9971-f3a8-fac8-b4b51cd881b0@gmail.com \
    --to=eric.dumazet@gmail.com \
    --cc=ast@kernel.org \
    --cc=daniel@iogearbox.net \
    --cc=fbl@redhat.com \
    --cc=fw@strlen.de \
    --cc=jakub@cloudflare.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).