linux/include/rdma/ib_hdrs.h

/* SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause */
/*
 * Copyright(c) 2016 - 2018 Intel Corporation.
 */

#ifndef IB_HDRS_H
#define IB_HDRS_H

#include <linux/types.h>
#include <linux/unaligned.h>
#include <rdma/ib_verbs.h>

#define IB_SEQ_NAK

/* AETH NAK opcode values */
#define IB_RNR_NAK
#define IB_NAK_PSN_ERROR
#define IB_NAK_INVALID_REQUEST
#define IB_NAK_REMOTE_ACCESS_ERROR
#define IB_NAK_REMOTE_OPERATIONAL_ERROR
#define IB_NAK_INVALID_RD_REQUEST

#define IB_BTH_REQ_ACK
#define IB_BTH_SOLICITED
#define IB_BTH_MIG_REQ

#define IB_GRH_VERSION
#define IB_GRH_VERSION_MASK
#define IB_GRH_VERSION_SHIFT
#define IB_GRH_TCLASS_MASK
#define IB_GRH_TCLASS_SHIFT
#define IB_GRH_FLOW_MASK
#define IB_GRH_FLOW_SHIFT
#define IB_GRH_NEXT_HDR
#define IB_FECN_SHIFT
#define IB_FECN_MASK
#define IB_FECN_SMASK
#define IB_BECN_SHIFT
#define IB_BECN_MASK
#define IB_BECN_SMASK

#define IB_AETH_CREDIT_SHIFT
#define IB_AETH_CREDIT_MASK
#define IB_AETH_CREDIT_INVAL
#define IB_AETH_NAK_SHIFT
#define IB_MSN_MASK

struct ib_reth {} __packed;

struct ib_atomic_eth {} __packed;

#include <rdma/tid_rdma_defs.h>

ib_ehdrs  __packed;

struct ib_other_headers {} __packed;

struct ib_header {} __packed;

/* accessors for unaligned __be64 items */

static inline u64 ib_u64_get(__be64 *p)
{}

static inline void ib_u64_put(u64 val, __be64 *p)
{}

static inline u64 get_ib_reth_vaddr(struct ib_reth *reth)
{}

static inline void put_ib_reth_vaddr(u64 val, struct ib_reth *reth)
{}

static inline u64 get_ib_ateth_vaddr(struct ib_atomic_eth *ateth)
{}

static inline void put_ib_ateth_vaddr(u64 val, struct ib_atomic_eth *ateth)
{}

static inline u64 get_ib_ateth_swap(struct ib_atomic_eth *ateth)
{}

static inline void put_ib_ateth_swap(u64 val, struct ib_atomic_eth *ateth)
{}

static inline u64 get_ib_ateth_compare(struct ib_atomic_eth *ateth)
{}

static inline void put_ib_ateth_compare(u64 val, struct ib_atomic_eth *ateth)
{}

/*
 * 9B/IB Packet Format
 */
#define IB_LNH_MASK
#define IB_SC_MASK
#define IB_SC_SHIFT
#define IB_SC5_MASK
#define IB_SL_MASK
#define IB_SL_SHIFT
#define IB_SL_SHIFT
#define IB_LVER_MASK
#define IB_LVER_SHIFT

static inline u8 ib_get_lnh(struct ib_header *hdr)
{}

static inline u8 ib_get_sc(struct ib_header *hdr)
{}

static inline bool ib_is_sc5(u16 sc5)
{}

static inline u8 ib_get_sl(struct ib_header *hdr)
{}

static inline u16 ib_get_dlid(struct ib_header *hdr)
{}

static inline u16 ib_get_slid(struct ib_header *hdr)
{}

static inline u8 ib_get_lver(struct ib_header *hdr)
{}

static inline u32 ib_get_qkey(struct ib_other_headers *ohdr)
{}

static inline u32 ib_get_sqpn(struct ib_other_headers *ohdr)
{}

/*
 * BTH
 */
#define IB_BTH_OPCODE_MASK
#define IB_BTH_OPCODE_SHIFT
#define IB_BTH_PAD_MASK
#define IB_BTH_PKEY_MASK
#define IB_BTH_PAD_SHIFT
#define IB_BTH_A_MASK
#define IB_BTH_A_SHIFT
#define IB_BTH_M_MASK
#define IB_BTH_M_SHIFT
#define IB_BTH_SE_MASK
#define IB_BTH_SE_SHIFT
#define IB_BTH_TVER_MASK
#define IB_BTH_TVER_SHIFT
#define IB_BTH_OPCODE_CNP

static inline u8 ib_bth_get_pad(struct ib_other_headers *ohdr)
{}

static inline u16 ib_bth_get_pkey(struct ib_other_headers *ohdr)
{}

static inline u8 ib_bth_get_opcode(struct ib_other_headers *ohdr)
{}

static inline u8 ib_bth_get_ackreq(struct ib_other_headers *ohdr)
{}

static inline u8 ib_bth_get_migreq(struct ib_other_headers *ohdr)
{}

static inline u8 ib_bth_get_se(struct ib_other_headers *ohdr)
{}

static inline u32 ib_bth_get_psn(struct ib_other_headers *ohdr)
{}

static inline u32 ib_bth_get_qpn(struct ib_other_headers *ohdr)
{}

static inline bool ib_bth_get_becn(struct ib_other_headers *ohdr)
{}

static inline bool ib_bth_get_fecn(struct ib_other_headers *ohdr)
{}

static inline u8 ib_bth_get_tver(struct ib_other_headers *ohdr)
{}

static inline bool ib_bth_is_solicited(struct ib_other_headers *ohdr)
{}

static inline bool ib_bth_is_migration(struct ib_other_headers *ohdr)
{}
#endif                          /* IB_HDRS_H */