[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <8b70630c-163b-474b-8322-d72ea8de8778@lunn.ch>
Date: Fri, 19 Sep 2025 18:35:51 +0200
From: Andrew Lunn <andrew@...n.ch>
To: Xuan Zhuo <xuanzhuo@...ux.alibaba.com>
Cc: netdev@...r.kernel.org, Andrew Lunn <andrew+netdev@...n.ch>,
"David S. Miller" <davem@...emloft.net>,
Eric Dumazet <edumazet@...gle.com>,
Jakub Kicinski <kuba@...nel.org>, Paolo Abeni <pabeni@...hat.com>,
Wen Gu <guwen@...ux.alibaba.com>,
Philo Lu <lulie@...ux.alibaba.com>,
Lorenzo Bianconi <lorenzo@...nel.org>,
Vadim Fedorenko <vadim.fedorenko@...ux.dev>,
Lukas Bulwahn <lukas.bulwahn@...hat.com>,
Geert Uytterhoeven <geert+renesas@...der.be>,
Vivian Wang <wangruikang@...as.ac.cn>,
Troy Mitchell <troy.mitchell@...ux.spacemit.com>,
Dust Li <dust.li@...ux.alibaba.com>
Subject: Re: [PATCH net-next v3] eea: Add basic driver framework for Alibaba
Elastic Ethernet Adaptor
> +static int eea_set_ringparam(struct net_device *netdev,
> + struct ethtool_ringparam *ring,
> + struct kernel_ethtool_ringparam *kernel_ring,
> + struct netlink_ext_ack *extack)
> +{
> + struct eea_net *enet = netdev_priv(netdev);
> + struct eea_net_tmp tmp = {};
> + bool need_update = false;
> + struct eea_net_cfg *cfg;
> + bool sh;
> +
> + enet_mk_tmp_cfg(enet, &tmp);
> +
> + cfg = &tmp.cfg;
> +
> + if (ring->rx_mini_pending || ring->rx_jumbo_pending)
> + return -EINVAL;
You have extack, so you can give a useful error message, in addition
to EINVAL. set ringparam has soo many parameters it is hard to user
space to know which values can be set. So seeing "rx_mini_pending not
supported" is a big help.
Andrew
Powered by blists - more mailing lists