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 9B4F8C54EE9 for ; Wed, 7 Sep 2022 15:18:24 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229967AbiIGPSX (ORCPT ); Wed, 7 Sep 2022 11:18:23 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56334 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229614AbiIGPSX (ORCPT ); Wed, 7 Sep 2022 11:18:23 -0400 Received: from verein.lst.de (verein.lst.de [213.95.11.211]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0DE5171BF6 for ; Wed, 7 Sep 2022 08:18:21 -0700 (PDT) Received: by verein.lst.de (Postfix, from userid 2407) id 7A89967373; Wed, 7 Sep 2022 17:18:18 +0200 (CEST) Date: Wed, 7 Sep 2022 17:18:18 +0200 From: Christoph Hellwig To: Sagi Grimberg Cc: Leon Romanovsky , Patrisious Haddad , Christoph Hellwig , Israel Rukshin , Linux-nvme , linux-rdma@vger.kernel.org, Michael Guralnik , Maor Gottlieb , Max Gurtovoy Subject: Re: [PATCH rdma-next 4/4] nvme-rdma: add more error details when a QP moves to an error state Message-ID: <20220907151818.GA26822@lst.de> References: <20220907113800.22182-1-phaddad@nvidia.com> <20220907113800.22182-5-phaddad@nvidia.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.17 (2007-11-01) Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org On Wed, Sep 07, 2022 at 06:16:05PM +0300, Sagi Grimberg wrote: >>> >>> This entire code needs to move to the rdma core instead >>> of being leaked to ulps. >> >> We can move, but you will lose connection between queue number, >> caller and error itself. > > That still doesn't explain why nvme-rdma is special. > > In any event, the ulp can log the qpn so the context can be interrogated > if that is important. I also don't see why the QP event handler can't be called from user context to start with. I see absolutely no reason to add boilerplate code to drivers for reporting slighly more verbose errors on one specific piece of hrdware. I'd say clean up the mess that is the QP event handler first, and then once error reporting becomes trivial we can just do it.