netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Stephen Hemminger <stephen@networkplumber.org>
To: Dmitrii Shcherbakov <fw.dmitrii@yandex.com>
Cc: Phil Sutter <phil@nwl.cc>,
	Jesper Dangaard Brouer <brouer@redhat.com>,
	"netdev@vger.kernel.org" <netdev@vger.kernel.org>
Subject: Re: [PATCH][iproute2] tc/q_htb.c: Fix the MPU value output in 'tc -d class show dev <device_name> ' command
Date: Mon, 21 Dec 2015 21:45:45 -0800	[thread overview]
Message-ID: <20151221214545.7ed9f4a7@xeon-e3> (raw)
In-Reply-To: <1335891450475140@web23o.yandex.ru>

On Sat, 19 Dec 2015 00:45:40 +0300
Dmitrii Shcherbakov <fw.dmitrii@yandex.com> wrote:

> Phil,
> 
> 18.12.2015, 19:55, "Phil Sutter" <phil@nwl.cc>:
> > On Fri, Dec 18, 2015 at 07:39:25PM +0300, Dmitrii Shcherbakov wrote:
> >>  > Dmitrii, did iproute2 without your change even print the overhead as set
> >>  > by you before? Looking at the code, I'd assume not.
> >>
> >>  Tried building iproute2 (as of tag 4.2) and using the upstream linux kernel (also tag 4.2 - 64291f7db5bd8150a74ad2036f1037e6a0428df2):
> >
> > This is without your patch, right?
> 
> Yes (ec4ef6aebd5a52ab1acf1f5be1749320b3188659). 
> 
> >
> >>  ~/src/iproute2/tc$ sudo ./tc class add dev eth0 parent 1: classid 1:1 htb rate 100kbps ceil 100kbps mpu 256 overhead 64
> >
> > Setting an mpu of 256 is suitable to get 0 as output value, as the code
> > before your patch ANDs it with 0xff.
> 
> True, but then I think I would get the 'old' (encoded) overhead output of '1b' then and the first 8 bits which are treated as mpu would be 0 anyway. And its 0 for both mpu and overhead ("mpu 0b overhead 0b") which is strange. I am going to have to take a look at the kernel state with gdb.
> 
> What I would expect instead (notice 'overhead 1b'):
> 
> [root@localhost ~]# tc -d class show dev eth0
> [root@localhost ~]# tc qdisc add dev eth0 root handle 1: htb default 12
> [root@localhost ~]# tc class add dev eth0 parent 1: classid 1:1 htb rate 100kbps ceil 100kbps mpu 256 overhead 64
> [root@localhost ~]# tc -d class show dev eth0
> class htb 1:1 root prio 0 quantum 10000 rate 800000bit overhead 64 ceil 800000bit burst 1600b/1 mpu 0b overhead 1b cburst 1600b/1 mpu 0b overhead 1b level 0  
> 
> >
> >>  So it looks like the overhead is being set correctly, but the mpu is not, even though the respective kernel module is loaded judging by what I see.
> >
> > To really know what is being set, you would have to look at the kernel
> > variables not what iproute prints. This is nitpicking mostly, but
> > relevant in this case as your patches to fix iproute's output show.
> >
> > Cheers, Phil
> 
> I am going to try and take a look at it. I have not delved into the kernel's network subsystem so it may take some time.
> 
> Thanks,
> Dima

I am going to hold off on this, if it hasn't been urgent for years, there is no
requirement to do it right away. If you come to a conclusion let me know.

It might be possible to troll back through Internet to get more data on this...

  reply	other threads:[~2015-12-22  5:45 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-12-12 11:09 [PATCH][iproute2] tc/q_htb.c: Fix the MPU value output in 'tc -d class show dev <device_name> ' command Dmitrii Shcherbakov
2015-12-16 15:15 ` Jesper Dangaard Brouer
2015-12-16 16:04   ` Phil Sutter
2015-12-16 20:56     ` Dmitrii Shcherbakov
2015-12-18 16:39     ` Dmitrii Shcherbakov
2015-12-18 16:55       ` Phil Sutter
2015-12-18 21:45         ` Dmitrii Shcherbakov
2015-12-22  5:45           ` Stephen Hemminger [this message]
2015-12-17  9:27   ` Dmitrii Shcherbakov
2015-12-17  9:45     ` Dmitrii Shcherbakov
2015-12-17 13:11       ` Phil Sutter

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=20151221214545.7ed9f4a7@xeon-e3 \
    --to=stephen@networkplumber.org \
    --cc=brouer@redhat.com \
    --cc=fw.dmitrii@yandex.com \
    --cc=netdev@vger.kernel.org \
    --cc=phil@nwl.cc \
    /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).