public inbox for linux-scsi@vger.kernel.org
 help / color / mirror / Atom feed
From: Sebastian Herbszt <herbszt@gmx.de>
To: James Smart <jsmart2021@gmail.com>
Cc: linux-scsi@vger.kernel.org, maier@linux.ibm.com, dwagner@suse.de,
	bvanassche@acm.org, Sebastian Herbszt <herbszt@gmx.de>
Subject: Re: [PATCH v2 00/32] [NEW] efct: Broadcom (Emulex) FC Target driver
Date: Sun, 29 Dec 2019 19:27:37 +0100	[thread overview]
Message-ID: <20191229192737.0000343a@gmx.de> (raw)
In-Reply-To: <20191220223723.26563-1-jsmart2021@gmail.com>

James Smart wrote:
> This patch set is a request to incorporate the new Broadcom
> (Emulex) FC target driver, efct, into the kernel source tree.
>
> The driver source has been Announced a couple of times, the last
> version on 12/18/2018. The driver has been hosted on gitlab for
> review has had contributions from the community.
>   gitlab (git@gitlab.com:jsmart/efct-Emulex_FC_Target.git)
>
> The driver integrates into the source tree at the (new)
> drivers/scsi/elx subdirectory.
>
> The driver consists of the following components:
> - A libefc_sli subdirectory: This subdirectory contains a library that
>   encapsulates common definitions and routines for an Emulex SLI-4
>   adapter.
> - A libefc subdirectory: This subdirectory contains a library of
>   common routines. Of major import is a number of routines that
>   implement a FC Discovery engine for target mode.
> - An efct subdirectory: This subdirectory contains the efct target
>   mode device driver. The driver utilizes the above librarys and
>   plugs into the SCSI LIO interfaces. The driver is SCSI only at
>   this time.
>
> The patches populate the libraries and device driver and can only
> be compiled as a complete set.
>
> This driver is completely independent from the lpfc device driver
> and there is no overlap on PCI ID's.
>
> The patches have been cut against the 5.6/scsi-queue branch.
>
> Thank you to those that have contributed to the driver in the past.
>
> Review comments welcome!
>
> -- james
>
>
> V2 modifications:
>
> Contains the following modifications based on prior review comments:
>   Indentation/Alignment/Spacing changes
>   Comments: format cleanup; removed obvious or unnecessary comments;
>     Added comments for clarity.
>   Headers use #ifndef comparing for prior inclusion
>   Cleanup structure names (remove _s suffix)
>   Encapsulate use of macro arguments
>   Refactor to remove static function declarations for static local
> routines Removed unused variables
>   Fix SLI4_INTF_VALID_MASK for 32bits
>   Ensure no BIT() use
>   Use __ffs() in page count macro
>   Reorg to move field defines out of structure definition
>   Commonize command building routines to reduce duplication
>   LIO interface:
>     Removed scsi initiator includes
>     Cleaned up interface defines
>     Removed lio WWN version attribute.
>     Expanded macros within logging macros
>     Cleaned up lio state setting macro
>     Remove __force use
>     Modularized session debugfs code so can be easily replaced.
>     Cleaned up abort task handling. Return after initiating.
>     Modularized where possible to reduce duplication
>     Convert from kthread to workqueue use
>     Remove unused macros
>   Add missing TARGET_CORE build attribute
>   Fix kbuild test robot warnings
>
> Comments not addressed:
>   Use of __packed: not believed necessary
>   Session debugfs code remains. There is not yet a common lio
>     mechanism to replace with.

There seems to be an issue with this version and also the code from
October on my setup. I am running 5.5.0-rc3 but it also happens
on earlier kernel versions.

While shutting down the target after some testing I execute

rmdir /sys/kernel/config/target/efct/10:00:00:90:fa:f0:89:ba/tpgt_0/acls/10:00:00:90:fa:f0:89:bb

but this command never returns and the shutdown script hangs.

The code from August [1] and a refactored version [2] do not exhibit
this problem.

[  245.485090] efct_TPG[0]_LUN[0] - Removed ACL for InitiatorNode: 10:00:00:90:fa:f0:89:bb Mapped LUN: 0
[  245.497691] efct_TPG[0] - Freeing ACL for efct InitiatorNode: 10:00:00:90:fa:f0:89:bb Mapped LUN: 0

