diff options
| author | Yishai Hadas <yishaih@mellanox.com> | 2014-01-28 06:40:15 -0500 |
|---|---|---|
| committer | Roland Dreier <roland@purestorage.com> | 2014-03-04 13:34:28 -0500 |
| commit | eeb8461e36c99fdf2d058751be924a2aab215005 (patch) | |
| tree | c92498349f842be5985194c840e2dd12201df861 /include/rdma | |
| parent | cfbf8d4857c26a8a307fb7cd258074c9dcd8c691 (diff) | |
IB: Refactor umem to use linear SG table
This patch refactors the IB core umem code and vendor drivers to use a
linear (chained) SG table instead of chunk list. With this change the
relevant code becomes clearer—no need for nested loops to build and
use umem.
Signed-off-by: Shachar Raindel <raindel@mellanox.com>
Signed-off-by: Yishai Hadas <yishaih@mellanox.com>
Signed-off-by: Roland Dreier <roland@purestorage.com>
Diffstat (limited to 'include/rdma')
| -rw-r--r-- | include/rdma/ib_umem.h | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/include/rdma/ib_umem.h b/include/rdma/ib_umem.h index 9ee0d2e51b16..1ea0b65c4cfb 100644 --- a/include/rdma/ib_umem.h +++ b/include/rdma/ib_umem.h | |||
| @@ -46,17 +46,12 @@ struct ib_umem { | |||
| 46 | int page_size; | 46 | int page_size; |
| 47 | int writable; | 47 | int writable; |
| 48 | int hugetlb; | 48 | int hugetlb; |
| 49 | struct list_head chunk_list; | ||
| 50 | struct work_struct work; | 49 | struct work_struct work; |
| 51 | struct mm_struct *mm; | 50 | struct mm_struct *mm; |
| 52 | unsigned long diff; | 51 | unsigned long diff; |
| 53 | }; | 52 | struct sg_table sg_head; |
| 54 | 53 | int nmap; | |
| 55 | struct ib_umem_chunk { | 54 | int npages; |
| 56 | struct list_head list; | ||
| 57 | int nents; | ||
| 58 | int nmap; | ||
| 59 | struct scatterlist page_list[0]; | ||
| 60 | }; | 55 | }; |
| 61 | 56 | ||
| 62 | #ifdef CONFIG_INFINIBAND_USER_MEM | 57 | #ifdef CONFIG_INFINIBAND_USER_MEM |
