From: Simon Horman <simon.horman@netronome.com>
To: Stephen Hemminger <stephen@networkplumber.org>
Cc: Dinan Gunawardena <dinan.gunawardena@netronome.com>,
netdev@vger.kernel.org, oss-drivers@netronome.com,
Simon Horman <simon.horman@netronome.com>
Subject: [PATCH iproute2/net-next 2/7] tc: flower: use correct type when calling flower_icmp_attr_type
Date: Thu, 2 Feb 2017 11:38:35 +0100 [thread overview]
Message-ID: <1486031920-10784-3-git-send-email-simon.horman@netronome.com> (raw)
In-Reply-To: <1486031920-10784-1-git-send-email-simon.horman@netronome.com>
Use enum flower_icmp_field rather than bool as type of third parameter
when calling flower_icmp_attr_type.
Fixes: eb3b5696f163 ("tc: flower: support matching on ICMP type and code")
Signed-off-by: Simon Horman <simon.horman@netronome.com>
--
This should not have a run-time affect assuming both false and,
FLOWER_ICMP_FIELD_TYPE, first value of enum flower_icmp_field rather,
are zero.
---
tc/f_flower.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/tc/f_flower.c b/tc/f_flower.c
index 7cb2cd45a783..0f2251315975 100644
--- a/tc/f_flower.c
+++ b/tc/f_flower.c
@@ -1061,10 +1061,12 @@ static int flower_print_opt(struct filter_util *qu, FILE *f,
if (nl_type >= 0)
flower_print_port(f, "src_port", tb[nl_type]);
- nl_type = flower_icmp_attr_type(eth_type, ip_proto, false);
+ nl_type = flower_icmp_attr_type(eth_type, ip_proto,
+ FLOWER_ICMP_FIELD_TYPE);
if (nl_type >= 0)
flower_print_icmp(f, "icmp_type", tb[nl_type]);
- nl_type = flower_icmp_attr_type(eth_type, ip_proto, true);
+ nl_type = flower_icmp_attr_type(eth_type, ip_proto,
+ FLOWER_ICMP_FIELD_CODE);
if (nl_type >= 0)
flower_print_icmp(f, "icmp_code", tb[nl_type]);
--
2.7.0.rc3.207.g0ac5344
next prev parent reply other threads:[~2017-02-02 10:38 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-02-02 10:38 [PATCH iproute2/net-next 0/7] tc: flower: Masked ICMP match and ND match Simon Horman
2017-02-02 10:38 ` [PATCH iproute2/net-next 1/7] tc: flower: Update documentation to indicate ARP takes IPv4 prefixes Simon Horman
2017-02-02 10:38 ` Simon Horman [this message]
2017-02-02 10:38 ` [PATCH iproute2/net-next 3/7] tc: flower: provide generic masked u8 parser helper Simon Horman
2017-02-02 10:38 ` [PATCH iproute2/net-next 4/7] tc: flower: provide generic masked u8 print helper Simon Horman
2017-02-02 10:38 ` [PATCH iproute2/net-next 5/7] tc: flower: support masked ICMP code and type match Simon Horman
2017-02-02 10:38 ` [PATCH iproute2/net-next 6/7] tc: flower: Add TCA_FLOWER_KEY_ND_* Simon Horman
2017-02-02 10:38 ` [PATCH iproute2/net-next 7/7] tc: flower: Support matching on ND Simon Horman
2017-02-02 17:27 ` Jiri Pirko
2017-02-06 8:44 ` Simon Horman
2017-02-06 9:44 ` Jiri Pirko
2017-02-06 10:09 ` [oss-drivers] " Simon Horman
2017-02-07 16:50 ` Stephen Hemminger
2017-02-06 22:28 ` [PATCH iproute2/net-next 0/7] tc: flower: Masked ICMP match and ND match Stephen Hemminger
2017-02-07 7:52 ` Simon Horman
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=1486031920-10784-3-git-send-email-simon.horman@netronome.com \
--to=simon.horman@netronome.com \
--cc=dinan.gunawardena@netronome.com \
--cc=netdev@vger.kernel.org \
--cc=oss-drivers@netronome.com \
--cc=stephen@networkplumber.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).