[PATCH] nvme: add DIX support for nvme-rdma

Chao Leng lengchao at huawei.com
Tue Aug 30 05:18:19 PDT 2022



On 2022/8/29 23:10, Keith Busch wrote:
> On Mon, Aug 29, 2022 at 05:56:39PM +0300, Max Gurtovoy wrote:
>> On 8/29/2022 4:16 PM, Chao Leng wrote:
>>> On 2022/8/29 18:43, Max Gurtovoy wrote:
>>>> On 8/29/2022 11:12 AM, Chao Leng wrote:
>>>>
>>>> You can mention that also in iser, if supported, the default is to
>>>> use IP_CHECKSUM for DIX and not CRC.
>>> According to DIX define:DIX = IP_CHECKSUM.
>>> To reduce CPU utilization, the end-to-end DIF for SCSI protocols is
>>> DIX-DIF when supported by hardware.
>>
>>  From what I re-call DIX was protection between host_buff -> host_device and
>> DIF was protection between host_device -> target_device.
>>
>> If now its defined as DIX == IP_CHECKSUM and DIF == CRC please mention it
>> somehow in the commit message.
> 
> Where is this coming from? The NVMe command set spec says this is the
> difference between DIF and DIX:
> 
>    The primary difference between these two mechanisms is the location of the
>    protection information. In DIF, the protection information is contiguous with
>    the logical block data and creates an extended logical block, while in DIX,
>    the protection information is stored in a separate buffer.The patch do not conflict with nvme spec. DIX just be used
between host_buff -> host HBA. host HBA->target still use DIF.
> 
> Regarding CRC vs IP Checksum, the spec also says this:
> 
>    In addition to a CRC-16, DIX also specifies an optional IP checksum that is
>    not supported by the NVM Express interface.
NVMe do not support DIX, this should refer specifically to PCI,
but NVMe over fabrics can support DIX.
The NVMe base spec says:
Additionally, support has been added for many Enterprise capabilities like
end-to-end data protection (compatible with SCSI Protection Information,
commonly known as T10 DIF, and SNIA DIX standards), enhanced error reporting,
and virtualization.
> 
> So DIX support doesn't imply IP checksum. Even if the host device can support
> it, the target device can not report it uses that guard type.
DIX just be used between host_buff -> host HBA. The target do not care.
> .
> 



More information about the Linux-nvme mailing list