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]
Date:   Mon, 20 Jan 2020 09:39:26 -0800
From:   Stephen Hemminger <stephen@...workplumber.org>
To:     Roi Dayan <roid@...lanox.com>
Cc:     netdev@...r.kernel.org, David Ahern <dsahern@...il.com>,
        Jiri Pirko <jiri@...lanox.com>
Subject: Re: [PATCH iproute2] tc: flower: fix print with oneline option

On Tue,  7 Jan 2020 11:22:10 +0200
Roi Dayan <roid@...lanox.com> wrote:

> This commit fix all location in flower to use _SL_ instead of \n for
> newline to allow support for oneline option.
> 
> Example before this commit:
> 
> filter protocol ip pref 2 flower chain 0 handle 0x1
>   indev ens1f0
>   dst_mac 11:22:33:44:55:66
>   eth_type ipv4
>   ip_proto tcp
>   src_ip 2.2.2.2
>   src_port 99
>   dst_port 1-10\  tcp_flags 0x5/5
>   ip_flags frag
>   ct_state -trk\  ct_zone 4\  ct_mark 255
>   ct_label 00000000000000000000000000000000
>   skip_hw
>   not_in_hw\    action order 1: ct zone 5 pipe
>          index 1 ref 1 bind 1 installed 287 sec used 287 sec
>         Action statistics:\     Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0)
>         backlog 0b 0p requeues 0\
> 
> Example output after this commit:
> 
> filter protocol ip pref 2 flower chain 0 handle 0x1 \  indev ens1f0\  dst_mac 11:22:33:44:55:66\  eth_type ipv4\  ip_proto tcp\  src_ip 2.2.2.2\  src_port 99\  dst_port 1-10\  tcp_flags 0x5/5\  ip_flags frag\  ct_state -trk\  ct_zone 4\  ct_mark 255\  ct_label 00000000000000000000000000000000\  skip_hw\  not_in_hw\action order 1: ct zone 5 pipe
>          index 1 ref 1 bind 1 installed 346 sec used 346 sec
>         Action statistics:\     Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0)
>         backlog 0b 0p requeues 0\
> 
> Signed-off-by: Roi Dayan <roid@...lanox.com>
> Acked-by: Jiri Pirko <jiri@...lanox.com>

In general this is fine. A couple of small style issues.
You may have noticed that iproute2 uses kernel formatting style.
Therefore checkpatch is useful tool to look for these.

ERROR: space required after that ',' (ctx:VxV)
#187: FILE: tc/f_flower.c:1898:q
+	sprintf(namefrm,"  %s %%u", name);
 	               ^

ERROR: else should follow close brace '}'
#326: FILE: tc/f_flower.c:2295:
 		}
+		else if (flags & TCA_CLS_FLAGS_NOT_IN_HW) {


ERROR: space required after that ',' (ctx:VxV)
#187: FILE: tc/f_flower.c:1898:
+	sprintf(namefrm,"  %s %%u", name);
 	               ^

ERROR: else should follow close brace '}'
#326: FILE: tc/f_flower.c:2295:
 		}
+		else if (flags & TCA_CLS_FLAGS_NOT_IN_HW) {

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