From: "Martin K. Petersen" Subject: Re: [PATCH v3 0/5] target: Fix several problems related to T10-PI support Date: Mon, 27 Apr 2015 19:50:58 -0400 Message-ID: References: <1429972410-7146-1-git-send-email-akinobu.mita@gmail.com> <553CBF07.6080902@dev.mellanox.co.il> Mime-Version: 1.0 Content-Type: text/plain Cc: Akinobu Mita , target-devel@vger.kernel.org, Tim Chen , Herbert Xu , "David S. Miller" , linux-crypto@vger.kernel.org, Nicholas Bellinger , Sagi Grimberg , "Martin K. Petersen" , Christoph Hellwig , "James E.J. Bottomley" To: Sagi Grimberg Return-path: Received: from userp1040.oracle.com ([156.151.31.81]:30813 "EHLO userp1040.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752574AbbD0XvT (ORCPT ); Mon, 27 Apr 2015 19:51:19 -0400 In-Reply-To: <553CBF07.6080902@dev.mellanox.co.il> (Sagi Grimberg's message of "Sun, 26 Apr 2015 13:33:43 +0300") Sender: linux-crypto-owner@vger.kernel.org List-ID: >>>>> "Sagi" == Sagi Grimberg writes: Sagi> The problem is that the HBA does not have the write_same Sagi> functionality you introduce here, i.e. generate multiple same Sagi> protection fields for a single data block. Adding support to DIX would be problematic since it would essentially turn a WRITE SAME into a WRITE. You'd only do one block of DMA but you'd get N blocks going over the wire. In target mode it is conceivable to set up a prot sgl after parsing the CDB and let the HBA do the work. But I'm not aware of any hardware that allows that. Sagi> In this case, for WRITE_SAME, have the fabrics generate/verify a Sagi> single data block (one integrity field) like they do today, and Sagi> then the core will expand it to the correct number of sectors Sagi> using some form of sbc_dif_expand_same() Yeah. In a simple world you'd just keep overriding the ref tag in the received PI tuple. But for performance reasons you'll obviously want to do I/O in units bigger than a single block. Blindly preallocating PI to fit the entire I/O is also be problematic, however, since a block count of 0 unfortunately means "the whole disk". -- Martin K. Petersen Oracle Linux Engineering