lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Message-ID: <22f9ee66-35b0-7aa0-bde3-fd63c5705110@ibw.com.ni>
Date:   Tue, 16 Jun 2020 08:14:26 -0600
From:   "Roberto J. Blandino Cisneros" <roberto.blandino@....com.ni>
To:     netdev@...r.kernel.org
Subject: RATE not being printed on tc -s class show dev XXXX

Good Morning.

I am using debian buster 10.4 with iproute2 compile version 5.7.0.

I am testing Traffic Control but on the statistics no Rate value is shown.

For example in the following link "https://paste.ubuntu.com/10963208/", 
i see following output:

vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
jjo@...-x220:~/tmp$ ./iproute2-3.19.0-jjo/tc/tc -s class show dev eth0 
class htb 1:10 parent 1:1 prio 0 rate 2500Mbit ceil 2500Mbit burst 
15000b cburst 1250b Sent 699143 bytes 5790 pkt (dropped 0, overlimits 0 
requeues 0) EST32 rate 0bit 0pps backlog 0b 0p requeues 0 lended: 5733 
borrowed: 0 giants: 0 tokens: 761 ctokens: 74
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

I am seing "rate 0bit".

But installing from debian package iproute2 i got nothing so i decide to 
compile iproute2 using version 5.7.0

But my output is the same as below:

vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
# tc -s class show dev enp4s0 | grep 1:30 -A 4
class htb 1:30 parent 1:1 leaf 30: prio 1 rate 3Mbit ceil 3Mbit burst 
5Kb cburst 1599b
  Sent 27793441 bytes 53351 pkt (dropped 26, overlimits 13707 requeues 0)
  backlog 0b 0p requeues 0
  lended: 52095 borrowed: 0 giants: 0
  tokens: 209078 ctokens: 62406
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

I did following changes in tc/tc_util.c for printing the rate enclosure 
after and before condicion of printing rate:

vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
843a844
 > printf("->");
865a867
 > printf("<-");
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

The section of tc_util.c show like this :

vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
printf("->");
         if (tbs[TCA_STATS_RATE_EST64]) {
struct gnet_stats_rate_est64 re = {0};

memcpy(&re, RTA_DATA(tbs[TCA_STATS_RATE_EST64]),
MIN(RTA_PAYLOAD(tbs[TCA_STATS_RATE_EST64]),
                            sizeof(re)));
print_string(PRINT_FP, NULL, "\n%s", prefix);
print_lluint(PRINT_JSON, "rate", NULL, re.bps);
print_string(PRINT_FP, NULL, "rate %s",
                              sprint_rate(re.bps, b1));
print_lluint(PRINT_ANY, "pps", " %llupps", re.pps);
         } else if (tbs[TCA_STATS_RATE_EST]) {
struct gnet_stats_rate_est re = {0};

memcpy(&re, RTA_DATA(tbs[TCA_STATS_RATE_EST]),
                        MIN(RTA_PAYLOAD(tbs[TCA_STATS_RATE_EST]), 
sizeof(re)));
print_string(PRINT_FP, NULL, "\n%s", prefix);
print_uint(PRINT_JSON, "rate", NULL, re.bps);
print_string(PRINT_FP, NULL, "rate %s",
                              sprint_rate(re.bps, b1));
print_uint(PRINT_ANY, "pps", " %upps", re.pps);
         }
printf("<-");
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

And as you can see no rate is being printed, does int need to be enable 
something else to print the rate?, now with the changes done i Got:

vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
# tc -s class show dev enp4s0 | grep 1:30 -A 4
class htb 1:30 parent 1:1 leaf 30: prio 1 rate 3Mbit ceil 3Mbit burst 
5Kb cburst 1599b
  Sent 35713116 bytes 72643 pkt (dropped 26, overlimits 16464 requeues 
0) -><-
  backlog 0b 0p requeues 0
  lended: 71083 borrowed: 0 giants: 0
  tokens: 209078 ctokens: 62406
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

As you can see "-><-" is being printed.

Is necessary to do something else to get tbs[TCA_STATS_RATE_EST] working?

Even i compile the last kernel 5.7.2.

Any guide option or value that must need the processor, network card, 
hardware, etc for this?


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