[  385.687531] sysrq: Show Blocked State
[  385.687547]   task                PC stack   pid father
[  385.687610] efct:0:0        D    0  3241      2 0x80004000
[  385.687615] Call Trace:
[  385.687628]  __schedule+0x28e/0x7a0
[  385.687635]  ? try_to_del_timer_sync+0x45/0x70
[  385.687639]  ? _raw_spin_lock_irqsave+0x14/0x40
[  385.687643]  schedule+0x46/0xb0
[  385.687646]  schedule_timeout+0x118/0x2d0
[  385.687650]  ? __next_timer_interrupt+0xb0/0xb0
[  385.687653]  wait_for_completion_timeout+0x87/0xf0
[  385.687657]  ? wake_up_q+0x90/0x90
[  385.687682]  efct_intr_thread+0x5a/0xa0 [efct]
[  385.687695]  ? efct_device_detach+0x110/0x110 [efct]
[  385.687700]  kthread+0xdc/0x110
[  385.687713]  ? efct_device_detach+0x110/0x110 [efct]
[  385.687716]  ? kthread_park+0xa0/0xa0
[  385.687720]  ret_from_fork+0x2e/0x40
[  385.687726] rmdir           D    0  3368   3365 0x00000000
[  385.687730] Call Trace:
[  385.687735]  __schedule+0x28e/0x7a0
[  385.687739]  schedule+0x46/0xb0
[  385.687742]  schedule_timeout+0x1bd/0x2d0
[  385.687762]  ? efct_lio_close_session+0x3e/0xd0 [efct]
[  385.687780]  ? efct_lio_close_session+0x3e/0xd0 [efct]
[  385.687783]  ? wait_for_completion+0x2a/0xe0
[  385.687786]  wait_for_completion+0x8f/0xe0
[  385.687789]  ? wake_up_q+0x90/0x90
[  385.687820]  core_tpg_del_initiator_node_acl+0x73/0x100 [target_core_mod]
[  385.687827]  ? config_item_put.part.0+0x57/0xe0 [configfs]
[  385.687845]  target_fabric_nacl_base_release+0x20/0x30 [target_core_mod]
[  385.687851]  config_item_put.part.0+0x78/0xe0 [configfs]
[  385.687856]  config_item_put+0x11/0x20 [configfs]
[  385.687861]  configfs_rmdir+0x299/0x300 [configfs]
[  385.687866]  vfs_rmdir+0x6a/0x150
[  385.687869]  do_rmdir+0x16d/0x1a0
[  385.687873]  sys_rmdir+0x15/0x20
[  385.687876]  do_fast_syscall_32+0x87/0x280
[  385.687880]  entry_SYSENTER_32+0xaa/0x102
[  385.687884] EIP: 0xb7eebb89
[  385.687888] Code: ff 00 06 fc ff 30 06 fc ff 60 06 fc ff 90 06 fc ff d0 06 fc ff 00 07 fc ff 30 07 fc ff 70 07 fc ff 15 06 fc ff 35 06 fc ff 55 <06> fc ff 75 06 fc ff 12 06 fc ff 32 06 fc ff 52 06 fc ff 72 06 fc
[  385.687891] EAX: ffffffda EBX: bf9ea909 ECX: 00000000 EDX: bf9ea909
[  385.687893] ESI: bf9e9114 EDI: 00000002 EBP: bf9e9078 ESP: bf9e901c
[  385.687895] DS: 007b ES: 007b FS: 0000 GS: 0033 SS: 007b EFLAGS: 00000292

[1]
https://repo.or.cz/efct-Emulex_FC_Target/sherbszt.git/shortlog/refs/heads/v2-20190804
[2]
https://repo.or.cz/efct-Emulex_FC_Target/sherbszt.git/shortlog/refs/heads/v2-20191125

Sebastian

      parent reply	other threads:[~2019-12-29 18:27 UTC|newest]

