From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-ed1-f66.google.com (mail-ed1-f66.google.com [209.85.208.66]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by lists.bufferbloat.net (Postfix) with ESMTPS id CCC393B29E for ; Thu, 4 Apr 2019 09:01:36 -0400 (EDT) Received: by mail-ed1-f66.google.com with SMTP id d26so2100336ede.10 for ; Thu, 04 Apr 2019 06:01:36 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:from:to:cc:date:message-id:in-reply-to :references:user-agent:mime-version:content-transfer-encoding; bh=S6sOuQgx74RtDEC2uYh2queyn1FDcATjS4e/Ke9X2+Q=; b=APn/MzyeN9hY62yZPkNu9A3vHBnLO452+6X8mEl7a9psUZaPMLJrolo1As77eHZPmx vliCEVSebiBzmkonk6b5ynw9AFiA/tfVuN4NptajQfYtwP66JiiJcO4sC6wF+T0GnUoy +llgjQ8CIXqhDZrsKUhJMazP5m/1R4cpm+44lJYoxdR/tYPGSr9J0V4xJ83zrGa28TYz NSjwRW3ABEyYTF/N1w/iuZUPlkoXa8qvZH6lP707+a6yJhPSuJFtG3q3FKeKQZxdCJrr cinZbl1/FmQoo5pTG0iS61sO2cQ6NcZhrh67zVKmWbK6TiVvSu6RHC073+7MJ8wBjyOW DU3Q== X-Gm-Message-State: APjAAAVRfRAI05+nYK4aiHSMeC0PBim7qR5gjhr2zzTtd8SBXAJP6Rza KNcfYAkGRE2AUzTEbH8TvonB0g== X-Google-Smtp-Source: APXvYqzQ/X0Lt2tPH8dNPYuyTP9PkSD26TObJOtKezWEr4+edR8DbQ2tuyY3Y6tN6Cdb/c6m98+frw== X-Received: by 2002:a17:906:3ed1:: with SMTP id d17mr3539823ejj.221.1554382895981; Thu, 04 Apr 2019 06:01:35 -0700 (PDT) Received: from alrua-x1.borgediget.toke.dk (alrua-x1.vpn.toke.dk. [2a00:7660:6da:10::2]) by smtp.gmail.com with ESMTPSA id k51sm5708311edd.32.2019.04.04.06.01.34 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 04 Apr 2019 06:01:34 -0700 (PDT) Received: by alrua-x1.borgediget.toke.dk (Postfix, from userid 1000) id B4FCE1804A6; Thu, 4 Apr 2019 15:01:33 +0200 (CEST) From: Toke =?utf-8?q?H=C3=B8iland-J=C3=B8rgensen?= To: David Miller Cc: netdev@vger.kernel.org, cake@lists.bufferbloat.net Date: Thu, 04 Apr 2019 15:01:33 +0200 Message-ID: <155438289368.18760.9777700364575323470.stgit@alrua-x1> In-Reply-To: <155438289359.18760.18027832614176337074.stgit@alrua-x1> References: <155438289359.18760.18027832614176337074.stgit@alrua-x1> User-Agent: StGit/unknown-version MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit Subject: [Cake] [PATCH net 1/2] sch_cake: Use tc_skb_protocol() helper for getting packet protocol 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, 04 Apr 2019 13:01:37 -0000 We shouldn't be using skb->protocol directly as that will miss cases with hardware-accelerated VLAN tags. Use the helper instead to get the right protocol number. Reported-by: Kevin Darbyshire-Bryant Signed-off-by: Toke Høiland-Jørgensen --- net/sched/sch_cake.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/sched/sch_cake.c b/net/sched/sch_cake.c index acc9b9da985f..a3b55e18df04 100644 --- a/net/sched/sch_cake.c +++ b/net/sched/sch_cake.c @@ -1519,7 +1519,7 @@ static u8 cake_handle_diffserv(struct sk_buff *skb, u16 wash) { u8 dscp; - switch (skb->protocol) { + switch (tc_skb_protocol(skb)) { case htons(ETH_P_IP): dscp = ipv4_get_dsfield(ip_hdr(skb)) >> 2; if (wash && dscp)