Skip to content

Commit a393daa

Browse files
jpirkodavem330
authored andcommitted
flow_offload: fix allowed types check
Change the check to see if the passed allowed type bit is enabled. Fixes: 319a1d1 ("flow_offload: check for basic action hw stats type") Signed-off-by: Jiri Pirko <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent 79c57bf commit a393daa

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

include/net/flow_offload.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -306,7 +306,7 @@ flow_action_hw_stats_types_check(const struct flow_action *action,
306306
NL_SET_ERR_MSG_MOD(extack, "Driver supports only default HW stats type \"any\"");
307307
return false;
308308
} else if (allowed_hw_stats_type != 0 &&
309-
action_entry->hw_stats_type != allowed_hw_stats_type) {
309+
!(action_entry->hw_stats_type & allowed_hw_stats_type)) {
310310
NL_SET_ERR_MSG_MOD(extack, "Driver does not support selected HW stats type");
311311
return false;
312312
}

0 commit comments

Comments
 (0)