Received: by 2002:ad5:4acb:0:0:0:0:0 with SMTP id n11csp988649imw; Fri, 15 Jul 2022 17:43:16 -0700 (PDT) X-Google-Smtp-Source: AGRyM1u3qelgX7Ebi+wboZwfCXBC4pJYtTTvpKVK731QkHlw13mN1M6D15o/iLzDwAKGmyzPrVLI X-Received: by 2002:a05:6402:5189:b0:43a:c55c:cf00 with SMTP id q9-20020a056402518900b0043ac55ccf00mr22447223edd.390.1657932195786; Fri, 15 Jul 2022 17:43:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1657932195; cv=none; d=google.com; s=arc-20160816; b=ZbnKTclC4EtqirD+TPAx9Ytln8MX1OYoP2pCwNxAVKod51Lm6huTkIRv9bVg7qKmhM K7i47E2G6TepIZ6fit8H37Yz5Fja47nM8JkvwCxJ/0/SgVlTGzKu6clzlPapFoTyHpkQ 2mKqq+jFbt2/RK9ZUt67KQ8HBiuDlCK831sJbHcQiAAc0ev2Rxe7f/cmVZm3mRxYDRgB DGNwopPmWc47gbrN+IF3I4WXzFZOQnYtyDrRsRJmrzSkHvMIeWXUSCMVt0yI14MRR0EW IS48MEauKWurncILACvO6gfnhcl4rCEhg1AoGVP3UwhECZ+Qd9kf7GzEpVEf572j+y6z vhsw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:date:from:references:in-reply-to :message-id:dkim-signature; bh=3fYK9aLEk4+QTiWncARzWNrEsKD8KVzMmkos5F1PmkE=; b=fQCqu0woUKtjJgnEJhd0lW+vvgrW6i7qxWP/10adqd7REpiI6cW9TtKcwFHRTKAY0O z3a0beJNn6mH2mEz9GuMMNHjbL7cxmE0PoV++yeeVk/Y+5UDCZ6u6JFpLfYlFpaGpwJL 7k72dYBvEJjl99JwP/KYB5ywK8piOY/myxtiKtmQWL/+ReZV15N0z1qzPsESBNGnOHyY 25qGIdA80EilplTCm5wad0GqYav5NiiZ7LDXPgIwz5ez9TXzyTcwl5zss3V9PqnBDkXK k/OVcD1aVAAIeGTjo3yH3LljbGL2ONkCg/Uiq1hOPgADzc9hM6Q4w73Kcbc4aIMGi3wu CvTA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@crudebyte.com header.s=lizzy header.b=YozSqIEK; 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=QUARANTINE sp=QUARANTINE dis=NONE) header.from=crudebyte.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id hr42-20020a1709073faa00b0072697f3b5f1si9097808ejc.562.2022.07.15.17.42.49; Fri, 15 Jul 2022 17:43:15 -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=@crudebyte.com header.s=lizzy header.b=YozSqIEK; 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=QUARANTINE sp=QUARANTINE dis=NONE) header.from=crudebyte.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232221AbiGOX4N (ORCPT + 99 others); Fri, 15 Jul 2022 19:56:13 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43980 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230114AbiGOXzy (ORCPT ); Fri, 15 Jul 2022 19:55:54 -0400 X-Greylist: delayed 1799 seconds by postgrey-1.37 at lindbergh.monkeyblade.net; Fri, 15 Jul 2022 16:55:51 PDT Received: from lizzy.crudebyte.com (lizzy.crudebyte.com [91.194.90.13]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5FE83904F3; Fri, 15 Jul 2022 16:55:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=crudebyte.com; s=lizzy; h=Cc:To:Subject:Date:From:References:In-Reply-To: Message-Id:Content-Type:Content-Transfer-Encoding:MIME-Version:Content-ID: Content-Description; bh=3fYK9aLEk4+QTiWncARzWNrEsKD8KVzMmkos5F1PmkE=; b=YozSq IEKWWCG3bc8gT6t0ihYNaBBuhPv305blQonV/EXBYDFysPyPUhKKg381HXh56M7I7qFNvaMJuGwTT 5iFC8S+v4El1BSGtKhaJnW3AQeovKnVDHsoF81RtELueuH9rVyfNWp4nommA68wYRs52o8y+8iIJA WtB/z1LpwZJ0VYR1oFs7ZUuIXUCTFEwCJLiYsIARE21IWOU8J3IBDtUVP90tCQ5yS7nzbQn5HaYkh WI6fivKHZhd/Mwr3a8h4XuNCj+ziz43uljA9zgbpI2Scm+zVm0kpYZn2RGHINdxmM+Q9bYncXZId8 p/snZJ9Xg7GK3GqolB5CvED2LNAOQ==; Message-Id: <3f23191d21032e7c14852b1e1a4ae26417a36739.1657920926.git.linux_oss@crudebyte.com> In-Reply-To: References: From: Christian Schoenebeck Date: Fri, 15 Jul 2022 23:32:30 +0200 Subject: [PATCH v6 08/11] 9p: add P9_ERRMAX for 9p2000 and 9p2000.u To: v9fs-developer@lists.sourceforge.net Cc: linux-kernel@vger.kernel.org, netdev@vger.kernel.org, Dominique Martinet , Eric Van Hensbergen , Latchesar Ionkov , Nikolay Kichukov X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_NONE autolearn=ham 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 Add P9_ERRMAX macro to 9P protocol header which reflects the maximum error string length of Rerror replies for 9p2000 and 9p2000.u protocol versions. Unfortunately a maximum error string length is not defined by the 9p2000 spec, picking 128 as value for now, as this seems to be a common max. size for POSIX error strings in practice. 9p2000.L protocol version uses Rlerror replies instead which does not contain an error string. Signed-off-by: Christian Schoenebeck --- This could probably be merged with the next patch, on doubt I posted it separately as squashing is easy. The advantage of a separate patch is making the discussion of the chosen value of max. 128 bytes more prominent. include/net/9p/9p.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/include/net/9p/9p.h b/include/net/9p/9p.h index 24a509f559ee..13abe013af21 100644 --- a/include/net/9p/9p.h +++ b/include/net/9p/9p.h @@ -331,6 +331,9 @@ enum p9_qid_t { /* size of header for zero copy read/write */ #define P9_ZC_HDR_SZ 4096 +/* maximum length of an error string */ +#define P9_ERRMAX 128 + /** * struct p9_qid - file system entity information * @type: 8-bit type &p9_qid_t -- 2.30.2