net/smc: introduce sg-logic for RMBs

The follow-on patch makes use of ib_map_mr_sg() when introducing
separate memory regions for RMBs. This function is based on
scatterlists; thus this patch introduces scatterlists for RMBs.

Signed-off-by: Ursula Braun <ubraun@linux.vnet.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
Ursula Braun
2017-07-28 13:56:15 +02:00
committed by David S. Miller
parent c45abf31e7
commit a3fe3d01bd
5 changed files with 76 additions and 26 deletions

View File

@ -93,10 +93,8 @@ struct smc_buf_desc {
u64 dma_addr[SMC_LINKS_PER_LGR_MAX];
/* mapped address of buffer */
void *cpu_addr; /* virtual address of buffer */
u32 rkey[SMC_LINKS_PER_LGR_MAX];
/* for rmb only:
* rkey provided to peer
*/
struct sg_table sgt[SMC_LINKS_PER_LGR_MAX];/* virtual buffer */
u32 order; /* allocation order */
u32 used; /* currently used / unused */
};