All of lore.kernel.org
 help / color / mirror / Atom feed
From: Flavio Leitner <fbl@redhat.com>
To: Cong Wang <xiyou.wangcong@gmail.com>
Cc: Eric Dumazet <eric.dumazet@gmail.com>,
	Linux Kernel Network Developers <netdev@vger.kernel.org>,
	Paolo Abeni <pabeni@redhat.com>,
	David Miller <davem@davemloft.net>,
	Florian Westphal <fw@strlen.de>,
	NetFilter <netfilter-devel@vger.kernel.org>
Subject: Re: [PATCH net-next] net: preserve sock reference when scrubbing the skb.
Date: Tue, 26 Jun 2018 20:33:02 -0300	[thread overview]
Message-ID: <20180626233302.GU19565@plex.lan> (raw)
In-Reply-To: <CAM_iQpU8E5OuXx87Dm+jbqwbkkwETNF_RZh-VnUkF5seFPvv_A@mail.gmail.com>

On Tue, Jun 26, 2018 at 03:47:31PM -0700, Cong Wang wrote:
> On Tue, Jun 26, 2018 at 3:03 PM Flavio Leitner <fbl@redhat.com> wrote:
> >
> > On Tue, Jun 26, 2018 at 02:48:47PM -0700, Cong Wang wrote:
> > > On Mon, Jun 25, 2018 at 11:41 PM Eric Dumazet <eric.dumazet@gmail.com> wrote:
> > > > When a packet is attached to a socket, we should keep the association as much as possible.
> > >
> > > As much as possible within one stack, I agree. I still don't understand
> > > why we should keep it across the stack boundary.
> > >
> > > > Only when a new association needs to be done, skb_orphan() needs to be called.
> > > >
> > > > Doing this skb_orphan() too soon breaks back pressure in general, this is bad, since a socket
> > > > can evades SO_SNDBUF limits.
> > >
> > > Right before leaving the stack is not too soon, it is the latest
> > > actually, for veth case.
> >
> > Depends on how you view things - it's the same host/stack sharing the
> > same resources, so why should we not keep it?
> 
> Because stacks are supposed to be independent, netdevices are
> isolated, iptables and route tables too. This is how netns is designed
> from the beginning. The trend today is actually more isolation instead
> of more sharing, given the popularity of containers.

It is still isolated, the sk carries the netns info and it is
orphaned when it re-enters the stack.

-- 
Flavio

  reply	other threads:[~2018-06-26 23:33 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-06-25 15:56 [PATCH net-next] net: preserve sock reference when scrubbing the skb Flavio Leitner
2018-06-26  4:15 ` Cong Wang
2018-06-26  6:41   ` Eric Dumazet
2018-06-26 12:38     ` Flavio Leitner
2018-06-26 13:06       ` Eric Dumazet
2018-06-26 13:32         ` Flavio Leitner
2018-06-26 21:48     ` Cong Wang
2018-06-26 22:03       ` Flavio Leitner
2018-06-26 22:47         ` Cong Wang
2018-06-26 23:33           ` Flavio Leitner [this message]
2018-06-27  0:29             ` Cong Wang
2018-06-27  0:39               ` Flavio Leitner
2018-06-27  1:28                 ` Cong Wang
2018-06-27 12:31                   ` Flavio Leitner
2018-06-27 19:06                     ` Cong Wang
2018-06-27 20:19                       ` Flavio Leitner
2018-06-28 21:51                         ` Cong Wang
2018-06-27  2:32               ` Eric Dumazet
2018-06-26 23:53           ` Eric Dumazet
2018-06-27  0:44             ` Cong Wang
2018-06-27  2:35               ` Eric Dumazet
2018-06-27 18:59                 ` Cong Wang
2018-06-27 19:33                   ` Eric Dumazet
2018-06-27 19:55                     ` Cong Wang
2018-06-28 23:18 ` Cong Wang

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=20180626233302.GU19565@plex.lan \
    --to=fbl@redhat.com \
    --cc=davem@davemloft.net \
    --cc=eric.dumazet@gmail.com \
    --cc=fw@strlen.de \
    --cc=netdev@vger.kernel.org \
    --cc=netfilter-devel@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=xiyou.wangcong@gmail.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.