[<prev] [next>] [day] [month] [year] [list]
Message-ID: <20250624060642.2926925-1-maxime.chevallier@bootlin.com>
Date: Tue, 24 Jun 2025 08:06:41 +0200
From: Maxime Chevallier <maxime.chevallier@...tlin.com>
To: Michal Kubecek <mkubecek@...e.cz>
Cc: Maxime Chevallier <maxime.chevallier@...tlin.com>,
netdev@...r.kernel.org,
thomas.petazzoni@...tlin.com,
Jakub Kicinski <kuba@...nel.org>,
Piergiorgio Beruto <piergiorgio.beruto@...il.com>
Subject: [PATCH ethtool-next] monitor: Add notification handling for PLCA configuration
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@...tlin.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
Powered by blists - more mailing lists