1 /* SPDX-License-Identifier: BSD-3-Clause 2 * Copyright (c) 2022-2024 NVIDIA CORPORATION & AFFILIATES. All rights reserved. 3 */ 4 5 #include "spdk/stdinc.h" 6 7 struct accel_mlx5_attr { 8 /* The number of entries in qp submission/receive queue */ 9 uint16_t qp_size; 10 /* The number of requests in the global pool */ 11 uint32_t num_requests; 12 /* Comma separated list of allowed device names */ 13 char *allowed_devs; 14 /* Apply crypto operation for each X data blocks. Works only if multiblock crypto operation is supported by HW. 15 * 0 means no limit */ 16 uint16_t crypto_split_blocks; 17 }; 18 19 enum accel_mlx5_dump_state_level { 20 /** Dump only grand total statistics */ 21 ACCEL_MLX5_DUMP_STAT_LEVEL_TOTAL, 22 /** Dump grand total statistics and per channel statistics over all devices */ 23 ACCEL_MLX5_DUMP_STAT_LEVEL_CHANNEL, 24 /** Dump grand total statistics and per channel statistics for each individual device */ 25 ACCEL_MLX5_DUMP_STAT_LEVEL_DEV 26 }; 27 28 typedef void(*accel_mlx5_dump_stat_done_cb)(void *ctx, int rc); 29 30 void accel_mlx5_get_default_attr(struct accel_mlx5_attr *attr); 31 int accel_mlx5_enable(struct accel_mlx5_attr *attr); 32 int accel_mlx5_dump_stats(struct spdk_json_write_ctx *w, enum accel_mlx5_dump_state_level level, 33 accel_mlx5_dump_stat_done_cb cb, void *ctx); 34