Skip to content

Commit 7e57842

Browse files
maorgottliebyishaih
authored andcommitted
mlx5: Expose BlueFlame capability
Add flag to indicate BlueFlame support through mlx5dv_query_device. Signed-off-by: Maor Gottlieb <[email protected]> Signed-off-by: Yishai Hadas <[email protected]>
1 parent a096910 commit 7e57842

File tree

3 files changed

+5
-0
lines changed

3 files changed

+5
-0
lines changed

providers/mlx5/man/mlx5dv_query_device.3

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,7 @@ enum mlx5dv_context_flags {
8787
* If CQ was created with IBV_WC_EX_WITH_COMPLETION_TIMESTAMP_WALLCLOCK, CQEs timestamp will be in real time format.
8888
*/
8989
MLX5DV_CONTEXT_FLAGS_REAL_TIME_TS = (1 << 7),
90+
MLX5DV_CONTEXT_FLAGS_BLUEFLAME = (1 << 8), /* Indicates if BlueFlame is supported by the device */
9091
.in -8
9192
};
9293

providers/mlx5/mlx5.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -894,6 +894,9 @@ static int _mlx5dv_query_device(struct ibv_context *ctx_in,
894894
MLX5_VENDOR_CAP_FLAGS_PACKET_BASED_CREDIT_MODE)
895895
attrs_out->flags |= MLX5DV_CONTEXT_FLAGS_PACKET_BASED_CREDIT_MODE;
896896

897+
if (mctx->bf_reg_size > 0)
898+
attrs_out->flags |= MLX5DV_CONTEXT_FLAGS_BLUEFLAME;
899+
897900
if (attrs_out->comp_mask & MLX5DV_CONTEXT_MASK_SWP) {
898901
attrs_out->sw_parsing_caps = mctx->sw_parsing_caps;
899902
comp_mask_out |= MLX5DV_CONTEXT_MASK_SWP;

providers/mlx5/mlx5dv.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -261,6 +261,7 @@ enum mlx5dv_context_flags {
261261
MLX5DV_CONTEXT_FLAGS_CQE_128B_PAD = (1 << 5), /* Support CQE 128B padding */
262262
MLX5DV_CONTEXT_FLAGS_PACKET_BASED_CREDIT_MODE = (1 << 6),
263263
MLX5DV_CONTEXT_FLAGS_REAL_TIME_TS = (1 << 7),
264+
MLX5DV_CONTEXT_FLAGS_BLUEFLAME = (1 << 8), /* Support BlueFlame */
264265
};
265266

266267
enum mlx5dv_cq_init_attr_mask {

0 commit comments

Comments
 (0)