From: Haiyang Zhang <haiyangz@linux.microsoft.com>
To: mkubecek@suse.cz, linux-hyperv@vger.kernel.org, netdev@vger.kernel.org
Cc: haiyangz@microsoft.com, paulros@microsoft.com
Subject: [PATCH ethtool-next] netlink: settings: add netlink support for RX CQE Coalescing params
Date: Fri, 20 Mar 2026 13:31:59 -0700 [thread overview]
Message-ID: <20260320203159.1590235-1-haiyangz@linux.microsoft.com> (raw)
From: Haiyang Zhang <haiyangz@microsoft.com>
Add support to get/set RX CQE Coalescing parameters, including the max frames
and time out value in nanoseconds.
(Headers: dc3d720e12f6 "net: ethtool: add ethtool COALESCE_RX_CQE_FRAMES/NSECS")
Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
---
ethtool.8.in | 2 ++
ethtool.c | 2 ++
netlink/coalesce.c | 17 +++++++++++++++++
netlink/desc-ethtool.c | 2 ++
shell-completion/bash/ethtool | 2 ++
5 files changed, 25 insertions(+)
diff --git a/ethtool.8.in b/ethtool.8.in
index e10a252..fe3c0ec 100644
--- a/ethtool.8.in
+++ b/ethtool.8.in
@@ -198,6 +198,8 @@ ethtool \- query or control network driver and hardware settings
.BN tx\-aggr\-max\-bytes
.BN tx\-aggr\-max\-frames
.BN tx\-aggr\-time\-usecs
+.BN rx\-cqe\-frames
+.BN rx\-cqe\-nsecs
.HP
.B ethtool \-g|\-\-show\-ring
.I devname
diff --git a/ethtool.c b/ethtool.c
index c9c1502..2444d85 100644
--- a/ethtool.c
+++ b/ethtool.c
@@ -5925,6 +5925,8 @@ static const struct option args[] = {
" [tx-aggr-max-bytes N]\n"
" [tx-aggr-max-frames N]\n"
" [tx-aggr-time-usecs N]\n"
+ " [rx-cqe-frames N]\n"
+ " [rx-cqe-nsecs N]\n"
},
{
.opts = "-g|--show-ring",
diff --git a/netlink/coalesce.c b/netlink/coalesce.c
index bc8b57b..f36b8e8 100644
--- a/netlink/coalesce.c
+++ b/netlink/coalesce.c
@@ -96,6 +96,11 @@ int coalesce_reply_cb(const struct nlmsghdr *nlhdr, void *data)
show_u32("tx-aggr-time-usecs", "tx-aggr-time-usecs:\t",
tb[ETHTOOL_A_COALESCE_TX_AGGR_TIME_USECS]);
show_cr();
+ show_u32("rx-cqe-frames", "rx-cqe-frames:\t\t",
+ tb[ETHTOOL_A_COALESCE_RX_CQE_FRAMES]);
+ show_u32("rx-cqe-nsecs", "rx-cqe-nsecs:\t\t",
+ tb[ETHTOOL_A_COALESCE_RX_CQE_NSECS]);
+ show_cr();
close_json_object();
@@ -292,6 +297,18 @@ static const struct param_parser scoalesce_params[] = {
.handler = nl_parse_direct_u32,
.min_argc = 1,
},
+ {
+ .arg = "rx-cqe-frames",
+ .type = ETHTOOL_A_COALESCE_RX_CQE_FRAMES,
+ .handler = nl_parse_direct_u32,
+ .min_argc = 1,
+ },
+ {
+ .arg = "rx-cqe-nsecs",
+ .type = ETHTOOL_A_COALESCE_RX_CQE_NSECS,
+ .handler = nl_parse_direct_u32,
+ .min_argc = 1,
+ },
{}
};
diff --git a/netlink/desc-ethtool.c b/netlink/desc-ethtool.c
index 8289190..08d94de 100644
--- a/netlink/desc-ethtool.c
+++ b/netlink/desc-ethtool.c
@@ -249,6 +249,8 @@ static const struct pretty_nla_desc __coalesce_desc[] = {
NLATTR_DESC_U32(ETHTOOL_A_COALESCE_TX_AGGR_TIME_USECS),
NLATTR_DESC_NESTED(ETHTOOL_A_COALESCE_RX_PROFILE, profile),
NLATTR_DESC_NESTED(ETHTOOL_A_COALESCE_TX_PROFILE, profile),
+ NLATTR_DESC_U32(ETHTOOL_A_COALESCE_RX_CQE_FRAMES),
+ NLATTR_DESC_U32(ETHTOOL_A_COALESCE_RX_CQE_NSECS),
};
static const struct pretty_nla_desc __pause_stats_desc[] = {
diff --git a/shell-completion/bash/ethtool b/shell-completion/bash/ethtool
index 3c775a1..57c39c4 100644
--- a/shell-completion/bash/ethtool
+++ b/shell-completion/bash/ethtool
@@ -259,6 +259,8 @@ _ethtool_coalesce()
[tx-aggr-max-bytes]=1
[tx-aggr-max-frames]=1
[tx-aggr-time-usecs]=1
+ [rx-cqe-frames]=1
+ [rx-cqe-nsecs]=1
)
case "$prev" in
--
2.34.1
next reply other threads:[~2026-03-20 20:32 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-20 20:31 Haiyang Zhang [this message]
2026-03-23 22:20 ` [PATCH ethtool-next] netlink: settings: add netlink support for RX CQE Coalescing params 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=20260320203159.1590235-1-haiyangz@linux.microsoft.com \
--to=haiyangz@linux.microsoft.com \
--cc=haiyangz@microsoft.com \
--cc=linux-hyperv@vger.kernel.org \
--cc=mkubecek@suse.cz \
--cc=netdev@vger.kernel.org \
--cc=paulros@microsoft.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