Re: FCOE vn2vn memory leaks in 4.14

2018-07-31 Thread Johannes Thumshirn
On Fri, Jul 27, 2018 at 12:49:55AM +0200, ard wrote: > Actually already got there from my arm dump, but they are different in > backtrace. > Anyway: > root@antec:~# grep -c fc_rport_create kmemleak.txt > 44 > So 44 * 512 bytes leaked in that path. And an extra thing: "it was leaked in" > libfc an

Re: FCOE vn2vn memory leaks in 4.14

2018-07-31 Thread ard
Hi, On Tue, Jul 31, 2018 at 10:38:06AM +0200, Johannes Thumshirn wrote: > So I've fixed one use-after-free and one memory leak, but the one you > reported is still on the TODO list. Wow, thanks... > Long story short, I can reproduce it here and I'm working on it. > > Thanks for your patience, T

[PATCH] scsi: csiostor: remove automatic irq affinity assignment

2018-07-31 Thread Varun Prakash
If number of interrupt vectors are more than num_online_cpus() then pci_alloc_irq_vectors_affinity() assigns cpumask based on num_possible_cpus() to the remaining vectors because of this interrupt does not generate for these vectors. This patch fixes this issue by using pci_alloc_irq_vectors() ins

[PATCH 4/8] lpfc: Fix driver crash when re-registering NVME rports.

