From: "Toke Høiland-Jørgensen" <toke@redhat.com>
To: Kevin Darbyshire-Bryant <kevin@darbyshire-bryant.me.uk>,
Cake List <cake@lists.bufferbloat.net>
Subject: Re: [Cake] SCE/CAKE coding curiosities
Date: Tue, 02 Apr 2019 19:45:08 +0200 [thread overview]
Message-ID: <87h8bgnvx7.fsf@toke.dk> (raw)
In-Reply-To: <57C0B5D4-C76E-4EA8-B1B7-7B8BC33B2BDE@darbyshire-bryant.me.uk>
Kevin Darbyshire-Bryant <kevin@darbyshire-bryant.me.uk> writes:
> 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?
No idea about this.
> 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 ??
Yup, I believe you are right about both of these; nice catch! I pushed
fixes for cake_handle_diffserv(); keeping my hands off the sce bits for
now ;)
-Toke
prev parent reply other threads:[~2019-04-02 17:45 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-03-25 13:08 Kevin Darbyshire-Bryant
2019-04-02 17:45 ` Toke Høiland-Jørgensen [this message]
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=87h8bgnvx7.fsf@toke.dk \
--to=toke@redhat.com \
--cc=cake@lists.bufferbloat.net \
--cc=kevin@darbyshire-bryant.me.uk \
/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