From: Stephen Hemminger <stephen@networkplumber.org>
To: Roi Dayan <roid@mellanox.com>
Cc: netdev@vger.kernel.org, David Ahern <dsahern@gmail.com>,
Jiri Pirko <jiri@mellanox.com>
Subject: Re: [PATCH iproute2] tc: flower: fix print with oneline option
Date: Mon, 20 Jan 2020 09:39:26 -0800 [thread overview]
Message-ID: <20200120093926.1bf3ce01@hermes.lan> (raw)
In-Reply-To: <20200107092210.1562-1-roid@mellanox.com>
On Tue, 7 Jan 2020 11:22:10 +0200
Roi Dayan <roid@mellanox.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@mellanox.com>
> Acked-by: Jiri Pirko <jiri@mellanox.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) {
next prev parent reply other threads:[~2020-01-20 17:39 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-01-07 9:22 [PATCH iproute2] tc: flower: fix print with oneline option Roi Dayan
2020-01-20 17:39 ` Stephen Hemminger [this message]
2020-01-21 8:26 ` Roi Dayan
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200120093926.1bf3ce01@hermes.lan \
--to=stephen@networkplumber.org \
--cc=dsahern@gmail.com \
--cc=jiri@mellanox.com \
--cc=netdev@vger.kernel.org \
--cc=roid@mellanox.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.