linux/drivers/infiniband/hw/hfi1/exp_rcv.h

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

#ifndef _HFI1_EXP_RCV_H
#define _HFI1_EXP_RCV_H
#include "hfi.h"

#define EXP_TID_SET_EMPTY(set)

#define EXP_TID_TIDLEN_MASK
#define EXP_TID_TIDLEN_SHIFT
#define EXP_TID_TIDCTRL_MASK
#define EXP_TID_TIDCTRL_SHIFT
#define EXP_TID_TIDIDX_MASK
#define EXP_TID_TIDIDX_SHIFT
#define EXP_TID_GET(tid, field)

#define EXP_TID_SET(field, value)
#define EXP_TID_CLEAR(tid, field)
#define EXP_TID_RESET(tid, field, value)

/*
 * Define fields in the KDETH header so we can update the header
 * template.
 */
#define KDETH_OFFSET_SHIFT
#define KDETH_OFFSET_MASK
#define KDETH_OM_SHIFT
#define KDETH_OM_MASK
#define KDETH_TID_SHIFT
#define KDETH_TID_MASK
#define KDETH_TIDCTRL_SHIFT
#define KDETH_TIDCTRL_MASK
#define KDETH_INTR_SHIFT
#define KDETH_INTR_MASK
#define KDETH_SH_SHIFT
#define KDETH_SH_MASK
#define KDETH_KVER_SHIFT
#define KDETH_KVER_MASK
#define KDETH_JKEY_SHIFT
#define KDETH_JKEY_MASK
#define KDETH_HCRC_UPPER_SHIFT
#define KDETH_HCRC_UPPER_MASK
#define KDETH_HCRC_LOWER_SHIFT
#define KDETH_HCRC_LOWER_MASK

#define KDETH_GET(val, field)
#define KDETH_SET(dw, field, val)

#define KDETH_RESET(dw, field, val)

/* KDETH OM multipliers and switch over point */
#define KDETH_OM_SMALL
#define KDETH_OM_SMALL_SHIFT
#define KDETH_OM_LARGE
#define KDETH_OM_LARGE_SHIFT
#define KDETH_OM_MAX_SIZE

struct tid_group {};

/*
 * Write an "empty" RcvArray entry.
 * This function exists so the TID registaration code can use it
 * to write to unused/unneeded entries and still take advantage
 * of the WC performance improvements. The HFI will ignore this
 * write to the RcvArray entry.
 */
static inline void rcv_array_wc_fill(struct hfi1_devdata *dd, u32 index)
{}

static inline void tid_group_add_tail(struct tid_group *grp,
				      struct exp_tid_set *set)
{}

static inline void tid_group_remove(struct tid_group *grp,
				    struct exp_tid_set *set)
{}

static inline void tid_group_move(struct tid_group *group,
				  struct exp_tid_set *s1,
				  struct exp_tid_set *s2)
{}

static inline struct tid_group *tid_group_pop(struct exp_tid_set *set)
{}

static inline u32 create_tid(u32 rcventry, u32 npages)
{}

/**
 * hfi1_tid_group_to_idx - convert an index to a group
 * @rcd - the receive context
 * @grp - the group pointer
 */
static inline u16
hfi1_tid_group_to_idx(struct hfi1_ctxtdata *rcd, struct tid_group *grp)
{}

/**
 * hfi1_idx_to_tid_group - convert a group to an index
 * @rcd - the receive context
 * @idx - the index
 */
static inline struct tid_group *
hfi1_idx_to_tid_group(struct hfi1_ctxtdata *rcd, u16 idx)
{}

int hfi1_alloc_ctxt_rcv_groups(struct hfi1_ctxtdata *rcd);
void hfi1_free_ctxt_rcv_groups(struct hfi1_ctxtdata *rcd);
void hfi1_exp_tid_group_init(struct hfi1_ctxtdata *rcd);

#endif /* _HFI1_EXP_RCV_H */