|
Packit |
961e70 |
/*
|
|
Packit |
961e70 |
|
|
Packit |
961e70 |
This file is provided under a dual BSD/GPLv2 license. When using or
|
|
Packit |
961e70 |
redistributing this file, you may do so under either license.
|
|
Packit |
961e70 |
|
|
Packit |
961e70 |
GPL LICENSE SUMMARY
|
|
Packit |
961e70 |
|
|
Packit |
961e70 |
Copyright(c) 2016 Intel Corporation.
|
|
Packit |
961e70 |
|
|
Packit |
961e70 |
This program is free software; you can redistribute it and/or modify
|
|
Packit |
961e70 |
it under the terms of version 2 of the GNU General Public License as
|
|
Packit |
961e70 |
published by the Free Software Foundation.
|
|
Packit |
961e70 |
|
|
Packit |
961e70 |
This program is distributed in the hope that it will be useful, but
|
|
Packit |
961e70 |
WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
Packit |
961e70 |
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
Packit |
961e70 |
General Public License for more details.
|
|
Packit |
961e70 |
|
|
Packit |
961e70 |
Contact Information:
|
|
Packit |
961e70 |
Intel Corporation, www.intel.com
|
|
Packit |
961e70 |
|
|
Packit |
961e70 |
BSD LICENSE
|
|
Packit |
961e70 |
|
|
Packit |
961e70 |
Copyright(c) 2016 Intel Corporation.
|
|
Packit |
961e70 |
|
|
Packit |
961e70 |
Redistribution and use in source and binary forms, with or without
|
|
Packit |
961e70 |
modification, are permitted provided that the following conditions
|
|
Packit |
961e70 |
are met:
|
|
Packit |
961e70 |
|
|
Packit |
961e70 |
* Redistributions of source code must retain the above copyright
|
|
Packit |
961e70 |
notice, this list of conditions and the following disclaimer.
|
|
Packit |
961e70 |
* Redistributions in binary form must reproduce the above copyright
|
|
Packit |
961e70 |
notice, this list of conditions and the following disclaimer in
|
|
Packit |
961e70 |
the documentation and/or other materials provided with the
|
|
Packit |
961e70 |
distribution.
|
|
Packit |
961e70 |
* Neither the name of Intel Corporation nor the names of its
|
|
Packit |
961e70 |
contributors may be used to endorse or promote products derived
|
|
Packit |
961e70 |
from this software without specific prior written permission.
|
|
Packit |
961e70 |
|
|
Packit |
961e70 |
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
|
Packit |
961e70 |
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
|
Packit |
961e70 |
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
|
Packit |
961e70 |
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
|
Packit |
961e70 |
OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
|
Packit |
961e70 |
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
|
Packit |
961e70 |
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
|
Packit |
961e70 |
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
|
Packit |
961e70 |
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
|
Packit |
961e70 |
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
|
Packit |
961e70 |
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
Packit |
961e70 |
|
|
Packit |
961e70 |
*/
|
|
Packit |
961e70 |
|
|
Packit |
961e70 |
/*
|
|
Packit |
961e70 |
|
|
Packit |
961e70 |
hfi1_deprecated_gen1.h
|
|
Packit |
961e70 |
|
|
Packit |
961e70 |
Contains certain features of the hfi1 module that have been deprecated.
|
|
Packit |
961e70 |
|
|
Packit |
961e70 |
These features may still need to be supported by the psm library for
|
|
Packit |
961e70 |
reasons of backwards compatibility.
|
|
Packit |
961e70 |
*/
|
|
Packit |
961e70 |
|
|
Packit |
961e70 |
#ifndef __HFI1_DEPRECATED_GEN1_H__
|
|
Packit |
961e70 |
|
|
Packit |
961e70 |
#define __HFI1_DEPRECATED_GEN1_H__
|
|
Packit |
961e70 |
|
|
Packit |
961e70 |
/* First, include the current hfi1_user.h file: */
|
|
Packit |
961e70 |
|
|
Packit |
961e70 |
#include <rdma/hfi/hfi1_user.h>
|
|
Packit |
961e70 |
|
|
Packit |
961e70 |
/* Determine if we need to define and declare deprecated
|
|
Packit |
961e70 |
entities based on the IB_IOCTL_MAGIC macro. */
|
|
Packit |
961e70 |
|
|
Packit |
961e70 |
#if defined( IB_IOCTL_MAGIC )
|
|
Packit |
961e70 |
|
|
Packit |
961e70 |
/* The macro: PSM2_SUPPORT_IW_CMD_API is used to stipulate
|
|
Packit |
961e70 |
adding compile-time support of either the ioctl() or write()
|
|
Packit |
961e70 |
command interfaces to the driver. Note though that the
|
|
Packit |
961e70 |
final decision whether to support this depends on factors
|
|
Packit |
961e70 |
only known at runtime. */
|
|
Packit |
961e70 |
#define PSM2_SUPPORT_IW_CMD_API 1
|
|
Packit |
961e70 |
/* IOCTL_CMD_API_MODULE_MAJOR defines the first version of the hfi1
|
|
Packit |
961e70 |
* module that supports the ioctl() command interface. Prior to this
|
|
Packit |
961e70 |
* (IOCTL_CMD_API_MODULE_MAJOR - 1 and smaller), the module used
|
|
Packit |
961e70 |
* write() for the command interface. */
|
|
Packit |
961e70 |
#define IOCTL_CMD_API_MODULE_MAJOR 6
|
|
Packit |
961e70 |
|
|
Packit |
961e70 |
/*
|
|
Packit |
961e70 |
* round robin contexts across HFIs, then
|
|
Packit |
961e70 |
* ports; this is the default.
|
|
Packit |
961e70 |
* This option spreads the HFI selection within the local socket.
|
|
Packit |
961e70 |
* If it is preferred to spread job over over entire set of
|
|
Packit |
961e70 |
* HFIs within the system, see ALG_ACROSS_ALL below.
|
|
Packit |
961e70 |
*/
|
|
Packit |
961e70 |
#define HFI1_ALG_ACROSS_DEP 0
|
|
Packit |
961e70 |
|
|
Packit |
961e70 |
/*
|
|
Packit |
961e70 |
* use all contexts on an HFI (round robin
|
|
Packit |
961e70 |
* active ports within), then next HFI
|
|
Packit |
961e70 |
*/
|
|
Packit |
961e70 |
#define HFI1_ALG_WITHIN_DEP 1
|
|
Packit |
961e70 |
|
|
Packit |
961e70 |
struct hfi1_cmd_deprecated {
|
|
Packit |
961e70 |
__u32 type; /* command type */
|
|
Packit |
961e70 |
__u32 len; /* length of struct pointed to by add */
|
|
Packit |
961e70 |
__u64 addr; /* pointer to user structure */
|
|
Packit |
961e70 |
};
|
|
Packit |
961e70 |
|
|
Packit |
961e70 |
#define hfi1_cmd hfi1_cmd_deprecated
|
|
Packit |
961e70 |
|
|
Packit |
961e70 |
#define HFI1_ALG_ACROSS HFI1_ALG_ACROSS_DEP
|
|
Packit |
961e70 |
#define HFI1_ALG_WITHIN HFI1_ALG_WITHIN_DEP
|
|
Packit |
961e70 |
|
|
Packit |
961e70 |
#else
|
|
Packit |
961e70 |
|
|
Packit |
961e70 |
#define HFI1_SWMAJOR_SHIFT 16
|
|
Packit |
961e70 |
|
|
Packit |
961e70 |
#endif /* defined( IB_IOCTL_MAGIC )*/
|
|
Packit |
961e70 |
|
|
Packit |
961e70 |
#define HFI1_ALG_ACROSS_ALL_DEP 2
|
|
Packit |
961e70 |
#define HFI1_ALG_ACROSS_ALL HFI1_ALG_ACROSS_ALL_DEP
|
|
Packit |
961e70 |
|
|
Packit |
961e70 |
/* Note that struct hfi1_user_info_dep declaration is identical to
|
|
Packit |
961e70 |
the struct hfi1_user_info declaration from MAJOR version 5 of the
|
|
Packit |
961e70 |
hfi1_user.h file. */
|
|
Packit |
961e70 |
struct hfi1_user_info_dep {
|
|
Packit |
961e70 |
/*
|
|
Packit |
961e70 |
* version of user software, to detect compatibility issues.
|
|
Packit |
961e70 |
* Should be set to HFI1_USER_SWVERSION.
|
|
Packit |
961e70 |
*/
|
|
Packit |
961e70 |
__u32 userversion;
|
|
Packit |
961e70 |
__u16 pad;
|
|
Packit |
961e70 |
/* HFI selection algorithm, if unit has not selected */
|
|
Packit |
961e70 |
__u16 hfi1_alg;
|
|
Packit |
961e70 |
/*
|
|
Packit |
961e70 |
* If two or more processes wish to share a context, each process
|
|
Packit |
961e70 |
* must set the subcontext_cnt and subcontext_id to the same
|
|
Packit |
961e70 |
* values. The only restriction on the subcontext_id is that
|
|
Packit |
961e70 |
* it be unique for a given node.
|
|
Packit |
961e70 |
*/
|
|
Packit |
961e70 |
__u16 subctxt_cnt;
|
|
Packit |
961e70 |
__u16 subctxt_id;
|
|
Packit |
961e70 |
/* 128bit UUID passed in by PSM. */
|
|
Packit |
961e70 |
__u8 uuid[16];
|
|
Packit |
961e70 |
};
|
|
Packit |
961e70 |
|
|
Packit |
961e70 |
/*
|
|
Packit |
961e70 |
* We assume here that we have the hfi1_user.h file installed in the system path
|
|
Packit |
961e70 |
* with the 'flags' field defined in struct sdma_req_info. (At least, when the
|
|
Packit |
961e70 |
* user needs to run GPU workloads, this _should_ be the version of hfi1_user.h
|
|
Packit |
961e70 |
* file installed by the IFS.)
|
|
Packit |
961e70 |
*/
|
|
Packit |
961e70 |
struct sdma_req_info_v6_3 {
|
|
Packit |
961e70 |
/*
|
|
Packit |
961e70 |
* bits 0-3 - version (currently unused)
|
|
Packit |
961e70 |
* bits 4-7 - opcode (enum sdma_req_opcode)
|
|
Packit |
961e70 |
* bits 8-15 - io vector count
|
|
Packit |
961e70 |
*/
|
|
Packit |
961e70 |
__u16 ctrl;
|
|
Packit |
961e70 |
/*
|
|
Packit |
961e70 |
* Number of fragments contained in this request.
|
|
Packit |
961e70 |
* User-space has already computed how many
|
|
Packit |
961e70 |
* fragment-sized packet the user buffer will be
|
|
Packit |
961e70 |
* split into.
|
|
Packit |
961e70 |
*/
|
|
Packit |
961e70 |
__u16 npkts;
|
|
Packit |
961e70 |
/*
|
|
Packit |
961e70 |
* Size of each fragment the user buffer will be
|
|
Packit |
961e70 |
* split into.
|
|
Packit |
961e70 |
*/
|
|
Packit |
961e70 |
__u16 fragsize;
|
|
Packit |
961e70 |
/*
|
|
Packit |
961e70 |
* Index of the slot in the SDMA completion ring
|
|
Packit |
961e70 |
* this request should be using. User-space is
|
|
Packit |
961e70 |
* in charge of managing its own ring.
|
|
Packit |
961e70 |
*/
|
|
Packit |
961e70 |
__u16 comp_idx;
|
|
Packit |
961e70 |
} __attribute__((packed));
|
|
Packit |
961e70 |
|
|
Packit |
961e70 |
#endif /* #ifndef __HFI1_DEPRECATED_GEN1_H__ */
|