[Ips] SCSI inquire command & iscsi wrapping

folkert <folkert@vanheusden.com> Wed, 02 February 2011 14:10 UTC

Return-Path: <folkert@vanheusden.com>
X-Original-To: ips@core3.amsl.com
Delivered-To: ips@core3.amsl.com
Received: from localhost (localhost [127.0.0.1]) by core3.amsl.com (Postfix) with ESMTP id 0C3BB3A6BBF for <ips@core3.amsl.com>; Wed, 2 Feb 2011 06:10:30 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.999
X-Spam-Level:
X-Spam-Status: No, score=-1.999 tagged_above=-999 required=5 tests=[BAYES_00=-2.599, J_CHICKENPOX_31=0.6]
Received: from mail.ietf.org ([64.170.98.32]) by localhost (core3.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id hY6VWA5wAvqM for <ips@core3.amsl.com>; Wed, 2 Feb 2011 06:10:28 -0800 (PST)
Received: from keetweej.vanheusden.com (tunnel947.ipv6.xs4all.nl [IPv6:2001:888:10:3b3::2]) by core3.amsl.com (Postfix) with ESMTP id 5B5E43A6CD2 for <ips@ietf.org>; Wed, 2 Feb 2011 06:10:26 -0800 (PST)
Received: from belle.intranet.vanheusden.com (belle.intranet.vanheusden.com [192.168.64.100]) by keetweej.vanheusden.com (Postfix) with ESMTP id 02DD7162E03 for <ips@ietf.org>; Wed, 2 Feb 2011 15:13:41 +0100 (CET)
Received: by belle.intranet.vanheusden.com (Postfix, from userid 1000) id D2AC993364; Wed, 2 Feb 2011 15:13:40 +0100 (CET)
Date: Wed, 2 Feb 2011 15:13:40 +0100
From: folkert <folkert@vanheusden.com>
To: ips@ietf.org
Message-ID: <20110202141339.GV19602@belle.intranet.vanheusden.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Organization: www.unixexpert.nl
X-Chameleon-Return-To: folkert@vanheusden.com
X-Xfmail-Return-To: folkert@vanheusden.com
X-Phonenumber: +31-6-41278122
X-URL: http://www.vanheusden.com/
X-PGP-KeyID: 1F28D8AE
X-GPG-fingerprint: AC89 09CE 41F2 00B4 FCF2 B174 3019 0E8C 1F28 D8AE
X-Key: http://pgp.surfnet.nl:11371/pks/lookup?op=get&search=0x1F28D8AE
Read-Receipt-To: <folkert@vanheusden.com>
Reply-By: Sat Jan 15 11:07:06 CET 2011
X-Message-Flag: www.unixexpert.nl
User-Agent: Mutt/1.5.18 (2008-05-17)
Subject: [Ips] SCSI inquire command & iscsi wrapping
X-BeenThere: ips@ietf.org
X-Mailman-Version: 2.1.9
Precedence: list
List-Id: IP Storage <ips.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/listinfo/ips>, <mailto:ips-request@ietf.org?subject=unsubscribe>
List-Archive: <http://www.ietf.org/mail-archive/web/ips>
List-Post: <mailto:ips@ietf.org>
List-Help: <mailto:ips-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/ips>, <mailto:ips-request@ietf.org?subject=subscribe>
X-List-Received-Date: Wed, 02 Feb 2011 14:10:30 -0000

Hi,

I'm struggling to get scsi 0x12 command working in my iSCSI target
(which will be an opensource java iSCSI target by the way).

I follow the procedure as described at
http://en.wikipedia.org/wiki/SCSI_Inquiry_Command

If I understand it correctly this is what happens:
Now, I receive an PDU with opcode 0x01 (SCSI command). In it, there's
the CDB with byte 3 and 4 telling how much extra data (apart from the
regular 16 CDB in the PDU) may be send by the target.
So as a target, let's say cdb byte 3+4 tell me i can send 'x' bytes.
So in the CDB space in the PDU I put a CDB with opcode 12 and byte 3+4
telling how many bytes I want to send.
Then, of the next 36 bytes I would want to send (I don't have any vendor
specific data), I can add 'x' bytes after the PDU with byte 4 set to
MIN(x, 36) - 4.

My question now is: am I right?


Folkert van Heusden

-- 
----------------------------------------------------------------------
Phone: +31-6-41278122, PGP-key: 1F28D8AE, www.vanheusden.com