mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-10-05 00:20:32 +00:00
net/mlx5e: RX, Change wqe last_in_page field from bool to bit flags
Change the bool flag to a bitfield as we'll use it in a downstream patch in the series to add signaling about skipping a fragment release. Signed-off-by: Dragos Tatulea <dtatulea@nvidia.com> Reviewed-by: Tariq Toukan <tariqt@nvidia.com> Signed-off-by: Saeed Mahameed <saeedm@nvidia.com>
This commit is contained in:
parent
4c2a132368
commit
625dff29df
3 changed files with 8 additions and 4 deletions
|
@ -605,13 +605,17 @@ struct mlx5e_frag_page {
|
|||
u16 frags;
|
||||
};
|
||||
|
||||
enum mlx5e_wqe_frag_flag {
|
||||
MLX5E_WQE_FRAG_LAST_IN_PAGE,
|
||||
};
|
||||
|
||||
struct mlx5e_wqe_frag_info {
|
||||
union {
|
||||
struct mlx5e_frag_page *frag_page;
|
||||
struct xdp_buff **xskp;
|
||||
};
|
||||
u32 offset;
|
||||
bool last_in_page;
|
||||
u8 flags;
|
||||
};
|
||||
|
||||
union mlx5e_alloc_units {
|
||||
|
|
|
@ -532,7 +532,7 @@ static void mlx5e_init_frags_partition(struct mlx5e_rq *rq)
|
|||
next_frag.frag_page++;
|
||||
next_frag.offset = 0;
|
||||
if (prev)
|
||||
prev->last_in_page = true;
|
||||
prev->flags |= BIT(MLX5E_WQE_FRAG_LAST_IN_PAGE);
|
||||
}
|
||||
*frag = next_frag;
|
||||
|
||||
|
@ -543,7 +543,7 @@ static void mlx5e_init_frags_partition(struct mlx5e_rq *rq)
|
|||
}
|
||||
|
||||
if (prev)
|
||||
prev->last_in_page = true;
|
||||
prev->flags |= BIT(MLX5E_WQE_FRAG_LAST_IN_PAGE);
|
||||
}
|
||||
|
||||
static void mlx5e_init_xsk_buffs(struct mlx5e_rq *rq)
|
||||
|
|
|
@ -323,7 +323,7 @@ static inline void mlx5e_put_rx_frag(struct mlx5e_rq *rq,
|
|||
struct mlx5e_wqe_frag_info *frag,
|
||||
bool recycle)
|
||||
{
|
||||
if (frag->last_in_page)
|
||||
if (frag->flags & BIT(MLX5E_WQE_FRAG_LAST_IN_PAGE))
|
||||
mlx5e_page_release_fragmented(rq, frag->frag_page, recycle);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue