linux/include/rdma/rdmavt_mr.h

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

#ifndef DEF_RDMAVT_INCMR_H
#define DEF_RDMAVT_INCMR_H

/*
 * For Memory Regions. This stuff should probably be moved into rdmavt/mr.h once
 * drivers no longer need access to the MR directly.
 */
#include <linux/percpu-refcount.h>

/*
 * A segment is a linear region of low physical memory.
 * Used by the verbs layer.
 */
struct rvt_seg {};

/* The number of rvt_segs that fit in a page. */
#define RVT_SEGSZ

struct rvt_segarray {};

struct rvt_mregion {};

#define RVT_MAX_LKEY_TABLE_BITS

struct rvt_lkey_table {};

/*
 * These keep track of the copy progress within a memory region.
 * Used by the verbs layer.
 */
struct rvt_sge {};

struct rvt_sge_state {};

static inline void rvt_put_mr(struct rvt_mregion *mr)
{}

static inline void rvt_get_mr(struct rvt_mregion *mr)
{}

static inline void rvt_put_ss(struct rvt_sge_state *ss)
{}

static inline u32 rvt_get_sge_length(struct rvt_sge *sge, u32 length)
{}

static inline void rvt_update_sge(struct rvt_sge_state *ss, u32 length,
				  bool release)
{}

static inline void rvt_skip_sge(struct rvt_sge_state *ss, u32 length,
				bool release)
{}

bool rvt_ss_has_lkey(struct rvt_sge_state *ss, u32 lkey);
bool rvt_mr_has_lkey(struct rvt_mregion *mr, u32 lkey);

#endif          /* DEF_RDMAVT_INCMRH */