net/mlx5: Add helper to initialize a flow steering actions struct instance
There are bunch of places in the code where the intermediate struct that keeps the elements related to flow actions is initialized with the same default values. Put that into a small DECLARE type helper. This patch doesn't change any functionality. Signed-off-by: Or Gerlitz <ogerlitz@mellanox.com> Reviewed-by: Hadar Hen Zion <hadarh@mellanox.com> Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
This commit is contained in:

committed by
Saeed Mahameed

parent
aa0cbbae5d
commit
e753b2b50d
@@ -136,6 +136,10 @@ struct mlx5_flow_act {
|
||||
u32 encap_id;
|
||||
};
|
||||
|
||||
#define MLX5_DECLARE_FLOW_ACT(name) \
|
||||
struct mlx5_flow_act name = {MLX5_FLOW_CONTEXT_ACTION_FWD_DEST,\
|
||||
MLX5_FS_DEFAULT_FLOW_TAG, 0}
|
||||
|
||||
/* Single destination per rule.
|
||||
* Group ID is implied by the match criteria.
|
||||
*/
|
||||
@@ -156,5 +160,4 @@ struct mlx5_fc *mlx5_fc_create(struct mlx5_core_dev *dev, bool aging);
|
||||
void mlx5_fc_destroy(struct mlx5_core_dev *dev, struct mlx5_fc *counter);
|
||||
void mlx5_fc_query_cached(struct mlx5_fc *counter,
|
||||
u64 *bytes, u64 *packets, u64 *lastuse);
|
||||
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user