2018-07-31 Thread James Smart
During remote port loss fault testing, the driver crashed with the following trace: general protection fault: [#1] SMP RIP: ... lpfc_nvme_register_port+0x250/0x480 [lpfc] Call Trace: lpfc_nlp_state_cleanup+0x1b3/0x7a0 [lpfc] lpfc_nlp_set_state+0xa6/0x1d0 [lpfc] lpfc_cmpl_prli_prli_issue+0x

[PATCH 0/8] lpfc updates for 12.0.0.6

2018-07-31 Thread James Smart
This patch contains lpfc bug fixes The patches were cut against the Martin's 4.19/scsi-queue tree James Smart (8): lpfc: Fix ELS abort on SLI-3 adapters lpfc: Fix sysfs Speed value on CNA ports lpfc: Fix list corruption on the completion queue. lpfc: Fix driver crash when re-registering

[PATCH 1/8] lpfc: Fix ELS abort on SLI-3 adapters

2018-07-31 Thread James Smart
For ABORT_XRI_CN command, firmware identifies XRI to abort by IOTAG and RPI combination. For ELS aborts, driver specifies IOTAG correctly but RPI is not specified. Fix by setting RPI in WQE. Signed-off-by: Dick Kennedy Signed-off-by: James Smart --- drivers/scsi/lpfc/lpfc_nportdisc.c | 3 +++

[PATCH 3/8] lpfc: Fix list corruption on the completion queue.

2018-07-31 Thread James Smart
Enabling list_debug showed the drivers txcmplq was suffering list corruption. The systems will eventually crash because the iocb free list gets crossed linked with the prings txcmplq. Most systems will run for a while after the corruption, but will eventually crash when a scsi eh reset occurs and t

[PATCH 7/8] lpfc: Remove lpfc_enable_pbde as module parameter

2018-07-31 Thread James Smart
Enablement of the PBDE optimization brought out some incompatible behaviors under error scenarios. Best to disable and remove the PBDE optimization. Signed-off-by: Dick Kennedy Signed-off-by: James Smart --- drivers/scsi/lpfc/lpfc_attr.c | 12 ++-- 1 file changed, 2 insertions(+), 10 d

[PATCH 8/8] lpfc: update driver version to 12.0.0.6

2018-07-31 Thread James Smart
Update the driver version to 12.0.0.6 Signed-off-by: Dick Kennedy Signed-off-by: James Smart --- drivers/scsi/lpfc/lpfc_version.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/scsi/lpfc/lpfc_version.h b/drivers/scsi/lpfc/lpfc_version.h index a669af45fce7..501249509

[PATCH 2/8] lpfc: Fix sysfs Speed value on CNA ports

2018-07-31 Thread James Smart
CNA ports were showing speed as "unknown" even if the link is up. Add speed decoding for FCOE-based adapters Signed-off-by: Dick Kennedy Signed-off-by: James Smart --- drivers/scsi/lpfc/lpfc_attr.c | 18 ++ 1 file changed, 18 insertions(+) diff --git a/drivers/scsi/lpfc/lpfc_a

[PATCH 5/8] lpfc: Limit tracking of tgt queue depth in fast path

2018-07-31 Thread James Smart
Performance is effected when target queue depth is tracked. An atomic counter is incremented on the submission path which competes with it being decremented on the completion path. In addition multiple CPUs can simultaniously be manipulating this counter for the same ndlp. Reduce the overhead by o

[PATCH 6/8] lpfc: Correct LCB ACCept payload

2018-07-31 Thread James Smart
After memory allocation for the LCB response frame, the memory wasn't zero initialized, and not all fields are set. Thus garbage shows up in the payload. Fix by zeroing the memory at allocation. Also properly set the Capability field based on duration support. Signed-off-by: Dick Kennedy Signed-

[PATCH v2 13/16] qla2xxx: Fix stalled relogin

2018-07-31 Thread Himanshu Madhani
This patch sets and clears FCF_ASYNC_{SENT|ACTIVE} flags to prevent stalling of relogin attempt. Once flag are correctly set/cleared, relogin timer can retry relogin attempt for driver to continue login. Fixes: fa83e65885b9 ("scsi: qla2xxx: ensure async flags are reset correctly") Cc: sta...@vger.

[PATCH v2 16/16] qla2xxx: Update driver version to 10.00.00.08-k

2018-07-31 Thread Himanshu Madhani
Signed-off-by: Himanshu Madhani --- drivers/scsi/qla2xxx/qla_version.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/scsi/qla2xxx/qla_version.h b/drivers/scsi/qla2xxx/qla_version.h index 1ad7582220c3..3850b28518e5 100644 --- a/drivers/scsi/qla2xxx/qla_version.h +++

[PATCH v2 01/16] qla2xxx: Cleanup for N2N code

2018-07-31 Thread Himanshu Madhani
Signed-off-by: Himanshu Madhani --- drivers/scsi/qla2xxx/qla_init.c | 112 drivers/scsi/qla2xxx/qla_iocb.c | 25 - 2 files changed, 137 deletions(-) diff --git a/drivers/scsi/qla2xxx/qla_init.c b/drivers/scsi/qla2xxx/qla_init.c index 7b675243bd16

[PATCH v2 06/16] qla2xxx: Silent erroneous message

2018-07-31 Thread Himanshu Madhani
From: Quinn Tran Driver uses shadow pointer instead of Mirror pointer for firmware dump collection. Skip those entries for Mirror pointers for Request/Response queue from firmware dump template reading. Following messages are printed in log messages qla27xx_fwdt_entry_t268: unknown buffer 4 q

[PATCH v2 07/16] qla2xxx: Fix redundant fc_rport registration

2018-07-31 Thread Himanshu Madhani
From: Quinn Tran Prevent multiple registration with transport layer for the same remote port. Signed-off-by: Quinn Tran Signed-off-by: Himanshu Madhani --- drivers/scsi/qla2xxx/qla_init.c | 25 +++-- 1 file changed, 11 insertions(+), 14 deletions(-) diff --git a/drivers/s

[PATCH v2 00/16] qla2xxx: Updates for the driver

2018-07-31 Thread Himanshu Madhani
Hi Martin, This patch series addresses issue with N2N connection for FCP and FC-NVMe by moving login to state machine and handle various state change. Please apply this series to 4.19/scsi-queue at your earliest. Changes from v1 -> v2 o Rebased on 4.19/scsi-queue Thanks, Himanshu Himanshu Mad

[PATCH v2 14/16] qla2xxx: Save frame payload size from ICB

2018-07-31 Thread Himanshu Madhani
From: Quinn Tran Save frame payload size from init control block. This field/data is used to register with switch data base. This allow the init control block temp buf to be reuse Signed-off-by: Quinn Tran Signed-off-by: Himanshu Madhani --- drivers/scsi/qla2xxx/qla_def.h | 1 + drivers/scs

[PATCH v2 09/16] qla2xxx: Fix unintended Logout

2018-07-31 Thread Himanshu Madhani
From: Quinn Tran During normal IO, FW can return IO with 'port unavailble' status. Driver would send a LOGO to remote port for session resync. On an off chance, a PLOGI could arrive before sending the LOGO. This patch will skip sendiing LOGO, if a PLOGI just came in. Signed-off-by: Quinn Tran

[PATCH v2 15/16] qla2xxx: Migrate NVME N2N handling into state machine

2018-07-31 Thread Himanshu Madhani
From: Quinn Tran This patch fixes regression introduced for the N2N support for FC-NVMe. For FC-NVMe with N2N connection, instead of FW initiating the Login, Driver starts Login process. This patch migrate that new process from a standalone path into existing session management state machine. Wi

[PATCH v2 02/16] qla2xxx: Fix N2N link re-connect

2018-07-31 Thread Himanshu Madhani
From: Quinn Tran In case of N2N connect, when sg_regset for bus/device/host was causing driver and firmware state to go out of sync. This patch fixes this link instablity when reconnect is attempted after link flap. Signed-off-by: Quinn Tran Signed-off-by: Himanshu Madhani --- drivers/scsi/ql

[PATCH v2 04/16] qla2xxx: Add longer window for Chip reset

2018-07-31 Thread Himanshu Madhani
From: Quinn Tran The qla2x00_reset_active only cover the window of turning the chip off, add check to cover Chip on. Signed-off-by: Quinn Tran Signed-off-by: Himanshu Madhani --- drivers/scsi/qla2xxx/qla_dbg.c | 3 +++ drivers/scsi/qla2xxx/qla_tmpl.c | 4 +++- 2 files changed, 6 insertions(+

[PATCH v2 05/16] qla2xxx: Prevent SysFS access when chip is down

2018-07-31 Thread Himanshu Madhani
From: Quinn Tran Prevent user from sending commands through SysFS while FW is not running or reset is in progress. Signed-off-by: Quinn Tran Signed-off-by: Himanshu Madhani --- drivers/scsi/qla2xxx/qla_attr.c | 33 +++-- drivers/scsi/qla2xxx/qla_init.c | 2 +-

[PATCH v2 12/16] qla2xxx: Fix race between switch cmd completion and timeout

2018-07-31 Thread Himanshu Madhani
From: Quinn Tran Fix race condition between switch cmd completion and timeout timer. Timer has popped triggers command free. On IOCB completion, stale sp point was reused. Instead, an abort will be sent to FW to nudge the command out of FW, where the normal completion will take place. RIP: 0010:

[PATCH v2 08/16] qla2xxx: Fix session state stuck in Get Port DB

2018-07-31 Thread Himanshu Madhani
From: Quinn Tran This patch sets discovery state back to GNL (Get Name List) when session is stuck at GPDB (Get Port DataBase). This will allow state machine to retry login and move session state ahead in discovery. Signed-off-by: Quinn Tran Signed-off-by: Himanshu Madhani --- drivers/scsi/ql

[PATCH v2 11/16] qla2xxx: Fix Management Server NPort handle reservation logic

2018-07-31 Thread Himanshu Madhani
From: Quinn Tran After selecting the NPort handle/loop_id, set a bit in the loop_id_map to prevent others from selecting the same NPort handle. Signed-off-by: Quinn Tran Signed-off-by: Himanshu Madhani --- drivers/scsi/qla2xxx/qla_gbl.h | 1 + drivers/scsi/qla2xxx/qla_init.c | 28 ++

[PATCH v2 03/16] qla2xxx: Fix login retry count

2018-07-31 Thread Himanshu Madhani
From: Quinn Tran Login retry count was not properly decrementing, which lead to endless login retry. Signed-off-by: Quinn Tran Signed-off-by: Himanshu Madhani --- drivers/scsi/qla2xxx/qla_gs.c | 16 +++ drivers/scsi/qla2xxx/qla_init.c | 23 +++--- drivers/scsi/qla2xxx/qla_mbx.c

[PATCH v2 10/16] qla2xxx: Flush mailbox commands on chip reset

2018-07-31 Thread Himanshu Madhani
From: Quinn Tran Flush pending mailbox commands on chip reset. Wake up command that's waiting for an interrupt and wait for mailbox counters to go to zero. Signed-off-by: Quinn Tran Signed-off-by: Himanshu Madhani --- drivers/scsi/qla2xxx/qla_def.h | 5 + drivers/scsi/qla2xxx/qla_init.

Re: [PATCH] scsi: csiostor: remove automatic irq affinity assignment

2018-07-31 Thread Hannes Reinecke
On 07/31/2018 05:07 PM, Varun Prakash wrote: > If number of interrupt vectors are more than num_online_cpus() > then pci_alloc_irq_vectors_affinity() assigns cpumask based > on num_possible_cpus() to the remaining vectors because of > this interrupt does not generate for these vectors. > > This pa