All of lore.kernel.org
 help / color / mirror / Atom feed
From: Michal Kubecek <mkubecek@suse.cz>
To: Guangbin Huang <huangguangbin2@huawei.com>
Cc: davem@davemloft.net, kuba@kernel.org, andrew@lunn.ch,
	amitc@mellanox.com, idosch@idosch.org, danieller@nvidia.com,
	netdev@vger.kernel.org, lipeng321@huawei.com,
	chenhao288@hisilicon.com
Subject: Re: [PATCH net-next 1/5] ethtool: add support to set/get tx spare buf size
Date: Thu, 26 Aug 2021 09:26:18 +0200	[thread overview]
Message-ID: <20210826072618.2lu6spapkzdcuhyv@lion.mk-sys.cz> (raw)
In-Reply-To: <1629873655-51539-2-git-send-email-huangguangbin2@huawei.com>

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

On Wed, Aug 25, 2021 at 02:40:51PM +0800, Guangbin Huang wrote:
> From: Hao Chen <chenhao288@hisilicon.com>
> 
> Add support for ethtool to set/get tx spare buf size.
> 
> Signed-off-by: Hao Chen <chenhao288@hisilicon.com>
> Signed-off-by: Guangbin Huang <huangguangbin2@huawei.com>
> ---
>  include/uapi/linux/ethtool.h | 1 +
>  net/ethtool/ioctl.c          | 1 +
>  2 files changed, 2 insertions(+)
> 
> diff --git a/include/uapi/linux/ethtool.h b/include/uapi/linux/ethtool.h
> index b6db6590baf0..266e95e4fb33 100644
> --- a/include/uapi/linux/ethtool.h
> +++ b/include/uapi/linux/ethtool.h
> @@ -231,6 +231,7 @@ enum tunable_id {
>  	ETHTOOL_RX_COPYBREAK,
>  	ETHTOOL_TX_COPYBREAK,
>  	ETHTOOL_PFC_PREVENTION_TOUT, /* timeout in msecs */
> +	ETHTOOL_TX_COPYBREAK_BUF_SIZE,
>  	/*
>  	 * Add your fresh new tunable attribute above and remember to update
>  	 * tunable_strings[] in net/ethtool/common.c
> diff --git a/net/ethtool/ioctl.c b/net/ethtool/ioctl.c
> index f2abc3152888..9fc801298fde 100644
> --- a/net/ethtool/ioctl.c
> +++ b/net/ethtool/ioctl.c
> @@ -2377,6 +2377,7 @@ static int ethtool_tunable_valid(const struct ethtool_tunable *tuna)
>  	switch (tuna->id) {
>  	case ETHTOOL_RX_COPYBREAK:
>  	case ETHTOOL_TX_COPYBREAK:
> +	case ETHTOOL_TX_COPYBREAK_BUF_SIZE:
>  		if (tuna->len != sizeof(u32) ||
>  		    tuna->type_id != ETHTOOL_TUNABLE_U32)
>  			return -EINVAL;
> -- 
> 2.8.1
> 

IMHO this illustrates quite well what I had in mind some time ago when
I expressed my doubts if the concept of tunables in this form still
makes sense as the main benefit - workaround for lack of extensibility
of the ioctl interface - is gone. With this patch, 3 out of 4 tunables
are related to copybreak and it would IMHO make sense to group them
together as attributes of a new message and ethtool subcommand.
Configuration of header split could also belong there when/if
implemented.

Michal

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

  parent reply	other threads:[~2021-08-26  7:26 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-25  6:40 [PATCH net-next 0/5] ethtool: add support to set/get tx spare buf size and rx buf len Guangbin Huang
2021-08-25  6:40 ` [PATCH net-next 1/5] ethtool: add support to set/get tx spare buf size Guangbin Huang
2021-08-25 14:56   ` Jakub Kicinski
2021-08-26  6:55     ` huangguangbin (A)
2021-08-26  7:26   ` Michal Kubecek [this message]
2021-08-25  6:40 ` [PATCH net-next 2/5] net: hns3: add support to set/get tx spare buf via ethtool for hns3 driver Guangbin Huang
2021-08-25  6:40 ` [PATCH net-next 3/5] ethtool: add support to set/get rx buf len Guangbin Huang
2021-08-25 15:09   ` Jakub Kicinski
2021-08-26  7:05     ` huangguangbin (A)
2021-08-25  6:40 ` [PATCH net-next 4/5] net: hns3: add support to set/get rx buf len via ethtool for hns3 driver Guangbin Huang
2021-08-25  6:40 ` [PATCH net-next 5/5] net: hns3: remove the way to set tx spare buf via module parameter Guangbin Huang

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=20210826072618.2lu6spapkzdcuhyv@lion.mk-sys.cz \
    --to=mkubecek@suse.cz \
    --cc=amitc@mellanox.com \
    --cc=andrew@lunn.ch \
    --cc=chenhao288@hisilicon.com \
    --cc=danieller@nvidia.com \
    --cc=davem@davemloft.net \
    --cc=huangguangbin2@huawei.com \
    --cc=idosch@idosch.org \
    --cc=kuba@kernel.org \
    --cc=lipeng321@huawei.com \
    --cc=netdev@vger.kernel.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.