lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CANn89i+0peAq_BS3Ge-h2_MENHQAHtf8D_M0gzgchK6CxU8D+Q@mail.gmail.com>
Date:   Sun, 29 Jul 2018 19:27:38 -0700
From:   Eric Dumazet <edumazet@...gle.com>
To:     Yafang Shao <laoar.shao@...il.com>
Cc:     David Miller <davem@...emloft.net>,
        netdev <netdev@...r.kernel.org>,
        LKML <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH net-next 1/2] tcp: call tcp_drop() in tcp collapse

On Sun, Jul 29, 2018 at 7:06 PM Yafang Shao <laoar.shao@...il.com> wrote:
>
> On Sun, Jul 29, 2018 at 12:28 AM, Eric Dumazet <edumazet@...gle.com> wrote:
> > On Sat, Jul 28, 2018 at 12:43 AM Yafang Shao <laoar.shao@...il.com> wrote:
> >>
> >> On Sat, Jul 28, 2018 at 11:38 AM, Eric Dumazet <edumazet@...gle.com> wrote:
> >> > On Fri, Jul 27, 2018 at 8:35 PM Yafang Shao <laoar.shao@...il.com> wrote:
> >> >
> >> >> So what about LINUX_MIB_TCPOFOMERGE ?
> >> >> Regarding LINUX_MIB_TCPOFOMERGE,  a skb is already covered by another
> >> >> skb, is that dropping the packet or simply lowering the memory
> >> >> overhead ?
> >> >
> >> > What do you think ?
> >> >
> >> > If you receive two times the same payload, don't you have to drop one
> >> > of the duplicate ?
> >> >
> >> > There is a a big difference between the two cases.
> >>
> >> If the drop caused some data lost (which may then cause retransmition
> >> or something), then this is a really DROP.
> >> While if the drop won't cause any data lost, meaning it is a
> >> non-harmful behavior, I think it should not be defined as DROP.
> >> This is my suggestion anyway.
> >
> > Sigh.
> >
> > We count drops, not because they are ' bad or something went wrong'.
> >
> > If TCP stack receives twice the same sequence (same payload), we
> > _drop_ one of the duplicate, so we account for this event.
> >
> > When ' collapsing'  we reorganize our own storage, not because we have
> > to drop a payload,
> > but for some memory pressure reason.
>
> Thanks for you clarification.
> So what about LINUX_MIB_TCPOFODROP ?
>
>         if (unlikely(tcp_try_rmem_schedule(sk, skb, skb->truesize))) {
>                 NET_INC_STATS(sock_net(sk), LINUX_MIB_TCPOFODROP);
>                 tcp_drop(sk, skb);
>                 return;
>         }
>
>
> It is also because of our own memory pressure, but we call tcp_drop() here.

Yes, we _drop_ a packet.

That is pretty clear that the payload is dropped, and that the sender
will have to _retransmit_.

>
> I am not mean to disagree with you. I am just confused and  want to
> make it clear.


Collapsing is :

For (a bunch of packets)
   Try (to compress them in order to reduce memory overhead)

No drop of payload happens here. Sender wont have to retransmit.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