freebsd-dev/sys/ofed/include/rdma/ib_peer_mem.h
Hans Petter Selasky b5c1e0cb8d Update the infiniband stack to Mellanox's OFED version 2.1.
Highlights:
 - Multiple verbs API updates
 - Support for RoCE, RDMA over ethernet

All hardware drivers depending on the common infiniband stack has been
updated aswell.

Discussed with:	np @
Sponsored by:	Mellanox Technologies
MFC after:	1 month
2015-02-17 08:40:27 +00:00

60 lines
1.4 KiB
C

#if !defined(IB_PEER_MEM_H)
#define IB_PEER_MEM_H
#include <rdma/peer_mem.h>
struct invalidation_ctx;
struct ib_ucontext;
struct ib_peer_memory_statistics {
unsigned long num_alloc_mrs;
unsigned long num_dealloc_mrs;
unsigned long num_reg_pages;
unsigned long num_dereg_pages;
unsigned long num_free_callbacks;
};
struct ib_peer_memory_client {
const struct peer_memory_client *peer_mem;
struct list_head core_peer_list;
struct list_head core_ticket_list;
unsigned long last_ticket;
#ifdef __FreeBSD__
int holdcount;
int needwakeup;
struct cv peer_cv;
#else
struct srcu_struct peer_srcu;
#endif
struct mutex lock;
struct kobject *kobj;
struct attribute_group peer_mem_attr_group;
struct ib_peer_memory_statistics stats;
};
struct core_ticket {
unsigned long key;
void *context;
struct list_head ticket_list;
};
struct ib_peer_memory_client *ib_get_peer_client(struct ib_ucontext *context, unsigned long addr,
size_t size, void **peer_client_context,
int *srcu_key);
void ib_put_peer_client(struct ib_peer_memory_client *ib_peer_client,
void *peer_client_context,
int srcu_key);
unsigned long ib_peer_insert_context(struct ib_peer_memory_client *ib_peer_client,
void *context);
int ib_peer_remove_context(struct ib_peer_memory_client *ib_peer_client,
unsigned long key);
struct core_ticket *ib_peer_search_context(struct ib_peer_memory_client *ib_peer_client,
unsigned long key);
#endif