Hi Nick,
Quoting "Nicholas A. Bellinger" <nab@xxxxxxxxxxxxxxx>:
Hi Bryant,
(Btw, your response didn't make it to target-devel)
Yes, I figured out the problem, I can't use my normal IBM email
address since it will always contain some HTML, thus I got a new
one bryantly@xxxxxxxxxxxxxxxxxx, which should work now.
On Thu, 2016-03-10 at 12:21 -0600, Bryant G Ly wrote:
Hello Nick,
"Nicholas A. Bellinger" <nab@xxxxxxxxxxxxxxx> wrote on 03/07/2016
07:39:34 PM:
> From: "Nicholas A. Bellinger" <nab@xxxxxxxxxxxxxxx>
> To: Bryant G Ly/Rochester/IBM@IBMUS
> Cc: target-devel@xxxxxxxxxxxxxxx
> Date: 03/07/2016 07:39 PM
> Subject: Re: Reviving Ibmvscsi target/Questions
>
> Hey Bryant,
>
> Any updates wrt getting your WIP code posted in a public repo..?
>
Yes, it finally has been approved for me to post code on a public
github.
The link is: github.com/powervm/ibmvscsis
Great.
I noticed https://github.com/powervm/ibmvscsis is stand-lone files, and
not a clone of upstream linux.git.
So you'll want to go ahead and create a fork from:
https://github.com/torvalds/linux
and then use target-pending/for-next (eg: the target code that will
become v4.6-rc1) as a starting point for further ibmvscsis development.
Also, please let me know if you have any questions wrt to git.
I will make these changes, but to clarify do you want us to carry a full
kernel repo upstream or can we just carry the target-pending?
> Are there any code items blocking you from making forward
progress..?
>
Nothing blocking, but I'd like to hear your thoughts on porting libsrp
to use target.
So after a initial grok on your WIP code, here is a few quick comments:
https://github.com/powervm/ibmvscsis/blob/master/drivers/scsi/ibmvscsi/ibmvscsis.c#L406
transport_init_session_tags() should be passing TARGET_PROT_NORMAL, as
AFAIK IBM vscsi doesn't support T10 protection information (PI).
https://github.com/powervm/ibmvscsis/blob/master/drivers/scsi/ibmvscsi/ibmvscsis.c#L424
You can drop cmd->sgl, cmd->upages and cmd->prot_sgl. Both are related
to vhost-scsi, and aren't used by ibmvscsis.
https://github.com/powervm/ibmvscsis/blob/master/drivers/scsi/ibmvscsi/ibmvscsis.c#L630
Just use SCSI_PROTOCOL_SRP by default, and drop the extra
tport->tport_proto_id related stuff.
https://github.com/powervm/ibmvscsis/blob/master/drivers/scsi/ibmvscsi/ibmvscsis.c#L1109
For tcm_queuecommand() dispatch code, it should be using modern
target_submit_cmd() for dispatching incoming SCSI CDBs + payloads into
target-core.
https://github.com/powervm/ibmvscsis/blob/master/drivers/scsi/ibmvscsi/ibmvscsis.c#L1194
For the original internal ibmvscsis INQUIRY + MODE_SENSE, and
REPORT_LUNS emulation, it would be useful to see if we can (at least)
make REPORT_LUNs use common code.
This could be done easily in spc_emulate_report_luns(), with a ibmvscsis
provided callback via target_core_fabric_ops using the existing
make_lun() encoding format.
https://github.com/powervm/ibmvscsis/blob/master/drivers/scsi/ibmvscsi/ibmvscsis.c#L1980
Since ibmviscsis uses a single internal se_session (eg: SCSI I_T Nexus)
per /sys/kernel/config/target/ibmvscsis/$WWN/$TPGT/ endpoint, there is
no need for an extra non-zero .node_acl_size.
So let's get your code into a proper linux.git based repo, and we can
continue the discussion to get up and running from there.
--
To unsubscribe from this list: send the line "unsubscribe target-devel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
I will also make these code changes. Thanks for doing a quick grok!
-Bryant
--
To unsubscribe from this list: send the line "unsubscribe target-devel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html