From: Andrew Lunn <andrew@lunn•ch>
To: David Awogbemila <awogbemila@google•com>
Cc: netdev@vger•kernel.org, Kuo Zhao <kuozhao@google•com>,
Yangchun Fu <yangchun@google•com>
Subject: Re: [PATCH net-next 01/18] gve: Get and set Rx copybreak via ethtool
Date: Tue, 18 Aug 2020 22:00:52 +0200 [thread overview]
Message-ID: <20200818200052.GJ2330298@lunn.ch> (raw)
In-Reply-To: <20200818194417.2003932-2-awogbemila@google.com>
On Tue, Aug 18, 2020 at 12:44:00PM -0700, David Awogbemila wrote:
> From: Kuo Zhao <kuozhao@google•com>
>
> This adds support for getting and setting the RX copybreak
> value via ethtool.
>
> Reviewed-by: Yangchun Fu <yangchun@google•com>
> Signed-off-by: Kuo Zhao <kuozhao@google•com>
> Signed-off-by: David Awogbemila <awogbemila@google•com>
> ---
> drivers/net/ethernet/google/gve/gve_ethtool.c | 34 +++++++++++++++++++
> 1 file changed, 34 insertions(+)
>
> diff --git a/drivers/net/ethernet/google/gve/gve_ethtool.c b/drivers/net/ethernet/google/gve/gve_ethtool.c
> index d8fa816f4473..469d3332bcd6 100644
> --- a/drivers/net/ethernet/google/gve/gve_ethtool.c
> +++ b/drivers/net/ethernet/google/gve/gve_ethtool.c
> @@ -230,6 +230,38 @@ static int gve_user_reset(struct net_device *netdev, u32 *flags)
> return -EOPNOTSUPP;
> }
Hi David.
> +static int gve_get_tunable(struct net_device *netdev,
> + const struct ethtool_tunable *etuna, void *value)
> +{
> + struct gve_priv *priv = netdev_priv(netdev);
> +
> + switch (etuna->id) {
> + case ETHTOOL_RX_COPYBREAK:
> + *(u32 *)value = priv->rx_copybreak;
> + return 0;
> + default:
> + return -EINVAL;
EOPNOTSUPP would be better. Other tunables are not invalid, they are
simply not supported by this driver.
> + }
> +}
> +
> +static int gve_set_tunable(struct net_device *netdev,
> + const struct ethtool_tunable *etuna, const void *value)
> +{
> + struct gve_priv *priv = netdev_priv(netdev);
> + u32 len;
> +
> + switch (etuna->id) {
> + case ETHTOOL_RX_COPYBREAK:
> + len = *(u32 *)value;
> + if (len > PAGE_SIZE / 2)
> + return -EINVAL;
> + priv->rx_copybreak = len;
> + return 0;
> + default:
> + return -EINVAL;
Same here.
Andrew
next prev parent reply other threads:[~2020-08-18 20:00 UTC|newest]
Thread overview: 38+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-08-18 19:43 [PATCH net-next 00/18] GVE Driver v1.1.0 Features David Awogbemila
2020-08-18 19:44 ` [PATCH net-next 01/18] gve: Get and set Rx copybreak via ethtool David Awogbemila
2020-08-18 20:00 ` Andrew Lunn [this message]
2020-08-18 19:44 ` [PATCH net-next 02/18] gve: Add stats for gve David Awogbemila
2020-08-18 19:44 ` [PATCH net-next 03/18] gve: Register netdev earlier David Awogbemila
2020-08-18 20:09 ` Andrew Lunn
2020-08-18 19:44 ` [PATCH net-next 04/18] gve: Add support for dma_mask register David Awogbemila
2020-08-18 20:15 ` Andrew Lunn
2020-08-18 19:44 ` [PATCH net-next 05/18] gve: Add Gvnic stats AQ command and ethtool show/set-priv-flags David Awogbemila
2020-08-19 3:13 ` Jakub Kicinski
2020-08-25 15:46 ` David Awogbemila
2020-08-25 16:46 ` Jakub Kicinski
2020-08-26 0:06 ` David Awogbemila
2020-08-26 0:53 ` Jakub Kicinski
2020-08-27 19:24 ` David Awogbemila
2020-08-18 19:44 ` [PATCH net-next 06/18] gve: Batch AQ commands for creating and destroying queues David Awogbemila
2020-08-18 20:16 ` David Miller
2020-08-18 22:25 ` David Awogbemila
2020-08-18 19:44 ` [PATCH net-next 07/18] gve: Use link status register to report link status David Awogbemila
2020-08-19 3:36 ` Jakub Kicinski
2020-08-25 15:46 ` David Awogbemila
2020-08-18 19:44 ` [PATCH net-next 08/18] gve: Enable Link Speed Reporting in the driver David Awogbemila
2020-08-18 21:30 ` Jakub Kicinski
2020-08-18 19:44 ` [PATCH net-next 09/18] gve: Add support for raw addressing device option David Awogbemila
2020-08-18 19:44 ` [PATCH net-next 10/18] gve: Add support for raw addressing to the rx path David Awogbemila
2020-08-18 20:18 ` David Miller
2020-08-18 22:25 ` David Awogbemila
2020-08-18 19:44 ` [PATCH net-next 11/18] gve: Add support for raw addressing in the tx path David Awogbemila
2020-08-18 19:44 ` [PATCH net-next 12/18] gve: Add netif_set_xps_queue call David Awogbemila
2020-08-18 19:44 ` [PATCH net-next 13/18] gve: Add rx buffer pagecnt bias David Awogbemila
2020-08-18 19:44 ` [PATCH net-next 14/18] gve: Move the irq db indexes out of the ntfy block struct David Awogbemila
2020-08-18 19:44 ` [PATCH net-next 15/18] gve: Prefetch packet pages and packet descriptors David Awogbemila
2020-08-18 19:44 ` [PATCH net-next 16/18] gve: Also WARN for skb index equals num_queues David Awogbemila
2020-08-18 19:44 ` [PATCH net-next 17/18] gve: Switch to use napi_complete_done David Awogbemila
2020-08-18 19:44 ` [PATCH net-next 18/18] gve: Bump version to 1.1.0 David Awogbemila
2020-08-19 3:40 ` Jakub Kicinski
2020-08-18 20:19 ` [PATCH net-next 00/18] GVE Driver v1.1.0 Features David Miller
2020-08-18 22:24 ` David Awogbemila
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=20200818200052.GJ2330298@lunn.ch \
--to=andrew@lunn$(echo .)ch \
--cc=awogbemila@google$(echo .)com \
--cc=kuozhao@google$(echo .)com \
--cc=netdev@vger$(echo .)kernel.org \
--cc=yangchun@google$(echo .)com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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