From: "Toke Høiland-Jørgensen" <toke@toke.dk>
To: Stephen Hemminger <stephen@networkplumber.org>
Cc: netdev@vger.kernel.org, cake@lists.bufferbloat.net
Subject: Re: [Cake] [PATCH iproute2-next v10] Add support for CAKE qdisc
Date: Mon, 16 Jul 2018 19:56:00 +0200 [thread overview]
Message-ID: <87o9f75akv.fsf@toke.dk> (raw)
In-Reply-To: <20180716100646.788fc9c0@xeon-e3>
Stephen Hemminger <stephen@networkplumber.org> writes:
> On Mon, 16 Jul 2018 18:39:26 +0200
> Toke Høiland-Jørgensen <toke@toke.dk> wrote:
>
>> +#define PRINT_TSTAT(name, attr, fmts, val) do { \
>> + if (GET_TSTAT(0, attr)) { \
>> + fprintf(f, name); \
>> + for (i = 0; i < num_tins; i++) \
>> + fprintf(f, " %12" fmts, val); \
>> + fprintf(f, "\n"); \
>> + } \
>> + } while (0)
>
> Couldn't this be a function?
Guess so? But keeping it as a macro keeps it closer to where it is
defined, and keeps the macro definitions together. IMO this is more
readable than splitting things up...
-Toke
next prev parent reply other threads:[~2018-07-16 17:56 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-07-16 16:39 Toke Høiland-Jørgensen
2018-07-16 17:06 ` Stephen Hemminger
2018-07-16 17:56 ` Toke Høiland-Jørgensen [this message]
2018-07-16 17:58 ` Stephen Hemminger
2018-07-18 2:31 ` David Ahern
2018-07-19 10:53 ` Toke Høiland-Jørgensen
2018-07-19 14:55 ` David Ahern
2018-07-19 15:20 ` Toke Høiland-Jørgensen
2018-07-19 15:22 ` David Ahern
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=87o9f75akv.fsf@toke.dk \
--to=toke@toke.dk \
--cc=cake@lists.bufferbloat.net \
--cc=netdev@vger.kernel.org \
--cc=stephen@networkplumber.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