linux/include/rdma/ib_smi.h

/* SPDX-License-Identifier: GPL-2.0 OR Linux-OpenIB */
/*
 * Copyright (c) 2004 Mellanox Technologies Ltd.  All rights reserved.
 * Copyright (c) 2004 Infinicon Corporation.  All rights reserved.
 * Copyright (c) 2004 Intel Corporation.  All rights reserved.
 * Copyright (c) 2004 Topspin Corporation.  All rights reserved.
 * Copyright (c) 2004 Voltaire Corporation.  All rights reserved.
 */

#ifndef IB_SMI_H
#define IB_SMI_H

#include <rdma/ib_mad.h>

#define IB_SMP_DATA_SIZE
#define IB_SMP_MAX_PATH_HOPS

struct ib_smp {} __packed;

#define IB_SMP_DIRECTION

/* Subnet management attributes */
#define IB_SMP_ATTR_NOTICE
#define IB_SMP_ATTR_NODE_DESC
#define IB_SMP_ATTR_NODE_INFO
#define IB_SMP_ATTR_SWITCH_INFO
#define IB_SMP_ATTR_GUID_INFO
#define IB_SMP_ATTR_PORT_INFO
#define IB_SMP_ATTR_PKEY_TABLE
#define IB_SMP_ATTR_SL_TO_VL_TABLE
#define IB_SMP_ATTR_VL_ARB_TABLE
#define IB_SMP_ATTR_LINEAR_FORWARD_TABLE
#define IB_SMP_ATTR_RANDOM_FORWARD_TABLE
#define IB_SMP_ATTR_MCAST_FORWARD_TABLE
#define IB_SMP_ATTR_SM_INFO
#define IB_SMP_ATTR_VENDOR_DIAG
#define IB_SMP_ATTR_LED_INFO
#define IB_SMP_ATTR_VENDOR_MASK

struct ib_port_info {};

struct ib_node_info {} __packed;

struct ib_vl_weight_elem {};

static inline u8
ib_get_smp_direction(struct ib_smp *smp)
{}

/*
 * SM Trap/Notice numbers
 */
#define IB_NOTICE_TRAP_LLI_THRESH
#define IB_NOTICE_TRAP_EBO_THRESH
#define IB_NOTICE_TRAP_FLOW_UPDATE
#define IB_NOTICE_TRAP_CAP_MASK_CHG
#define IB_NOTICE_TRAP_SYS_GUID_CHG
#define IB_NOTICE_TRAP_BAD_MKEY
#define IB_NOTICE_TRAP_BAD_PKEY
#define IB_NOTICE_TRAP_BAD_QKEY

/*
 * Other local changes flags (trap 144).
 */
#define IB_NOTICE_TRAP_LSE_CHG
#define IB_NOTICE_TRAP_LWE_CHG
#define IB_NOTICE_TRAP_NODE_DESC_CHG

/*
 * M_Key volation flags in dr_trunc_hop (trap 256).
 */
#define IB_NOTICE_TRAP_DR_NOTICE
#define IB_NOTICE_TRAP_DR_TRUNC

/**
 * ib_init_query_mad - Initialize query MAD.
 * @mad: MAD to initialize.
 */
static inline void ib_init_query_mad(struct ib_smp *mad)
{}
#endif /* IB_SMI_H */