Received: by 2002:ab2:6203:0:b0:1f5:f2ab:c469 with SMTP id o3csp362383lqt; Thu, 18 Apr 2024 19:08:06 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCX++vLCw4qt63BVAB6qo39gl+b4rn2Acwsh9oElwCh/cuiGAZ0seJbzv8yYPk8++gY1qPPilHHeooXHbwEuL4aPDiYxPNLdtpYIhXkr4w== X-Google-Smtp-Source: AGHT+IGdJ/Sj3XeGpbH58UsGewerBmzV+kPna4L91Ubp83WQ/S7i85xt+8DLQsaQOxr7E7DjrTQj X-Received: by 2002:a05:6a20:728a:b0:1aa:a6cc:39c5 with SMTP id o10-20020a056a20728a00b001aaa6cc39c5mr1357197pzk.7.1713492486141; Thu, 18 Apr 2024 19:08:06 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1713492486; cv=pass; d=google.com; s=arc-20160816; b=oYTG3Dcixslgi9Uw0hEcPf+yRKFgay12y/RKOzLg8Sl850gOHktIsRe2WiUejWyDuQ g1DI2Z5QHsYEiHkyR3okwY5STCXFqeNT2E1M9r4AQdRKrrqn7hEGIjdA7F5fz5lPaPbr KpRX3efLZnFAahMoFnu2rEQL8UIZ479spox5PJf+lrnKKa7CPSM/A6nvqBJ1XxNiFJGI nSFzmXiUujSsVodF6LrACdfxJLgk3xMCyroz7ADrIbPhX2KFK7Ot6fWYcJHNRaIkAeJK G1CTantrXo/fuu5+zLeeT2T7SKYAyb0noHcH650uy6VRtDDo8OzR6Qty15o6KpQ176TA TM3Q== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :subject:cc:to:from:date:dkim-signature; bh=0EviJXblBsdhUF7MuJ+Se0rDXqDvnWIvQRDnGlu+SQU=; fh=MUR88bFMIx3vFKp/j9Y9fWtpE04vvnu3U9YY6g14FHI=; b=PIkqxMz2b5ydCUxo+Qty1my0DCGoologKug4JHUJUKB4Ek4Y1BmG3NeZD8YClN4Dlo LtKBpiWXq0eQWUz1BT1nKPrrM2VzWAQCBNn+RSxyIPQew+Kvhw/aoOXmc5BjMXLvSIXK 3ilEaL6F/XiTZPRblYII7qwdi3qTrLCP7H+3Mf+iAZV3Lgc3ad2WMabGGGThT5uIQQHe EZA3mlCM+r+M/B1YmeY+OvmnXdQ93tq3zOw3etvMlW0CzCIcrS1tWSY0sm6+1DIlPviu uebRAXdnHWkb8iAcuMJ0qGVHblL0A/DYiTBLie5C8AjW60p02d5L0ijQEjuBSk3Wcl8T ZiMw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=jtBII6e3; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-150932-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-150932-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id v12-20020a17090a458c00b002a0409736a1si4154899pjg.183.2024.04.18.19.08.05 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 18 Apr 2024 19:08:06 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-150932-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=jtBII6e3; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-150932-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-150932-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=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 sv.mirrors.kernel.org (Postfix) with ESMTPS id BF479282903 for ; Fri, 19 Apr 2024 02:08:05 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 63AA653BE; Fri, 19 Apr 2024 02:07:58 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="jtBII6e3" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 808A84C6B; Fri, 19 Apr 2024 02:07:57 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713492477; cv=none; b=IyCI/LN3Gueo1wON1t2X+9he8Bv3axXCQWByEp47fkC8FjFOOgv2P6a483ARCwj8b56NtitH9sZpTu+IkbU/jYtKG0c+HITg+PITEbPi78OJzbbGJj2bJuNu/qNjsRq0+QAWwZPtcKoLIkmQODj4WmYkXy2Snlch0uHTYWJr2WQ= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713492477; c=relaxed/simple; bh=X72OXuYe/3hsHFyy+rxRJlE3PBWjqR3xc0lDbLCji8w=; h=Date:From:To:Cc:Subject:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=Kf/J+c4j/ERLcuGZsJ+jLfjg1/m/nht0c3t1tRGFSDK/LWzzXYhKqGI07JXi4JTSj1OSMAkAIDR8L61QsQwZOWeNXzSsFWNEp93S5e748tsKtH2jTCumicpzNyE9NEZ5JDNYLCm8dWvGv+P/Pqa5C7G6lSAKHf73pBW5BfOJyhA= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=jtBII6e3; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 0A447C113CC; Fri, 19 Apr 2024 02:07:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1713492477; bh=X72OXuYe/3hsHFyy+rxRJlE3PBWjqR3xc0lDbLCji8w=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=jtBII6e3f2HENWd7KuoNwDTV/183CC8TqBRqKBFlWw3RR7ZlnOMUaes5Zl8FESj5P blHKTMKQ1ThMO5FWY1r4AAahCDh0p2P6XFgnCePQZkHpaioLH+qpcBCYiZPbJrp/Tn MGmEYmhCVT6GeCmyupPI59S6FqBvhZTctZgxb1mJD5laEGbgX5PAoESbINhGNyGfg2 NEitM6tsbbeH+lt4mR5Mb2F4CRqOBGkK0ICYdZUngNoO/czJizgeXvuFwdkk9x4otQ fznTWROR9Ex13jXHKw9LMbQCf7XFSC+sY9E/sPO9CyNvxPIwBgFv2G7Gh+PPPappJa 0dSo1syYE99qg== Date: Thu, 18 Apr 2024 19:07:55 -0700 From: Jakub Kicinski To: Danielle Ratson Cc: , , , , , , , , , , , , , , , , , , , , Subject: Re: [PATCH net-next v4 03/10] ethtool: Add an interface for flashing transceiver modules' firmware Message-ID: <20240418190755.1865fcaa@kernel.org> In-Reply-To: <20240418103455.3297870-4-danieller@nvidia.com> References: <20240418103455.3297870-1-danieller@nvidia.com> <20240418103455.3297870-4-danieller@nvidia.com> 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-Transfer-Encoding: 7bit On Thu, 18 Apr 2024 13:34:48 +0300 Danielle Ratson wrote: > + - > + name: module-fw-flash > + attributes: > + - > + name: header > + type: nest > + nested-attributes: header > + - > + name: file-name > + type: string > + - > + name: password > + type: u32 > + - > + name: module-fw-flash-ntf > + attributes: > + - > + name: header > + type: nest > + nested-attributes: header > + - > + name: status > + type: u32 > + enum: module-fw-flash-status > + - > + name: status-msg > + type: string > + - > + name: done > + type: u64 uint? > + - > + name: total > + type: u64 same? > +enum { > + ETHTOOL_A_MODULE_FW_FLASH_UNSPEC, > + ETHTOOL_A_MODULE_FW_FLASH_HEADER, /* nest - _A_HEADER_* */ > + ETHTOOL_A_MODULE_FW_FLASH_FILE_NAME, /* string */ > + ETHTOOL_A_MODULE_FW_FLASH_PASSWORD, /* u32 */ > + ETHTOOL_A_MODULE_FW_FLASH_PAD, > + ETHTOOL_A_MODULE_FW_FLASH_STATUS, /* u8 */ > + ETHTOOL_A_MODULE_FW_FLASH_STATUS_MSG, /* string */ > + ETHTOOL_A_MODULE_FW_FLASH_DONE, /* u64 */ > + ETHTOOL_A_MODULE_FW_FLASH_TOTAL, /* u64 */ > + > + /* add new constants above here */ > + __ETHTOOL_A_MODULE_FW_FLASH_CNT, > + ETHTOOL_A_MODULE_FW_FLASH_MAX = (__ETHTOOL_A_MODULE_FW_FLASH_CNT - 1) > +}; The next patch uses these names for notifications and patch 9 for the action. The YAML spec should contain basically this same info. Not sure why the spec ended up with two different nests. Just translate this enum into YAML: name: module-fw-flash attributes: - name: header type: nest nested-attributes: header - name: file-name type: string - name: password type: u32 - name: pad type: pad - name: status type: u8 ... And you can use this nest in multiple operations, using the attributes members of the operation to narrow down which members will show up in given op.