[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <8c9eb06c-28de-2e24-2758-9f5c913b36ab@intel.com>
Date: Tue, 11 Apr 2023 16:18:44 -0700
From: Jacob Keller <jacob.e.keller@...el.com>
To: Leon Romanovsky <leon@...nel.org>, Jason Gunthorpe <jgg@...dia.com>
CC: Avihai Horon <avihaih@...dia.com>,
"David S. Miller" <davem@...emloft.net>,
Eric Dumazet <edumazet@...gle.com>,
Jakub Kicinski <kuba@...nel.org>, <linux-rdma@...r.kernel.org>,
Meir Lichtinger <meirl@...lanox.com>,
Michael Guralnik <michaelgur@...lanox.com>,
<netdev@...r.kernel.org>, Paolo Abeni <pabeni@...hat.com>,
Saeed Mahameed <saeedm@...dia.com>,
Shay Drory <shayd@...dia.com>
Subject: Re: [PATCH rdma-next 2/4] RDMA/mlx5: Check
pcie_relaxed_ordering_enabled() in UMR
On 4/10/2023 6:07 AM, Leon Romanovsky wrote:
> From: Avihai Horon <avihaih@...dia.com>
>
> relaxed_ordering_read HCA capability is set if both the device supports
> relaxed ordering (RO) read and RO is set in PCI config space.
>
> RO in PCI config space can change during runtime. This will change the
> value of relaxed_ordering_read HCA capability in FW, but the driver will
> not see it since it queries the capabilities only once.
>
> This can lead to the following scenario:
> 1. RO in PCI config space is enabled.
> 2. User creates MKey without RO.
> 3. RO in PCI config space is disabled.
> As a result, relaxed_ordering_read HCA capability is turned off in FW
> but remains on in driver copy of the capabilities.
> 4. User requests to reconfig the MKey with RO via UMR.
> 5. Driver will try to reconfig the MKey with RO read although it
> shouldn't (as relaxed_ordering_read HCA capability is really off).
>
> To fix this, check pcie_relaxed_ordering_enabled() before setting RO
> read in UMR.
>
> Fixes: 896ec9735336 ("RDMA/mlx5: Set mkey relaxed ordering by UMR with ConnectX-7")
> Signed-off-by: Avihai Horon <avihaih@...dia.com>
> Reviewed-by: Shay Drory <shayd@...dia.com>
> Signed-off-by: Leon Romanovsky <leonro@...dia.com>
> ---
Reviewed-by: Jacob Keller <jacob.e.keller@...el.com>
Powered by blists - more mailing lists