Re: [PATCH v3 4/6] qla2xxx: Add multiple queue pair functionality.

2016-12-05 Thread Madhani, Himanshu


On 12/5/16, 8:20 AM, "Christoph Hellwig"  wrote:

>>  create mode 100644 drivers/scsi/qla2xxx/qla_bottom.c
>>  create mode 100644 drivers/scsi/qla2xxx/qla_mq.c
>>  create mode 100644 drivers/scsi/qla2xxx/qla_top.c
>
>What's the point of three new fairly small files, two of them very
>oddly named?  Can't we keep the code together by logical groups?

Ack. Will merge code 

>
>> +/* distill these fields down to 'online=0/1'
>> + * ha->flags.eeh_busy
>> + * ha->flags.pci_channel_io_perm_failure
>> + * base_vha->loop_state
>> + */
>> +uint32_t online:1;
>> +/* move vha->flags.difdix_supported here */
>> +uint32_t difdix_supported:1;
>> +uint32_t delete_in_progress:1;
>
>These probably should be atomic bitops.

Ack. Will update send out series. 

>
>> +#define QLA_VHA_MARK_BUSY(__vha, __bail) do {   \
>> +atomic_inc(&__vha->vref_count); \
>> +mb();   \
>> +if (__vha->flags.delete_progress) { \
>> +atomic_dec(&__vha->vref_count); \
>> +__bail = 1; \
>> +} else {\
>> +__bail = 0; \
>> +}   \
>>  } while (0)
>
>Something like this should be an inline function, not a macro
>that returns through an argument.
>
>(and move to lower case it while at it, please).
>
>Btw, the way vref_count is used looks incredibly buggy, instead
>of the busy wait just add a waie queue to sleep on in
>qla24xx_deallocate_vp_id.

We’ll work on this change and post as a separate patch.

>
>> +QLA_QPAIR_MARK_BUSY(qpair, bail);
>> +if (unlikely(bail))
>> +return NULL;
>> +
>> +sp = mempool_alloc(qpair->srb_mempool, flag);
>> +if (!sp)
>> +goto done;
>> +
>> +memset(sp, 0, sizeof(*sp));
>> +sp->fcport = fcport;
>> +sp->iocbs = 1;
>
>FYI, the blk-mq model would be to allocate the srps as part of the
>scsi_cmd by setting the cmd_size field in the host template.  Note
>that this is also supported for the non-blk-mq path.
>
>> +qpair->delete_in_progress = 1;
>> +while (atomic_read(>ref_count))
>> +msleep(500);
>
>Please use a waitqueue instead of a busy wait here as well.

We’ll work on cleanup patch as separate patch.

>
>> +int ql2xmqsupport;
>> +module_param(ql2xmqsupport, int, S_IRUGO);
>> +MODULE_PARM_DESC(ql2xmqsupport,
>> +"Enable on demand multiple queue pairs support "
>> +"Default is 0 for no support. "
>> +"Set it to 1 to turn on mq qpair support.");
>
>Why isn't this enabled by default?

Ack. Will enable it by default. 

>
>> +ha->queue_pair_map = kzalloc(sizeof(struct qla_qpair *)
>> +* ha->max_qpairs, GFP_KERNEL);
>
>Use kcalloc instead.

Ack. Will update this. 
>


Re: [PATCH v3 4/6] qla2xxx: Add multiple queue pair functionality.

2016-12-05 Thread Madhani, Himanshu


On 12/5/16, 12:43 PM, "linux-scsi-ow...@vger.kernel.org on behalf of Madhani, 
Himanshu"  wrote:

>
>We need to have the spinlock because currently our NPIV implementation does 
>not utilizes
>Q-pair framework.

Looks like sent it prematurely. This comment should be read as following

We need to have the spinlock because currently our NPIV implementation does not 
utilizes
block mq tagging framework.



Re: [PATCH v3 4/6] qla2xxx: Add multiple queue pair functionality.

2016-12-05 Thread Madhani, Himanshu

On 12/4/16, 11:38 PM, "Hannes Reinecke"  wrote:

