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: Wed, 27 Jun 2018 17:19:37 -0300 [thread overview]
Message-ID: <20180627201937.GZ19565@plex.lan> (raw)
In-Reply-To: <CAM_iQpWOxCk0GYPEAwrdrPg91mhyHR==pzhRGF3fS9+pF493xA@mail.gmail.com>
On Wed, Jun 27, 2018 at 12:06:16PM -0700, Cong Wang wrote:
> On Wed, Jun 27, 2018 at 5:32 AM Flavio Leitner <fbl@redhat.com> wrote:
> >
> > On Tue, Jun 26, 2018 at 06:28:27PM -0700, Cong Wang wrote:
> > > On Tue, Jun 26, 2018 at 5:39 PM Flavio Leitner <fbl@redhat.com> wrote:
> > > >
> > > > On Tue, Jun 26, 2018 at 05:29:51PM -0700, Cong Wang wrote:
> > > > > On Tue, Jun 26, 2018 at 4:33 PM Flavio Leitner <fbl@redhat.com> wrote:
> > > > > >
> > > > > > It is still isolated, the sk carries the netns info and it is
> > > > > > orphaned when it re-enters the stack.
> > > > >
> > > > > Then what difference does your patch make?
> > > >
> > > > Don't forget it is fixing two issues.
> > >
> > > Sure. I am only talking about TSQ from the very beginning.
> > > Let me rephrase my above question:
> > > What difference does your patch make to TSQ?
> >
> > It avoids burstiness.
>
> Never even mentioned in changelog or in your patch. :-/
It's part of queueing and helping the bufferbloat problem in the
commit message.
> > > > > Before your patch:
> > > > > veth orphans skb in its xmit
> > > > >
> > > > > After your patch:
> > > > > RX orphans it when re-entering stack (as you claimed, I don't know)
> > > >
> > > > ip_rcv, and equivalents.
> > >
> > > ip_rcv() is L3, we enter a stack from L1. So your above claim is incorrect. :)
> >
> > Maybe you found a problem, could you please point me to where in
> > between L1 to L3 the socket is relevant?
>
> Of course, ingress qdisc is in L2. Do I need to say more? This
> is where we can re-route the packets, for example, redirecting it to
> yet another netns. This is in fact what we use in production, not anything
> that only in my imagination.
>
> You really have to think about why you allow a different netns influence
> another netns by holding the skb to throttle the source TCP socket.
Maybe I wasn't clear and you didn't understand the question. Please find
a spot where the preserved socket is used incorrectly.
> > > which means you have to update Documentation/networking/ip-sysctl.txt
> > > too.
> >
> > How it is never targeted? Whole point is to avoid queueing traffic.
>
> What queues? You really need to define it, seriously.
>
>
> > Would you be okay if I include this chunk?
>
> No, still lack of an explanation why it comes across netns for
> a good reason.
Because it doesn't. Since you talk more about veth, let's pick it
as an example. The TX is nothing more than add to the CPU backlog,
right? That is netns agnostic. The same for processing that queue
which will push the skb anyways and will call skb_orphan().
How can one netns avoid/delay the skb_orphan()? And even if does
that, what gain will you have to allow queuing of more and more
packets in the CPU backlog? It is stalled.
> > diff --git a/Documentation/networking/ip-sysctl.txt b/Documentation/networking/ip-sysctl.txt
> > index ce8fbf5aa63c..f4c042be0216 100644
> > --- a/Documentation/networking/ip-sysctl.txt
> > +++ b/Documentation/networking/ip-sysctl.txt
> > @@ -733,11 +733,11 @@ tcp_limit_output_bytes - INTEGER
> > Controls TCP Small Queue limit per tcp socket.
> > TCP bulk sender tends to increase packets in flight until it
> > gets losses notifications. With SNDBUF autotuning, this can
> > - result in a large amount of packets queued in qdisc/device
> > - on the local machine, hurting latency of other flows, for
> > - typical pfifo_fast qdiscs.
> > - tcp_limit_output_bytes limits the number of bytes on qdisc
> > - or device to reduce artificial RTT/cwnd and reduce bufferbloat.
> > + result in a large amount of packets queued on the local machine
> > + (e.g.: qdiscs, CPU backlog, or device) hurting latency of other
>
>
> Apparently CPU backlog never happens when leaving the host.
--
Flavio
next prev parent reply other threads:[~2018-06-27 20:19 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 [this message]
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=20180627201937.GZ19565@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 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).