1321936Shselasky/* 2321936Shselasky * Copyright (c) 2004, 2005 Voltaire, Inc. All rights reserved. 3321936Shselasky * Copyright (c) 2002-2005 Mellanox Technologies LTD. All rights reserved. 4321936Shselasky * Copyright (c) 1996-2003 Intel Corporation. All rights reserved. 5321936Shselasky * 6321936Shselasky * This software is available to you under a choice of one of two 7321936Shselasky * licenses. You may choose to be licensed under the terms of the GNU 8321936Shselasky * General Public License (GPL) Version 2, available from the file 9321936Shselasky * COPYING in the main directory of this source tree, or the 10321936Shselasky * OpenIB.org BSD license below: 11321936Shselasky * 12321936Shselasky * Redistribution and use in source and binary forms, with or 13321936Shselasky * without modification, are permitted provided that the following 14321936Shselasky * conditions are met: 15321936Shselasky * 16321936Shselasky * - Redistributions of source code must retain the above 17321936Shselasky * copyright notice, this list of conditions and the following 18321936Shselasky * disclaimer. 19321936Shselasky * 20321936Shselasky * - Redistributions in binary form must reproduce the above 21321936Shselasky * copyright notice, this list of conditions and the following 22321936Shselasky * disclaimer in the documentation and/or other materials 23321936Shselasky * provided with the distribution. 24321936Shselasky * 25321936Shselasky * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 26321936Shselasky * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 27321936Shselasky * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 28321936Shselasky * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS 29321936Shselasky * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN 30321936Shselasky * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 31321936Shselasky * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 32321936Shselasky * SOFTWARE. 33321936Shselasky * 34321936Shselasky */ 35321936Shselasky 36321936Shselasky/* 37321936Shselasky * Abstract: 38321936Shselasky * Declaration of osm_mad_wrapper_t. 39321936Shselasky * This object represents the context wrapper for OpenSM MAD processing. 40321936Shselasky * This object is part of the OpenSM family of objects. 41321936Shselasky */ 42321936Shselasky 43321936Shselasky#ifndef _OSM_VENDOR_UMADT_h_ 44321936Shselasky#define _OSM_VENDOR_UMADT_h_ 45321936Shselasky 46321936Shselasky#include "iba/ib_types.h" 47321936Shselasky#include "complib/cl_qlist.h" 48321936Shselasky#include "complib/cl_thread.h" 49321936Shselasky#include <opensm/osm_base.h> 50321936Shselasky#include <vendor/umadt.h> 51321936Shselasky 52321936Shselasky#ifdef __cplusplus 53321936Shselasky# define BEGIN_C_DECLS extern "C" { 54321936Shselasky# define END_C_DECLS } 55321936Shselasky#else /* !__cplusplus */ 56321936Shselasky# define BEGIN_C_DECLS 57321936Shselasky# define END_C_DECLS 58321936Shselasky#endif /* __cplusplus */ 59321936Shselasky 60321936ShselaskyBEGIN_C_DECLS 61321936Shselasky/****h* OpenSM/ Vendor Umadt 62321936Shselasky* NAME 63321936Shselasky* MAD Wrapper 64321936Shselasky* 65321936Shselasky* DESCRIPTION 66321936Shselasky* 67321936Shselasky* 68321936Shselasky* AUTHOR 69321936Shselasky* Ranjit Pandit, Intel 70321936Shselasky* 71321936Shselasky*********/ 72321936Shselaskytypedef void *osm_vendor_t; 73321936Shselasky#define OSM_BIND_INVALID_HANDLE 0 74321936Shselasky 75321936Shselasky/****s* OpenSM: Vendor Umadt /osm_bind_handle_t 76321936Shselasky* NAME 77321936Shselasky* osm_bind_handle_t 78321936Shselasky* 79321936Shselasky* DESCRIPTION 80321936Shselasky* handle returned by the vendor transport bind call. 81321936Shselasky* 82321936Shselasky* SYNOPSIS 83321936Shselasky*/ 84321936Shselasky 85321936Shselaskytypedef void *osm_bind_handle_t; 86321936Shselasky 87321936Shselasky/****s* OpenSM: Vendor Umadt /mad_direction_t 88321936Shselasky* NAME 89321936Shselasky* mad_direction_t 90321936Shselasky* 91321936Shselasky* DESCRIPTION 92321936Shselasky* Tags for mad wrapper to indicate the direction of mads. 93321936Shselasky* Umadt vendor transport layer uses this tag to call the appropriate 94321936Shselasky* Umadt APIs. 95321936Shselasky* 96321936Shselasky* SYNOPSIS 97321936Shselasky*/ 98321936Shselaskytypedef enum _mad_direction_t { 99321936Shselasky SEND = 0, 100321936Shselasky RECEIVE, 101321936Shselasky} mad_direction_t; 102321936Shselasky 103321936Shselasky/****s* OpenSM/ osm_vend_wrap_t 104321936Shselasky* NAME 105321936Shselasky* Umadt Vendor MAD Wrapper 106321936Shselasky* 107321936Shselasky* DESCRIPTION 108321936Shselasky* Umadt specific MAD wrapper. Umadt transport layer sets this for 109321936Shselasky* housekeeping. 110321936Shselasky* 111321936Shselasky* SYNOPSIS 112321936Shselasky*********/ 113321936Shselaskytypedef struct _osm_vend_wrap_t { 114321936Shselasky MadtStruct *p_madt_struct; 115321936Shselasky mad_direction_t direction; // send or receive 116321936Shselasky uint32_t size; 117321936Shselasky} osm_vend_wrap_t; 118321936Shselasky/* 119321936Shselasky* FIELDS 120321936Shselasky* p_madt_struct 121321936Shselasky* Umadt mad structure to identify a mad. 122321936Shselasky* 123321936Shselasky* direction 124321936Shselasky* Used to identify a mad with it's direction. 125321936Shselasky* 126321936Shselasky* SEE ALSO 127321936Shselasky*********/ 128321936Shselasky 129321936ShselaskyEND_C_DECLS 130321936Shselasky#endif /* _OSM_VENDOR_UMADT_h_ */ 131