From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from shards.monkeyblade.net (shards.monkeyblade.net [IPv6:2620:137:e000::1:9]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by lists.bufferbloat.net (Postfix) with ESMTPS id 523EB3B29D for ; Thu, 25 Jun 2020 15:29:47 -0400 (EDT) Received: from localhost (unknown [IPv6:2601:601:9f00:477::3d5]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) (Authenticated sender: davem-davemloft) by shards.monkeyblade.net (Postfix) with ESMTPSA id 42D89129D591D; Thu, 25 Jun 2020 12:29:46 -0700 (PDT) Date: Thu, 25 Jun 2020 12:29:45 -0700 (PDT) Message-Id: <20200625.122945.321093402617646704.davem@davemloft.net> To: toke@redhat.com Cc: netdev@vger.kernel.org, cake@lists.bufferbloat.net From: David Miller In-Reply-To: <159308610390.190211.17831843954243284203.stgit@toke.dk> References: <159308610282.190211.9431406149182757758.stgit@toke.dk> <159308610390.190211.17831843954243284203.stgit@toke.dk> X-Mailer: Mew version 6.8 on Emacs 26.3 Mime-Version: 1.0 Content-Type: Text/Plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.5.12 (shards.monkeyblade.net [149.20.54.216]); Thu, 25 Jun 2020 12:29:46 -0700 (PDT) Subject: Re: [Cake] [PATCH net-next 1/5] sch_cake: fix IP protocol handling in the presence of VLAN tags X-BeenThere: cake@lists.bufferbloat.net X-Mailman-Version: 2.1.20 Precedence: list List-Id: Cake - FQ_codel the next generation List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 25 Jun 2020 19:29:47 -0000 From: Toke H=F8iland-J=F8rgensen Date: Thu, 25 Jun 2020 13:55:03 +0200 > From: Ilya Ponetayev > = > CAKE was using the return value of tc_skb_protocol() and expecting it= to be > the IP protocol type. This can fail in the presence of QinQ VLAN tags= , > making CAKE unable to handle ECN marking and diffserv parsing in this= case. > Fix this by implementing our own version of tc_skb_protocol(), which = will > use skb->protocol directly, but also parse and skip over any VLAN tag= s and > return the inner protocol number instead. > = > Also fix CE marking by implementing a version of INET_ECN_set_ce() th= at > uses the same parsing routine. > = > Fixes: ea82511518f4 ("sch_cake: Add NAT awareness to packet classifie= r") > Fixes: b2100cc56fca ("sch_cake: Use tc_skb_protocol() helper for gett= ing packet protocol") > Fixes: 046f6fd5daef ("sched: Add Common Applications Kept Enhanced (c= ake) qdisc") > Signed-off-by: Ilya Ponetayev > [ squash original two patches, rewrite commit message ] > Signed-off-by: Toke H=F8iland-J=F8rgensen First, this is a bug fix and should probably be steered to 'net'. Also, other users of tc_skb_protocol() are almost certainly hitting a similar problem aren't they? Maybe fix this generically.