109938b21SHans Petter Selasky /*- 209938b21SHans Petter Selasky * SPDX-License-Identifier: BSD-2-Clause OR GPL-2.0 309938b21SHans Petter Selasky * 49f715dc1SHans Petter Selasky * Copyright (c) 2005 Intel Corporation. All rights reserved. 59f715dc1SHans Petter Selasky * 69f715dc1SHans Petter Selasky * This software is available to you under a choice of one of two 79f715dc1SHans Petter Selasky * licenses. You may choose to be licensed under the terms of the GNU 89f715dc1SHans Petter Selasky * General Public License (GPL) Version 2, available from the file 99f715dc1SHans Petter Selasky * COPYING in the main directory of this source tree, or the 109f715dc1SHans Petter Selasky * OpenIB.org BSD license below: 119f715dc1SHans Petter Selasky * 129f715dc1SHans Petter Selasky * Redistribution and use in source and binary forms, with or 139f715dc1SHans Petter Selasky * without modification, are permitted provided that the following 149f715dc1SHans Petter Selasky * conditions are met: 159f715dc1SHans Petter Selasky * 169f715dc1SHans Petter Selasky * - Redistributions of source code must retain the above 179f715dc1SHans Petter Selasky * copyright notice, this list of conditions and the following 189f715dc1SHans Petter Selasky * disclaimer. 199f715dc1SHans Petter Selasky * 209f715dc1SHans Petter Selasky * - Redistributions in binary form must reproduce the above 219f715dc1SHans Petter Selasky * copyright notice, this list of conditions and the following 229f715dc1SHans Petter Selasky * disclaimer in the documentation and/or other materials 239f715dc1SHans Petter Selasky * provided with the distribution. 249f715dc1SHans Petter Selasky * 259f715dc1SHans Petter Selasky * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 269f715dc1SHans Petter Selasky * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 279f715dc1SHans Petter Selasky * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 289f715dc1SHans Petter Selasky * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS 299f715dc1SHans Petter Selasky * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN 309f715dc1SHans Petter Selasky * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 319f715dc1SHans Petter Selasky * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 329f715dc1SHans Petter Selasky * SOFTWARE. 339f715dc1SHans Petter Selasky */ 349f715dc1SHans Petter Selasky 359f715dc1SHans Petter Selasky #ifndef IB_USER_SA_H 369f715dc1SHans Petter Selasky #define IB_USER_SA_H 379f715dc1SHans Petter Selasky 389f715dc1SHans Petter Selasky #ifdef _KERNEL 399f715dc1SHans Petter Selasky #include <linux/types.h> 409f715dc1SHans Petter Selasky #else 419f715dc1SHans Petter Selasky #include <infiniband/types.h> 429f715dc1SHans Petter Selasky #endif 439f715dc1SHans Petter Selasky 449f715dc1SHans Petter Selasky enum { 459f715dc1SHans Petter Selasky IB_PATH_GMP = 1, 469f715dc1SHans Petter Selasky IB_PATH_PRIMARY = (1<<1), 479f715dc1SHans Petter Selasky IB_PATH_ALTERNATE = (1<<2), 489f715dc1SHans Petter Selasky IB_PATH_OUTBOUND = (1<<3), 499f715dc1SHans Petter Selasky IB_PATH_INBOUND = (1<<4), 509f715dc1SHans Petter Selasky IB_PATH_INBOUND_REVERSE = (1<<5), 519f715dc1SHans Petter Selasky IB_PATH_BIDIRECTIONAL = IB_PATH_OUTBOUND | IB_PATH_INBOUND_REVERSE 529f715dc1SHans Petter Selasky }; 539f715dc1SHans Petter Selasky 549f715dc1SHans Petter Selasky struct ib_path_rec_data { 559f715dc1SHans Petter Selasky __u32 flags; 569f715dc1SHans Petter Selasky __u32 reserved; 579f715dc1SHans Petter Selasky __u32 path_rec[16]; 589f715dc1SHans Petter Selasky }; 599f715dc1SHans Petter Selasky 609f715dc1SHans Petter Selasky struct ib_user_path_rec { 619f715dc1SHans Petter Selasky __u8 dgid[16]; 629f715dc1SHans Petter Selasky __u8 sgid[16]; 639f715dc1SHans Petter Selasky __be16 dlid; 649f715dc1SHans Petter Selasky __be16 slid; 659f715dc1SHans Petter Selasky __u32 raw_traffic; 669f715dc1SHans Petter Selasky __be32 flow_label; 679f715dc1SHans Petter Selasky __u32 reversible; 689f715dc1SHans Petter Selasky __u32 mtu; 699f715dc1SHans Petter Selasky __be16 pkey; 709f715dc1SHans Petter Selasky __u8 hop_limit; 719f715dc1SHans Petter Selasky __u8 traffic_class; 729f715dc1SHans Petter Selasky __u8 numb_path; 739f715dc1SHans Petter Selasky __u8 sl; 749f715dc1SHans Petter Selasky __u8 mtu_selector; 759f715dc1SHans Petter Selasky __u8 rate_selector; 769f715dc1SHans Petter Selasky __u8 rate; 779f715dc1SHans Petter Selasky __u8 packet_life_time_selector; 789f715dc1SHans Petter Selasky __u8 packet_life_time; 799f715dc1SHans Petter Selasky __u8 preference; 809f715dc1SHans Petter Selasky }; 819f715dc1SHans Petter Selasky 829f715dc1SHans Petter Selasky #endif /* IB_USER_SA_H */ 83