Re: tcm: Add Documentation/target/tcm_mod_builder.py script andmini-HOWTO

From: Nicholas A. Bellinger
Date: Tue Aug 24 2010 - 19:18:43 EST


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


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/