Skip to content

Commit ae9f83a

Browse files
hadarhenziondavem330
authored andcommitted
net/mlx5: Move alloc/dealloc encap commands declarations to common header file
The alloc and dealloc encap commands will be used in the mlx5e driver, as such, declare them in a common header file. Also, rename the functions: mlx5_cmd_{de}alloc_encap is replaced with mlx5_encap_{de}alloc. Signed-off-by: Hadar Hen Zion <[email protected]> Signed-off-by: Saeed Mahameed <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent 75bfbca commit ae9f83a

File tree

3 files changed

+12
-13
lines changed

3 files changed

+12
-13
lines changed

drivers/net/ethernet/mellanox/mlx5/core/fs_cmd.c

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -455,11 +455,11 @@ void mlx5_cmd_fc_bulk_get(struct mlx5_core_dev *dev,
455455

456456
#define MAX_ENCAP_SIZE (128)
457457

458-
int mlx5_cmd_alloc_encap(struct mlx5_core_dev *dev,
459-
int header_type,
460-
size_t size,
461-
void *encap_header,
462-
u32 *encap_id)
458+
int mlx5_encap_alloc(struct mlx5_core_dev *dev,
459+
int header_type,
460+
size_t size,
461+
void *encap_header,
462+
u32 *encap_id)
463463
{
464464
u32 out[MLX5_ST_SZ_DW(alloc_encap_header_out)];
465465
u32 in[MLX5_ST_SZ_DW(alloc_encap_header_in) +
@@ -488,7 +488,7 @@ int mlx5_cmd_alloc_encap(struct mlx5_core_dev *dev,
488488
return err;
489489
}
490490

491-
void mlx5_cmd_dealloc_encap(struct mlx5_core_dev *dev, u32 encap_id)
491+
void mlx5_encap_dealloc(struct mlx5_core_dev *dev, u32 encap_id)
492492
{
493493
u32 in[MLX5_ST_SZ_DW(dealloc_encap_header_in)];
494494
u32 out[MLX5_ST_SZ_DW(dealloc_encap_header_out)];

drivers/net/ethernet/mellanox/mlx5/core/fs_cmd.h

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -89,11 +89,4 @@ void mlx5_cmd_fc_bulk_get(struct mlx5_core_dev *dev,
8989
struct mlx5_cmd_fc_bulk *b, u16 id,
9090
u64 *packets, u64 *bytes);
9191

92-
int mlx5_cmd_alloc_encap(struct mlx5_core_dev *dev,
93-
int header_type,
94-
size_t size,
95-
void *encap_header,
96-
u32 *encap_id);
97-
void mlx5_cmd_dealloc_encap(struct mlx5_core_dev *dev, u32 encap_id);
98-
9992
#endif

drivers/net/ethernet/mellanox/mlx5/core/mlx5_core.h

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,12 @@ struct mlx5_core_dev *mlx5_get_next_phys_dev(struct mlx5_core_dev *dev);
121121
void mlx5_dev_list_lock(void);
122122
void mlx5_dev_list_unlock(void);
123123
int mlx5_dev_list_trylock(void);
124+
int mlx5_encap_alloc(struct mlx5_core_dev *dev,
125+
int header_type,
126+
size_t size,
127+
void *encap_header,
128+
u32 *encap_id);
129+
void mlx5_encap_dealloc(struct mlx5_core_dev *dev, u32 encap_id);
124130

125131
bool mlx5_lag_intf_add(struct mlx5_interface *intf, struct mlx5_priv *priv);
126132

0 commit comments

Comments
 (0)