netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: David Ahern <dsahern@gmail.com>
To: Petr Machata <petrm@mellanox.com>, netdev@vger.kernel.org
Cc: David Ahern <dsahern@gmail.com>
Subject: Re: [PATCH iproute2-next 2/2] tc: q_red: Support 'nodrop' flag
Date: Sun, 22 Mar 2020 15:43:18 -0600	[thread overview]
Message-ID: <4ace5bb3-df27-44eb-dee7-6469deb0ec1b@gmail.com> (raw)
In-Reply-To: <bb3146bd93e4c5f089033311e8a0418f93420447.1584533829.git.petrm@mellanox.com>

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.



  reply	other threads:[~2020-03-22 21:43 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 [this message]
2020-03-23 10:20     ` Petr Machata

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=4ace5bb3-df27-44eb-dee7-6469deb0ec1b@gmail.com \
    --to=dsahern@gmail.com \
    --cc=netdev@vger.kernel.org \
    --cc=petrm@mellanox.com \
    /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).