Cake - FQ_codel the next generation
 help / color / mirror / Atom feed
From: "Toke Høiland-Jørgensen" <toke@redhat.com>
To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: David Miller <davem@davemloft.net>,
	stable@vger.kernel.org, cake@lists.bufferbloat.net
Subject: [Cake] [PATCH for-4.19 2/3] sch_cake: Use tc_skb_protocol() helper for getting packet protocol
Date: Fri, 05 Apr 2019 12:28:22 +0200	[thread overview]
Message-ID: <155446010204.1460.9767080514106105716.stgit@alrua-x1> (raw)
In-Reply-To: <155446010188.1460.16734711102827171744.stgit@alrua-x1>

Commit bbd669a868bba591ffd38b7bc75a7b361bb54b04 upstream.

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 <kevin@darbyshire-bryant.me.uk>
Signed-off-by: Toke Høiland-Jørgensen <toke@redhat.com>
---
 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 640f00e9f665..de92b5d81ca6 100644
--- a/net/sched/sch_cake.c
+++ b/net/sched/sch_cake.c
@@ -1512,7 +1512,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)


  reply	other threads:[~2019-04-05 10:28 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-04-05 10:28 [Cake] [PATCH for-4.19 0/3] Backport of series: 'sched: A few small fixes for sch_cake' from 5.1 Toke Høiland-Jørgensen
2019-04-05 10:28 ` Toke Høiland-Jørgensen [this message]
2019-04-05 10:28 ` [Cake] [PATCH for-4.19 3/3] sch_cake: Make sure we can write the IP header before changing DSCP bits Toke Høiland-Jørgensen
2019-04-05 10:28 ` [Cake] [PATCH for-4.19 1/3] sch_cake: Simplify logic in cake_select_tin() Toke Høiland-Jørgensen
2019-04-29 12:43   ` Greg Kroah-Hartman
2019-04-29 12:45     ` Greg Kroah-Hartman
2019-04-05 11:34 ` [Cake] [PATCH for-4.19 0/3] Backport of series: 'sched: A few small fixes for sch_cake' from 5.1 Greg Kroah-Hartman
2019-04-05 12:13   ` Toke Høiland-Jørgensen
2019-04-05 12:20     ` Greg Kroah-Hartman
2019-04-05 12:43       ` Toke Høiland-Jørgensen

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

  List information: https://lists.bufferbloat.net/postorius/lists/cake.lists.bufferbloat.net/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=155446010204.1460.9767080514106105716.stgit@alrua-x1 \
    --to=toke@redhat.com \
    --cc=cake@lists.bufferbloat.net \
    --cc=davem@davemloft.net \
    --cc=gregkh@linuxfoundation.org \
    --cc=stable@vger.kernel.org \
    /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