projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
ad78af9
)
net/mlx5e: Use u8 as ownership type in mlx5e_get_cqe()
author
Tariq Toukan
<
[email protected]
>
Mon, 3 Apr 2017 07:48:30 +0000
(10:48 +0300)
committer
Saeed Mahameed
<
[email protected]
>
Sun, 30 Apr 2017 13:03:19 +0000
(16:03 +0300)
CQE ownership indication is as small as a single bit.
Use u8 to speedup the comparison.
Signed-off-by: Tariq Toukan <
[email protected]
>
Cc:
[email protected]
Signed-off-by: Saeed Mahameed <
[email protected]
>
drivers/net/ethernet/mellanox/mlx5/core/en_txrx.c
patch
|
blob
|
history
diff --git
a/drivers/net/ethernet/mellanox/mlx5/core/en_txrx.c
b/drivers/net/ethernet/mellanox/mlx5/core/en_txrx.c
index 491e83d09b58bd4ea74334b3333defeb531451c3..5ca6714e3e02bd976515de96fa010d348b349458 100644
(file)
--- a/
drivers/net/ethernet/mellanox/mlx5/core/en_txrx.c
+++ b/
drivers/net/ethernet/mellanox/mlx5/core/en_txrx.c
@@
-37,8
+37,8
@@
struct mlx5_cqe64 *mlx5e_get_cqe(struct mlx5e_cq *cq)
struct mlx5_cqwq *wq = &cq->wq;
u32 ci = mlx5_cqwq_get_ci(wq);
struct mlx5_cqe64 *cqe = mlx5_cqwq_get_wqe(wq, ci);
-
int
cqe_ownership_bit = cqe->op_own & MLX5_CQE_OWNER_MASK;
-
int
sw_ownership_val = mlx5_cqwq_get_wrap_cnt(wq) & 1;
+
u8
cqe_ownership_bit = cqe->op_own & MLX5_CQE_OWNER_MASK;
+
u8
sw_ownership_val = mlx5_cqwq_get_wrap_cnt(wq) & 1;
if (cqe_ownership_bit != sw_ownership_val)
return NULL;