| 1 | /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ |
| 2 | /* |
| 3 | * Copyright (c) 2024-2025, NVIDIA CORPORATION & AFFILIATES |
| 4 | * |
| 5 | * These are definitions for the command interface for mlx5 HW. mlx5 FW has a |
| 6 | * User Context mechanism which allows the FW to understand a security scope. |
| 7 | * FWCTL binds each FD to a FW user context and then places the User Context ID |
| 8 | * (UID) in each command header. The created User Context has a capability set |
| 9 | * that is appropriate for FWCTL's security model. |
| 10 | * |
| 11 | * Command formation should use a copy of the structs in mlx5_ifc.h following |
| 12 | * the Programmers Reference Manual. A open release is available here: |
| 13 | * |
| 14 | * https://network.nvidia.com/files/doc-2020/ethernet-adapters-programming-manual.pdf |
| 15 | * |
| 16 | * The device_type for this file is FWCTL_DEVICE_TYPE_MLX5. |
| 17 | */ |
| 18 | #ifndef _FWCTL_MLX5_H |
| 19 | #define _FWCTL_MLX5_H |
| 20 | |
| 21 | #include <linux/types.h> |
| 22 | |
| 23 | /** |
| 24 | * struct fwctl_info_mlx5 - ioctl(FWCTL_INFO) out_device_data |
| 25 | * @uid: The FW UID this FD is bound to. Each command header will force |
| 26 | *	this value. |
| 27 | * @uctx_caps: The FW capabilities that are enabled for the uid. |
| 28 | * |
| 29 | * Return basic information about the FW interface available. |
| 30 | */ |
| 31 | struct fwctl_info_mlx5 { |
| 32 | 	__u32 uid; |
| 33 | 	__u32 uctx_caps; |
| 34 | }; |
| 35 | |
| 36 | #endif |