nvmf/rdma: Avoid queryng the qp state as much as possible
This call results in a syscall that should be avoided. We can often use our cached value instead. Change-Id: I11b5c5457ac2f68bfd46877d3bbc077a50dc9acb Signed-off-by: Ben Walker <benjamin.walker@intel.com> Reviewed-on: https://review.gerrithub.io/423409 Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@intel.com> Reviewed-by: Seth Howell <seth.howell5141@gmail.com> Reviewed-by: Philipp Skadorov <philipp.skadorov@wdc.com> Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com> Reviewed-by: Changpeng Liu <changpeng.liu@intel.com> Reviewed-by: Jim Harris <james.r.harris@intel.com>
This commit is contained in:
parent
5deb90b002
commit
b86bb376ff
@ -1991,7 +1991,7 @@ spdk_nvmf_rdma_qpair_recover(struct spdk_nvmf_rdma_qpair *rqpair)
|
||||
return;
|
||||
}
|
||||
|
||||
state = spdk_nvmf_rdma_update_ibv_state(rqpair);
|
||||
state = rqpair->ibv_attr.qp_state;
|
||||
next_state = state;
|
||||
|
||||
SPDK_NOTICELOG("RDMA qpair %u is in state: %s\n",
|
||||
@ -2081,7 +2081,7 @@ _spdk_nvmf_rdma_qp_error(void *arg)
|
||||
struct spdk_nvmf_rdma_qpair *rqpair = arg;
|
||||
enum ibv_qp_state state;
|
||||
|
||||
state = spdk_nvmf_rdma_update_ibv_state(rqpair);
|
||||
state = rqpair->ibv_attr.qp_state;
|
||||
if (state != IBV_QPS_ERR) {
|
||||
/* Error was already recovered */
|
||||
return;
|
||||
|
Loading…
Reference in New Issue
Block a user