diff options
author | Jiri Pirko <jiri@resnulli.us> | 2020-03-10 16:49:07 +0100 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2020-03-11 00:04:19 +0100 |
commit | a393daa8993fd7d6c9c33110d5dac08bc0dc2696 (patch) | |
tree | f62c7411a959c5a8e4040e318399a683d5ccc30c /include/net/flow_offload.h | |
parent | Merge branch 'enetc-Support-extended-BD-rings-at-runtime' (diff) | |
download | linux-a393daa8993fd7d6c9c33110d5dac08bc0dc2696.tar.xz linux-a393daa8993fd7d6c9c33110d5dac08bc0dc2696.zip |
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@resnulli.us>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/net/flow_offload.h')
-rw-r--r-- | include/net/flow_offload.h | 2 |
1 files changed, 1 insertions, 1 deletions
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; } |