From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933959Ab0HXXSk (ORCPT ); Tue, 24 Aug 2010 19:18:40 -0400 Received: from smtp101.sbc.mail.gq1.yahoo.com ([67.195.15.60]:36136 "HELO smtp101.sbc.mail.gq1.yahoo.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with SMTP id S933948Ab0HXXSb (ORCPT ); Tue, 24 Aug 2010 19:18:31 -0400 X-Yahoo-SMTP: fzDSGlOswBCWnIOrNw7KwwK1j9PqyNbe5PtLKiS4dDU.UNl_t6bdEZu9tTLW X-YMail-OSG: I.piikYVM1m1Q069Fx1NavJklZv_qBxFm8g8jcAdlEpnL12 lUZc3u.0mv71IFefkgUER3v8HqUzMkL5Oo1v1rOI7FWPHvvS1LNETqlUDZfV VOkfdkfzSfNp9F_ciWFVOJHIfHZen4wkCTDidXAWRW_5TPDl70D3h4Miq3y5 8zxf6SULnVbkcHU2sq8NWYi8fMRT28lGEq5v.cZxspjo8.Hc.eVYrDr2vk9v 2qo0z.QF5NBvv5DhEqzhauXB9joPf55OWkgZfyM0Hp5I3DNr9AOrCqvYvpty 2dgivI1WNc6nYhSifw0V3IZaNBCwyXYdxxbBbwsLp_1QraDLuZgZALCT4 X-Yahoo-Newman-Property: ymail-3 Subject: Re: tcm: Add Documentation/target/tcm_mod_builder.py script and mini-HOWTO From: "Nicholas A. Bellinger" To: linux-scsi Cc: LKML , Christoph Hellwig , FUJITA Tomonori , Mike Christie , Hannes Reinecke , James Bottomley , Jens Axboe , Richard Sharpe , Joel Becker In-Reply-To: <1282683207.32007.40.camel@haakon2.linux-iscsi.org> References: <1282683207.32007.40.camel@haakon2.linux-iscsi.org> Content-Type: text/plain Date: Tue, 24 Aug 2010 16:14:42 -0700 Message-Id: <1282691682.32007.71.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 Tue, 2010-08-24 at 13:53 -0700, Nicholas A. Bellinger wrote: > Greetings all, > > The initial commit for the new tcm_mod_builder.py script has been pushed > into lio-core-2.6.git/lio-4.0! Included is a brief mini-HOWTO as to how > the TCM fabric module generation logic actually functions, and what is > currently supported. I thought instead of spamming the kernel lists > with 1K LOC of python for actually generating *new* TCM kernel fabric > modules, it might be easier to post the HOWTO to the list and a gitweb > URL of the script itself for those interested parties here: > > http://www.kernel.org/pub/linux/kernel/people/nab/Documentation/target/tcm_mod_builder.py > > So after a single day of python coding things are working remarkably > well, so far I am able to generate functioning ConfigFS skeletons with > proper target_core_fabric_lib.c Transport / WWPN handlers, eg: > multi-fabric transitional SPC-3 PR and ALUA (configfs attributes > included) that work right out of the box. > > There are are a list of remaining TODO items at the bottom of the doc, > but I hope that people will actually give this script a shot and see for > themselves how easy the generation of new configfs code for TCM fabric > modules can really be! > > Comments are welcome, Enjoy! > Just a quick followup, the functional kernel source generated by the tcm_mod_builder.py mini-HOWTO example can be found here: http://www.kernel.org/pub/linux/kernel/people/nab/tcm_nab5000/ This example is currently using 'main():proto_ident=iSCSI' to generate iSCSI specific structure member naming, and includes the necessary $PROTO_IDENT dependent code from drivers/target/target_core_fabric_lib.c into the newly generated TCM fabric module in order to provide a running TransportID / WWPN model in ConfigFS for high level logic from drivers/target/target_core_pr.c and friends to 'just work'. Comments are welcome, thanks! --nab