[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20240418190755.1865fcaa@kernel.org>
Date: Thu, 18 Apr 2024 19:07:55 -0700
From: Jakub Kicinski <kuba@...nel.org>
To: Danielle Ratson <danieller@...dia.com>
Cc: <netdev@...r.kernel.org>, <davem@...emloft.net>, <edumazet@...gle.com>,
<pabeni@...hat.com>, <corbet@....net>, <linux@...linux.org.uk>,
<sdf@...gle.com>, <kory.maincent@...tlin.com>,
<maxime.chevallier@...tlin.com>, <vladimir.oltean@....com>,
<przemyslaw.kitszel@...el.com>, <ahmed.zaki@...el.com>,
<richardcochran@...il.com>, <shayagr@...zon.com>,
<paul.greenwalt@...el.com>, <jiri@...nulli.us>,
<linux-doc@...r.kernel.org>, <linux-kernel@...r.kernel.org>,
<mlxsw@...dia.com>, <petrm@...dia.com>, <idosch@...dia.com>
Subject: Re: [PATCH net-next v4 03/10] ethtool: Add an interface for
flashing transceiver modules' firmware
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.
Powered by blists - more mailing lists