From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 03787C77B60 for ; Sun, 30 Apr 2023 14:38:04 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229565AbjD3OiE (ORCPT ); Sun, 30 Apr 2023 10:38:04 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47644 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229452AbjD3OiC (ORCPT ); Sun, 30 Apr 2023 10:38:02 -0400 Received: from mail-wm1-f48.google.com (mail-wm1-f48.google.com [209.85.128.48]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id F1996101; Sun, 30 Apr 2023 07:38:01 -0700 (PDT) Received: by mail-wm1-f48.google.com with SMTP id 5b1f17b1804b1-3f1738d0d4cso8668525e9.1; Sun, 30 Apr 2023 07:38:01 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1682865480; x=1685457480; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=pjAcu4IcSQRiDt8dUv43LgZPu6LvertkuJ0LwpP92lY=; b=AwXeeTCvJBDGZrjiIWMTewLQ4Yw6eDrYUWQdc+8D4Y0Zs0pFLk5pZ9KqT2bwNn1vbB 0hLxi+2mKxFbi7bgm+HiNptCqecFwVSJFkLDKoDaUxImXjo/HjEiSK15tPgaskf85FL9 s/8KRzBoJjaM9mkLQ+rW1k1lIj/jOAPdo9IJ3ORuFGlC2jwnadh9wFM3MmFMERPlNFW3 6dAeXzhWDjQIbSWNeEMNprJnYYwiF2F6O9qBsaLhqzhKEBTGAATOrsviacSOC0GEb3cw tDU9AzPyPbxlB5sh7gV1DLU+jzSPVg0Ldei7svgmYQ7LUWJUO2RAjewgQUyH/zpVt1Se 0nag== X-Gm-Message-State: AC+VfDzDafdcBe5M1LmwXg8cBgVU5+dYUyNCvE5YWXykfliFESTidgpF FvUY+qYcgw1xYulqVbVbqnc= X-Google-Smtp-Source: ACHHUZ5MAoJuX2opkQ1iG5lqU3GmlotVF/8I1OK08Oa68jNWUln3SI3TGJBlTblGXSKtA1vu+wOMHA== X-Received: by 2002:a05:600c:b45:b0:3f2:5922:d955 with SMTP id k5-20020a05600c0b4500b003f25922d955mr9291474wmr.8.1682865480436; Sun, 30 Apr 2023 07:38:00 -0700 (PDT) Received: from gmail.com (fwdproxy-cln-013.fbsv.net. [2a03:2880:31ff:d::face:b00c]) by smtp.gmail.com with ESMTPSA id j32-20020a05600c1c2000b003f173987ec2sm33667582wms.22.2023.04.30.07.37.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 30 Apr 2023 07:37:59 -0700 (PDT) Date: Sun, 30 Apr 2023 07:37:58 -0700 From: Breno Leitao To: Christoph Hellwig Cc: io-uring@vger.kernel.org, linux-nvme@lists.infradead.org, asml.silence@gmail.com, axboe@kernel.dk, leit@fb.com, linux-kernel@vger.kernel.org, linux-block@vger.kernel.org, sagi@grimberg.me, kbusch@kernel.org, ming.lei@redhat.com Subject: Re: [PATCH 1/2] io_uring: Pass whole sqe to commands Message-ID: References: <20230419102930.2979231-1-leitao@debian.org> <20230419102930.2979231-2-leitao@debian.org> <20230420045712.GA4239@lst.de> <20230420123139.GA32030@lst.de> <20230420124615.GA733@lst.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230420124615.GA733@lst.de> Precedence: bulk List-ID: X-Mailing-List: io-uring@vger.kernel.org On Thu, Apr 20, 2023 at 02:46:15PM +0200, Christoph Hellwig wrote: > On Thu, Apr 20, 2023 at 05:38:02AM -0700, Breno Leitao wrote: > > Since we are not coping the payload anymore, this is not necessary. Now > > we are copying 64 bytes for the single SQE or 128 bytes for double SQE. > > > > Do you prefer I create a helper that returns the SQE size, instead of > > doing the left shift? > > I think a helper would be nice. And adding another sizeof(sqe) seems > more self documenting then the shift, but if you really prefer the > shift at least write a good comment explaining it. Agree, this is a good idea. I've fixed it in the nvme code by creating a function helper. The same problem happen on the ublkd_drv, and I've also fixed it there in a new patch. https://lkml.org/lkml/2023/4/30/94 Thanks for the review.