[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20211012112624.641ed3e9@kicinski-fedora-pc1c0hjn.dhcp.thefacebook.com>
Date: Tue, 12 Oct 2021 11:26:24 -0700
From: Jakub Kicinski <kuba@...nel.org>
To: Guangbin Huang <huangguangbin2@...wei.com>
Cc: <davem@...emloft.net>, <mkubecek@...e.cz>, <andrew@...n.ch>,
<amitc@...lanox.com>, <idosch@...sch.org>, <danieller@...dia.com>,
<jesse.brandeburg@...el.com>, <anthony.l.nguyen@...el.com>,
<jdike@...toit.com>, <richard@....at>,
<anton.ivanov@...bridgegreys.com>, <netanel@...zon.com>,
<akiyano@...zon.com>, <gtzalik@...zon.com>, <saeedb@...zon.com>,
<chris.snook@...il.com>, <ulli.kroll@...glemail.com>,
<linus.walleij@...aro.org>, <jeroendb@...gle.com>,
<csully@...gle.com>, <awogbemila@...gle.com>, <jdmason@...zu.us>,
<rain.1986.08.12@...il.com>, <zyjzyj2000@...il.com>,
<kys@...rosoft.com>, <haiyangz@...rosoft.com>, <mst@...hat.com>,
<jasowang@...hat.com>, <doshir@...are.com>,
<pv-drivers@...are.com>, <jwi@...ux.ibm.com>,
<kgraul@...ux.ibm.com>, <hca@...ux.ibm.com>, <gor@...ux.ibm.com>,
<johannes@...solutions.net>, <netdev@...r.kernel.org>,
<lipeng321@...wei.com>, <chenhao288@...ilicon.com>,
<linux-s390@...r.kernel.org>
Subject: Re: [PATCH V3 net-next 3/6] ethtool: add support to set/get rx buf
len via ethtool
On Tue, 12 Oct 2021 21:41:24 +0800 Guangbin Huang wrote:
> From: Hao Chen <chenhao288@...ilicon.com>
>
> Add support to set rx buf len via ethtool -G parameter and get
> rx buf len via ethtool -g parameter.
>
> Signed-off-by: Hao Chen <chenhao288@...ilicon.com>
> Signed-off-by: Guangbin Huang <huangguangbin2@...wei.com>
> + ``ETHTOOL_A_RINGS_RX_BUF_LEN`` u32 size of buffers on the ring
> ==================================== ====== ==========================
Does the documentation build without warnings?
> diff --git a/include/uapi/linux/ethtool.h b/include/uapi/linux/ethtool.h
> index 266e95e4fb33..83544186cbb5 100644
> --- a/include/uapi/linux/ethtool.h
> +++ b/include/uapi/linux/ethtool.h
> @@ -535,6 +535,14 @@ struct ethtool_ringparam {
> __u32 tx_pending;
> };
>
> +/**
> + * struct ethtool_ringparam_ext - RX/TX ring configuration
> + * @rx_buf_len: Current length of buffers on the rx ring.
> + */
> +struct ethtool_ringparam_ext {
> + __u32 rx_buf_len;
> +};
This can be moved to include/linux/ethtool.h, user space does not need
to know about this structure.
> + if (ringparam_ext.rx_buf_len != 0 &&
> + !(ops->supported_ring_params & ETHTOOL_RING_USE_RX_BUF_LEN)) {
> + ret = -EOPNOTSUPP;
> + NL_SET_ERR_MSG_ATTR(info->extack,
> + tb[ETHTOOL_A_RINGS_RX_BUF_LEN],
> + "setting not supported rx buf len");
"setting rx buf len not supported" sounds better
> + goto out_ops;
> + }
> +
> ret = dev->ethtool_ops->set_ringparam(dev, &ringparam);
> if (ret < 0)
> goto out_ops;
Powered by blists - more mailing lists