Netdev Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Michal Kubecek <mkubecek@suse.cz>
To: Yufeng Mo <moyufeng@huawei.com>
Cc: davem@davemloft.net, kuba@kernel.org, amitc@mellanox.com,
	idosch@idosch.org, andrew@lunn.ch, o.rempel@pengutronix.de,
	f.fainelli@gmail.com, jacob.e.keller@intel.com,
	mlxsw@mellanox.com, netdev@vger.kernel.org, lipeng321@huawei.com,
	linuxarm@huawei.com, linuxarm@openeuler.org
Subject: Re: [PATCH RESEND ethtool-next] netlink: settings: add netlink support for coalesce cqe mode parameter
Date: Sun, 29 Aug 2021 18:57:25 +0200	[thread overview]
Message-ID: <20210829165725.p7tbqwdeaugekb3v@lion.mk-sys.cz> (raw)
In-Reply-To: <1630044408-32819-1-git-send-email-moyufeng@huawei.com>

[-- Attachment #1: Type: text/plain, Size: 1911 bytes --]

On Fri, Aug 27, 2021 at 02:06:48PM +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>
> ---
>  ethtool.c          |  2 ++
>  netlink/coalesce.c | 15 +++++++++++++++
>  2 files changed, 17 insertions(+)

Please update also the man page (file ethtool.8.in) to show the new
parameters.

Michal

> 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..762d0e3 100644
> --- a/netlink/coalesce.c
> +++ b/netlink/coalesce.c
> @@ -66,6 +66,9 @@ 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]);
>  
>  	return MNL_CB_OK;
>  }
> @@ -226,6 +229,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
> 

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

  reply	other threads:[~2021-08-29 16:57 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-27  6:06 [PATCH RESEND ethtool-next] netlink: settings: add netlink support for coalesce cqe mode parameter Yufeng Mo
2021-08-29 16:57 ` Michal Kubecek [this message]
2021-08-30  1:46   ` moyufeng

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=20210829165725.p7tbqwdeaugekb3v@lion.mk-sys.cz \
    --to=mkubecek@suse.cz \
    --cc=amitc@mellanox.com \
    --cc=andrew@lunn.ch \
    --cc=davem@davemloft.net \
    --cc=f.fainelli@gmail.com \
    --cc=idosch@idosch.org \
    --cc=jacob.e.keller@intel.com \
    --cc=kuba@kernel.org \
    --cc=linuxarm@huawei.com \
    --cc=linuxarm@openeuler.org \
    --cc=lipeng321@huawei.com \
    --cc=mlxsw@mellanox.com \
    --cc=moyufeng@huawei.com \
    --cc=netdev@vger.kernel.org \
    --cc=o.rempel@pengutronix.de \
    /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;
as well as URLs for NNTP newsgroup(s).