From: Kory Maincent <kory.maincent@bootlin.com>
To: Jakub Kicinski <kuba@kernel.org>
Cc: "David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Paolo Abeni <pabeni@redhat.com>,
Donald Hunter <donald.hunter@gmail.com>,
Oleksij Rempel <o.rempel@pengutronix.de>,
Jonathan Corbet <corbet@lwn.net>,
Thomas Petazzoni <thomas.petazzoni@bootlin.com>,
linux-kernel@vger.kernel.org, netdev@vger.kernel.org,
Dent Project <dentproject@linuxfoundation.org>,
kernel@pengutronix.de, linux-doc@vger.kernel.org
Subject: Re: [PATCH net-next v6 5/7] net: ethtool: Add new power limit get and set features
Date: Tue, 9 Jul 2024 15:20:41 +0200 [thread overview]
Message-ID: <20240709152041.7493ffc5@kmaincent-XPS-13-7390> (raw)
In-Reply-To: <20240708113300.3544d36d@kernel.org>
On Mon, 8 Jul 2024 11:33:00 -0700
Jakub Kicinski <kuba@kernel.org> wrote:
> On Mon, 8 Jul 2024 11:38:46 +0200 Kory Maincent wrote:
> [...]
> [...]
>
> Don't worry I understand the code well enough to resolve any conflicts
> (famous last words?). And if we fix as part of ethnl_set_pse_validate()
> then there's no conflict, AFAICT.
As you can see in the patch I just sent
https://lore.kernel.org/netdev/20240709131201.166421-1-kory.maincent@bootlin.com/T/#u
the fix is not in set_pse_validate() therefore you will have a merge conflict.
You could do this to solve the merge conflict:
--- a/net/ethtool/pse-pd.c
+++ b/net/ethtool/pse-pd.c
@@ -256,6 +256,7 @@ static int
ethnl_set_pse(struct ethnl_req_info *req_info, struct genl_info *info)
{
struct net_device *dev = req_info->dev;
+ struct pse_control_config config = {};
struct nlattr **tb = info->attrs;
struct phy_device *phydev;
int ret = 0;
@@ -273,15 +274,13 @@ ethnl_set_pse(struct ethnl_req_info *req_info, struct genl_info *info)
}
/* These values are already validated by the ethnl_pse_set_policy */
+ if (tb[ETHTOOL_A_PODL_PSE_ADMIN_CONTROL])
+ config.podl_admin_control = nla_get_u32(tb[ETHTOOL_A_PODL_PSE_ADMIN_CONTROL]);
+ if (tb[ETHTOOL_A_C33_PSE_ADMIN_CONTROL])
+ config.c33_admin_control = nla_get_u32(tb[ETHTOOL_A_C33_PSE_ADMIN_CONTROL]);
+
if (tb[ETHTOOL_A_PODL_PSE_ADMIN_CONTROL] ||
tb[ETHTOOL_A_C33_PSE_ADMIN_CONTROL]) {
- struct pse_control_config config = {};
-
- if (pse_has_podl(phydev->psec))
- config.podl_admin_control = nla_get_u32(tb[ETHTOOL_A_PODL_PSE_ADMIN_CONTROL]);
- if (pse_has_c33(phydev->psec))
- config.c33_admin_control = nla_get_u32(tb[ETHTOOL_A_C33_PSE_ADMIN_CONTROL]);
-
ret = pse_ethtool_set_config(phydev->psec, info->extack,
&config);
if (ret)
Regards,
--
Köry Maincent, Bootlin
Embedded Linux and kernel engineering
https://bootlin.com
next prev parent reply other threads:[~2024-07-09 13:20 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-07-04 8:11 [PATCH net-next v6 0/7] net: pse-pd: Add new PSE c33 features Kory Maincent
2024-07-04 8:11 ` [PATCH net-next v6 1/7] net: ethtool: pse-pd: Expand C33 PSE status with class, power and extended state Kory Maincent
2024-07-04 8:11 ` [PATCH net-next v6 2/7] netlink: specs: Expand the PSE netlink command with C33 new features Kory Maincent
2024-07-04 8:11 ` [PATCH net-next v6 3/7] net: pse-pd: pd692x0: Expand ethtool status message Kory Maincent
2024-07-04 8:11 ` [PATCH net-next v6 4/7] net: pse-pd: Add new power limit get and set c33 features Kory Maincent
2024-07-04 8:12 ` [PATCH net-next v6 5/7] net: ethtool: Add new power limit get and set features Kory Maincent
2024-07-06 1:41 ` Jakub Kicinski
2024-07-08 9:38 ` Kory Maincent
2024-07-08 18:33 ` Jakub Kicinski
2024-07-09 13:20 ` Kory Maincent [this message]
2024-07-04 8:12 ` [PATCH net-next v6 6/7] netlink: specs: Expand the PSE netlink command with C33 pw-limit attributes Kory Maincent
2024-07-04 8:12 ` [PATCH net-next v6 7/7] net: pse-pd: pd692x0: Enhance with new current limit and voltage read callbacks Kory Maincent
2024-07-05 13:10 ` [PATCH net-next v6 0/7] net: pse-pd: Add new PSE c33 features Kory Maincent
2024-07-06 1:50 ` patchwork-bot+netdevbpf
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20240709152041.7493ffc5@kmaincent-XPS-13-7390 \
--to=kory.maincent@bootlin.com \
--cc=corbet@lwn.net \
--cc=davem@davemloft.net \
--cc=dentproject@linuxfoundation.org \
--cc=donald.hunter@gmail.com \
--cc=edumazet@google.com \
--cc=kernel@pengutronix.de \
--cc=kuba@kernel.org \
--cc=linux-doc@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=o.rempel@pengutronix.de \
--cc=pabeni@redhat.com \
--cc=thomas.petazzoni@bootlin.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox