Bug 1477296 - tc qdisc in iproute-4.11 has completely changed its output
tc qdisc in iproute-4.11 has completely changed its output
Status: CLOSED NOTABUG
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: iproute (Show other bugs)
7.4-Alt
Unspecified Unspecified
medium Severity medium
: rc
: ---
Assigned To: Phil Sutter
BaseOS QE Security Team
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2017-08-01 12:33 EDT by Jaroslav Aster
Modified: 2017-08-07 10:54 EDT (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2017-08-07 10:54:05 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Jaroslav Aster 2017-08-01 12:33:53 EDT
Description of problem:

tc qdisc in iproute-4.11 has completely changed its output


Version-Release number of selected component (if applicable):

iproute-4.11.0-1.el7a


How reproducible:

100%

Steps to Reproduce:

iproute-3.10.0-87.el7

# tc qdisc add dev dummy0 root gred setup DPs 3 default 0 grio
# tc qdisc change dev dummy0 root gred limit 60KB min 15KB max 30KB burst 30 avpkt 576 probability 0.01 DP 0 prio 1
# tc qdisc show dev dummy0
qdisc gred 8006: root refcnt 2
 DP:0 (prio 1) Average Queue 0b Measured Queue 0b
         Packet drops: 0 (forced 0 early 0)
         Packet totals: 0 (bytes 0)  ewma 3 probability 0.01 Scell_log 12

iproute-4.11.0-1.el7a

# tc qdisc add dev dummy0 root gred setup DPs 3 default 0 grio
# tc qdisc change dev dummy0 root gred limit 60KB min 15KB max 30KB burst 30 avpkt 576 probability 0.01 DP 0 prio 1
# tc qdisc show dev dummy0
qdisc gred 8005: root refcnt 2 vqs 3 default 0 grio limit 1514000b
 vq 0 prio 1 limit 60Kb min 15Kb max 30Kb


Actual results:

tc from iproute-3.10 displays different information.


Expected results:

tc from iproute-4.11 should display the same information as displays in 3.10 or some justification for different behaviour is needed.
Comment 1 Phil Sutter 2017-08-01 13:07:11 EDT
Hi Jaroslav,

I checked git log of tc/q_gred.c source file. The following commits are responsible for the changed output:

commit 1693a4d392779adf004b99b0864f9cf0cd4a8a4f
Author: David Ward <david.ward@ll.mit.edu>
Date:   Mon May 18 11:35:11 2015 -0400

    tc: gred: Improve parameter/statistics output
    
    Make the output more consistent with the RED qdisc, and only show
    details/statistics if the appropriate flag is set when calling tc.
    
    Show the parameters used with "gred setup". Add missing statistics
    "pdrop" and "other". Fix format specifiers for unsigned values.
    
    Signed-off-by: David Ward <david.ward@ll.mit.edu>

commit 357c45ad3a3fba94adc3591c150506af95fba50e
Author: David Ward <david.ward@ll.mit.edu>
Date:   Mon May 18 11:35:13 2015 -0400

    tc: gred: Adopt the term VQ in the command syntax and output
    
    In the GRED kernel source code, both of the terms "drop parameters"
    (DP) and "virtual queue" (VQ) are used to refer to the same thing.
    Each "DP" is better understood as a "set of drop parameters", since
    it has values for limit, min, max, avpkt, etc. This terminology can
    result in confusion when creating a GRED qdisc having multiple DPs.
    Netlink attributes and struct members with the DP name seem to have
    been left intact for compatibility, while the term VQ was otherwise
    adopted in the code, which is more intuitive.
    
    Use the VQ term in the tc command syntax and output (but maintain
    compatibility with the old syntax).
    
    Rewrite the usage text to be concise and similar to other qdiscs.
    
    Signed-off-by: David Ward <david.ward@ll.mit.edu>


So the rationale for the changes in output are that on one hand VQ is a better
term for what was previously called DP and on the other statistics output is
now only printed if it was requested on command line. The missing info is
printed if you pass '-s' flag to the last tc command.

Cheers, Phil
Comment 2 Jaroslav Aster 2017-08-07 10:54:05 EDT
Hi Phil,

thanks. I agree, it's not a bug. I have fixed my test and it passes now. Closing the bug as not a bug.

Note You need to log in before you can comment on or make changes to this bug.