DORMANTno replies

[PATCH ethtool-next] monitor: Add notification handling for PLCA configuration

From: Maxime Chevallier <maxime.chevallier@bootlin.com>
Date: 2025-06-24 06:06:49
Subsystem: the rest · Maintainer: Linus Torvalds

Physical Layer Collision Avoindance (PLCA) has configuration and status
netlink commands (PLCA_GET/SET_CFG and PLCA_GET_STATUS).

The PLCA_xxx_CFG commands generate notifications, allow monitoring them.

Signed-off-by: Maxime Chevallier <maxime.chevallier@bootlin.com>
---
 netlink/monitor.c | 9 +++++++++
 netlink/netlink.h | 1 +
 2 files changed, 10 insertions(+)
diff --git a/netlink/monitor.c b/netlink/monitor.c
index ace9b25..c511389 100644
--- a/netlink/monitor.c
+++ b/netlink/monitor.c
@@ -75,6 +75,10 @@ static struct {
 		.cmd	= ETHTOOL_MSG_MODULE_NTF,
 		.cb	= module_reply_cb,
 	},
+	{
+		.cmd	= ETHTOOL_MSG_PLCA_NTF,
+		.cb	= plca_get_cfg_reply_cb,
+	},
 };
 
 static void clear_filter(struct nl_context *nlctx)
@@ -186,6 +190,11 @@ static struct monitor_option monitor_opts[] = {
 		.pattern	= "--show-module|--set-module",
 		.cmd		= ETHTOOL_MSG_MODULE_NTF,
 	},
+	{
+		.pattern	= "--get-plca-cfg|--set-plca-cfg",
+		.cmd		= ETHTOOL_MSG_PLCA_NTF,
+	},
+
 };
 
 static bool pattern_match(const char *s, const char *pattern)
diff --git a/netlink/netlink.h b/netlink/netlink.h
index ad2a787..290592b 100644
--- a/netlink/netlink.h
+++ b/netlink/netlink.h
@@ -92,6 +92,7 @@ int cable_test_tdr_reply_cb(const struct nlmsghdr *nlhdr, void *data);
 int cable_test_tdr_ntf_cb(const struct nlmsghdr *nlhdr, void *data);
 int fec_reply_cb(const struct nlmsghdr *nlhdr, void *data);
 int module_reply_cb(const struct nlmsghdr *nlhdr, void *data);
+int plca_get_cfg_reply_cb(const struct nlmsghdr *nlhdr, void *data);
 
 /* dump helpers */
 
-- 
2.49.0
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help