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] [day] [month] [year] [list]
Date:   Fri, 10 Jul 2020 01:10:02 +0800
From:   "YU, Xiangning" <xiangning.yu@...baba-inc.com>
To:     Stephen Hemminger <stephen@...workplumber.org>
Cc:     Linux Kernel Network Developers <netdev@...r.kernel.org>
Subject: Re: [PATCH iproute2-next v2] iproute2 Support lockless token bucket
 (ltb)



On 7/8/20 11:33 PM, Stephen Hemminger wrote:
> On Thu, 09 Jul 2020 00:38:27 +0800
> "YU, Xiangning" <xiangning.yu@...baba-inc.com> wrote:
> 
>> +static int ltb_parse_class_opt(struct qdisc_util *qu, int argc, char **argv,
>> +			       struct nlmsghdr *n, const char *dev)
>> +{
>> +	struct tc_ltb_opt opt;
> 
> If you use empty initializer in C it will make everything 0 and save you some pain.
> 
> 	struct tc_ltb_opt opt = { };
> 

Thank you!
> 
>> +		fprintf(f, "rate %s ", sprint_rate(rate64, b1));
>> +		fprintf(f, "ceil %s ", sprint_rate(ceil64, b1));
>> +		if (show_details) {
>> +			fprintf(f, "measured %llu allocated %llu highwater %llu",
>> +				lopt->measured, lopt->allocated,
>> +				lopt->high_water);
> 
> 
> All output has to be in JSON. Any use of fprintf(f, ...) directly
> is a indication to me of code that is not supporting JSON correctly.
> 

I see your point now. Looks like everything is heading to support JSON, but we have some thing left in other files to be cleaned up. Will change all fprintf in this file.

Thanks,
- Xiangning

Powered by blists - more mailing lists