Re: [RFC PATCHv2 1/2] target: Version 2 of TCMU ABI

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Andy,

You forgot to initialize the new fields of cmd_entry.req, namely
iov_bidi_cnt and iov_dif_cnt. Both fields should be initialized to zero.
Other than that (and the comments made by Nicholas), this patch series
looks good to me.

Cheers,
Ilias


On Tue, Apr 14, 2015 at 05:30PM, Andy Grover wrote:
> The initial version of TCMU (in 3.18) does not properly handle
> bidirectional SCSI commands -- those with both an in and out buffer. In
> looking to fix this it also became clear that TCMU's support for adding
> new types of entries (opcodes) to the command ring was broken. We need
> to fix this now, so that future issues can be handled properly by adding
> new opcodes.
> 
> We make the most of this ABI break by enabling bidi cmd handling within
> TCMP_OP_CMD opcode. Add an iov_bidi_cnt field to tcmu_cmd_entry.req.
> This enables TCMU to describe bidi commands, but further kernel work is
> needed for full bidi support.
> 
> Enlarge tcmu_cmd_entry_hdr by 32 bits by pulling in cmd_id and __pad1. Turn
> __pad1 into two 8 bit flags fields, for kernel-set and userspace-set flags,
> "kflags" and "uflags" respectively.
> 
> Update version fields so userspace can tell the interface is changed.
> 
> Update tcmu-design.txt with details of how new stuff works:
> - Specify an additional requirement for userspace to set UNKNOWN_OP
>   (bit 0) in hdr.uflags for unknown/unhandled opcodes.
> - Define how Data-In and Data-Out fields are described in req.iov[]
> 
> Changed in v2:
> - Change name of SKIPPED bit to UNKNOWN bit
> - PAD op does not set the bit any more
> - Change len_op helper functions to take just len_op, not the whole struct
> - Change version to 2 in missed spots, and use defines
> - Add 16 unused bytes to cmd_entry.req, in case additional SAM cmd
>   parameters need to be included
> - Add iov_dif_cnt field to specify buffers used for DIF info in iov[]
> - Rearrange fields to naturally align cdb_off
> - Handle if userspace sets UNKNOWN_OP by indicating failure of the cmd
> - Wrap some overly long UPDATE_HEAD lines
> 
> Signed-off-by: Andy Grover <agrover@xxxxxxxxxx>

Attachment: signature.asc
Description: Digital signature


[Index of Archives]     [Linux SCSI]     [Kernel Newbies]     [Linux SCSI Target Infrastructure]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Device Mapper]

  Powered by Linux