From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932667Ab0JFHsU (ORCPT ); Wed, 6 Oct 2010 03:48:20 -0400 Received: from smtp125.sbc.mail.sp1.yahoo.com ([69.147.65.184]:44591 "HELO smtp125.sbc.mail.sp1.yahoo.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with SMTP id S932340Ab0JFHsR (ORCPT ); Wed, 6 Oct 2010 03:48:17 -0400 X-Yahoo-SMTP: fzDSGlOswBCWnIOrNw7KwwK1j9PqyNbe5PtLKiS4dDU.UNl_t6bdEZu9tTLW X-YMail-OSG: Fr_kHWoVM1kzD3raDpw9LLLZEOUXd3RnykM8RmTZ2Oaiiib dgyWlQG2v5zwbgS6qJP11osw9_e9D03X0iPL6GEi63tLEpEPyJGZbMvx.XAx xh9JRLCbQFfJ0ZUDzRaCeCDydvpQGimdUQWS9Yhz3ktcNfCNvQa0OlUxpnEr ipZGHOx80NDRpZo7ewQQefaC1Jcyzi66rHCyN.fR1eS7RUy6rl0oVjWGfVhA .quNNuZOPrJAnYg.nQM9tDQKc996vgkZiZWouUXjBAKlOWEUAMw4.gHoU2Rf nnkLU0v_bUHqZxsaB392i_nXuG1v3W_SBImyWZHK9W0a_wNyDhoZ0vMTH X-Yahoo-Newman-Property: ymail-3 Subject: Re: [RFC v2 05/21] tcm: Add ConfigFS subsystem backstore infrastructure From: "Nicholas A. Bellinger" To: FUJITA Tomonori Cc: linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org, michaelc@cs.wisc.edu, hch@lst.de, hare@suse.de, James.Bottomley@suse.de, axboe@kernel.dk, bharrosh@panasas.com, Joel Becker In-Reply-To: <20101006162018R.fujita.tomonori@lab.ntt.co.jp> References: <20101006091219Q.fujita.tomonori@lab.ntt.co.jp> <1286339442.5685.76.camel@haakon2.linux-iscsi.org> <20101006155833G.fujita.tomonori@lab.ntt.co.jp> <20101006162018R.fujita.tomonori@lab.ntt.co.jp> Content-Type: text/plain Date: Wed, 06 Oct 2010 00:43:37 -0700 Message-Id: <1286351017.5685.137.camel@haakon2.linux-iscsi.org> Mime-Version: 1.0 X-Mailer: Evolution 2.22.3.1 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 2010-10-06 at 16:25 +0900, FUJITA Tomonori wrote: > On Wed, 6 Oct 2010 16:09:26 +0900 > FUJITA Tomonori wrote: > > > On Tue, 05 Oct 2010 21:30:42 -0700 > > "Nicholas A. Bellinger" wrote: > > > > > I have been thinking about something similar that is needed for the WIP > > > TCM HW target mode drivers when a: > > > > > > mkdir -p /sys/kernel/config/target/$TCM_MOD/$LPORT_WWPN/tpgt_1 > > > > > > happens the WWPN is coming from HW. This currently looks like something > > > along the lines of the following for tcm_lpfc: > > > > > > http://git.kernel.org/?p=linux/kernel/git/nab/lio-core-2.6.git;a=blob;f=drivers/target/tcm_lpfc/tcm_lpfc_configfs.c;hb=tcm_lpfc#l227 > > > > The above link doesn't work for me so I'm not sure. > > > > But I guess that you are talking about the problem that > > tcm_lpfc_make_lport() can accept proper hardware port addresses. We > > are on the same page if so. > > > > > > > The main issue here is that the user still needs to know the $LPORT_WWPN > > > before hand (either from looking at a sticker on the card, or via > > > another method) in order to preform the initial TFO->fabric_make_wwn() > > > -> $TCM_MOD_make_wwn() operation. So what we need is a configfs attrib > > > at the top level TCM fabric group in order to see a list of the > > > available hardware ports from the specific $TCM_MOD. What I was > > > thinking for TCM HW fabric module ports would be to have something like: > > > > > > /sys/kernel/config/target/$TCM_MOD/hw_ports > > > > > > that would walk the struct pci_dev looking for fabric module specific HW > > > target mode capabilities. I assume this is what you had in mind for > > > drivers/scsi/ibmvscsi as well, yes..? > > > > Doesn't sound so. > > > > I want the driver to create necessary target directories in > > /sys/kernel/config/target/ibmvscsit/ automatically. > > In addition, I also think that /sys/kernel/config/target/$TCM_MOD > should show up automatically when I load the module. > > vine:/home/fujita# modprobe iscsi_target_mod > > Then why do I need to create iscsi directory by hand? Because configfs is driven by completely userspace syscalls. 8-) > > vine:/home/fujita# mkdir /sys/kernel/config/target/iscsi > Actually, these is an LKM autoload feature for LIO-Target and TCM_Loop currently in place when: mkdir /sys/kernel/config/target/[iscsi,loopback] occurs and propigates through target_Core_configfs.c code into target_core_register_fabric() here: http://git.kernel.org/?p=linux/kernel/git/nab/lio-core-2.6.git;a=blob;f=drivers/target/target_core_configfs.c;hb=lio-4.0#l144 Other than these two hardcoded cases (I plan to add these as new modules are merged into mainline), the userspace code is expected to: modprobe $TCM_FAB_MOD ; mkdir /sys/kernel/config/target/$FAB_MOD in order to access the top level generic fabric directory/group in target_core_fabric_configfs.c code. > > btw, 'iscsi' needs to renamed to iscsi_tcp or something like that? I was thinking here to keep the default software iSCSI LIO-Target code to use 'iscsi' and use add a seperate iSCSI HW target mode with a iscsi_ $HWNAME prefix as necessary for the existing iSCSI HW TOE cases. However there is a certain flavour of iSCSI HW target offload silicon currently in development that I am considering to integrate directly into LIO-Target code in order to function transparently with existing LIO kernel code, along with some new fabric configfs attribute knobs for tuning, debugging, etc. --nab