Netdev Archive on lore.kernel.org
help / color / mirror / Atom feed
* [PATCH V2 ethtool-next] netlink: settings: add netlink support for coalesce cqe mode parameter
@ 2021-08-30 2:35 Yufeng Mo
2021-09-12 20:40 ` patchwork-bot+netdevbpf
2021-09-12 22:05 ` Michal Kubecek
0 siblings, 2 replies; 3+ messages in thread
From: Yufeng Mo @ 2021-08-30 2:35 UTC (permalink / raw)
To: davem, kuba, mkubecek, amitc, idosch, andrew, o.rempel,
f.fainelli, jacob.e.keller, mlxsw
Cc: netdev, lipeng321, moyufeng, linuxarm, linuxarm
Add support for "ethtool -C <dev> cqe-mode-rx/cqe-mode-tx on/off"
for setting coalesce cqe mode.
Signed-off-by: Yufeng Mo <moyufeng@huawei.com>
---
ChangeLogs:
V1 -> V2:
1. update the man page for new paremeters cqe-mode-rx/cqe-mode-tx.
2. add '\n' in coalesce_reply_cb() after showing new paremeters.
---
ethtool.8.in | 2 ++
ethtool.c | 2 ++
netlink/coalesce.c | 16 ++++++++++++++++
3 files changed, 20 insertions(+)
diff --git a/ethtool.8.in b/ethtool.8.in
index f83d6d1..c187c32 100644
--- a/ethtool.8.in
+++ b/ethtool.8.in
@@ -186,6 +186,8 @@ ethtool \- query or control network driver and hardware settings
.BN tx\-usecs\-high
.BN tx\-frames\-high
.BN sample\-interval
+.B2 cqe\-mode\-rx on off
+.B2 cqe\-mode\-tx on off
.HP
.B ethtool \-g|\-\-show\-ring
.I devname
diff --git a/ethtool.c b/ethtool.c
index 2486caa..a6826e9 100644
--- a/ethtool.c
+++ b/ethtool.c
@@ -5703,6 +5703,8 @@ static const struct option args[] = {
" [tx-usecs-high N]\n"
" [tx-frames-high N]\n"
" [sample-interval N]\n"
+ " [cqe-mode-rx on|off]\n"
+ " [cqe-mode-tx on|off]\n"
},
{
.opts = "-g|--show-ring",
diff --git a/netlink/coalesce.c b/netlink/coalesce.c
index 75922a9..15037c2 100644
--- a/netlink/coalesce.c
+++ b/netlink/coalesce.c
@@ -66,6 +66,10 @@ int coalesce_reply_cb(const struct nlmsghdr *nlhdr, void *data)
show_u32(tb[ETHTOOL_A_COALESCE_TX_USECS_HIGH], "tx-usecs-high: ");
show_u32(tb[ETHTOOL_A_COALESCE_TX_MAX_FRAMES_HIGH], "tx-frame-high: ");
putchar('\n');
+ show_bool("rx", "CQE mode RX: %s ",
+ tb[ETHTOOL_A_COALESCE_USE_CQE_MODE_RX]);
+ show_bool("tx", "TX: %s\n", tb[ETHTOOL_A_COALESCE_USE_CQE_MODE_TX]);
+ putchar('\n');
return MNL_CB_OK;
}
@@ -226,6 +230,18 @@ static const struct param_parser scoalesce_params[] = {
.handler = nl_parse_direct_u32,
.min_argc = 1,
},
+ {
+ .arg = "cqe-mode-rx",
+ .type = ETHTOOL_A_COALESCE_USE_CQE_MODE_RX,
+ .handler = nl_parse_u8bool,
+ .min_argc = 1,
+ },
+ {
+ .arg = "cqe-mode-tx",
+ .type = ETHTOOL_A_COALESCE_USE_CQE_MODE_TX,
+ .handler = nl_parse_u8bool,
+ .min_argc = 1,
+ },
{}
};
--
2.8.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH V2 ethtool-next] netlink: settings: add netlink support for coalesce cqe mode parameter
2021-08-30 2:35 [PATCH V2 ethtool-next] netlink: settings: add netlink support for coalesce cqe mode parameter Yufeng Mo
@ 2021-09-12 20:40 ` patchwork-bot+netdevbpf
2021-09-12 22:05 ` Michal Kubecek
1 sibling, 0 replies; 3+ messages in thread
From: patchwork-bot+netdevbpf @ 2021-09-12 20:40 UTC (permalink / raw)
To: moyufeng
Cc: davem, kuba, mkubecek, amitc, idosch, andrew, o.rempel,
f.fainelli, jacob.e.keller, mlxsw, netdev, lipeng321, linuxarm,
linuxarm
Hello:
This patch was applied to ethtool/ethtool.git (refs/heads/next):
On Mon, 30 Aug 2021 10:35:53 +0800 you wrote:
> Add support for "ethtool -C <dev> cqe-mode-rx/cqe-mode-tx on/off"
> for setting coalesce cqe mode.
>
> Signed-off-by: Yufeng Mo <moyufeng@huawei.com>
> ---
> ChangeLogs:
> V1 -> V2:
> 1. update the man page for new paremeters cqe-mode-rx/cqe-mode-tx.
> 2. add '\n' in coalesce_reply_cb() after showing new paremeters.
>
> [...]
Here is the summary with links:
- [V2,ethtool-next] netlink: settings: add netlink support for coalesce cqe mode parameter
https://git.kernel.org/pub/scm/network/ethtool/ethtool.git/commit/?id=ecfb7302cfe6
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH V2 ethtool-next] netlink: settings: add netlink support for coalesce cqe mode parameter
2021-08-30 2:35 [PATCH V2 ethtool-next] netlink: settings: add netlink support for coalesce cqe mode parameter Yufeng Mo
2021-09-12 20:40 ` patchwork-bot+netdevbpf
@ 2021-09-12 22:05 ` Michal Kubecek
1 sibling, 0 replies; 3+ messages in thread
From: Michal Kubecek @ 2021-09-12 22:05 UTC (permalink / raw)
To: Yufeng Mo
Cc: davem, kuba, amitc, idosch, andrew, o.rempel, f.fainelli,
jacob.e.keller, mlxsw, netdev, lipeng321, linuxarm, linuxarm
[-- Attachment #1: Type: text/plain, Size: 361 bytes --]
On Mon, Aug 30, 2021 at 10:35:53AM +0800, Yufeng Mo wrote:
> Add support for "ethtool -C <dev> cqe-mode-rx/cqe-mode-tx on/off"
> for setting coalesce cqe mode.
>
> Signed-off-by: Yufeng Mo <moyufeng@huawei.com>
> ---
Applied, thank you.
For the record, I added information that "ethtool -c" output is also
updated to the commit message.
Michal
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2021-09-12 22:05 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-30 2:35 [PATCH V2 ethtool-next] netlink: settings: add netlink support for coalesce cqe mode parameter Yufeng Mo
2021-09-12 20:40 ` patchwork-bot+netdevbpf
2021-09-12 22:05 ` Michal Kubecek
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).