From: Kevin Darbyshire-Bryant <kevin@darbyshire-bryant.me.uk>
To: Cake List <cake@lists.bufferbloat.net>
Subject: [Cake] SCE/CAKE coding curiosities
Date: Mon, 25 Mar 2019 13:08:11 +0000 [thread overview]
Message-ID: <57C0B5D4-C76E-4EA8-B1B7-7B8BC33B2BDE@darbyshire-bryant.me.uk> (raw)
Ahoy there team Bufferboat :-)
I’ve been looking at the new SCE related code and a few questions have fallen out of the brain cell.
1) https://github.com/dtaht/sch_cake/blob/47d821f89f39c1b2216d6f65b014f609e46fc57c/sce.h#L50 Curious as to why htons isn’t used here as per other instances in CAKE?
2) Immediately below that line we have a skb length guard before trying to set ECT ultimately via ipv?_change_dsfield - we have other places in CAKE where we play with dsfield bits that don’t have an (obvious) guard - should they?
3) And saving the most curious for last, in cake_update_flowkeys we check the protocol again (we want IPv4 packets only) but we use tc_skb_protocol(skb) https://github.com/dtaht/sch_cake/blob/47d821f89f39c1b2216d6f65b014f609e46fc57c/sch_cake.c#L628
tc_skb_protocol says "/* We need to take extra care in case the skb came via
* vlan accelerated path. In that case, use skb->vlan_proto
* as the original vlan header was already stripped.
*/
if (skb_vlan_tag_present(skb))
return skb->vlan_proto;
return skb->protocol;
"
What??? Should cake_handle_diffserv use tc_skb_protocol too? and INET_ECN_set_sce ??
Curious of Basingstoke, England :-)
Cheers,
Kevin D-B
gpg: 012C ACB2 28C6 C53E 9775 9123 B3A2 389B 9DE2 334A
next reply other threads:[~2019-03-25 13:08 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-03-25 13:08 Kevin Darbyshire-Bryant [this message]
2019-04-02 17:45 ` 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=57C0B5D4-C76E-4EA8-B1B7-7B8BC33B2BDE@darbyshire-bryant.me.uk \
--to=kevin@darbyshire-bryant.me.uk \
--cc=cake@lists.bufferbloat.net \
/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