Cake - FQ_codel the next generation
 help / color / mirror / Atom feed
From: Kevin Darbyshire-Bryant <kevin@darbyshire-bryant.me.uk>
To: "Toke Høiland-Jørgensen" <toke@toke.dk>
Cc: "cake@lists.bufferbloat.net" <cake@lists.bufferbloat.net>
Subject: Re: [Cake] [PATCH 1/2] cake: print_uint format fixes
Date: Sun, 11 Mar 2018 22:10:51 +0000	[thread overview]
Message-ID: <5DD63A68-EE32-4A5C-B08E-019FB8CBC9B1@darbyshire-bryant.me.uk> (raw)
In-Reply-To: <87bmfujq18.fsf@toke.dk>



> On 11 Mar 2018, at 20:49, Toke Høiland-Jørgensen <toke@toke.dk> wrote:
> 
> Thank you for the patch! :)
> 
>> Signed-off-by: Kevin Darbyshire-Bryant <ldir@darbyshire-bryant.me.uk>
>> ---
>> tc/q_cake.c | 15 ++++++++-------
>> 1 file changed, 8 insertions(+), 7 deletions(-)
>> 
>> diff --git a/tc/q_cake.c b/tc/q_cake.c
>> index 44cadb63..f888bd2a 100644
>> --- a/tc/q_cake.c
>> +++ b/tc/q_cake.c
>> @@ -47,6 +47,7 @@
>> #include <netinet/in.h>
>> #include <arpa/inet.h>
>> #include <string.h>
>> +#include <inttypes.h>
>> 
>> #include "utils.h"
>> #include "tc_util.h"
>> @@ -557,10 +558,10 @@ static int cake_print_opt(struct qdisc_util *qu, FILE *f, struct rtattr *opt)
>> 	else if (!raw)
>> 		print_string(PRINT_ANY, "atm", "%s ", "noatm");
>> 
>> -	print_uint(PRINT_ANY, "overhead", "overhead %d ", overhead);
>> +	print_uint(PRINT_ANY, "overhead", "overhead %" PRId64 " ",
>> overhead);
> 
> Guess this should actually be print_int(), since overhead can be
> negative?

Tried it, and you’d sort of guess wrong.  I’ll write it up tomorrow ‘properly’ but ‘int’ is int length whereas uint is uint64 length.  On big endian it goes wrong.

Anyway, glad you’ve tested on something little endian.  I’ll try to submit a patch upstream as requested…very busy over next 3 days doing $dayjob so may take a little while.  Thanks for boosting confidence that I’ve not broken it on architectures it used to work on :-)

> 
> -Toke


Cheers,

Kevin D-B

012C ACB2 28C6 C53E 9775  9123 B3A2 389B 9DE2 334A


  reply	other threads:[~2018-03-11 22:10 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-03-11  9:19 [Cake] fixing tc cake output since json-ification Kevin Darbyshire-Bryant
2018-03-11  9:19 ` [Cake] [PATCH 1/2] cake: print_uint format fixes Kevin Darbyshire-Bryant
2018-03-11 20:49   ` Toke Høiland-Jørgensen
2018-03-11 22:10     ` Kevin Darbyshire-Bryant [this message]
2018-03-11 23:34       ` Stephen Hemminger
2018-03-12  9:28         ` Kevin Darbyshire-Bryant
2018-03-12  9:56           ` Toke Høiland-Jørgensen
2018-03-12 15:11             ` Stephen Hemminger
2018-03-12 15:38               ` Toke Høiland-Jørgensen
2018-03-12 21:44                 ` Kevin Darbyshire-Bryant
2018-03-16  8:02               ` Kevin Darbyshire-Bryant
2018-03-17 14:33                 ` Toke Høiland-Jørgensen
2018-03-11  9:19 ` [Cake] [PATCH 2/2] tc " Kevin Darbyshire-Bryant
2018-03-11 20:50   ` Toke Høiland-Jørgensen
2018-03-11 20:57     ` Kevin Darbyshire-Bryant
2018-03-11 21:22       ` 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=5DD63A68-EE32-4A5C-B08E-019FB8CBC9B1@darbyshire-bryant.me.uk \
    --to=kevin@darbyshire-bryant.me.uk \
    --cc=cake@lists.bufferbloat.net \
    --cc=toke@toke.dk \
    /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