>On 12/02/2016 10:44 PM, Himanshu Madhani wrote:
>> From: Michael Hernandez 
>> 
>> Replaced existing multiple queue functionality with framework
>> that allows for the creation of pairs of request and response queues,
>> either at start of day or dynamically.
>> 
>> Signed-off-by: Sawan Chandak 
>> Signed-off-by: Michael Hernandez 
>> Signed-off-by: Himanshu Madhani 
>> ---
>>  drivers/scsi/qla2xxx/Makefile |   3 +-
>>  drivers/scsi/qla2xxx/qla_attr.c   |  36 ++--
>>  drivers/scsi/qla2xxx/qla_bottom.c | 398 
>> ++
>>  drivers/scsi/qla2xxx/qla_dbg.c|   4 +-
>>  drivers/scsi/qla2xxx/qla_def.h| 105 --
>>  drivers/scsi/qla2xxx/qla_gbl.h|  32 ++-
>>  drivers/scsi/qla2xxx/qla_init.c   |  14 +-
>>  drivers/scsi/qla2xxx/qla_inline.h |  30 +++
>>  drivers/scsi/qla2xxx/qla_iocb.c   |  56 ++
>>  drivers/scsi/qla2xxx/qla_isr.c| 101 +-
>>  drivers/scsi/qla2xxx/qla_mbx.c|  33 ++--
>>  drivers/scsi/qla2xxx/qla_mid.c| 116 +--
>>  drivers/scsi/qla2xxx/qla_mq.c | 236 ++
>>  drivers/scsi/qla2xxx/qla_os.c | 237 +++
>>  drivers/scsi/qla2xxx/qla_top.c|  95 +
>>  15 files changed, 1153 insertions(+), 343 deletions(-)
>>  create mode 100644 drivers/scsi/qla2xxx/qla_bottom.c
>>  create mode 100644 drivers/scsi/qla2xxx/qla_mq.c
>>  create mode 100644 drivers/scsi/qla2xxx/qla_top.c
>> 
>> diff --git a/drivers/scsi/qla2xxx/Makefile b/drivers/scsi/qla2xxx/Makefile
>> index 44def6b..ca04260 100644
>> --- a/drivers/scsi/qla2xxx/Makefile
>> +++ b/drivers/scsi/qla2xxx/Makefile
>> @@ -1,6 +1,7 @@
>>  qla2xxx-y := qla_os.o qla_init.o qla_mbx.o qla_iocb.o qla_isr.o qla_gs.o \
>>  qla_dbg.o qla_sup.o qla_attr.o qla_mid.o qla_dfs.o qla_bsg.o \
>> -qla_nx.o qla_mr.o qla_nx2.o qla_target.o qla_tmpl.o
>> +qla_nx.o qla_mr.o qla_nx2.o qla_target.o qla_tmpl.o qla_mq.o \
>> +qla_top.o qla_bottom.o
>>  
>>  obj-$(CONFIG_SCSI_QLA_FC) += qla2xxx.o
>>  obj-$(CONFIG_TCM_QLA2XXX) += tcm_qla2xxx.o
>> diff --git a/drivers/scsi/qla2xxx/qla_attr.c 
>> b/drivers/scsi/qla2xxx/qla_attr.c
>> index fe7469c..47eb4d5 100644
>> --- a/drivers/scsi/qla2xxx/qla_attr.c
>> +++ b/drivers/scsi/qla2xxx/qla_attr.c
>> @@ -1988,9 +1988,9 @@ struct device_attribute *qla2x00_host_attrs[] = {
>>  scsi_qla_host_t *base_vha = shost_priv(fc_vport->shost);
>>  scsi_qla_host_t *vha = NULL;
>>  struct qla_hw_data *ha = base_vha->hw;
>> -uint16_t options = 0;
>>  int cnt;
>>  struct req_que *req = ha->req_q_map[0];
>> +struct qla_qpair *qpair;
>>  
>>  ret = qla24xx_vport_create_req_sanity_check(fc_vport);
>>  if (ret) {
>> @@ -2075,15 +2075,9 @@ struct device_attribute *qla2x00_host_attrs[] = {
>>  qlt_vport_create(vha, ha);
>>  qla24xx_vport_disable(fc_vport, disable);
>>  
>> -if (ha->flags.cpu_affinity_enabled) {
>> -req = ha->req_q_map[1];
>> -ql_dbg(ql_dbg_multiq, vha, 0xc000,
>> -"Request queue %p attached with "
>> -"VP[%d], cpu affinity =%d\n",
>> -req, vha->vp_idx, ha->flags.cpu_affinity_enabled);
>> -goto vport_queue;
>> -} else if (ql2xmaxqueues == 1 || !ha->npiv_info)
>> +if (!ql2xmqsupport || !ha->npiv_info)
>>  goto vport_queue;
>> +
>>  /* Create a request queue in QoS mode for the vport */
>>  for (cnt = 0; cnt < ha->nvram_npiv_size; cnt++) {
>>  if (memcmp(ha->npiv_info[cnt].port_name, vha->port_name, 8) == 0
>> @@ -2095,20 +2089,20 @@ struct device_attribute *qla2x00_host_attrs[] = {
>>  }
>>  
>>  if (qos) {
>> -ret = qla25xx_create_req_que(ha, options, vha->vp_idx, 0, 0,
>> -qos);
>> -if (!ret)
>> +qpair = qla2xxx_create_qpair(vha, qos, vha->vp_idx);
>> +if (!qpair)
>>  ql_log(ql_log_warn, vha, 0x7084,
>> -"Can't create request queue for VP[%d]\n",
>> +"Can't create qpair for VP[%d]\n",
>>  vha->vp_idx);
>>  else {
>>  ql_dbg(ql_dbg_multiq, vha, 0xc001,
>> -"Request Que:%d Q0s: %d) created for VP[%d]\n",
>> -ret, qos, vha->vp_idx);
>> +"Queue pair: %d Qos: %d) created for VP[%d]\n",
>> +qpair->id, qos, vha->vp_idx);
>>  ql_dbg(ql_dbg_user, vha, 0x7085,
>> -"Request Que:%d Q0s: %d) created for VP[%d]\n",
>> -ret, qos, vha->vp_idx);
>> -req = ha->req_q_map[ret];
>> +"Queue Pair: %d Qos: %d) created for VP[%d]\n",
>> +   

Re: [PATCH v3 4/6] qla2xxx: Add multiple queue pair functionality.

2016-12-05 Thread Christoph Hellwig
>  create mode 100644 drivers/scsi/qla2xxx/qla_bottom.c
>  create mode 100644 drivers/scsi/qla2xxx/qla_mq.c
>  create mode 100644 drivers/scsi/qla2xxx/qla_top.c

What's the point of three new fairly small files, two of them very
oddly named?  Can't we keep the code together by logical groups?

> + /* distill these fields down to 'online=0/1'
> +  * ha->flags.eeh_busy
> +  * ha->flags.pci_channel_io_perm_failure
> +  * base_vha->loop_state
> +  */
> + uint32_t online:1;
> + /* move vha->flags.difdix_supported here */
> + uint32_t difdix_supported:1;
> + uint32_t delete_in_progress:1;

These probably should be atomic bitops.

> +#define QLA_VHA_MARK_BUSY(__vha, __bail) do {\
> + atomic_inc(&__vha->vref_count); \
> + mb();   \
> + if (__vha->flags.delete_progress) { \
> + atomic_dec(&__vha->vref_count); \
> + __bail = 1; \
> + } else {\
> + __bail = 0; \
> + }   \
>  } while (0)

Something like this should be an inline function, not a macro
that returns through an argument.

(and move to lower case it while at it, please).

Btw, the way vref_count is used looks incredibly buggy, instead
of the busy wait just add a waie queue to sleep on in
qla24xx_deallocate_vp_id.

> + QLA_QPAIR_MARK_BUSY(qpair, bail);
> + if (unlikely(bail))
> + return NULL;
> +
> + sp = mempool_alloc(qpair->srb_mempool, flag);
> + if (!sp)
> + goto done;
> +
> + memset(sp, 0, sizeof(*sp));
> + sp->fcport = fcport;
> + sp->iocbs = 1;

FYI, the blk-mq model would be to allocate the srps as part of the
scsi_cmd by setting the cmd_size field in the host template.  Note
that this is also supported for the non-blk-mq path.

> + qpair->delete_in_progress = 1;
> + while (atomic_read(>ref_count))
> + msleep(500);

Please use a waitqueue instead of a busy wait here as well.

> +int ql2xmqsupport;
> +module_param(ql2xmqsupport, int, S_IRUGO);
> +MODULE_PARM_DESC(ql2xmqsupport,
> + "Enable on demand multiple queue pairs support "
> + "Default is 0 for no support. "
> + "Set it to 1 to turn on mq qpair support.");

Why isn't this enabled by default?

> + ha->queue_pair_map = kzalloc(sizeof(struct qla_qpair *)
> + * ha->max_qpairs, GFP_KERNEL);

Use kcalloc instead.
--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH v3 4/6] qla2xxx: Add multiple queue pair functionality.

2016-12-05 Thread Christoph Hellwig
[Hannes, can you please stop the damn full quotes?  reading your answers
is a major pain]

> Have you modified the irq affinity for this?
> Typically the irq-affinity changes will treat all vectors identically,
> and spread them out across the available CPUS.
> But with this layout vector '0' apparently is the MB irq vector, and as
> such should _not_ be treated like the others wrt irq affinity, but
> rather left alone.
> Christoph put in some changes for that, but they'll be coming in via the
> tip tree, so not sure if Martin has already taken them in.
> But in either way, you should be using them to get the irq affinity
> layout correctly.

The changes are here:

https://git.kernel.org/cgit/linux/kernel/git/tip/tip.git/log/?h=irq/for-block

I don't think they are in the SCSI tree yet as I haven't gotten a reply
to the lpfc conversion yet.  But that conversion is here for reference:

http://git.infradead.org/users/hch/block.git/shortlog/refs/heads/lpfc-msix

qla2xxx would need to use pre_vectors instead of post_vectors, though.
--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH v3 4/6] qla2xxx: Add multiple queue pair functionality.

2016-12-04 Thread Hannes Reinecke
On 12/02/2016 10:44 PM, Himanshu Madhani wrote:
> From: Michael Hernandez 
> 
> Replaced existing multiple queue functionality with framework
> that allows for the creation of pairs of request and response queues,
> either at start of day or dynamically.
> 
> Signed-off-by: Sawan Chandak 
> Signed-off-by: Michael Hernandez 
> Signed-off-by: Himanshu Madhani 
> ---
>  drivers/scsi/qla2xxx/Makefile |   3 +-
>  drivers/scsi/qla2xxx/qla_attr.c   |  36 ++--
>  drivers/scsi/qla2xxx/qla_bottom.c | 398 
> ++
>  drivers/scsi/qla2xxx/qla_dbg.c|   4 +-
>  drivers/scsi/qla2xxx/qla_def.h| 105 --
>  drivers/scsi/qla2xxx/qla_gbl.h|  32 ++-
>  drivers/scsi/qla2xxx/qla_init.c   |  14 +-
>  drivers/scsi/qla2xxx/qla_inline.h |  30 +++
>  drivers/scsi/qla2xxx/qla_iocb.c   |  56 ++
>  drivers/scsi/qla2xxx/qla_isr.c| 101 +-
>  drivers/scsi/qla2xxx/qla_mbx.c|  33 ++--
>  drivers/scsi/qla2xxx/qla_mid.c| 116 +--
>  drivers/scsi/qla2xxx/qla_mq.c | 236 ++
>  drivers/scsi/qla2xxx/qla_os.c | 237 +++
>  drivers/scsi/qla2xxx/qla_top.c|  95 +
>  15 files changed, 1153 insertions(+), 343 deletions(-)
>  create mode 100644 drivers/scsi/qla2xxx/qla_bottom.c
>  create mode 100644 drivers/scsi/qla2xxx/qla_mq.c
>  create mode 100644 drivers/scsi/qla2xxx/qla_top.c
> 
> diff --git a/drivers/scsi/qla2xxx/Makefile b/drivers/scsi/qla2xxx/Makefile
> index 44def6b..ca04260 100644
> --- a/drivers/scsi/qla2xxx/Makefile
> +++ b/drivers/scsi/qla2xxx/Makefile
> @@ -1,6 +1,7 @@
>  qla2xxx-y := qla_os.o qla_init.o qla_mbx.o qla_iocb.o qla_isr.o qla_gs.o \
>   qla_dbg.o qla_sup.o qla_attr.o qla_mid.o qla_dfs.o qla_bsg.o \
> - qla_nx.o qla_mr.o qla_nx2.o qla_target.o qla_tmpl.o
> + qla_nx.o qla_mr.o qla_nx2.o qla_target.o qla_tmpl.o qla_mq.o \
> + qla_top.o qla_bottom.o
>  
>  obj-$(CONFIG_SCSI_QLA_FC) += qla2xxx.o
>  obj-$(CONFIG_TCM_QLA2XXX) += tcm_qla2xxx.o
> diff --git a/drivers/scsi/qla2xxx/qla_attr.c b/drivers/scsi/qla2xxx/qla_attr.c
> index fe7469c..47eb4d5 100644
> --- a/drivers/scsi/qla2xxx/qla_attr.c
> +++ b/drivers/scsi/qla2xxx/qla_attr.c
> @@ -1988,9 +1988,9 @@ struct device_attribute *qla2x00_host_attrs[] = {
>   scsi_qla_host_t *base_vha = shost_priv(fc_vport->shost);
>   scsi_qla_host_t *vha = NULL;
>   struct qla_hw_data *ha = base_vha->hw;
> - uint16_t options = 0;
>   int cnt;
>   struct req_que *req = ha->req_q_map[0];
> + struct qla_qpair *qpair;
>  
>   ret = qla24xx_vport_create_req_sanity_check(fc_vport);
>   if (ret) {
> @@ -2075,15 +2075,9 @@ struct device_attribute *qla2x00_host_attrs[] = {
>   qlt_vport_create(vha, ha);
>   qla24xx_vport_disable(fc_vport, disable);
>  
> - if (ha->flags.cpu_affinity_enabled) {
> - req = ha->req_q_map[1];
> - ql_dbg(ql_dbg_multiq, vha, 0xc000,
> - "Request queue %p attached with "
> - "VP[%d], cpu affinity =%d\n",
> - req, vha->vp_idx, ha->flags.cpu_affinity_enabled);
> - goto vport_queue;
> - } else if (ql2xmaxqueues == 1 || !ha->npiv_info)
> + if (!ql2xmqsupport || !ha->npiv_info)
>   goto vport_queue;
> +
>   /* Create a request queue in QoS mode for the vport */
>   for (cnt = 0; cnt < ha->nvram_npiv_size; cnt++) {
>   if (memcmp(ha->npiv_info[cnt].port_name, vha->port_name, 8) == 0
> @@ -2095,20 +2089,20 @@ struct device_attribute *qla2x00_host_attrs[] = {
>   }
>  
>   if (qos) {
> - ret = qla25xx_create_req_que(ha, options, vha->vp_idx, 0, 0,
> - qos);
> - if (!ret)
> + qpair = qla2xxx_create_qpair(vha, qos, vha->vp_idx);
> + if (!qpair)
>   ql_log(ql_log_warn, vha, 0x7084,
> - "Can't create request queue for VP[%d]\n",
> + "Can't create qpair for VP[%d]\n",
>   vha->vp_idx);
>   else {
>   ql_dbg(ql_dbg_multiq, vha, 0xc001,
> - "Request Que:%d Q0s: %d) created for VP[%d]\n",
> - ret, qos, vha->vp_idx);
> + "Queue pair: %d Qos: %d) created for VP[%d]\n",
> + qpair->id, qos, vha->vp_idx);
>   ql_dbg(ql_dbg_user, vha, 0x7085,
> - "Request Que:%d Q0s: %d) created for VP[%d]\n",
> - ret, qos, vha->vp_idx);
> - req = ha->req_q_map[ret];
> + "Queue Pair: %d Qos: %d) created for VP[%d]\n",
> + qpair->id, qos, vha->vp_idx);
> + req = qpair->req;
> + 

[PATCH v3 4/6] qla2xxx: Add multiple queue pair functionality.

2016-12-02 Thread Himanshu Madhani
From: Michael Hernandez 

Replaced existing multiple queue functionality with framework
that allows for the creation of pairs of request and response queues,
either at start of day or dynamically.

Signed-off-by: Sawan Chandak 
Signed-off-by: Michael Hernandez 
Signed-off-by: Himanshu Madhani 
---
 drivers/scsi/qla2xxx/Makefile |   3 +-
 drivers/scsi/qla2xxx/qla_attr.c   |  36 ++--
 drivers/scsi/qla2xxx/qla_bottom.c | 398 ++
 drivers/scsi/qla2xxx/qla_dbg.c|   4 +-
 drivers/scsi/qla2xxx/qla_def.h| 105 --
 drivers/scsi/qla2xxx/qla_gbl.h|  32 ++-
 drivers/scsi/qla2xxx/qla_init.c   |  14 +-
 drivers/scsi/qla2xxx/qla_inline.h |  30 +++
 drivers/scsi/qla2xxx/qla_iocb.c   |  56 ++
 drivers/scsi/qla2xxx/qla_isr.c| 101 +-
 drivers/scsi/qla2xxx/qla_mbx.c|  33 ++--
 drivers/scsi/qla2xxx/qla_mid.c| 116 +--
 drivers/scsi/qla2xxx/qla_mq.c | 236 ++
 drivers/scsi/qla2xxx/qla_os.c | 237 +++
 drivers/scsi/qla2xxx/qla_top.c|  95 +
 15 files changed, 1153 insertions(+), 343 deletions(-)
 create mode 100644 drivers/scsi/qla2xxx/qla_bottom.c
 create mode 100644 drivers/scsi/qla2xxx/qla_mq.c
 create mode 100644 drivers/scsi/qla2xxx/qla_top.c

diff --git a/drivers/scsi/qla2xxx/Makefile b/drivers/scsi/qla2xxx/Makefile
index 44def6b..ca04260 100644
--- a/drivers/scsi/qla2xxx/Makefile
+++ b/drivers/scsi/qla2xxx/Makefile
@@ -1,6 +1,7 @@
 qla2xxx-y := qla_os.o qla_init.o qla_mbx.o qla_iocb.o qla_isr.o qla_gs.o \
qla_dbg.o qla_sup.o qla_attr.o qla_mid.o qla_dfs.o qla_bsg.o \
-   qla_nx.o qla_mr.o qla_nx2.o qla_target.o qla_tmpl.o
+   qla_nx.o qla_mr.o qla_nx2.o qla_target.o qla_tmpl.o qla_mq.o \
+   qla_top.o qla_bottom.o
 
 obj-$(CONFIG_SCSI_QLA_FC) += qla2xxx.o
 obj-$(CONFIG_TCM_QLA2XXX) += tcm_qla2xxx.o
diff --git a/drivers/scsi/qla2xxx/qla_attr.c b/drivers/scsi/qla2xxx/qla_attr.c
index fe7469c..47eb4d5 100644
--- a/drivers/scsi/qla2xxx/qla_attr.c
+++ b/drivers/scsi/qla2xxx/qla_attr.c
@@ -1988,9 +1988,9 @@ struct device_attribute *qla2x00_host_attrs[] = {
scsi_qla_host_t *base_vha = shost_priv(fc_vport->shost);
scsi_qla_host_t *vha = NULL;
struct qla_hw_data *ha = base_vha->hw;
-   uint16_t options = 0;
int cnt;
struct req_que *req = ha->req_q_map[0];
+   struct qla_qpair *qpair;
 
ret = qla24xx_vport_create_req_sanity_check(fc_vport);
if (ret) {
@@ -2075,15 +2075,9 @@ struct device_attribute *qla2x00_host_attrs[] = {
qlt_vport_create(vha, ha);
qla24xx_vport_disable(fc_vport, disable);
 
-   if (ha->flags.cpu_affinity_enabled) {
-   req = ha->req_q_map[1];
-   ql_dbg(ql_dbg_multiq, vha, 0xc000,
-   "Request queue %p attached with "
-   "VP[%d], cpu affinity =%d\n",
-   req, vha->vp_idx, ha->flags.cpu_affinity_enabled);
-   goto vport_queue;
-   } else if (ql2xmaxqueues == 1 || !ha->npiv_info)
+   if (!ql2xmqsupport || !ha->npiv_info)
goto vport_queue;
+
/* Create a request queue in QoS mode for the vport */
for (cnt = 0; cnt < ha->nvram_npiv_size; cnt++) {
if (memcmp(ha->npiv_info[cnt].port_name, vha->port_name, 8) == 0
@@ -2095,20 +2089,20 @@ struct device_attribute *qla2x00_host_attrs[] = {
}
 
if (qos) {
-   ret = qla25xx_create_req_que(ha, options, vha->vp_idx, 0, 0,
-   qos);
-   if (!ret)
+   qpair = qla2xxx_create_qpair(vha, qos, vha->vp_idx);
+   if (!qpair)
ql_log(ql_log_warn, vha, 0x7084,
-   "Can't create request queue for VP[%d]\n",
+   "Can't create qpair for VP[%d]\n",
vha->vp_idx);
else {
ql_dbg(ql_dbg_multiq, vha, 0xc001,
-   "Request Que:%d Q0s: %d) created for VP[%d]\n",
-   ret, qos, vha->vp_idx);
+   "Queue pair: %d Qos: %d) created for VP[%d]\n",
+   qpair->id, qos, vha->vp_idx);
ql_dbg(ql_dbg_user, vha, 0x7085,
-   "Request Que:%d Q0s: %d) created for VP[%d]\n",
-   ret, qos, vha->vp_idx);
-   req = ha->req_q_map[ret];
+   "Queue Pair: %d Qos: %d) created for VP[%d]\n",
+   qpair->id, qos, vha->vp_idx);
+   req = qpair->req;
+   vha->qpair = qpair;
}
}
 
@@ -2162,10 +2156,10 @@ struct device_attribute *qla2x00_host_attrs[] = {
clear_bit(vha->vp_idx,