Received: by 10.213.65.68 with SMTP id h4csp943691imn; Wed, 4 Apr 2018 09:49:18 -0700 (PDT) X-Google-Smtp-Source: AIpwx4/0ezrlecMGsRIFAx+s0p48OKvL3Ltct79g0AMdVO6/d+hNVmX9qoxIsGcxkfP11whsMERp X-Received: by 10.99.60.89 with SMTP id i25mr5197353pgn.208.1522860558494; Wed, 04 Apr 2018 09:49:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1522860558; cv=none; d=google.com; s=arc-20160816; b=ggViWGAXwoLn4WoA0BOVBy16px9PLvs6f2mG5iSvX8gKyun0Ze5RocBTG2Laq7nuHR h1KP6VIsfza5KbGpwN0cXN/toaNnSU9GH8oeg5KEzcRdhljlFWSL6tovKPhB9P0jFnaS hbpKSeL4iqReRBUiOfcycjSQMuqHG5hEXarUc7sNDJ70Qil6S0hXcYwrFsidjVcz87Ns OJOvlHl3N6EnKr+kWGDLT3F7gEq6ShRZPpWqdlSkIkb4Bof1h6AJKfteLJNw/ZcuOkNX dxMDowSvnaOJJiWAiMXghu041aKz6cylf9b+Tr3CALc1ujr0YgtPDNhuW4xX+b/qS2Fn 7/RA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:subject:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:arc-authentication-results; bh=IpMPjIgQZa6fgzVon10ERbForpY/BfreVC52BCs1hJs=; b=CusBdpy5ut9w/af6nmoF4sbSnV5QpQexrbb7xowK/Iz9UTguPZMSeoZTYUBW/smj5V Wiw3cI6NDaxDT1njIQGhm0XPm/bRHM38iGhin4A4ACzW1LeOglFQWyJkX4uvVPkpalmD b5vsDQgE1/1umGcmBsEbjFy8T3DOw2XU+E207/59CL7W9F63C+5ueOPBWG4l0+RFKqs3 ZQpXuQee5zFg2bYZcLKJYYH2zXhCkSaYfJY+OR10b7txaPgzG4OUgPfXnCa1QmM71IxA Z6mPZSgtCOCdMe3U/K4nvE1+q5P499dT2gwl/dWS90qCKei4tk1IjEZ5XtlVrA8BmAtB +zCg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id s1-v6si3343272plr.109.2018.04.04.09.49.04; Wed, 04 Apr 2018 09:49:18 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752283AbeDDQri (ORCPT + 99 others); Wed, 4 Apr 2018 12:47:38 -0400 Received: from ale.deltatee.com ([207.54.116.67]:53272 "EHLO ale.deltatee.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751896AbeDDQrh (ORCPT ); Wed, 4 Apr 2018 12:47:37 -0400 Received: from guinness.priv.deltatee.com ([172.16.1.162]) by ale.deltatee.com with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.89) (envelope-from ) id 1f3lZM-0001zQ-Iq; Wed, 04 Apr 2018 10:47:33 -0600 To: Sagi Grimberg , linux-kernel@vger.kernel.org, linux-nvme@lists.infradead.org Cc: Christoph Hellwig , James Smart References: <20180329160721.4691-1-logang@deltatee.com> <20180329160721.4691-3-logang@deltatee.com> <2fbc3260-6682-f789-9500-2961293ff3b4@grimberg.me> From: Logan Gunthorpe Message-ID: <17515a8d-df59-9bb7-0d51-a5134858db0a@deltatee.com> Date: Wed, 4 Apr 2018 10:47:26 -0600 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0 MIME-Version: 1.0 In-Reply-To: <2fbc3260-6682-f789-9500-2961293ff3b4@grimberg.me> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-SA-Exim-Connect-IP: 172.16.1.162 X-SA-Exim-Rcpt-To: james.smart@broadcom.com, hch@lst.de, linux-nvme@lists.infradead.org, linux-kernel@vger.kernel.org, sagi@grimberg.me X-SA-Exim-Mail-From: logang@deltatee.com X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on ale.deltatee.com X-Spam-Level: X-Spam-Status: No, score=-8.7 required=5.0 tests=ALL_TRUSTED,BAYES_00, GREYLIST_ISWHITE,MYRULES_FREE,T_RP_MATCHES_RCVD autolearn=ham autolearn_force=no version=3.4.1 Subject: Re: [PATCH 2/4] nvmet-rdma: Use new SGL alloc/free helper for requests X-SA-Exim-Version: 4.2.1 (built Tue, 02 Aug 2016 21:08:31 +0000) X-SA-Exim-Scanned: Yes (on ale.deltatee.com) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 4/4/2018 6:43 AM, Sagi Grimberg wrote: > IIRC, this might result in nvmet-rdma executing data-transfer even > for failed requests in some error cases. I'm not sure this is the > only case, but have you tested what happens in error cases? That's why I set transfer_len to zero when we exit this function on error (see the error_out label): > +error_out: > + rsp->req.transfer_len = 0; > + return NVME_SC_INTERNAL; I haven't tested the error path, but I can. Is it sufficient to just change the code to create an error or do you know of a better way to test this? Thanks, Logan