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

2016-12-13 Thread Martin K. Petersen
> "Himanshu" == Madhani, Himanshu  writes:

Himanshu> Would you be pulling changes for this new call into scsi tree
Himanshu> anytime soon

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

James just sent the first batch of 4.10 to Linus.

Once Linus merges I'll start the 4.10/scsi-fixes branch. We have a few
patches that depend on block layer changes and they'll go in first
thing.

-- 
Martin K. Petersen  Oracle Linux Engineering
--
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 v4 4/6] qla2xxx: Add multiple queue pair functionality.

2016-12-09 Thread Madhani, Himanshu
Hi Martin, 



On 12/9/16, 11:39 AM, "Madhani, Himanshu"  wrote:

>
>On 12/9/16, 5:10 AM, "Christoph Hellwig"  wrote:
>
>>Ok.  We'll still need to use PCI_IRQ_AFFINITY here after it's removed
>>i nthe previous patch, but with pci_irq_alloc_vectors_affinity so that
>>we can get the separate non-assignment vector right as in the previous
>>discussion.
>
>Ack. Will fix up patch and resend series.

Would you be pulling changes for this new call into scsi tree anytime soon

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

>
>Thanks,
>- Himanshu
>


>
N�r��yb�X��ǧv�^�)޺{.n�+{���"�{ay�ʇڙ�,j��f���h���z��w���
���j:+v���w�j�mzZ+�ݢj"��!�i

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

2016-12-09 Thread Madhani, Himanshu

On 12/9/16, 5:10 AM, "Christoph Hellwig"  wrote:

>Ok.  We'll still need to use PCI_IRQ_AFFINITY here after it's removed
>i nthe previous patch, but with pci_irq_alloc_vectors_affinity so that
>we can get the separate non-assignment vector right as in the previous
>discussion.

Ack. Will fix up patch and resend series.

Thanks,
- Himanshu

N�r��yb�X��ǧv�^�)޺{.n�+{���"�{ay�ʇڙ�,j��f���h���z��w���
���j:+v���w�j�mzZ+�ݢj"��!�i

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

2016-12-09 Thread Christoph Hellwig
Ok.  We'll still need to use PCI_IRQ_AFFINITY here after it's removed
i nthe previous patch, but with pci_irq_alloc_vectors_affinity so that
we can get the separate non-assignment vector right as in the previous
discussion.
--
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 v4 4/6] qla2xxx: Add multiple queue pair functionality.

2016-12-08 Thread Madhani, Himanshu
Hi Christoph,



On 12/7/16, 11:05 AM, "Christoph Hellwig"  wrote:

>On Tue, Dec 06, 2016 at 11:07:44AM -0800, 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.
>> 
>> Queue pair creation depend on module parameter "ql2xmqsupport",
>> which need to be enabled to create queue pair.
>
>This doesn't seem to address any of the feedback from the last
>round of feedback, was is sent out before that?

Following changes are incorporated into current patch

- Merged code from new files into existing code
- Enabled multi queue support by default.
- Update to use kcalloc instead of kzalloc. 

Following review comments are not addressed as part of this patch 

- Using bits-ops instead of uint32_t.
- Converting macros into inline function.
- Fixing the vref counting in the driver.
- Using wait queue instead of busy wait. 
- Remove driver allocated mempools for SRB and use the one passed in via 
command. 

These changes are going to need us to run regression tests and would take bit 
longer. 
Would you be willing to accept this patch and we will post updates as new patch 
later. 

Thanks,
- Himanshu


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

2016-12-08 Thread Hannes Reinecke

On 12/06/2016 08:07 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.

Queue pair creation depend on module parameter "ql2xmqsupport",
which need to be enabled to create queue pair.

Signed-off-by: Sawan Chandak 
Signed-off-by: Michael Hernandez 
Signed-off-by: Himanshu Madhani 
---
 drivers/scsi/qla2xxx/qla_attr.c   |  36 ++--
 drivers/scsi/qla2xxx/qla_dbg.c|   4 +-
 drivers/scsi/qla2xxx/qla_def.h| 105 --
 drivers/scsi/qla2xxx/qla_gbl.h|  28 ++-
 drivers/scsi/qla2xxx/qla_init.c   | 173 +++-
 drivers/scsi/qla2xxx/qla_inline.h |  30 +++
 drivers/scsi/qla2xxx/qla_iocb.c   | 407 ++
 drivers/scsi/qla2xxx/qla_isr.c| 122 +++-
 drivers/scsi/qla2xxx/qla_mbx.c|  33 ++--
 drivers/scsi/qla2xxx/qla_mid.c| 114 ++-
 drivers/scsi/qla2xxx/qla_os.c | 395 
 11 files changed, 1113 insertions(+), 334 deletions(-)


Reviewed-by: Hannes Reinecke 

Cheers,

Hannes
--
Dr. Hannes ReineckeTeamlead Storage & Networking
h...@suse.de   +49 911 74053 688
SUSE LINUX GmbH, Maxfeldstr. 5, 90409 Nürnberg
GF: F. Imendörffer, J. Smithard, J. Guild, D. Upmanyu, G. Norton
HRB 21284 (AG Nürnberg)
--
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 v4 4/6] qla2xxx: Add multiple queue pair functionality.

2016-12-07 Thread Christoph Hellwig
On Tue, Dec 06, 2016 at 11:07:44AM -0800, 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.
> 
> Queue pair creation depend on module parameter "ql2xmqsupport",
> which need to be enabled to create queue pair.

This doesn't seem to address any of the feedback from the last
round of feedback, was is sent out before that?
--
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


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

2016-12-06 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.

Queue pair creation depend on module parameter "ql2xmqsupport",
which need to be enabled to create queue pair.

Signed-off-by: Sawan Chandak 
Signed-off-by: Michael Hernandez 
Signed-off-by: Himanshu Madhani 
---
 drivers/scsi/qla2xxx/qla_attr.c   |  36 ++--
 drivers/scsi/qla2xxx/qla_dbg.c|   4 +-
 drivers/scsi/qla2xxx/qla_def.h| 105 --
 drivers/scsi/qla2xxx/qla_gbl.h|  28 ++-
 drivers/scsi/qla2xxx/qla_init.c   | 173 +++-
 drivers/scsi/qla2xxx/qla_inline.h |  30 +++
 drivers/scsi/qla2xxx/qla_iocb.c   | 407 ++
 drivers/scsi/qla2xxx/qla_isr.c| 122 +++-
 drivers/scsi/qla2xxx/qla_mbx.c|  33 ++--
 drivers/scsi/qla2xxx/qla_mid.c| 114 ++-
 drivers/scsi/qla2xxx/qla_os.c | 395 
 11 files changed, 1113 insertions(+), 334 deletions(-)

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, ha->vp_idx_map);
mutex_unlock(>vport_lock);
 
-   if (vha->req->id && !ha->flags.cpu_affinity_enabled) {
-   if (qla25xx_delete_req_que(vha, vha->req) != QLA_SUCCESS)
+   if (vha->qpair->vp_idx == vha->vp_idx) {
+   if (qla2xxx_delete_qpair(vha, vha->qpair) != QLA_SUCCESS)
ql_log(ql_log_warn, vha, 0x7087,
-   "Queue delete failed.\n");
+   "Queue Pair delete failed.\n");
}
 
ql_log(ql_log_info, vha, 0x7088, "VP[%d] deleted.\n", id);
diff --git a/drivers/scsi/qla2xxx/qla_dbg.c b/drivers/scsi/qla2xxx/qla_dbg.c
index 45af34d..21d9fb7 100644
--- a/drivers/scsi/qla2xxx/qla_dbg.c
+++ b/drivers/scsi/qla2xxx/qla_dbg.c
@@ -11,7 +11,7 @@
  * --
  *