diff options
author | David S. Miller <davem@davemloft.net> | 2017-07-29 11:22:58 -0700 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2017-07-29 11:22:58 -0700 |
commit | eace92e31bbbd4b8707977536b623d2229c67243 (patch) | |
tree | aeba542906415b93991296bbae5ad5f983587bcc /net/smc/smc_ib.h | |
parent | bdb0effcc0a9e636c0a5406bc2eb78474436143d (diff) | |
parent | 10428dd8354cc1c74ee806df45c2227c1f9d7b0c (diff) | |
download | linux-eace92e31bbbd4b8707977536b623d2229c67243.tar.bz2 |
Merge branch 'smc-get-rid-of-unsafe_global_rkey'
Ursula Braun says:
====================
net/smc: get rid of unsafe_global_rkey
The smc code uses the unsafe_global_rkey, exposing all memory for
remote reads and writes once a connection is established.
Here is now a patch series to get rid of unsafe_global_rkey usage.
Main idea is to switch to SG-logic and separate memory regions for RMBs.
====================
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/smc/smc_ib.h')
-rw-r--r-- | net/smc/smc_ib.h | 19 |
1 files changed, 13 insertions, 6 deletions
diff --git a/net/smc/smc_ib.h b/net/smc/smc_ib.h index b567152a526d..9b927a33d5e6 100644 --- a/net/smc/smc_ib.h +++ b/net/smc/smc_ib.h @@ -51,12 +51,12 @@ int smc_ib_register_client(void) __init; void smc_ib_unregister_client(void); bool smc_ib_port_active(struct smc_ib_device *smcibdev, u8 ibport); int smc_ib_remember_port_attr(struct smc_ib_device *smcibdev, u8 ibport); -int smc_ib_buf_map(struct smc_ib_device *smcibdev, int buf_size, - struct smc_buf_desc *buf_slot, - enum dma_data_direction data_direction); -void smc_ib_buf_unmap(struct smc_ib_device *smcibdev, int bufsize, +int smc_ib_buf_map_sg(struct smc_ib_device *smcibdev, struct smc_buf_desc *buf_slot, enum dma_data_direction data_direction); +void smc_ib_buf_unmap_sg(struct smc_ib_device *smcibdev, + struct smc_buf_desc *buf_slot, + enum dma_data_direction data_direction); void smc_ib_dealloc_protection_domain(struct smc_link *lnk); int smc_ib_create_protection_domain(struct smc_link *lnk); void smc_ib_destroy_queue_pair(struct smc_link *lnk); @@ -65,6 +65,13 @@ int smc_ib_ready_link(struct smc_link *lnk); int smc_ib_modify_qp_rts(struct smc_link *lnk); int smc_ib_modify_qp_reset(struct smc_link *lnk); long smc_ib_setup_per_ibdev(struct smc_ib_device *smcibdev); - - +int smc_ib_get_memory_region(struct ib_pd *pd, int access_flags, + struct smc_buf_desc *buf_slot); +void smc_ib_put_memory_region(struct ib_mr *mr); +void smc_ib_sync_sg_for_cpu(struct smc_ib_device *smcibdev, + struct smc_buf_desc *buf_slot, + enum dma_data_direction data_direction); +void smc_ib_sync_sg_for_device(struct smc_ib_device *smcibdev, + struct smc_buf_desc *buf_slot, + enum dma_data_direction data_direction); #endif |