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>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <52262814-6824-44EF-B10C-C7AD96A0FA57@redhat.com>
Date:   Fri, 10 Aug 2018 16:48:42 +0200
From:   "Eelco Chaudron" <echaudro@...hat.com>
To:     "Stephen Hemminger" <stephen@...workplumber.org>
Cc:     netdev@...r.kernel.org, davem@...emloft.net
Subject: Re: [PATCH iproute2/net-next v2] tc_util: Add support for showing
 TCA_STATS_BASIC_HW statistics



On 10 Aug 2018, at 16:44, Stephen Hemminger wrote:

> On Fri, 10 Aug 2018 07:59:30 -0400
> Eelco Chaudron <echaudro@...hat.com> wrote:
>
>> +		if (bs.bytes >= bs_hw.bytes && bs.packets >= bs_hw.packets) {
>> +			print_string(PRINT_FP, NULL, "%s", _SL_);
>> +			print_string(PRINT_FP, NULL, "%s", prefix);
>> +			print_lluint(PRINT_ANY, "sw_bytes",
>> +				     "Sent software %llu bytes",
>> +				     bs.bytes - bs_hw.bytes);
>> +			print_uint(PRINT_ANY, "sw_packets", " %u pkt",
>> +				   bs.packets - bs_hw.packets);
>> +		}
>> +	}
>> +
>> +	print_string(PRINT_FP, NULL, "%s", _SL_);
>> +	print_string(PRINT_FP, NULL, "%s", prefix);
>> +	print_lluint(PRINT_ANY, "hw_bytes", "Sent hardware %llu bytes",
>> +		     bs_hw.bytes);
>
> What does the output look like?

See the two +’es below:

$ tc -s filter show dev enp3s0np0 parent ffff:
filter protocol ip pref 1 flower chain 0
filter protocol ip pref 1 flower chain 0 handle 0x1
  eth_type ipv4
  dst_ip 2.0.0.0
  src_ip 1.0.0.0
  ip_flags nofrag
  in_hw
        action order 1: mirred (Egress Redirect to device eth1) stolen
        index 1 ref 1 bind 1 installed 0 sec used 0 sec
        Action statistics:
        Sent 534884742 bytes 8915697 pkt (dropped 0, overlimits 0 requeues 0)
+       Sent software 187542 bytes 4077 pkt
+       Sent hardware 534697200 bytes 8911620 pkt
        backlog 0b 0p requeues 0
        cookie 89173e6a44447001becfd486bda17e29

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