All of lore.kernel.org
 help / color / mirror / Atom feed
From: Cong Wang <xiyou.wangcong@gmail.com>
To: Eric Dumazet <eric.dumazet@gmail.com>
Cc: Flavio Leitner <fbl@redhat.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: Wed, 27 Jun 2018 12:55:37 -0700	[thread overview]
Message-ID: <CAM_iQpWA5KEacEeD184P3NvhZdR6tFhwtndsbX7PZio8A8brfw@mail.gmail.com> (raw)
In-Reply-To: <096ada36-8e05-c330-e5b3-3f6fcc77aea2@gmail.com>

On Wed, Jun 27, 2018 at 12:33 PM Eric Dumazet <eric.dumazet@gmail.com> wrote:
>
>
>
> On 06/27/2018 11:59 AM, Cong Wang wrote:
>
> >
> > IIRC, this skb_orphan() was introduced much earlier than TSQ, probably
> > from the beginning of veth.
>
> Sigh
>
> SO_SNDBUF was invented years ago before veth.

Yeah, probably when there was only one stack on one host.
SO_SNDBUF is aligned to networking stack basis.

>
> You focus on TSQ while it is only one of the many things that are broken.
>

I think it is the opposite: this patchset _potentially_ breaks things, not fixes
anything.


> >
> > Leaving the stack should be effectively equivalent to leaving the host,
> > from the view of network isolation.
> >
>
>
> Having a UDP socket being able to burn a cpu and fill a qdisc is a major bug.
>


Very true, network isolation never isolates CPU or memory.
It is cpuset's job to provide physical CPU isolation, not networking
namespace. I don't want to defend this, but it is the current design.


> Bu default (blocking send() syscalls) the following loop should
> block the thread if socket sk_wmem_alloc hits sk_sndbuf, this is
> the beauty of backpressure.
>
> while (1)
>     send(fd, ...);
>
> With skb_orphan(), sk_wmem_alloc will stay around 0, so the loop will burn a cpu
> and fill a qdisc, eventually breaking "network isolation", since other sockets
> might be unable to send a single packet.

Won't the same happen when congestion on a physical connection
between two hosts? Does 'host isolation' break too?

>
> If you have a concrete case where the skb_orphan() is needed, then you will have
> to add a parameter to let the admin opt-in for this.

Please see the other reply from me, where I list 3 or 4 reasons.

  reply	other threads:[~2018-06-27 19:55 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
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 [this message]
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=CAM_iQpWA5KEacEeD184P3NvhZdR6tFhwtndsbX7PZio8A8brfw@mail.gmail.com \
    --to=xiyou.wangcong@gmail.com \
    --cc=davem@davemloft.net \
    --cc=eric.dumazet@gmail.com \
    --cc=fbl@redhat.com \
    --cc=fw@strlen.de \
    --cc=netdev@vger.kernel.org \
    --cc=netfilter-devel@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 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.