From mboxrd@z Thu Jan 1 00:00:00 1970 From: sagi grimberg Subject: Re: [PATCH 7/9] target: Enable WRITE_INSERT emulation in target_execute_cmd Date: Mon, 7 Apr 2014 11:13:50 +0300 Message-ID: <53425E3E.3080509@mellanox.com> References: <1396517753-23546-1-git-send-email-nab@daterainc.com> <1396517753-23546-8-git-send-email-nab@daterainc.com> <5342562F.1070706@dev.mellanox.co.il> <1396858271.19888.9.camel@haakon3.risingtidesystems.com> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1396858271.19888.9.camel@haakon3.risingtidesystems.com> Sender: target-devel-owner@vger.kernel.org To: "Nicholas A. Bellinger" , Sagi Grimberg Cc: "Nicholas A. Bellinger" , target-devel , linux-scsi , "Martin K. Petersen" , Or Gerlitz , Quinn Tran , Giridhar Malavali List-Id: linux-scsi@vger.kernel.org On 4/7/2014 11:11 AM, Nicholas A. Bellinger wrote: >> Looks good to me. >> >> Reviewed-by: Sagi Grimberg >> >> This is useless though without the code setting this prot_op in >> sbc_set_prot_op_checks()... > Not sure I follow.. sbc_set_prot_op_checks() is already setting > TARGET_PROT_DOUT_INSERT when no protect field in the WRITE CDB has been > set, eg: > > static int > sbc_set_prot_op_checks(u8 protect, enum target_prot_type prot_type, > bool is_write, struct se_cmd *cmd) > { > if (is_write) { > cmd->prot_op = protect ? TARGET_PROT_DOUT_PASS : > TARGET_PROT_DOUT_INSERT; > > > } > } > > Which in-turn is what causes this code to invoke sbc_dif_write_insert > (now sbc_dif_generate) when the backend supports PI, and the fabric > itself does not support WRITE_INSERT hw offload. pphh, I confused this with DOUT_STRIP/DIN_INSERT. You can discard. Sagi.