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