From nobody Sat Nov 30 04:28:29 2024 Received: from relay7-d.mail.gandi.net (relay7-d.mail.gandi.net [217.70.183.200]) (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 B4E5118C90C; Thu, 12 Sep 2024 09:20:16 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=217.70.183.200 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1726132819; cv=none; b=mAcepwkDS8rqHbr+23SybrdJkFNCCHc/Es8VLfXSgJiqHWob4RBon2adOJw1tShxxgInGsr8xAqfpGqRzVws/rmn730z2hkpoqirwv8yWRt5jLxwHhcoUbVdSAWVK4o19Mgq3V33stm0O/lpptZOUIuWb5dVhonqRSPIoosYwJU= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1726132819; c=relaxed/simple; bh=VRZu/gYVycurcTXpLQBnu6sVbbno7hacrLi+jhkgvzA=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=BP4OISS0UsSDO+OP9LXg2cxHg6fWbU0k8z4vCSKG4HHlz8MkXD4frRwKD+7MuCr0y3Cf6gR5E1mADQd6ObQLCmeGEQ4UfIlk97QvJrt/i6BuCmAc9qtku/xziO55FGa9YByuzS/ybLeyJDrtFiAQ3ZSv+s5MFfGDPjSOR5Z9gdY= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=bootlin.com; spf=pass smtp.mailfrom=bootlin.com; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b=mqFHb0SX; arc=none smtp.client-ip=217.70.183.200 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=bootlin.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=bootlin.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b="mqFHb0SX" Received: by mail.gandi.net (Postfix) with ESMTPSA id 3C27920009; Thu, 12 Sep 2024 09:20:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1726132814; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=lTwCKIaFc++7vq6u5YKiWuGcV3t4iB20Ov/QI4s+yc4=; b=mqFHb0SXeoaWJZRqfzi/57udQBWksW+kmqDo+UD2/ptGhYz+r3MQ00W+sOTVy4wCA8JwBy Jr9wHI36hFFx5ZDorNnQie2F8IK3MfwrLuKJ8bcgsSWNxc0XAX3zZKI/YvWSnUfqwLhzbz oLJ2Tvtz7WxXgRQSYEYWNBO5s5K1VRlhs43oqMTQ13QsXztBGfB2hy5wCLSLL7cr2DAV/4 w7giaHIRK59PPJPXgomtkk03Nyfdw4BjmMhFTn4l4Yjn0Ln97y4OjlIupYC9kMMwi+4BFL Ro0WqxSvoNHH8auUdRSRsa30+uA80erj+wLeo7SfkFtJz4YPOO027KL7eT+IPw== From: Kory Maincent Date: Thu, 12 Sep 2024 11:20:02 +0200 Subject: [PATCH ethtool-next 1/3] ethtool: pse-pd: Expand C33 PSE with several new features 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="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20240912-feature_poe_power_cap-v1-1-499e3dd996d7@bootlin.com> References: <20240912-feature_poe_power_cap-v1-0-499e3dd996d7@bootlin.com> In-Reply-To: <20240912-feature_poe_power_cap-v1-0-499e3dd996d7@bootlin.com> To: Oleksij Rempel , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Andrew Lunn , Michal Kubecek Cc: Kyle Swenson , Thomas Petazzoni , netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Kory Maincent X-Mailer: b4 0.15-dev-8cb71 X-GND-Sasl: kory.maincent@bootlin.com From: Kory Maincent (Dent Project) This patch adds support for several new features to the C33 PSE commands: - Get the Class negotiated between the Powered Device and the PSE - Get Extended state and substate - Get the Actual power - Configure the power limit - Get the Power limit ranges available Example: $ ethtool --set-pse eth1 c33-pse-avail-pw-limit 18000 $ ethtool --show-pse eth1 PSE attributes for eth1: Clause 33 PSE Admin State: enabled Clause 33 PSE Power Detection Status: disabled Clause 33 PSE Extended State: Group of mr_mps_valid states Clause 33 PSE Extended Substate: Port is not connected Clause 33 PSE Available Power Limit: 18000 Clause 33 PSE Power Limit Ranges: range: min 15000 max 18100 range: min 30000 max 38000 range: min 60000 max 65000 range: min 90000 max 97500 Signed-off-by: Kory Maincent --- If you think the Power Limit Ranges display does not fit your liking please do not hesitate to ask for change. --- netlink/pse-pd.c | 275 +++++++++++++++++++++++++++++++++++++++++++++++++++= ++++ 1 file changed, 275 insertions(+) diff --git a/netlink/pse-pd.c b/netlink/pse-pd.c index 3f6b6aa..fd1fc4d 100644 --- a/netlink/pse-pd.c +++ b/netlink/pse-pd.c @@ -89,10 +89,226 @@ static const char *c33_pse_pw_d_status_name(u32 val) return "unsupported"; } } + +static const char *c33_pse_ext_state_name(u32 val) +{ + switch (val) { + case ETHTOOL_C33_PSE_EXT_STATE_ERROR_CONDITION: + return "Group of error_condition states"; + case ETHTOOL_C33_PSE_EXT_STATE_MR_MPS_VALID: + return "Group of mr_mps_valid states"; + case ETHTOOL_C33_PSE_EXT_STATE_MR_PSE_ENABLE: + return "Group of mr_pse_enable states"; + case ETHTOOL_C33_PSE_EXT_STATE_OPTION_DETECT_TED: + return "Group of option_detect_ted"; + case ETHTOOL_C33_PSE_EXT_STATE_OPTION_VPORT_LIM: + return "Group of option_vport_lim states"; + case ETHTOOL_C33_PSE_EXT_STATE_OVLD_DETECTED: + return "Group of ovld_detected states"; + case ETHTOOL_C33_PSE_EXT_STATE_PD_DLL_POWER_TYPE: + return "Group of pd_dll_power_type states"; + case ETHTOOL_C33_PSE_EXT_STATE_POWER_NOT_AVAILABLE: + return "Group of power_not_available states"; + case ETHTOOL_C33_PSE_EXT_STATE_SHORT_DETECTED: + return "Group of short_detected states"; + default: + return "unsupported"; + } +} + +static const char *c33_pse_ext_substate_mr_mps_valid_name(u32 val) +{ + switch (val) { + case ETHTOOL_C33_PSE_EXT_SUBSTATE_MR_MPS_VALID_DETECTED_UNDERLOAD: + return "Underload state"; + case ETHTOOL_C33_PSE_EXT_SUBSTATE_MR_MPS_VALID_CONNECTION_OPEN: + return "Port is not connected"; + default: + return "unsupported"; + } +} + +static const char *c33_pse_ext_substate_error_condition_name(u32 val) +{ + switch (val) { + case ETHTOOL_C33_PSE_EXT_SUBSTATE_ERROR_CONDITION_NON_EXISTING_PORT: + return "Non-existing port number"; + case ETHTOOL_C33_PSE_EXT_SUBSTATE_ERROR_CONDITION_UNDEFINED_PORT: + return "Undefined port"; + case ETHTOOL_C33_PSE_EXT_SUBSTATE_ERROR_CONDITION_INTERNAL_HW_FAULT: + return "Internal hardware fault"; + case ETHTOOL_C33_PSE_EXT_SUBSTATE_ERROR_CONDITION_COMM_ERROR_AFTER_FORCE_= ON: + return "Communication error after force on"; + case ETHTOOL_C33_PSE_EXT_SUBSTATE_ERROR_CONDITION_UNKNOWN_PORT_STATUS: + return "Unknown port status"; + case ETHTOOL_C33_PSE_EXT_SUBSTATE_ERROR_CONDITION_HOST_CRASH_TURN_OFF: + return "Host crash turn off"; + case ETHTOOL_C33_PSE_EXT_SUBSTATE_ERROR_CONDITION_HOST_CRASH_FORCE_SHUTDO= WN: + return "Host crash force shutdown"; + case ETHTOOL_C33_PSE_EXT_SUBSTATE_ERROR_CONDITION_CONFIG_CHANGE: + return "Configuration change"; + case ETHTOOL_C33_PSE_EXT_SUBSTATE_ERROR_CONDITION_DETECTED_OVER_TEMP: + return "Over temperature detected"; + default: + return "unsupported"; + } +} + +static const char *c33_pse_ext_substate_mr_pse_enable_name(u32 val) +{ + switch (val) { + case ETHTOOL_C33_PSE_EXT_SUBSTATE_MR_PSE_ENABLE_DISABLE_PIN_ACTIVE: + return "Disable pin active"; + default: + return "unsupported"; + } +} + +static const char *c33_pse_ext_substate_option_detect_ted_name(u32 val) +{ + switch (val) { + case ETHTOOL_C33_PSE_EXT_SUBSTATE_OPTION_DETECT_TED_DET_IN_PROCESS: + return "Detection in process"; + case ETHTOOL_C33_PSE_EXT_SUBSTATE_OPTION_DETECT_TED_CONNECTION_CHECK_ERRO= R: + return "Connection check error"; + default: + return "unsupported"; + } +} + +static const char *c33_pse_ext_substate_option_vport_lim_name(u32 val) +{ + switch (val) { + case ETHTOOL_C33_PSE_EXT_SUBSTATE_OPTION_VPORT_LIM_HIGH_VOLTAGE: + return "Main supply voltage is high"; + case ETHTOOL_C33_PSE_EXT_SUBSTATE_OPTION_VPORT_LIM_LOW_VOLTAGE: + return "Main supply voltage is low"; + case ETHTOOL_C33_PSE_EXT_SUBSTATE_OPTION_VPORT_LIM_VOLTAGE_INJECTION: + return "Voltage injection into the port"; + default: + return "unsupported"; + } +} + +static const char *c33_pse_ext_substate_ovld_detected_name(u32 val) +{ + switch (val) { + case ETHTOOL_C33_PSE_EXT_SUBSTATE_OVLD_DETECTED_OVERLOAD: + return "Overload state"; + default: + return "unsupported"; + } +} + +static const char *c33_pse_ext_substate_power_not_available_name(u32 val) +{ + switch (val) { + case ETHTOOL_C33_PSE_EXT_SUBSTATE_POWER_NOT_AVAILABLE_BUDGET_EXCEEDED: + return "Power budget exceeded for the controller"; + case ETHTOOL_C33_PSE_EXT_SUBSTATE_POWER_NOT_AVAILABLE_PORT_PW_LIMIT_EXCEE= DS_CONTROLLER_BUDGET: + return "Configured port power limit exceeded controller power budget"; + case ETHTOOL_C33_PSE_EXT_SUBSTATE_POWER_NOT_AVAILABLE_PD_REQUEST_EXCEEDS_= PORT_LIMIT: + return "Power request from PD exceeds port limit"; + case ETHTOOL_C33_PSE_EXT_SUBSTATE_POWER_NOT_AVAILABLE_HW_PW_LIMIT: + return "Power denied due to Hardware power limit"; + default: + return "unsupported"; + } +} + +static const char *c33_pse_ext_substate_short_detected_name(u32 val) +{ + switch (val) { + case ETHTOOL_C33_PSE_EXT_SUBSTATE_SHORT_DETECTED_SHORT_CONDITION: + return "Short condition was detected"; + default: + return "unsupported"; + } +} + +struct c33_pse_ext_substate_desc { + u32 state; + const char *(*substate_name)(u32 val); +}; + +static const struct c33_pse_ext_substate_desc c33_pse_ext_substate_map[] = =3D { + { ETHTOOL_C33_PSE_EXT_STATE_ERROR_CONDITION, + c33_pse_ext_substate_error_condition_name }, + { ETHTOOL_C33_PSE_EXT_STATE_MR_MPS_VALID, + c33_pse_ext_substate_mr_mps_valid_name }, + { ETHTOOL_C33_PSE_EXT_STATE_MR_PSE_ENABLE, + c33_pse_ext_substate_mr_pse_enable_name }, + { ETHTOOL_C33_PSE_EXT_STATE_OPTION_DETECT_TED, + c33_pse_ext_substate_option_detect_ted_name }, + { ETHTOOL_C33_PSE_EXT_STATE_OPTION_VPORT_LIM, + c33_pse_ext_substate_option_vport_lim_name }, + { ETHTOOL_C33_PSE_EXT_STATE_OVLD_DETECTED, + c33_pse_ext_substate_ovld_detected_name }, + { ETHTOOL_C33_PSE_EXT_STATE_POWER_NOT_AVAILABLE, + c33_pse_ext_substate_power_not_available_name }, + { ETHTOOL_C33_PSE_EXT_STATE_SHORT_DETECTED, + c33_pse_ext_substate_short_detected_name }, + { /* sentinel */ } +}; + +static void c33_pse_print_ext_substate(u32 state, u32 substate) +{ + const struct c33_pse_ext_substate_desc *substate_map; + + substate_map =3D c33_pse_ext_substate_map; + while (substate_map->state) { + if (substate_map->state =3D=3D state) { + print_string(PRINT_ANY, "c33-pse-extended-substate", + "Clause 33 PSE Extended Substate: %s\n", + substate_map->substate_name(substate)); + return; + } + substate_map++; + } +} + +static int c33_pse_dump_pw_limit_range(const struct nlattr *range) +{ + const struct nlattr *range_tb[ETHTOOL_A_C33_PSE_PW_LIMIT_MAX + 1] =3D {}; + DECLARE_ATTR_TB_INFO(range_tb); + const struct nlattr *attr; + u32 min, max; + int ret; + + ret =3D mnl_attr_parse_nested(range, attr_cb, &range_tb_info); + if (ret < 0) { + fprintf(stderr, + "malformed netlink message (power limit range)\n"); + return 1; + } + + attr =3D range_tb[ETHTOOL_A_C33_PSE_PW_LIMIT_MIN]; + if (!attr || mnl_attr_validate(attr, MNL_TYPE_U32) < 0) { + fprintf(stderr, + "malformed netlink message (power limit min)\n"); + return 1; + } + min =3D mnl_attr_get_u32(attr); + + attr =3D range_tb[ETHTOOL_A_C33_PSE_PW_LIMIT_MAX]; + if (!attr || mnl_attr_validate(attr, MNL_TYPE_U32) < 0) { + fprintf(stderr, + "malformed netlink message (power limit max)\n"); + return 1; + } + max =3D mnl_attr_get_u32(attr); + + print_string(PRINT_ANY, "range", "\trange:\n", NULL); + print_uint(PRINT_ANY, "min", "\t\tmin %u\n", min); + print_uint(PRINT_ANY, "max", "\t\tmax %u\n", max); + return 0; +} + int pse_reply_cb(const struct nlmsghdr *nlhdr, void *data) { const struct nlattr *tb[ETHTOOL_A_PSE_MAX + 1] =3D {}; struct nl_context *nlctx =3D data; + const struct nlattr *attr; DECLARE_ATTR_TB_INFO(tb); bool silent; int err_ret; @@ -151,6 +367,59 @@ int pse_reply_cb(const struct nlmsghdr *nlhdr, void *d= ata) c33_pse_pw_d_status_name(val)); } =20 + if (tb[ETHTOOL_A_C33_PSE_EXT_STATE]) { + u32 val; + + val =3D mnl_attr_get_u32(tb[ETHTOOL_A_C33_PSE_EXT_STATE]); + print_string(PRINT_ANY, "c33-pse-extended-state", + "Clause 33 PSE Extended State: %s\n", + c33_pse_ext_state_name(val)); + + if (tb[ETHTOOL_A_C33_PSE_EXT_SUBSTATE]) { + u32 substate; + + substate =3D mnl_attr_get_u32(tb[ETHTOOL_A_C33_PSE_EXT_SUBSTATE]); + c33_pse_print_ext_substate(val, substate); + } + } + + if (tb[ETHTOOL_A_C33_PSE_PW_CLASS]) { + u32 val; + + val =3D mnl_attr_get_u32(tb[ETHTOOL_A_C33_PSE_PW_CLASS]); + print_uint(PRINT_ANY, "c33-pse-power-class", + "Clause 33 PSE Power Class: %u\n", val); + } + + if (tb[ETHTOOL_A_C33_PSE_ACTUAL_PW]) { + u32 val; + + val =3D mnl_attr_get_u32(tb[ETHTOOL_A_C33_PSE_ACTUAL_PW]); + print_uint(PRINT_ANY, "c33-pse-actual-power", + "Clause 33 PSE Actual Power: %u\n", val); + } + + if (tb[ETHTOOL_A_C33_PSE_AVAIL_PW_LIMIT]) { + u32 val; + + val =3D mnl_attr_get_u32(tb[ETHTOOL_A_C33_PSE_AVAIL_PW_LIMIT]); + print_uint(PRINT_ANY, "c33-pse-available-power-limit", + "Clause 33 PSE Available Power Limit: %u\n", val); + } + + if (tb[ETHTOOL_A_C33_PSE_PW_LIMIT_RANGES]) { + print_string(PRINT_ANY, "c33-pse-power-limit-ranges", + "Clause 33 PSE Power Limit Ranges:\n", NULL); + mnl_attr_for_each(attr, nlhdr, GENL_HDRLEN) { + if (mnl_attr_get_type(attr) =3D=3D ETHTOOL_A_C33_PSE_PW_LIMIT_RANGES) { + if (c33_pse_dump_pw_limit_range(attr)) { + close_json_object(); + return err_ret; + } + } + } + } + close_json_object(); =20 return MNL_CB_OK; @@ -212,6 +481,12 @@ static const struct param_parser spse_params[] =3D { .handler_data =3D c33_pse_admin_control_values, .min_argc =3D 1, }, + { + .arg =3D "c33-pse-avail-pw-limit", + .type =3D ETHTOOL_A_C33_PSE_AVAIL_PW_LIMIT, + .handler =3D nl_parse_direct_u32, + .min_argc =3D 1, + }, {} }; =20 --=20 2.34.1 From nobody Sat Nov 30 04:28:29 2024 Received: from relay7-d.mail.gandi.net (relay7-d.mail.gandi.net [217.70.183.200]) (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 284F919006A; Thu, 12 Sep 2024 09:20:16 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=217.70.183.200 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1726132819; cv=none; b=JVfcjTl/+e72lUrVsW9UfPaOo4iE6V96MRJWJhaQ3tv5D85Fi+yqC6plNNeSy/cIwMse3E51M6sL5PbdMznqucl3VuiBBblAtUyemfWOI+LbFJcxjCpk6TpnY+FkquPSi1wRG5aYz7zhS4o6+Mvq0O8IRZ2ZMgmd/26bIh50kk0= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1726132819; c=relaxed/simple; bh=gxWJLdsbUew7yDGM8C/C34DUSyBUoVzKhbTYo1x9fa0=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=RfP4B6fEc/EEBWOGXNICRexdr850x4w5P/aE/7EZ9zEFBDeLpt2ogTFyJ3GBtbEie/j/5EKV6yveEXCyclVNs5XKMPJqDlFyHPY13+SAbpp2gyWCKXWMMa7xEerbmXfOgmEydmKv++zGKx4gNvToN6gjCXl5mFi4/fRa6wqxGqw= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=bootlin.com; spf=pass smtp.mailfrom=bootlin.com; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b=hsuYZ6tB; arc=none smtp.client-ip=217.70.183.200 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=bootlin.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=bootlin.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b="hsuYZ6tB" Received: by mail.gandi.net (Postfix) with ESMTPSA id E6C2320012; Thu, 12 Sep 2024 09:20:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1726132815; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=fhVnlUKOgIu5/UvU5Yq2KFQNf61+9gVyEs9J5wPnkG4=; b=hsuYZ6tB0IMs3nEpNIYRo7UIH6fV49gyLVgvmiWMlMk67gXLBqh2DbICJFlk5ErQ6RBXAo Vf+zJhCugcM+YTVHDD3vqvlLcrB42GaHVoDu0NT29gIl+htb547abrO8rszLcfTP0xzAGS 0sof4ec/VnzCudOmSnExjDL7M/sgATgylIwWgz7m5/TpPf9zB9y2MKSOHbqhpaEqjb5nBk 1YQCKE8rsqu0XFnXrmeJYb69ZHGTqmAzeV8ycClbSOXyoEMqK5DSLA8oPTEXKkj/jOEF3a SXaasu4X3zJHIZe1GLQjz3mj9nqNtMGkXIk6A4H5T/5dHqzIKlOn+VhY+mgFJw== From: Kory Maincent Date: Thu, 12 Sep 2024 11:20:03 +0200 Subject: [PATCH ethtool-next 2/3] ethtool.8: Fix small documentation nit 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="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20240912-feature_poe_power_cap-v1-2-499e3dd996d7@bootlin.com> References: <20240912-feature_poe_power_cap-v1-0-499e3dd996d7@bootlin.com> In-Reply-To: <20240912-feature_poe_power_cap-v1-0-499e3dd996d7@bootlin.com> To: Oleksij Rempel , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Andrew Lunn , Michal Kubecek Cc: Kyle Swenson , Thomas Petazzoni , netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Kory Maincent X-Mailer: b4 0.15-dev-8cb71 X-GND-Sasl: kory.maincent@bootlin.com From: Kory Maincent (Dent Project) Remove useless .RE macro call. Signed-off-by: Kory Maincent --- ethtool.8.in | 1 - 1 file changed, 1 deletion(-) diff --git a/ethtool.8.in b/ethtool.8.in index bf8af57..3b4df42 100644 --- a/ethtool.8.in +++ b/ethtool.8.in @@ -1809,7 +1809,6 @@ status depend on internal PSE state machine and autom= atic PD classification support. It corresponds to IEEE 802.3-2022 30.9.1.1.5 (aPSEPowerDetectionStatus) with potential values being .B disabled, searching, delivering power, test, fault, other fault -.RE =20 .RE .TP --=20 2.34.1 From nobody Sat Nov 30 04:28:29 2024 Received: from relay7-d.mail.gandi.net (relay7-d.mail.gandi.net [217.70.183.200]) (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 1816F190675; Thu, 12 Sep 2024 09:20:17 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=217.70.183.200 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1726132820; cv=none; b=ne7MJRL4GczqHEtRamcAB7r96EcL+EGalGt7q8WzK9pIGkV6OIBPLWEKyIOfPyKuvkaHiRXlpiU6Ux7OAHqigpMFcMEFOISzupBUXNxgbwc4l/p377wAmcJjCl7nIElJ3lihCGrPtRTP+tdDhLLOPTqtGY6uLTeGfdzx6jYjnI8= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1726132820; c=relaxed/simple; bh=j2CDIlRAqYOUw44emUEbwqYGv+uqh685KjTuPfyHLrg=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=JYIfMTnRZ9cBD/I/nYTy8UtisRQNUQihmPgpSB3pvROs/Xx+NNpbimP7Wdcb3bjZSYrkAEjLaNIjpaJeKmuXIiYGMw7VLYF644YpnC1Iak3Nu7bhv9IQojvV/gXQuwiLh+7h5LH8ml37OlGTDyAnPpm8rwlGZGqBuxxul04PqDo= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=bootlin.com; spf=pass smtp.mailfrom=bootlin.com; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b=kM+1+Ahu; arc=none smtp.client-ip=217.70.183.200 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=bootlin.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=bootlin.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b="kM+1+Ahu" Received: by mail.gandi.net (Postfix) with ESMTPSA id 9EE1C20010; Thu, 12 Sep 2024 09:20:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1726132816; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=ZHe8OJYspWoaHU9WVb1XPlu+LICOnsvuNjbBgFu9lGE=; b=kM+1+AhumfKj2pTrFIuWJUd90X9YjLZrXXZzVgBn8jxs6jRX0NbupMbsGas9fkz/vCZjCI Q8F9bqsv0UJpYcKjA2qRfT/KEMzdQoV2vdOiu84ktM+8WQ+bwchlobk6OtOjxtCi+6U49L aSsJAQpeyHrCTrU84ATDhKn+ILeubJLnJXo40AZcN/mtqQbDYpz63YSRefnnshP7fF50NV NSFWqTuOIUVHDDF0gM2uW/lpY8YYpQaCUnzA/ciYhBghV9L6eUzFuhdoXH5V54vFmmotJQ oCF7GBZ4aU+Jlc2uwOoIMRa6U046tH4yQqmDNNF3sYD+r6nxnN6bpEuugf0Xfw== From: Kory Maincent Date: Thu, 12 Sep 2024 11:20:04 +0200 Subject: [PATCH ethtool-next 3/3] ethtool.8: Add documentation for new C33 PSE features 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="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20240912-feature_poe_power_cap-v1-3-499e3dd996d7@bootlin.com> References: <20240912-feature_poe_power_cap-v1-0-499e3dd996d7@bootlin.com> In-Reply-To: <20240912-feature_poe_power_cap-v1-0-499e3dd996d7@bootlin.com> To: Oleksij Rempel , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Andrew Lunn , Michal Kubecek Cc: Kyle Swenson , Thomas Petazzoni , netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Kory Maincent X-Mailer: b4 0.15-dev-8cb71 X-GND-Sasl: kory.maincent@bootlin.com From: Kory Maincent (Dent Project) Add documentation to described the newly C33 PSE features supported. Signed-off-by: Kory Maincent --- ethtool.8.in | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) diff --git a/ethtool.8.in b/ethtool.8.in index 3b4df42..39bbd2e 100644 --- a/ethtool.8.in +++ b/ethtool.8.in @@ -542,6 +542,7 @@ ethtool \- query or control network driver and hardware= settings .BR enable | disable ] .RB [ c33\-pse\-admin\-control .BR enable | disable ] +.BN c33\-pse\-avail\-pw\-limit N .HP .B ethtool \-\-flash\-module\-firmware .I devname @@ -1809,6 +1810,36 @@ status depend on internal PSE state machine and auto= matic PD classification support. It corresponds to IEEE 802.3-2022 30.9.1.1.5 (aPSEPowerDetectionStatus) with potential values being .B disabled, searching, delivering power, test, fault, other fault +.TP +.B c33-pse-extended-state +This attribute indicates the Extended state of the c33 PSE. The extended +state correlated with the c33 PSE Extended Substate allows to have more +detail on the c33 PSE current error state. +It corresponds to IEEE 802.3-2022 33.2.4.4 Variables. +.TP +.B c33-pse-extended-substate +This attribute indicates the Extended substate of the c33 PSE. Correlated +with the c33 PSE Extended state value, it allows to have more detail on the +c33 PSE current error state. +.TP +.B c33-pse-power-class +This attribute identifies the power class of the c33 PSE. It depends on +the class negotiated between the PSE and the PD. It corresponds to +IEEE 802.3-2022 30.9.1.1.8 (aPSEPowerClassification). +.TP +.B c33-pse-actual-power +This attribute identifies the actual power drawn by the c33 PSE. It +corresponds to ``IEEE 802.3-2022`` 30.9.1.1.23 (aPSEActualPower). Actual +power is reported in mW. +.TP +.B c33-pse-available-power-limit +This attribute identifies the configured c33 PSE power limit in mW. +.TP +.B c33-pse-power-limit-ranges +This attribute specifies the allowed power limit ranges in mW for +configuring the c33-pse-avail-pw-limit parameter. It defines the valid +power levels that can be assigned to the c33 PSE in compliance with the +c33 standard. =20 .RE .TP @@ -1823,6 +1854,11 @@ This parameter manages PoDL PSE Admin operations in = accordance with the IEEE .A2 c33-pse-admin-control \ enable disable This parameter manages c33 PSE Admin operations in accordance with the IEEE 802.3-2022 30.9.1.2.1 (acPSEAdminControl) specification. +.TP +.B c33-pse-avail-pw-limit \ N +This parameter manages c33 PSE Available Power Limit in mW, in accordance +with the IEEE 802.3-2022 33.2.4.4 Variables (pse_available_power) +specification. =20 .RE .TP --=20 2.34.1