Thread overview: 77+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-12-20 22:36 [PATCH v2 00/32] [NEW] efct: Broadcom (Emulex) FC Target driver James Smart
2019-12-20 22:36 ` [PATCH v2 01/32] elx: libefc_sli: SLI-4 register offsets and field definitions James Smart
2020-01-08  7:11   ` Hannes Reinecke
2020-01-09  0:59     ` James Smart
2019-12-20 22:36 ` [PATCH v2 02/32] elx: libefc_sli: SLI Descriptors and Queue entries James Smart
2020-01-08  7:24   ` Hannes Reinecke
2020-01-09  1:00     ` James Smart
2019-12-20 22:36 ` [PATCH v2 03/32] elx: libefc_sli: Data structures and defines for mbox commands James Smart
2020-01-08  7:32   ` Hannes Reinecke
2020-01-09  1:03     ` James Smart
2019-12-20 22:36 ` [PATCH v2 04/32] elx: libefc_sli: queue create/destroy/parse routines James Smart
2020-01-08  7:45   ` Hannes Reinecke
2020-01-09  1:04     ` James Smart
2019-12-20 22:36 ` [PATCH v2 05/32] elx: libefc_sli: Populate and post different WQEs James Smart
2020-01-08  7:54   ` Hannes Reinecke
2020-01-09  1:04     ` James Smart
2019-12-20 22:36 ` [PATCH v2 06/32] elx: libefc_sli: bmbx routines and SLI config commands James Smart
2020-01-08  8:05   ` Hannes Reinecke
2019-12-20 22:36 ` [PATCH v2 07/32] elx: libefc_sli: APIs to setup SLI library James Smart
2020-01-08  8:22   ` Hannes Reinecke
2020-01-09  1:29     ` James Smart
2019-12-20 22:36 ` [PATCH v2 08/32] elx: libefc: Generic state machine framework James Smart
2020-01-09  7:05   ` Hannes Reinecke
2019-12-20 22:37 ` [PATCH v2 09/32] elx: libefc: Emulex FC discovery library APIs and definitions James Smart
2020-01-09  7:16   ` Hannes Reinecke
2019-12-20 22:37 ` [PATCH v2 10/32] elx: libefc: FC Domain state machine interfaces James Smart
2020-01-09  7:27   ` Hannes Reinecke
2019-12-20 22:37 ` [PATCH v2 11/32] elx: libefc: SLI and FC PORT " James Smart
2020-01-09  7:34   ` Hannes Reinecke
2019-12-20 22:37 ` [PATCH v2 12/32] elx: libefc: Remote node " James Smart
2020-01-09  8:31   ` Hannes Reinecke
2020-01-09  9:57   ` Daniel Wagner
2019-12-20 22:37 ` [PATCH v2 13/32] elx: libefc: Fabric " James Smart
2020-01-09  8:34   ` Hannes Reinecke
2019-12-20 22:37 ` [PATCH v2 14/32] elx: libefc: FC node ELS and state handling James Smart
2020-01-09  8:39   ` Hannes Reinecke
2019-12-20 22:37 ` [PATCH v2 15/32] elx: efct: Data structures and defines for hw operations James Smart
2020-01-09  8:41   ` Hannes Reinecke
2019-12-20 22:37 ` [PATCH v2 16/32] elx: efct: Driver initialization routines James Smart
2020-01-09  9:01   ` Hannes Reinecke
2019-12-20 22:37 ` [PATCH v2 17/32] elx: efct: Hardware queues creation and deletion James Smart
2020-01-09  9:10   ` Hannes Reinecke
2019-12-20 22:37 ` [PATCH v2 18/32] elx: efct: RQ buffer, memory pool allocation and deallocation APIs James Smart
2020-01-09  9:13   ` Hannes Reinecke
2019-12-20 22:37 ` [PATCH v2 19/32] elx: efct: Hardware IO and SGL initialization James Smart
2020-01-09  9:22   ` Hannes Reinecke
2019-12-20 22:37 ` [PATCH v2 20/32] elx: efct: Hardware queues processing James Smart
2020-01-09  9:24   ` Hannes Reinecke
2019-12-20 22:37 ` [PATCH v2 21/32] elx: efct: Unsolicited FC frame processing routines James Smart
2020-01-09  9:26   ` Hannes Reinecke
2019-12-20 22:37 ` [PATCH v2 22/32] elx: efct: Extended link Service IO handling James Smart
2020-01-09  9:38   ` Hannes Reinecke
2019-12-20 22:37 ` [PATCH v2 23/32] elx: efct: SCSI IO handling routines James Smart
2020-01-09  9:41   ` Hannes Reinecke
2019-12-20 22:37 ` [PATCH v2 24/32] elx: efct: LIO backend interface routines James Smart
2020-01-09  3:56   ` Bart Van Assche
2019-12-20 22:37 ` [PATCH v2 25/32] elx: efct: Hardware IO submission routines James Smart
2020-01-09  9:52   ` Hannes Reinecke
2019-12-20 22:37 ` [PATCH v2 26/32] elx: efct: link statistics and SFP data James Smart
2020-01-09 10:12   ` Hannes Reinecke
2019-12-20 22:37 ` [PATCH v2 27/32] elx: efct: xport and hardware teardown routines James Smart
2020-01-09 10:14   ` Hannes Reinecke
2019-12-20 22:37 ` [PATCH v2 28/32] elx: efct: IO timeout handling routines James Smart
2020-01-09 11:27   ` Hannes Reinecke
2019-12-20 22:37 ` [PATCH v2 29/32] elx: efct: Firmware update, async link processing James Smart
2020-01-09 11:45   ` Hannes Reinecke
2019-12-20 22:37 ` [PATCH v2 30/32] elx: efct: scsi_transport_fc host interface support James Smart
2020-01-09 11:46   ` Hannes Reinecke
2019-12-20 22:37 ` [PATCH v2 31/32] elx: efct: Add Makefile and Kconfig for efct driver James Smart
2019-12-20 23:17   ` Randy Dunlap
2020-01-09 11:47   ` Hannes Reinecke
2019-12-20 22:37 ` [PATCH v2 32/32] elx: efct: Tie into kernel Kconfig and build process James Smart
2019-12-24  7:45   ` kbuild test robot
2019-12-24 21:01   ` Nathan Chancellor
2019-12-25 16:09     ` James Smart
2020-01-09 11:47   ` Hannes Reinecke
2019-12-29 18:27 ` Sebastian Herbszt [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20191229192737.0000343a@gmx.de \
    --to=herbszt@gmx.de \
    --cc=bvanassche@acm.org \
    --cc=dwagner@suse.de \
    --cc=jsmart2021@gmail.com \
    --cc=linux-scsi@vger.kernel.org \
    --cc=maier@linux.ibm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox