162306a36Sopenharmony_ci/* 262306a36Sopenharmony_ci * Copyright (c) 2018, Mellanox Technologies inc. All rights reserved. 362306a36Sopenharmony_ci * 462306a36Sopenharmony_ci * This software is available to you under a choice of one of two 562306a36Sopenharmony_ci * licenses. You may choose to be licensed under the terms of the GNU 662306a36Sopenharmony_ci * General Public License (GPL) Version 2, available from the file 762306a36Sopenharmony_ci * COPYING in the main directory of this source tree, or the 862306a36Sopenharmony_ci * OpenIB.org BSD license below: 962306a36Sopenharmony_ci * 1062306a36Sopenharmony_ci * Redistribution and use in source and binary forms, with or 1162306a36Sopenharmony_ci * without modification, are permitted provided that the following 1262306a36Sopenharmony_ci * conditions are met: 1362306a36Sopenharmony_ci * 1462306a36Sopenharmony_ci * - Redistributions of source code must retain the above 1562306a36Sopenharmony_ci * copyright notice, this list of conditions and the following 1662306a36Sopenharmony_ci * disclaimer. 1762306a36Sopenharmony_ci * 1862306a36Sopenharmony_ci * - Redistributions in binary form must reproduce the above 1962306a36Sopenharmony_ci * copyright notice, this list of conditions and the following 2062306a36Sopenharmony_ci * disclaimer in the documentation and/or other materials 2162306a36Sopenharmony_ci * provided with the distribution. 2262306a36Sopenharmony_ci * 2362306a36Sopenharmony_ci * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 2462306a36Sopenharmony_ci * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 2562306a36Sopenharmony_ci * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 2662306a36Sopenharmony_ci * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS 2762306a36Sopenharmony_ci * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN 2862306a36Sopenharmony_ci * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 2962306a36Sopenharmony_ci * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 3062306a36Sopenharmony_ci * SOFTWARE. 3162306a36Sopenharmony_ci */ 3262306a36Sopenharmony_ci 3362306a36Sopenharmony_ci#ifndef MLX5_USER_IOCTL_VERBS_H 3462306a36Sopenharmony_ci#define MLX5_USER_IOCTL_VERBS_H 3562306a36Sopenharmony_ci 3662306a36Sopenharmony_ci#include <linux/types.h> 3762306a36Sopenharmony_ci 3862306a36Sopenharmony_cienum mlx5_ib_uapi_flow_action_flags { 3962306a36Sopenharmony_ci MLX5_IB_UAPI_FLOW_ACTION_FLAGS_REQUIRE_METADATA = 1 << 0, 4062306a36Sopenharmony_ci}; 4162306a36Sopenharmony_ci 4262306a36Sopenharmony_cienum mlx5_ib_uapi_flow_table_type { 4362306a36Sopenharmony_ci MLX5_IB_UAPI_FLOW_TABLE_TYPE_NIC_RX = 0x0, 4462306a36Sopenharmony_ci MLX5_IB_UAPI_FLOW_TABLE_TYPE_NIC_TX = 0x1, 4562306a36Sopenharmony_ci MLX5_IB_UAPI_FLOW_TABLE_TYPE_FDB = 0x2, 4662306a36Sopenharmony_ci MLX5_IB_UAPI_FLOW_TABLE_TYPE_RDMA_RX = 0x3, 4762306a36Sopenharmony_ci MLX5_IB_UAPI_FLOW_TABLE_TYPE_RDMA_TX = 0x4, 4862306a36Sopenharmony_ci}; 4962306a36Sopenharmony_ci 5062306a36Sopenharmony_cienum mlx5_ib_uapi_flow_action_packet_reformat_type { 5162306a36Sopenharmony_ci MLX5_IB_UAPI_FLOW_ACTION_PACKET_REFORMAT_TYPE_L2_TUNNEL_TO_L2 = 0x0, 5262306a36Sopenharmony_ci MLX5_IB_UAPI_FLOW_ACTION_PACKET_REFORMAT_TYPE_L2_TO_L2_TUNNEL = 0x1, 5362306a36Sopenharmony_ci MLX5_IB_UAPI_FLOW_ACTION_PACKET_REFORMAT_TYPE_L3_TUNNEL_TO_L2 = 0x2, 5462306a36Sopenharmony_ci MLX5_IB_UAPI_FLOW_ACTION_PACKET_REFORMAT_TYPE_L2_TO_L3_TUNNEL = 0x3, 5562306a36Sopenharmony_ci}; 5662306a36Sopenharmony_ci 5762306a36Sopenharmony_cistruct mlx5_ib_uapi_devx_async_cmd_hdr { 5862306a36Sopenharmony_ci __aligned_u64 wr_id; 5962306a36Sopenharmony_ci __u8 out_data[]; 6062306a36Sopenharmony_ci}; 6162306a36Sopenharmony_ci 6262306a36Sopenharmony_cienum mlx5_ib_uapi_dm_type { 6362306a36Sopenharmony_ci MLX5_IB_UAPI_DM_TYPE_MEMIC, 6462306a36Sopenharmony_ci MLX5_IB_UAPI_DM_TYPE_STEERING_SW_ICM, 6562306a36Sopenharmony_ci MLX5_IB_UAPI_DM_TYPE_HEADER_MODIFY_SW_ICM, 6662306a36Sopenharmony_ci MLX5_IB_UAPI_DM_TYPE_HEADER_MODIFY_PATTERN_SW_ICM, 6762306a36Sopenharmony_ci}; 6862306a36Sopenharmony_ci 6962306a36Sopenharmony_cienum mlx5_ib_uapi_devx_create_event_channel_flags { 7062306a36Sopenharmony_ci MLX5_IB_UAPI_DEVX_CR_EV_CH_FLAGS_OMIT_DATA = 1 << 0, 7162306a36Sopenharmony_ci}; 7262306a36Sopenharmony_ci 7362306a36Sopenharmony_cistruct mlx5_ib_uapi_devx_async_event_hdr { 7462306a36Sopenharmony_ci __aligned_u64 cookie; 7562306a36Sopenharmony_ci __u8 out_data[]; 7662306a36Sopenharmony_ci}; 7762306a36Sopenharmony_ci 7862306a36Sopenharmony_cienum mlx5_ib_uapi_pp_alloc_flags { 7962306a36Sopenharmony_ci MLX5_IB_UAPI_PP_ALLOC_FLAGS_DEDICATED_INDEX = 1 << 0, 8062306a36Sopenharmony_ci}; 8162306a36Sopenharmony_ci 8262306a36Sopenharmony_cienum mlx5_ib_uapi_uar_alloc_type { 8362306a36Sopenharmony_ci MLX5_IB_UAPI_UAR_ALLOC_TYPE_BF = 0x0, 8462306a36Sopenharmony_ci MLX5_IB_UAPI_UAR_ALLOC_TYPE_NC = 0x1, 8562306a36Sopenharmony_ci}; 8662306a36Sopenharmony_ci 8762306a36Sopenharmony_cienum mlx5_ib_uapi_query_port_flags { 8862306a36Sopenharmony_ci MLX5_IB_UAPI_QUERY_PORT_VPORT = 1 << 0, 8962306a36Sopenharmony_ci MLX5_IB_UAPI_QUERY_PORT_VPORT_VHCA_ID = 1 << 1, 9062306a36Sopenharmony_ci MLX5_IB_UAPI_QUERY_PORT_VPORT_STEERING_ICM_RX = 1 << 2, 9162306a36Sopenharmony_ci MLX5_IB_UAPI_QUERY_PORT_VPORT_STEERING_ICM_TX = 1 << 3, 9262306a36Sopenharmony_ci MLX5_IB_UAPI_QUERY_PORT_VPORT_REG_C0 = 1 << 4, 9362306a36Sopenharmony_ci MLX5_IB_UAPI_QUERY_PORT_ESW_OWNER_VHCA_ID = 1 << 5, 9462306a36Sopenharmony_ci}; 9562306a36Sopenharmony_ci 9662306a36Sopenharmony_cistruct mlx5_ib_uapi_reg { 9762306a36Sopenharmony_ci __u32 value; 9862306a36Sopenharmony_ci __u32 mask; 9962306a36Sopenharmony_ci}; 10062306a36Sopenharmony_ci 10162306a36Sopenharmony_cistruct mlx5_ib_uapi_query_port { 10262306a36Sopenharmony_ci __aligned_u64 flags; 10362306a36Sopenharmony_ci __u16 vport; 10462306a36Sopenharmony_ci __u16 vport_vhca_id; 10562306a36Sopenharmony_ci __u16 esw_owner_vhca_id; 10662306a36Sopenharmony_ci __u16 rsvd0; 10762306a36Sopenharmony_ci __aligned_u64 vport_steering_icm_rx; 10862306a36Sopenharmony_ci __aligned_u64 vport_steering_icm_tx; 10962306a36Sopenharmony_ci struct mlx5_ib_uapi_reg reg_c0; 11062306a36Sopenharmony_ci}; 11162306a36Sopenharmony_ci 11262306a36Sopenharmony_ci#endif 11362306a36Sopenharmony_ci 114