rdma_vt.h (0194621b225348428c212f330c26d194fc77bd15) | rdma_vt.h (8afd32eb58b6885fc3e268c69b1b1b627aa2afaf) |
---|---|
1#ifndef DEF_RDMA_VT_H 2#define DEF_RDMA_VT_H 3 4/* 5 * Copyright(c) 2015 Intel Corporation. 6 * 7 * This file is provided under a dual BSD/GPLv2 license. When using or 8 * redistributing this file, you may do so under either license. --- 40 unchanged lines hidden (view full) --- 49 */ 50 51/* 52 * Structure that low level drivers will populate in order to register with the 53 * rdmavt layer. 54 */ 55 56#include "ib_verbs.h" | 1#ifndef DEF_RDMA_VT_H 2#define DEF_RDMA_VT_H 3 4/* 5 * Copyright(c) 2015 Intel Corporation. 6 * 7 * This file is provided under a dual BSD/GPLv2 license. When using or 8 * redistributing this file, you may do so under either license. --- 40 unchanged lines hidden (view full) --- 49 */ 50 51/* 52 * Structure that low level drivers will populate in order to register with the 53 * rdmavt layer. 54 */ 55 56#include "ib_verbs.h" |
57 58/* 59 * Things that are driver specific, module parameters in hfi1 and qib 60 */ 61struct rvt_driver_params { 62 int max_pds; 63}; 64 65/* Protection domain */ 66struct rvt_pd { 67 struct ib_pd ibpd; 68 int user; /* non-zero if created from user space */ 69}; 70 |
|
57struct rvt_dev_info { 58 struct ib_device ibdev; | 71struct rvt_dev_info { 72 struct ib_device ibdev; |
73 74 /* Driver specific */ 75 struct rvt_driver_params dparms; |
|
59 int (*port_callback)(struct ib_device *, u8, struct kobject *); 60 | 76 int (*port_callback)(struct ib_device *, u8, struct kobject *); 77 |
61 /* 62 * TODO: 63 * need to reflect module parameters that may vary by dev 64 */ | 78 /* Internal use */ 79 int n_pds_allocated; 80 spinlock_t n_pds_lock; /* Protect pd allocated count */ |
65}; 66 | 81}; 82 |
83static inline struct rvt_pd *ibpd_to_rvtpd(struct ib_pd *ibpd) 84{ 85 return container_of(ibpd, struct rvt_pd, ibpd); 86} 87 88static inline struct rvt_dev_info *ib_to_rvt(struct ib_device *ibdev) 89{ 90 return container_of(ibdev, struct rvt_dev_info, ibdev); 91} 92 |
|
67int rvt_register_device(struct rvt_dev_info *rvd); 68void rvt_unregister_device(struct rvt_dev_info *rvd); 69 70#endif /* DEF_RDMA_VT_H */ | 93int rvt_register_device(struct rvt_dev_info *rvd); 94void rvt_unregister_device(struct rvt_dev_info *rvd); 95 96#endif /* DEF_RDMA_VT_H */ |