Received: by 2002:a05:7208:31d3:b0:81:e143:7c29 with SMTP id v19csp399662rbd; Fri, 5 Apr 2024 07:50:28 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWKWgKOzqy0F9HEJof5oEfZ2jgC5TbK5UYH1wbHeiq9za/v+r16PQShlGEmYalpf5AnLq31jK1YUJZpbiBAh6S60FxrZmWB3x9D8PXf7A== X-Google-Smtp-Source: AGHT+IFbo5CTiHRI8sy2zTRQojtSHv5eqSiuMEY2AprCkuByg0eHJdQV0+s1NKWNYpv9Mp3lKxdC X-Received: by 2002:ae9:f015:0:b0:78a:575b:eca3 with SMTP id l21-20020ae9f015000000b0078a575beca3mr1552333qkg.20.1712328628318; Fri, 05 Apr 2024 07:50:28 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1712328628; cv=pass; d=google.com; s=arc-20160816; b=nyAGLv9HSF/sQzfQcHZT8HdFnm7C3S6h6HBT7ipwBZypQkh9TjGNfxA7mBArE+b6cF CxyWFp7yTN8Ac1bnO/00MlWc8eIpjMknwKz52Kz/drZw77hTaLjpqK3yvNIQgRGzYOsc 9JdiHfLcd93M6lE0bxBfV6qWLvj2iK3OMXEcd/SRNojHoGrrCXEiq1AOFx7X4koKOeF3 XT1dIzkQPikyLwyRVFM2V/W8bqy1yY6EDD+aFV/fVsuVeOI2qlswhPDFS8FGO89BQW2H 0Cjwz53zVHmvPSp91dR/LHgfJe/BY41lvcmnqBAZiCzAPlYiSEGLHxMQSLCV0sXH28H3 mFzA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=user-agent:in-reply-to:content-disposition:mime-version :list-unsubscribe:list-subscribe:list-id:precedence:references :message-id:subject:cc:to:from:date; bh=0r0sJ6YigZjoyHye3XS3rWn9OA+3tvfWQJ6eaNd8K7I=; fh=6uKwOOp9hhvf67P5I2OeqIup87XvFjl/B+5iSBXgkxE=; b=mgbCoX40WbYYMK87wTo1fUsp27YG9s/aR8zTzFnMgG5X/vXKMJKFjvrRy8cpOoDlbV FJKCW9wiR5pbYKoBFNJv20zNnUa8z0WLWqKgZ0d5svT1Tra+bdbQR3LvG/0Ly38IPWUv cS96+ErnOtXywFba/Ju03VjCWi/T8LRYiXJiSQom32OkgmVBsJLeV1Ws0D5J62Xfe5pr kUeuNR4FeWoyBkTnNYfF9+tSlMf3cBlz0pvOptl17/WrceEVFaL1hUsyrsdMgL9lLQPH LkfKSSbRkzHRlbcSUMbhFpAB1c8sHnqGxZvDzq2PvIXvfO+haJC66iOQQkrP/guyKZwj 9few==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=lst.de); spf=pass (google.com: domain of linux-kernel+bounces-133193-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-133193-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id vq26-20020a05620a559a00b00789dd902c08si1914031qkn.177.2024.04.05.07.50.28 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 05 Apr 2024 07:50:28 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-133193-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=lst.de); spf=pass (google.com: domain of linux-kernel+bounces-133193-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-133193-linux.lists.archive=gmail.com@vger.kernel.org" Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 13A9F1C20910 for ; Fri, 5 Apr 2024 14:50:28 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id C00CA16F820; Fri, 5 Apr 2024 14:50:23 +0000 (UTC) Received: from verein.lst.de (verein.lst.de [213.95.11.211]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id D9AC116F29B for ; Fri, 5 Apr 2024 14:50:21 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=213.95.11.211 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712328623; cv=none; b=DSNQQiFPgZzdXgk6BIvtWYadWFFPZlzv20JZfco63vzk8FHLcjLvWdY8B+mFkYTVtfuj5Jiu9JrW7kwVaYD/mPOE6gJ4X7V/YfdgKMOVLrnwga+DGfu9/GFErjWvwMeqStxVOj7Sqpnf+UR92390zgnwYo71Vjd/Dd+IMpN7zCM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712328623; c=relaxed/simple; bh=VqINHYATEwC4O5L2MZdP3SWw93PfxhwfQb3t/PgqT/8=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=I1DiZmtbQ1owGOsEfSzn3ZdfJAP5odO/wonMIDg4SvxcyzJGtvYNowiu4+fC0tyIB/qwP5ZrhGQbSzF3bSeHb47+occKuB6u1yqgWbbgOdvO9tnrPhMIFWNcXB++Z85Jv6AdLlrm7TdgeHYaq/EfV4owQYmMawCKmR84u3lpFcs= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=lst.de; spf=pass smtp.mailfrom=lst.de; arc=none smtp.client-ip=213.95.11.211 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=lst.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=lst.de Received: by verein.lst.de (Postfix, from userid 2407) id 8DC3368D07; Fri, 5 Apr 2024 16:50:17 +0200 (CEST) Date: Fri, 5 Apr 2024 16:50:17 +0200 From: Christoph Hellwig To: Daniel Wagner Cc: Christoph Hellwig , James Smart , Keith Busch , Sagi Grimberg , Hannes Reinecke , linux-nvme@lists.infradead.org, linux-kernel@vger.kernel.org, Hannes Reinecke Subject: Re: [PATCH v4 3/5] nvmet: return DHCHAP status codes from nvmet_setup_auth() Message-ID: <20240405145017.GA6844@lst.de> References: <20240405062055.GC3107@lst.de> <3qh6d2fensgck2rodnbhreirfwkf7lloqwvk6gyfafu4fvgxss@jxb4b4kzu224> <20240405144752.GA6352@lst.de> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20240405144752.GA6352@lst.de> User-Agent: Mutt/1.5.17 (2007-11-01) On Fri, Apr 05, 2024 at 04:47:52PM +0200, Christoph Hellwig wrote: > > Are you sure I should map this to errno codes and the back to NVME > > status codes? Sure, this is possible but don't really think it makes > > sense. > > No, but we should not overload the return value. Pass in the req > or sq, or add a new paramter for the auth fail reason. Or make sure all returns are the status codes, change the return value to a u8 and clearly document what values it returns if that works out. And while you're at it please fix all the overly long lines.