All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH iproute2/net-next repost2] tc: flower: use correct type when calling flower_icmp_attr_type
@ 2017-02-08 12:04 Simon Horman
  2017-02-08 19:39 ` Stephen Hemminger
  0 siblings, 1 reply; 2+ messages in thread
From: Simon Horman @ 2017-02-08 12:04 UTC (permalink / raw)
  To: Stephen Hemminger
  Cc: Jiri Pirko, Dinan Gunawardena, netdev, oss-drivers, Simon Horman

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>
---
* Reposted a second time due to send-mail set-up error
* Reposted after breaking out of a larger patch-set
* This should not have a run-time affect assuming both false and
  FLOWER_ICMP_FIELD_TYPE - the first value of enum flower_icmp_field -
  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 403100c92af0..c9d56211b040 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

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH iproute2/net-next repost2] tc: flower: use correct type when calling flower_icmp_attr_type
  2017-02-08 12:04 [PATCH iproute2/net-next repost2] tc: flower: use correct type when calling flower_icmp_attr_type Simon Horman
@ 2017-02-08 19:39 ` Stephen Hemminger
  0 siblings, 0 replies; 2+ messages in thread
From: Stephen Hemminger @ 2017-02-08 19:39 UTC (permalink / raw)
  To: Simon Horman; +Cc: Jiri Pirko, Dinan Gunawardena, netdev, oss-drivers

On Wed,  8 Feb 2017 13:04:31 +0100
Simon Horman <simon.horman@netronome.com> wrote:

> 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>
> ---
> * Reposted a second time due to send-mail set-up error
> * Reposted after breaking out of a larger patch-set
> * This should not have a run-time affect assuming both false and
>   FLOWER_ICMP_FIELD_TYPE - the first value of enum flower_icmp_field -
>   are zero.

Applied to net-next

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2017-02-08 19:47 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-02-08 12:04 [PATCH iproute2/net-next repost2] tc: flower: use correct type when calling flower_icmp_attr_type Simon Horman
2017-02-08 19:39 ` Stephen Hemminger

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.