git: d0a800a7fcdc - stable/14 - mlx5core: add mlx5_core_modify_tir()
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Thu, 20 Mar 2025 03:14:00 UTC
The branch stable/14 has been updated by kib:
URL: https://cgit.FreeBSD.org/src/commit/?id=d0a800a7fcdcb276d5083aa906bef7c7e5b33e93
commit d0a800a7fcdcb276d5083aa906bef7c7e5b33e93
Author: Konstantin Belousov <kib@FreeBSD.org>
AuthorDate: 2025-01-30 11:11:29 +0000
Commit: Konstantin Belousov <kib@FreeBSD.org>
CommitDate: 2025-03-20 03:13:37 +0000
mlx5core: add mlx5_core_modify_tir()
(cherry picked from commit 98071573638a1f31e4007894ce20a4fdc8e33a1d)
---
sys/dev/mlx5/mlx5_core/mlx5_transobj.c | 12 ++++++++++++
sys/dev/mlx5/mlx5_core/transobj.h | 1 +
2 files changed, 13 insertions(+)
diff --git a/sys/dev/mlx5/mlx5_core/mlx5_transobj.c b/sys/dev/mlx5/mlx5_core/mlx5_transobj.c
index 6d375d371597..c62969d8d172 100644
--- a/sys/dev/mlx5/mlx5_core/mlx5_transobj.c
+++ b/sys/dev/mlx5/mlx5_core/mlx5_transobj.c
@@ -166,6 +166,18 @@ int mlx5_core_create_tir(struct mlx5_core_dev *dev, u32 *in, int inlen,
return err;
}
+
+int
+mlx5_core_modify_tir(struct mlx5_core_dev *dev, u32 *in, int inlen)
+{
+ u32 out[MLX5_ST_SZ_DW(create_tir_out)] = {0};
+ int err;
+
+ MLX5_SET(modify_tir_in, in, opcode, MLX5_CMD_OP_MODIFY_TIR);
+ err = mlx5_cmd_exec(dev, in, inlen, out, sizeof(out));
+ return (err);
+}
+
void mlx5_core_destroy_tir(struct mlx5_core_dev *dev, u32 tirn, u32 uid)
{
u32 in[MLX5_ST_SZ_DW(destroy_tir_in)] = {0};
diff --git a/sys/dev/mlx5/mlx5_core/transobj.h b/sys/dev/mlx5/mlx5_core/transobj.h
index 1cc40ca8b1b7..6a21d7db90c8 100644
--- a/sys/dev/mlx5/mlx5_core/transobj.h
+++ b/sys/dev/mlx5/mlx5_core/transobj.h
@@ -40,6 +40,7 @@ void mlx5_core_destroy_sq(struct mlx5_core_dev *dev, u32 sqn);
int mlx5_core_query_sq(struct mlx5_core_dev *dev, u32 sqn, u32 *out);
int mlx5_core_create_tir(struct mlx5_core_dev *dev, u32 *in, int inlen,
u32 *tirn);
+int mlx5_core_modify_tir(struct mlx5_core_dev *dev, u32 *in, int inlen);
void mlx5_core_destroy_tir(struct mlx5_core_dev *dev, u32 tirn, u32 uid);
int mlx5_core_create_tis(struct mlx5_core_dev *dev, u32 *in, int inlen,
u32 *tisn);