Skip to content

Commit b4b0368

Browse files
committed
verbs: Query QP data in order on non x86 platforms
EFA can support 128 bytes blocks write in-order for some Grace platforms. Move the check on x86 architecture to the mlx5 provider implementation. Reviewed-by: Michael Margolin <[email protected]> Reviewed-by: Yonatan Nachum <[email protected]> Signed-off-by: Daniel Kranzdorf <[email protected]>
1 parent b2ff238 commit b4b0368

File tree

2 files changed

+11
-7
lines changed

2 files changed

+11
-7
lines changed

libibverbs/verbs.c

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -695,12 +695,6 @@ LATEST_SYMVER_FUNC(ibv_query_qp, 1_1, "IBVERBS_1.1",
695695
int ibv_query_qp_data_in_order(struct ibv_qp *qp, enum ibv_wr_opcode op,
696696
uint32_t flags)
697697
{
698-
#if !defined(__i386__) && !defined(__x86_64__)
699-
/* Currently this API is only supported for x86 architectures since most
700-
* non-x86 platforms are known to be OOO and need to do a per-platform study.
701-
*/
702-
return 0;
703-
#else
704698
int result;
705699

706700
if (!check_comp_mask(flags, IBV_QUERY_QP_DATA_IN_ORDER_RETURN_CAPS))
@@ -711,7 +705,6 @@ int ibv_query_qp_data_in_order(struct ibv_qp *qp, enum ibv_wr_opcode op,
711705
result |= IBV_QUERY_QP_DATA_IN_ORDER_ALIGNED_128_BYTES;
712706

713707
return flags ? result : !!(result & IBV_QUERY_QP_DATA_IN_ORDER_WHOLE_MSG);
714-
#endif
715708
}
716709

717710
LATEST_SYMVER_FUNC(ibv_modify_qp, 1_1, "IBVERBS_1.1",

providers/mlx5/verbs.c

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2911,6 +2911,10 @@ int mlx5_destroy_qp(struct ibv_qp *ibqp)
29112911
return 0;
29122912
}
29132913

2914+
/* Currently this API is only supported for x86 architectures since most
2915+
* non-x86 platforms are known to be OOO and need to do a per-platform study.
2916+
*/
2917+
#if defined(__i386__) || defined(__x86_64__)
29142918
static int query_dct_in_order(struct ibv_qp *qp)
29152919
{
29162920
uint32_t in_dct[DEVX_ST_SZ_DW(query_dct_in)] = {};
@@ -2956,6 +2960,13 @@ int mlx5_query_qp_data_in_order(struct ibv_qp *qp, enum ibv_wr_opcode op,
29562960
return DEVX_GET(query_qp_out, out_qp, qpc.data_in_order) ?
29572961
IBV_QUERY_QP_DATA_IN_ORDER_WHOLE_MSG : 0;
29582962
}
2963+
#else
2964+
int mlx5_query_qp_data_in_order(struct ibv_qp *qp, enum ibv_wr_opcode op,
2965+
uint32_t flags)
2966+
{
2967+
return 0;
2968+
}
2969+
#endif
29592970

29602971
int mlx5_query_qp(struct ibv_qp *ibqp, struct ibv_qp_attr *attr,
29612972
int attr_mask, struct ibv_qp_init_attr *init_attr)

0 commit comments

Comments
 (0)