[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20200310154909.3970-2-jiri@resnulli.us>
Date: Tue, 10 Mar 2020 16:49:07 +0100
From: Jiri Pirko <jiri@...nulli.us>
To: netdev@...r.kernel.org
Cc: davem@...emloft.net, kuba@...nel.org, saeedm@...lanox.com,
pablo@...filter.org, ecree@...arflare.com
Subject: [patch net-next 1/3] flow_offload: fix allowed types check
Change the check to see if the passed allowed type bit is enabled.
Fixes: 319a1d19471e ("flow_offload: check for basic action hw stats type")
Signed-off-by: Jiri Pirko <jiri@...nulli.us>
---
include/net/flow_offload.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/include/net/flow_offload.h b/include/net/flow_offload.h
index 891e15055708..2fda4178ba35 100644
--- a/include/net/flow_offload.h
+++ b/include/net/flow_offload.h
@@ -306,7 +306,7 @@ flow_action_hw_stats_types_check(const struct flow_action *action,
NL_SET_ERR_MSG_MOD(extack, "Driver supports only default HW stats type \"any\"");
return false;
} else if (allowed_hw_stats_type != 0 &&
- action_entry->hw_stats_type != allowed_hw_stats_type) {
+ !(action_entry->hw_stats_type & allowed_hw_stats_type)) {
NL_SET_ERR_MSG_MOD(extack, "Driver does not support selected HW stats type");
return false;
}
--
2.21.1
Powered by blists - more mailing lists