linux/include/rdma/opa_port_info.h

/* SPDX-License-Identifier: GPL-2.0 OR Linux-OpenIB */
/*
 * Copyright (c) 2014-2020 Intel Corporation.  All rights reserved.
 */

#ifndef OPA_PORT_INFO_H
#define OPA_PORT_INFO_H

#include <rdma/opa_smi.h>

#define OPA_PORT_LINK_MODE_NOP
#define OPA_PORT_LINK_MODE_OPA

#define OPA_PORT_PACKET_FORMAT_NOP
#define OPA_PORT_PACKET_FORMAT_8B
#define OPA_PORT_PACKET_FORMAT_9B
#define OPA_PORT_PACKET_FORMAT_10B
#define OPA_PORT_PACKET_FORMAT_16B

#define OPA_PORT_LTP_CRC_MODE_NONE
#define OPA_PORT_LTP_CRC_MODE_14
#define OPA_PORT_LTP_CRC_MODE_16
#define OPA_PORT_LTP_CRC_MODE_48
#define OPA_PORT_LTP_CRC_MODE_PER_LANE

/* Link Down / Neighbor Link Down Reason; indicated as follows: */
#define OPA_LINKDOWN_REASON_NONE
#define OPA_LINKDOWN_REASON_RCV_ERROR_0
#define OPA_LINKDOWN_REASON_BAD_PKT_LEN
#define OPA_LINKDOWN_REASON_PKT_TOO_LONG
#define OPA_LINKDOWN_REASON_PKT_TOO_SHORT
#define OPA_LINKDOWN_REASON_BAD_SLID
#define OPA_LINKDOWN_REASON_BAD_DLID
#define OPA_LINKDOWN_REASON_BAD_L2
#define OPA_LINKDOWN_REASON_BAD_SC
#define OPA_LINKDOWN_REASON_RCV_ERROR_8
#define OPA_LINKDOWN_REASON_BAD_MID_TAIL
#define OPA_LINKDOWN_REASON_RCV_ERROR_10
#define OPA_LINKDOWN_REASON_PREEMPT_ERROR
#define OPA_LINKDOWN_REASON_PREEMPT_VL15
#define OPA_LINKDOWN_REASON_BAD_VL_MARKER
#define OPA_LINKDOWN_REASON_RCV_ERROR_14
#define OPA_LINKDOWN_REASON_RCV_ERROR_15
#define OPA_LINKDOWN_REASON_BAD_HEAD_DIST
#define OPA_LINKDOWN_REASON_BAD_TAIL_DIST
#define OPA_LINKDOWN_REASON_BAD_CTRL_DIST
#define OPA_LINKDOWN_REASON_BAD_CREDIT_ACK
#define OPA_LINKDOWN_REASON_UNSUPPORTED_VL_MARKER
#define OPA_LINKDOWN_REASON_BAD_PREEMPT
#define OPA_LINKDOWN_REASON_BAD_CONTROL_FLIT
#define OPA_LINKDOWN_REASON_EXCEED_MULTICAST_LIMIT
#define OPA_LINKDOWN_REASON_RCV_ERROR_24
#define OPA_LINKDOWN_REASON_RCV_ERROR_25
#define OPA_LINKDOWN_REASON_RCV_ERROR_26
#define OPA_LINKDOWN_REASON_RCV_ERROR_27
#define OPA_LINKDOWN_REASON_RCV_ERROR_28
#define OPA_LINKDOWN_REASON_RCV_ERROR_29
#define OPA_LINKDOWN_REASON_RCV_ERROR_30
#define OPA_LINKDOWN_REASON_EXCESSIVE_BUFFER_OVERRUN
#define OPA_LINKDOWN_REASON_UNKNOWN
/* 34 -reserved */
#define OPA_LINKDOWN_REASON_REBOOT
#define OPA_LINKDOWN_REASON_NEIGHBOR_UNKNOWN
/* 37-38 reserved */
#define OPA_LINKDOWN_REASON_FM_BOUNCE
#define OPA_LINKDOWN_REASON_SPEED_POLICY
#define OPA_LINKDOWN_REASON_WIDTH_POLICY
/* 42-48 reserved */
#define OPA_LINKDOWN_REASON_DISCONNECTED
#define OPA_LINKDOWN_REASON_LOCAL_MEDIA_NOT_INSTALLED
#define OPA_LINKDOWN_REASON_NOT_INSTALLED
#define OPA_LINKDOWN_REASON_CHASSIS_CONFIG
/* 53 reserved */
#define OPA_LINKDOWN_REASON_END_TO_END_NOT_INSTALLED
/* 55 reserved */
#define OPA_LINKDOWN_REASON_POWER_POLICY
#define OPA_LINKDOWN_REASON_LINKSPEED_POLICY
#define OPA_LINKDOWN_REASON_LINKWIDTH_POLICY
/* 59 reserved */
#define OPA_LINKDOWN_REASON_SWITCH_MGMT
#define OPA_LINKDOWN_REASON_SMA_DISABLED
/* 62 reserved */
#define OPA_LINKDOWN_REASON_TRANSIENT
/* 64-255 reserved */

/* OPA Link Init reason; indicated as follows: */
/* 3-7; 11-15 reserved; 8-15 cleared on Polling->LinkUp */
#define OPA_LINKINIT_REASON_NOP
#define OPA_LINKINIT_REASON_LINKUP
#define OPA_LINKINIT_REASON_FLAPPING
#define OPA_LINKINIT_REASON_CLEAR
#define OPA_LINKINIT_OUTSIDE_POLICY
#define OPA_LINKINIT_QUARANTINED
#define OPA_LINKINIT_INSUFIC_CAPABILITY

#define OPA_LINK_SPEED_NOP
#define OPA_LINK_SPEED_12_5G
#define OPA_LINK_SPEED_25G

#define OPA_LINK_WIDTH_1X
#define OPA_LINK_WIDTH_2X
#define OPA_LINK_WIDTH_3X
#define OPA_LINK_WIDTH_4X

#define OPA_CAP_MASK3_IsEthOnFabricSupported
#define OPA_CAP_MASK3_IsSnoopSupported
#define OPA_CAP_MASK3_IsAsyncSC2VLSupported
#define OPA_CAP_MASK3_IsAddrRangeConfigSupported
#define OPA_CAP_MASK3_IsPassThroughSupported
#define OPA_CAP_MASK3_IsSharedSpaceSupported
/* reserved (1 << 2) */
#define OPA_CAP_MASK3_IsVLMarkerSupported
#define OPA_CAP_MASK3_IsVLrSupported

enum {};

enum port_info_field_masks {};

struct opa_port_states {};

struct opa_port_state_info {};

struct opa_port_info {} __packed;

#endif /* OPA_PORT_INFO_H */