[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20211220083155.39882-2-huangguangbin2@huawei.com>
Date: Mon, 20 Dec 2021 16:31:54 +0800
From: Guangbin Huang <huangguangbin2@...wei.com>
To: <mkubecek@...e.cz>, <davem@...emloft.net>, <kuba@...nel.org>
CC: <netdev@...r.kernel.org>, <lipeng321@...wei.com>,
<huangguangbin2@...wei.com>, <chenhao288@...ilicon.com>
Subject: [PATCH ethtool-next 1/2] ethtool: netlink: add support to set/get rx buf len
From: Hao Chen <chenhao288@...ilicon.com>
Add support for "ethtool -G <dev> rx-buf-len xxx" and "ethtool -g <dev>"
to set/get rx-buf-len.
Signed-off-by: Hao Chen <chenhao288@...ilicon.com>
Signed-off-by: Guangbin Huang <huangguangbin2@...wei.com>
---
ethtool.c | 1 +
netlink/rings.c | 7 +++++++
2 files changed, 8 insertions(+)
diff --git a/ethtool.c b/ethtool.c
index 55dac51..0dc3559 100644
--- a/ethtool.c
+++ b/ethtool.c
@@ -5724,6 +5724,7 @@ static const struct option args[] = {
" [ rx-mini N ]\n"
" [ rx-jumbo N ]\n"
" [ tx N ]\n"
+ " [ rx-buf-len N]\n"
},
{
.opts = "-k|--show-features|--show-offload",
diff --git a/netlink/rings.c b/netlink/rings.c
index b8c458f..119178e 100644
--- a/netlink/rings.c
+++ b/netlink/rings.c
@@ -46,6 +46,7 @@ int rings_reply_cb(const struct nlmsghdr *nlhdr, void *data)
show_u32(tb[ETHTOOL_A_RINGS_RX_MINI], "RX Mini:\t");
show_u32(tb[ETHTOOL_A_RINGS_RX_JUMBO], "RX Jumbo:\t");
show_u32(tb[ETHTOOL_A_RINGS_TX], "TX:\t\t");
+ show_u32(tb[ETHTOOL_A_RINGS_RX_BUF_LEN], "RX Buf Len:\t\t");
return MNL_CB_OK;
}
@@ -98,6 +99,12 @@ static const struct param_parser sring_params[] = {
.handler = nl_parse_direct_u32,
.min_argc = 1,
},
+ {
+ .arg = "rx-buf-len",
+ .type = ETHTOOL_A_RINGS_RX_BUF_LEN,
+ .handler = nl_parse_direct_u32,
+ .min_argc = 1,
+ },
{}
};
--
2.33.0
Powered by blists - more mailing lists