netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Petr Machata <petrm@mellanox.com>
To: David Ahern <dsahern@gmail.com>
Cc: netdev@vger.kernel.org
Subject: Re: [PATCH iproute2-next 2/2] tc: q_red: Support 'nodrop' flag
Date: Mon, 23 Mar 2020 11:20:19 +0100	[thread overview]
Message-ID: <87zhc7v0d8.fsf@mellanox.com> (raw)
In-Reply-To: <4ace5bb3-df27-44eb-dee7-6469deb0ec1b@gmail.com>


David Ahern <dsahern@gmail.com> writes:

> On 3/18/20 6:18 AM, Petr Machata wrote:
>> @@ -154,6 +161,7 @@ static int red_parse_opt(struct qdisc_util *qu, int argc, char **argv,
>>  	addattr_l(n, 1024, TCA_RED_STAB, sbuf, 256);
>>  	max_P = probability * pow(2, 32);
>>  	addattr_l(n, 1024, TCA_RED_MAX_P, &max_P, sizeof(max_P));
>> +	addattr_l(n, 1024, TCA_RED_FLAGS, &flags_bf, sizeof(flags_bf));
>
> the attr is a bitfield32 here ...
>
>>  	addattr_nest_end(n, tail);
>>  	return 0;
>>  }
>> @@ -183,6 +191,10 @@ static int red_print_opt(struct qdisc_util *qu, FILE *f, struct rtattr *opt)
>>  	    RTA_PAYLOAD(tb[TCA_RED_MAX_P]) >= sizeof(__u32))
>>  		max_P = rta_getattr_u32(tb[TCA_RED_MAX_P]);
>>
>> +	if (tb[TCA_RED_FLAGS] &&
>> +	    RTA_PAYLOAD(tb[TCA_RED_FLAGS]) >= sizeof(__u32))
>> +		qopt->flags = rta_getattr_u32(tb[TCA_RED_FLAGS]);
>> +
>
> but a u32 here. These should be consistent.

:-/ That's a leftover from previous ABI, thanks for catching it.
Will send a v2.

      reply	other threads:[~2020-03-23 10:20 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-03-18 12:18 [PATCH iproute2-next 0/2] Support RED ECN nodrop mode Petr Machata
2020-03-18 12:18 ` [PATCH iproute2-next 1/2] uapi: pkt_sched: Update headers for RED nodrop Petr Machata
2020-03-18 12:18 ` [PATCH iproute2-next 2/2] tc: q_red: Support 'nodrop' flag Petr Machata
2020-03-22 21:43   ` David Ahern
2020-03-23 10:20     ` Petr Machata [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

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

  git send-email \
    --in-reply-to=87zhc7v0d8.fsf@mellanox.com \
    --to=petrm@mellanox.com \
    --cc=dsahern@gmail.com \
    --cc=netdev@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;
as well as URLs for NNTP newsgroup(s).