From patchwork Mon Apr 10 13:07:49 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Leon Romanovsky X-Patchwork-Id: 13206347 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 33386C76196 for ; Mon, 10 Apr 2023 13:08:04 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229700AbjDJNIC (ORCPT ); Mon, 10 Apr 2023 09:08:02 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42016 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229614AbjDJNIB (ORCPT ); Mon, 10 Apr 2023 09:08:01 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 97AB0212F; Mon, 10 Apr 2023 06:07:59 -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 32DC260F55; Mon, 10 Apr 2023 13:07:59 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 110A5C433D2; Mon, 10 Apr 2023 13:07:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1681132078; bh=3aM8xzi3Ejc9lw0KWj0iPFmTjjhZiJ/W+M8ER7GMoLE=; h=From:To:Cc:Subject:Date:From; b=uYs88a7cywe+vk7/CcSmdMTe1aljB6GFFqTWSGvZ7drx6m8BpaW+9afYDCXMw/sxq usn7CgaZBdEEhTpIePVtUo67enAq/bKpz5yahqfo8M9rDwHtdmWiqkk3mydBRr1jKw Nk9EqgZdK4Qqwcahzpx0PTeCG4ggpFbg2EW4/UAV4IBS8XhGk5NY8zGrGL5rr8T7pi i66sDu5JEYVjY/l4j6UL1U/foOZouVfGYMuXmAtrTqqVeVT8CPLw/kdEz3uIyG4QeE Gno4vrMOn3spYcZ4uFK/d9lSe2EiMtUgMzNRxOdGdSXAWXtBj9lHQw0KqH7CPygwz6 iA/Pi1NHHzU8w== From: Leon Romanovsky To: Jason Gunthorpe Cc: Leon Romanovsky , 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: [PATCH rdma-next 0/4] Allow relaxed ordering read in VFs and VMs Date: Mon, 10 Apr 2023 16:07:49 +0300 Message-Id: X-Mailer: git-send-email 2.39.2 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org 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 drivers/infiniband/hw/mlx5/mr.c | 12 ++++++++---- drivers/infiniband/hw/mlx5/umr.c | 7 +++++-- drivers/infiniband/hw/mlx5/umr.h | 3 ++- drivers/net/ethernet/mellanox/mlx5/core/en/params.c | 3 +-- drivers/net/ethernet/mellanox/mlx5/core/en_common.c | 9 +++++---- include/linux/mlx5/mlx5_ifc.h | 5 +++-- 6 files changed, 24 insertions(+), 15 deletions(-)