Skip to contentSkip to conversation

netlink: fix duplex setting

PATCH Applied Ladislav Michl 2 participants 2 messages Jun 27, 2023 – Jul 1, 2023

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 netlink: fix duplex setting

From: Ladislav Michl <[email protected]>

nl_parse_lookup_u8 handler is used with duplex_values defined as lookup_entry_u32. While it still works on little endian machines, duplex is always 0 (DUPLEX_HALF) on big endian ones...

Fixes 392b12e38747 ("netlink: add netlink handler for sset (-s)")
---
 netlink/settings.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
netlink/settings.c +1 -1
index 4fd75d2..9aad8d9 100644
@@ -1089,7 +1089,7 @@ static const struct bitset_parser_data advertise_parser_data = {
 	.force_hex	= true,
 };
 
-static const struct lookup_entry_u32 duplex_values[] = {
+static const struct lookup_entry_u8 duplex_values[] = {
 	{ .arg = "half",	.val = DUPLEX_HALF },
 	{ .arg = "full",	.val = DUPLEX_FULL },
 	{}
Signature · 1 line
2.39.2
#1 lore raw
This patch was applied to ethtool/ethtool.git (master) by Michal Kubecek <[email protected]>:

Hello:

This patch was applied to ethtool/ethtool.git (master) by Michal Kubecek <[email protected]>:

Quoted 10 lines · On Tue, 27 Jun 2023 13:09:03 +0200 you wrote:

From: Ladislav Michl <[email protected]>

nl_parse_lookup_u8 handler is used with duplex_values defined as lookup_entry_u32. While it still works on little endian machines, duplex is always 0 (DUPLEX_HALF) on big endian ones...

Fixes 392b12e38747 ("netlink: add netlink handler for sset (-s)")

[...]

Here is the summary with links:
- [ethtool] netlink: fix duplex setting

    https://git.kernel.org/pub/scm/network/ethtool/ethtool.git/commit/?id=f493e6381c8a

You are awesome, thank you!

Signature · 2 lines
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html