IB/srp: Create an insecure all physical rkey only if needed
The SRP initiator only needs this if the insecure register_always=N performance optimization is enabled, or if FRWR/FMR is not supported in the driver. Do not create an all physical MR unless it is needed to support either of those modes. Default register_always to true so the out of the box configuration does not create an insecure all physical MR. Signed-off-by: Jason Gunthorpe <jgunthorpe@obsidianresearch.com> [bvanassche: reworked and rebased this patch] Signed-off-by: Bart Van Assche <bart.vanassche@sandisk.com> Signed-off-by: Doug Ledford <dledford@redhat.com>
This commit is contained in:

committed by
Doug Ledford

parent
330179f2fa
commit
03f6fb93fd
@@ -95,7 +95,7 @@ struct srp_device {
|
||||
struct list_head dev_list;
|
||||
struct ib_device *dev;
|
||||
struct ib_pd *pd;
|
||||
struct ib_mr *mr;
|
||||
struct ib_mr *global_mr;
|
||||
u64 mr_page_mask;
|
||||
int mr_page_size;
|
||||
int mr_max_size;
|
||||
@@ -183,10 +183,10 @@ struct srp_target_port {
|
||||
spinlock_t lock;
|
||||
|
||||
/* read only in the hot path */
|
||||
struct ib_mr *global_mr;
|
||||
struct srp_rdma_ch *ch;
|
||||
u32 ch_count;
|
||||
u32 lkey;
|
||||
u32 rkey;
|
||||
enum srp_target_state state;
|
||||
unsigned int max_iu_len;
|
||||
unsigned int cmd_sg_cnt;
|
||||
|
Reference in New Issue
Block a user