Whamcloud - gitweb
LU-17744 ldiskfs: mballoc stats fixes
[fs/lustre-release.git] / lnet / include / lnet / lnet_rdma.h
1 // SPDX-License-Identifier: GPL-2.0
2
3 /* This file is part of Lustre, http://www.lustre.org/ */
4
5 #ifndef LNET_RDMA_H
6 #define LNET_RDMA_H
7
8 struct device;
9 struct page;
10 enum dma_data_direction;
11 struct scatterlist;
12
13 struct nvfs_dma_rw_ops;
14
15 int REGISTER_FUNC (struct nvfs_dma_rw_ops *ops);
16
17 void UNREGISTER_FUNC (void);
18
19 unsigned int lnet_get_dev_prio(struct device *dev,
20                                unsigned int dev_idx);
21 int lnet_rdma_map_sg_attrs(struct device *dev, struct scatterlist *sg,
22                            int nents, enum dma_data_direction direction);
23 int lnet_rdma_unmap_sg(struct device *dev,
24                        struct scatterlist *sg, int nents,
25                        enum dma_data_direction direction);
26 bool lnet_is_rdma_only_page(struct page *page);
27 unsigned int lnet_get_dev_idx(struct page *page);
28
29 /* DMA_ATTR_NO_WARN was added to kernel v4.8-11962-ga9a62c9 */
30 #ifndef DMA_ATTR_NO_WARN
31 #define DMA_ATTR_NO_WARN 0
32 #endif
33
34 #endif /* LUSTRE_NVFS_H */
35