mlxsw: use intermediate representation for matchall offload
Updates the Mellanox spectrum driver to use the newer intermediate representation for flow actions in matchall offloads. Signed-off-by: Pieter Jansen van Vuuren <pieter.jansenvanvuuren@netronome.com> Reviewed-by: Jakub Kicinski <jakub.kicinski@netronome.com> Acked-by: Jiri Pirko <jiri@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:

committed by
David S. Miller

parent
f00cbf1968
commit
ab79af32b0
@@ -177,6 +177,17 @@ static inline bool flow_action_has_entries(const struct flow_action *action)
|
||||
return action->num_entries;
|
||||
}
|
||||
|
||||
/**
|
||||
* flow_action_has_one_action() - check if exactly one action is present
|
||||
* @action: tc filter flow offload action
|
||||
*
|
||||
* Returns true if exactly one action is present.
|
||||
*/
|
||||
static inline bool flow_offload_has_one_action(const struct flow_action *action)
|
||||
{
|
||||
return action->num_entries == 1;
|
||||
}
|
||||
|
||||
#define flow_action_for_each(__i, __act, __actions) \
|
||||
for (__i = 0, __act = &(__actions)->entries[0]; __i < (__actions)->num_entries; __act = &(__actions)->entries[++__i])
|
||||
|
||||
|
Reference in New Issue
Block a user