Received: by 2002:a05:6358:11c7:b0:104:8066:f915 with SMTP id i7csp5567000rwl; Tue, 11 Apr 2023 07:13:22 -0700 (PDT) X-Google-Smtp-Source: AKy350b+8zRbO4RAwDzLjYFdLCYD2NvluyT2bfp053VY3q4SwYtXabfkdoFLM9rbpcCLX9JVFRED X-Received: by 2002:a05:6402:10d2:b0:504:9379:717a with SMTP id p18-20020a05640210d200b005049379717amr8802994edu.10.1681222401784; Tue, 11 Apr 2023 07:13:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1681222401; cv=none; d=google.com; s=arc-20160816; b=Di+dxQPkazAzE1oO4lYdsCEp1s3N+m3q8MABeHlUs9LWP1f/5R6HqPN/kp60gDpwJ1 4mbwkwvbMOW99JAFhSVu51Tm42YCUsekHxRYtqSOesJB8xzLDoMgJR7sD5C2iLtswUEN To9T75xJSvbOsCTypVO+bd5ckc1uRPRC2BdVNibfL8zyjM1eLIeKyhMo4amFjjuRh+IT oB2xyk4SPqbA0Ql/fXvJPCOwck+iV2X8kk4n6c5tya63/cVD1JgZyo7llE4kqoi7pAa/ eOpcq91By+FFj2wiT1mq7QOdkWol5PXRKSHCPubpUJ70b9wSDJgBWG+8dJDZJQQQohp0 +weQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=8o6+8UfOe03HGpKiG3vOcY+WDM2FOuH+5NEbD20e12E=; b=BN8E8A1aY2ncp/QDqdpHAckFu29USW2i7Y/POEvfEAGQZK2JwyY5BOoncFbmrExYPx DmUMt2ZypHs9bXH8NV7dSyVxZQpyVlPniCQVyqobCC8aBkg1K/Ik2s/GM+UYdi7csOYs PXiHAYfLLDHmGQp91nWmMzlVxMwema7k67M/fNPkHhPA9PPLxEgn6JqifVBeX+wBPX7e kL2oE3WlpZ8wU56JHkcft94Og9cztO835UHXKnbF8DJ4Sat9sw+lYQ7PMn9NvlfMTjoo 8XM5X5gjbMXVs/6fAXASeF0h6nnEfRd6Hrmkk2rbZHLOB0Zf8b2Un9OrCQeehwmF1WlR jS+Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="R8EM/gO6"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id r7-20020aa7d147000000b004acc137fdd5si3177249edo.48.2023.04.11.07.12.52; Tue, 11 Apr 2023 07:13:21 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="R8EM/gO6"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229920AbjDKOJg (ORCPT + 99 others); Tue, 11 Apr 2023 10:09:36 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39492 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229995AbjDKOJT (ORCPT ); Tue, 11 Apr 2023 10:09:19 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CD9E3E5B; Tue, 11 Apr 2023 07:09:18 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 658D061EFB; Tue, 11 Apr 2023 14:09:18 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 0DC5AC433EF; Tue, 11 Apr 2023 14:09:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1681222157; bh=XLeiHPPRb/DwYmY4IBd0MVrFHsxO0fJj1f0QxrYLR24=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=R8EM/gO6CfvkM2z21W6oah1Mh0wQ77bweO/mwgGAKCWomuvswyMeTF76B/n5GhLp7 3rQLIAiequ+vbzOD9iW/ThKe8iiOjMaWixCcJMOkLQwgnzj+Jt+pN3OEmybd60+EQy 4V6iffG+KC0Mlac01oXgJBTp+Su4XLfmjtnv4xVqNHU05ONwsnjJLvQOF2mLHcTfhg Y2DpiP3EnFa7VPPhb+H4b+d+DfXUYwfwJf+80eTiRpIEb87YPk6IYskltd8nNoA4tS oE1hy1zN9KLR81eZrzdQpjMO7XERLTOqCrXn0pqJTFvKB7SkV/Ud2VIMqfmsmpIveb vdOnoWPeiQjqQ== Date: Tue, 11 Apr 2023 17:09:12 +0300 From: Leon Romanovsky To: Jason Gunthorpe Cc: Avihai Horon , Aya Levin , Eric Dumazet , Jakub Kicinski , linux-kernel@vger.kernel.org, linux-rdma@vger.kernel.org, Meir Lichtinger , Michael Guralnik , netdev@vger.kernel.org, Paolo Abeni , Saeed Mahameed , Shay Drory Subject: Re: [PATCH rdma-next 0/4] Allow relaxed ordering read in VFs and VMs Message-ID: <20230411140912.GZ182481@unreal> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-5.2 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI,SPF_HELO_NONE, SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Apr 11, 2023 at 11:01:03AM -0300, Jason Gunthorpe wrote: > On Mon, Apr 10, 2023 at 04:07:49PM +0300, Leon Romanovsky wrote: > > From: Leon Romanovsky > > > > From Avihai, > > > > Currently, Relaxed Ordering (RO) can't be used in VFs directly and in > > VFs assigned to QEMU, even if the PF supports RO. This is due to issues > > in reporting/emulation of PCI config space RO bit and due to current > > HCA capability behavior. > > > > This series fixes it by using a new HCA capability and by relying on FW > > to do the "right thing" according to the PF's PCI config space RO value. > > > > Allowing RO in VFs and VMs is valuable since it can greatly improve > > performance on some setups. For example, testing throughput of a VF on > > an AMD EPYC 7763 and ConnectX-6 Dx setup showed roughly 60% performance > > improvement. > > > > Thanks > > > > Avihai Horon (4): > > RDMA/mlx5: Remove pcie_relaxed_ordering_enabled() check for RO write > > RDMA/mlx5: Check pcie_relaxed_ordering_enabled() in UMR > > net/mlx5: Update relaxed ordering read HCA capabilities > > RDMA/mlx5: Allow relaxed ordering read in VFs and VMs > > This looks OK, but the patch structure is pretty confusing. > > It seems to me there are really only two patches here, the first is to > add some static inline I asked from Avihai to align all pcie_relaxed_ordering_enabled() calls to be relevant for RO only. This is how we came to first two patches. Thanks > > 'mlx5 supports read ro' > > which supports both the cap bits described in > the PRM, with a little comment to explain that old devices only set > the old cap. > > And a second patch to call it in all the places we need to check before > setting the mkc ro read bit. > > Maybe a final third patch to sort out that mistake in the write side. > > But this really doesn't have anything to do with VFs and VMs, this is > adjusting the code to follow the current PRM because the old one was > mis-desgined. > > Jason