提交 aa98d15e 编写于 作者: R Rahul Rameshbabu 提交者: Jakub Kicinski

net/mlx5e: Utilize the entire fifo

Previous check was comparing against the fifo mask. The mask is size of the
fifo (power of two) minus one, so a less than or equal comparator should be
used for checking if the fifo has room for the SKB.
Signed-off-by: NRahul Rameshbabu <rrameshbabu@nvidia.com>
Reviewed-by: NTariq Toukan <tariqt@nvidia.com>
Signed-off-by: NSaeed Mahameed <saeedm@nvidia.com>
Link: https://lore.kernel.org/r/20230314054234.267365-6-saeed@kernel.orgSigned-off-by: NJakub Kicinski <kuba@kernel.org>
上级 c1fef618
...@@ -86,7 +86,7 @@ void mlx5e_free_txqsq_descs(struct mlx5e_txqsq *sq); ...@@ -86,7 +86,7 @@ void mlx5e_free_txqsq_descs(struct mlx5e_txqsq *sq);
static inline bool static inline bool
mlx5e_skb_fifo_has_room(struct mlx5e_skb_fifo *fifo) mlx5e_skb_fifo_has_room(struct mlx5e_skb_fifo *fifo)
{ {
return (u16)(*fifo->pc - *fifo->cc) < fifo->mask; return (u16)(*fifo->pc - *fifo->cc) <= fifo->mask;
} }
static inline bool static inline bool
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册