diff options
-rw-r--r-- | drivers/infiniband/hw/mlx4/qp.c | 6 | ||||
-rw-r--r-- | include/linux/mlx4/qp.h | 3 |
2 files changed, 5 insertions, 4 deletions
diff --git a/drivers/infiniband/hw/mlx4/qp.c b/drivers/infiniband/hw/mlx4/qp.c index 3a7848966627..6da2e9755091 100644 --- a/drivers/infiniband/hw/mlx4/qp.c +++ b/drivers/infiniband/hw/mlx4/qp.c | |||
@@ -1424,6 +1424,9 @@ static int build_mlx_header(struct mlx4_ib_sqp *sqp, struct ib_send_wr *wr, | |||
1424 | 1424 | ||
1425 | if (is_eth) { | 1425 | if (is_eth) { |
1426 | u8 *smac; | 1426 | u8 *smac; |
1427 | u16 pcp = (be32_to_cpu(ah->av.ib.sl_tclass_flowlabel) >> 29) << 13; | ||
1428 | |||
1429 | mlx->sched_prio = cpu_to_be16(pcp); | ||
1427 | 1430 | ||
1428 | memcpy(sqp->ud_header.eth.dmac_h, ah->av.eth.mac, 6); | 1431 | memcpy(sqp->ud_header.eth.dmac_h, ah->av.eth.mac, 6); |
1429 | /* FIXME: cache smac value? */ | 1432 | /* FIXME: cache smac value? */ |
@@ -1434,10 +1437,7 @@ static int build_mlx_header(struct mlx4_ib_sqp *sqp, struct ib_send_wr *wr, | |||
1434 | if (!is_vlan) { | 1437 | if (!is_vlan) { |
1435 | sqp->ud_header.eth.type = cpu_to_be16(MLX4_IB_IBOE_ETHERTYPE); | 1438 | sqp->ud_header.eth.type = cpu_to_be16(MLX4_IB_IBOE_ETHERTYPE); |
1436 | } else { | 1439 | } else { |
1437 | u16 pcp; | ||
1438 | |||
1439 | sqp->ud_header.vlan.type = cpu_to_be16(MLX4_IB_IBOE_ETHERTYPE); | 1440 | sqp->ud_header.vlan.type = cpu_to_be16(MLX4_IB_IBOE_ETHERTYPE); |
1440 | pcp = (be32_to_cpu(ah->av.ib.sl_tclass_flowlabel) >> 29) << 13; | ||
1441 | sqp->ud_header.vlan.tag = cpu_to_be16(vlan | pcp); | 1441 | sqp->ud_header.vlan.tag = cpu_to_be16(vlan | pcp); |
1442 | } | 1442 | } |
1443 | } else { | 1443 | } else { |
diff --git a/include/linux/mlx4/qp.h b/include/linux/mlx4/qp.h index 091f9e7dc8b9..bb57d5c58df2 100644 --- a/include/linux/mlx4/qp.h +++ b/include/linux/mlx4/qp.h | |||
@@ -233,7 +233,8 @@ struct mlx4_wqe_mlx_seg { | |||
233 | u8 owner; | 233 | u8 owner; |
234 | u8 reserved1[2]; | 234 | u8 reserved1[2]; |
235 | u8 opcode; | 235 | u8 opcode; |
236 | u8 reserved2[3]; | 236 | __be16 sched_prio; |
237 | u8 reserved2; | ||
237 | u8 size; | 238 | u8 size; |
238 | /* | 239 | /* |
239 | * [17] VL15 | 240 | * [17] VL15 |