1 /*- 2 * SPDX-License-Identifier: BSD-2-Clause OR GPL-2.0 3 * 4 * Copyright (c) 2005 Intel Corporation. All rights reserved. 5 * 6 * This software is available to you under a choice of one of two 7 * licenses. You may choose to be licensed under the terms of the GNU 8 * General Public License (GPL) Version 2, available from the file 9 * COPYING in the main directory of this source tree, or the 10 * OpenIB.org BSD license below: 11 * 12 * Redistribution and use in source and binary forms, with or 13 * without modification, are permitted provided that the following 14 * conditions are met: 15 * 16 * - Redistributions of source code must retain the above 17 * copyright notice, this list of conditions and the following 18 * disclaimer. 19 * 20 * - Redistributions in binary form must reproduce the above 21 * copyright notice, this list of conditions and the following 22 * disclaimer in the documentation and/or other materials 23 * provided with the distribution. 24 * 25 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 26 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 27 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 28 * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS 29 * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN 30 * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 31 * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 32 * SOFTWARE. 33 * 34 * $FreeBSD$ 35 */ 36 37 #ifndef IB_USER_SA_H 38 #define IB_USER_SA_H 39 40 #ifdef _KERNEL 41 #include <linux/types.h> 42 #else 43 #include <infiniband/types.h> 44 #endif 45 46 enum { 47 IB_PATH_GMP = 1, 48 IB_PATH_PRIMARY = (1<<1), 49 IB_PATH_ALTERNATE = (1<<2), 50 IB_PATH_OUTBOUND = (1<<3), 51 IB_PATH_INBOUND = (1<<4), 52 IB_PATH_INBOUND_REVERSE = (1<<5), 53 IB_PATH_BIDIRECTIONAL = IB_PATH_OUTBOUND | IB_PATH_INBOUND_REVERSE 54 }; 55 56 struct ib_path_rec_data { 57 __u32 flags; 58 __u32 reserved; 59 __u32 path_rec[16]; 60 }; 61 62 struct ib_user_path_rec { 63 __u8 dgid[16]; 64 __u8 sgid[16]; 65 __be16 dlid; 66 __be16 slid; 67 __u32 raw_traffic; 68 __be32 flow_label; 69 __u32 reversible; 70 __u32 mtu; 71 __be16 pkey; 72 __u8 hop_limit; 73 __u8 traffic_class; 74 __u8 numb_path; 75 __u8 sl; 76 __u8 mtu_selector; 77 __u8 rate_selector; 78 __u8 rate; 79 __u8 packet_life_time_selector; 80 __u8 packet_life_time; 81 __u8 preference; 82 }; 83 84 #endif /* IB_USER_SA_H */ 85