From mboxrd@z Thu Jan 1 00:00:00 1970 From: Eric Dumazet Subject: Re: [PATCH net-next v13 3/7] sch_cake: Add optional ACK filter Date: Mon, 21 May 2018 10:18:32 -0700 Message-ID: References: <152691970035.4083.3349902669266371765.stgit@alrua-kau> <152691985736.4083.3416150561524698541.stgit@alrua-kau> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit To: =?UTF-8?Q?Toke_H=c3=b8iland-J=c3=b8rgensen?= , netdev@vger.kernel.org, cake@lists.bufferbloat.net Return-path: Received: from mail-pg0-f65.google.com ([74.125.83.65]:34630 "EHLO mail-pg0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752943AbeEURSe (ORCPT ); Mon, 21 May 2018 13:18:34 -0400 Received: by mail-pg0-f65.google.com with SMTP id k2-v6so6654726pgc.1 for ; Mon, 21 May 2018 10:18:33 -0700 (PDT) In-Reply-To: <152691985736.4083.3416150561524698541.stgit@alrua-kau> Content-Language: en-US Sender: netdev-owner@vger.kernel.org List-ID: On 05/21/2018 09:24 AM, Toke Høiland-Jørgensen wrote: > + while (oplen_tmp >= 8) { > + u32 right_b = get_unaligned_be32(sack_tmp + 4); > + u32 left_b = get_unaligned_be32(sack_tmp); > + > + if (left_b >= right_b) > + continue; > + > + if (first) > + bytes_b += right_b - left_b; > + > + if (left_b <= left_a && right_a <= right_b) { > + found = true; > + if (!first) > + break; > + } > + oplen_tmp -= 8; > + sack_tmp += 8; > + } > This is obviously incorrect. Please take a look at TCP stack, and how it handles sequence wrapping with following macros : after(), before() Quite frankly O wonder how this was really tested.