From: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
To: "Philipp Schönberger" <ph.schoenberger@googlemail.com>
Cc: netdev@vger.kernel.org
Subject: Re: [iproute2 PATCH] tc: handle is not used without containing ':'
Date: Thu, 13 Jun 2013 21:39:21 +0400 [thread overview]
Message-ID: <51BA03C9.80505@cogentembedded.com> (raw)
In-Reply-To: <CAABrY5pGnVQPctPUSJAiM0tp3o2OTxjG5y8yt3bY59r=x2Gksg@mail.gmail.com>
Hello.
On 06/13/2013 09:20 PM, Philipp Schönberger wrote:
> Handle is not used if it is not containing a ':' . This is
> reproducible with these commands.
> /sbin/tc qdisc add dev lo parent 0xffffffff handle 0x10000 pfifo limit 10
> /sbin/tc qdisc show dev lo
> qdisc pfifo 8001: root refcnt 2 limit 10p
> Signed-off-by: Philipp Schönberger <ph.schoenberger@googlemail.com>
> --- iproute2-2.6.33/tc/tc_util.c 2010-02-25 04:56:50.000000000 +0100
> +++ /home/pschoen/tc_util.c 2013-06-13 18:31:00.347135625 +0200
> @@ -50,9 +50,14 @@
> maj = strtoul(str, &p, 16);
> if (p == str)
> return -1;
> - maj <<= 16;
> - if (*p != ':' && *p!=0)
> - return -1;
> + if (*p != ':')
> + {
> + if(*p!=0)
Maybe you should be more consistent in using space after *if*? :-)
> + return -1;
> + else if (TC_H_MIN(maj) != 0)
> + return -1;
> + }else
Space after } seems a good idea too...
> + maj <<= 16;
> ok:
> *h = maj;
> return 0;
WBR, Sergei
next prev parent reply other threads:[~2013-06-13 17:39 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-06-13 17:20 [iproute2 PATCH] tc: handle is not used without containing ':' Philipp Schönberger
2013-06-13 17:39 ` Sergei Shtylyov [this message]
2013-06-14 6:45 ` Philipp Schönberger
2013-06-18 17:48 ` Stephen Hemminger
2013-06-18 18:27 ` Philipp Schönberger
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=51BA03C9.80505@cogentembedded.com \
--to=sergei.shtylyov@cogentembedded.com \
--cc=netdev@vger.kernel.org \
--cc=ph.schoenberger@googlemail.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.