Skip to content

Commit a2e4020

Browse files
committed
UCT/API: Moved iface query flag to v2, minor fixes
Signed-off-by: Roie Danino <rdanino@nvidia.com>
1 parent e3ae85a commit a2e4020

4 files changed

Lines changed: 20 additions & 15 deletions

File tree

src/uct/api/uct.h

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -429,9 +429,6 @@ typedef enum uct_atomic_op {
429429
channel with remote peer is broken, even if there
430430
are no outstanding send operations */
431431

432-
/* Token query capability */
433-
#define UCT_IFACE_FLAG_QUERY_TOKEN UCS_BIT(47) /**< Interface supports token query */
434-
435432
/* Tag matching operations */
436433
#define UCT_IFACE_FLAG_TAG_EAGER_SHORT UCS_BIT(50) /**< Hardware tag matching short eager support */
437434
#define UCT_IFACE_FLAG_TAG_EAGER_BCOPY UCS_BIT(51) /**< Hardware tag matching bcopy eager support */

src/uct/api/v2/uct_v2.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1059,6 +1059,7 @@ enum uct_iface_attr_field {
10591059
*/
10601060
/* PUT capabilities */
10611061
#define UCT_IFACE_FLAG_V2_PUT_SGL_ZCOPY UCS_BIT(0) /**< Zero-copy SGL put */
1062+
#define UCT_IFACE_FLAG_V2_QUERY_TOKEN UCS_BIT(1) /**< Interface supports token query */
10621063
/**
10631064
* @}
10641065
*/

src/uct/ib/mlx5/ib_mlx5_ext.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,5 +27,5 @@ void uct_ib_mlx5_ext_register(const uct_ib_mlx5_ext_ops_t *ops)
2727
ucs_assertv(ops->iface_flags != NULL, "ext_resgiter: iface_flags function is NULL");
2828
ucs_assertv(ops->qp_query != NULL, "ext_resgiter: qp_query function is NULL");
2929
uct_ib_mlx5_ext_ops = *ops;
30-
ucs_info("ib mlx5: registered external ops successfully");
30+
ucs_debug("ib mlx5: registered external ops successfully");
3131
}

src/uct/ib/mlx5/ib_mlx5_ext.h

Lines changed: 18 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,15 @@
77
#ifndef UCT_IB_MLX5_EXT_H_
88
#define UCT_IB_MLX5_EXT_H_
99

10+
#include <infiniband/verbs.h>
11+
#include <infiniband/mlx5dv.h>
12+
1013
#include <stdint.h>
14+
1115
#include <ucs/debug/assert.h>
1216
#include <ucs/type/status.h>
1317
#include <ucs/sys/stubs.h>
1418

15-
16-
struct ibv_qp;
17-
struct mlx5dv_devx_obj;
18-
1919
/**
2020
* @brief Field mask bits for @ref uct_ib_mlx5_ext_qp_query_attr_t.
2121
* Selects which output fields to populate.
@@ -29,19 +29,26 @@ enum uct_ib_mlx5_ext_qp_query_attr_field {
2929
};
3030

3131
/**
32-
* @brief QP query output attributes.
32+
* @brief QP tx/rx token query output attributes.
3333
*/
3434
typedef struct uct_ib_mlx5_ext_qp_query_attr {
35-
uint64_t field_mask;
36-
size_t tx_token_len;
37-
size_t rx_token_len;
38-
void *tx_token;
39-
void *rx_token;
40-
uint32_t qp_num;
35+
uint64_t field_mask; /**< Mask of valid fields in this structure, using bits from @ref uct_ib_mlx5_ext_qp_query_attr_field. */
36+
size_t tx_token_len; /**< Length of the TX token in bytes. */
37+
size_t rx_token_len; /**< Length of the RX token in bytes. */
38+
void *tx_token; /**< TX token pointer. */
39+
void *rx_token; /**< RX token pointer. */
40+
uint32_t qp_num; /**< QP number. */
4141
} uct_ib_mlx5_ext_qp_query_attr_t;
4242

4343

44+
/**
45+
* @brief External plugin iface flags function type.
46+
*/
4447
typedef ucs_status_t (*uct_ib_mlx5_ext_iface_flags_func_t)(uint64_t *flags);
48+
49+
/**
50+
* @brief QP tx/rx token query function type.
51+
*/
4552
typedef ucs_status_t (*uct_ib_mlx5_ext_qp_query_func_t)(
4653
struct ibv_qp *qp, struct mlx5dv_devx_obj *devx_obj,
4754
uct_ib_mlx5_ext_qp_query_attr_t *attr);

0 commit comments

Comments
 (0)