aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/mlx4
diff options
context:
space:
mode:
authorAmir Vadai <amirv@mellanox.com>2014-03-02 03:25:04 -0500
committerDavid S. Miller <davem@davemloft.net>2014-03-02 20:04:01 -0500
commitec5709403e6893acb4f7ca40514ebd29c3116836 (patch)
treec43daac50a67323df5b6f925ec17ce68f3e2a59f /include/linux/mlx4
parent28d222bbaa5122fb4bb0e607e39ab149a010e587 (diff)
net/mlx4_en: Use union for BlueFlame WQE
When BlueFlame is turned on, control segment of the TX WQE is changed, and the second line of it is used for QPN. Changed code to use a union in the mlx4_wqe_ctrl_seg instead of casting. This makes the code clearer and solves the static checker warning: drivers/net/ethernet/mellanox/mlx4/en_tx.c:839 mlx4_en_xmit() warn: potential memory corrupting cast 4 vs 2 bytes CC: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Amir Vadai <amirv@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/linux/mlx4')
-rw-r--r--include/linux/mlx4/qp.h11
1 files changed, 8 insertions, 3 deletions
diff --git a/include/linux/mlx4/qp.h b/include/linux/mlx4/qp.h
index 59f8ba84568b..b66e7610d4ee 100644
--- a/include/linux/mlx4/qp.h
+++ b/include/linux/mlx4/qp.h
@@ -270,9 +270,14 @@ enum {
270 270
271struct mlx4_wqe_ctrl_seg { 271struct mlx4_wqe_ctrl_seg {
272 __be32 owner_opcode; 272 __be32 owner_opcode;
273 __be16 vlan_tag; 273 union {
274 u8 ins_vlan; 274 struct {
275 u8 fence_size; 275 __be16 vlan_tag;
276 u8 ins_vlan;
277 u8 fence_size;
278 };
279 __be32 bf_qpn;
280 };
276 /* 281 /*
277 * High 24 bits are SRC remote buffer; low 8 bits are flags: 282 * High 24 bits are SRC remote buffer; low 8 bits are flags:
278 * [7] SO (strong ordering) 283 * [7] SO (strong ordering)