lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <aJuB_4cQAyZfiEc0@MacBook-Air.local>
Date: Tue, 12 Aug 2025 11:03:43 -0700
From: Joe Damato <joe@...a.to>
To: Vishal Badole <Vishal.Badole@....com>
Cc: Shyam-sundar.S-k@....com, andrew+netdev@...n.ch, davem@...emloft.net,
	edumazet@...gle.com, kuba@...nel.org, pabeni@...hat.com,
	netdev@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2 net-next] amd-xgbe: Configure and retrieve 'tx-usecs'
 for Tx coalescing

On Tue, Aug 12, 2025 at 10:20:35AM +0530, Vishal Badole wrote:
> Ethtool has advanced with additional configurable options, but the
> current driver does not support tx-usecs configuration.
> 
> Add support to configure and retrieve 'tx-usecs' using ethtool, which
> specifies the wait time before servicing an interrupt for Tx coalescing.
> 
> Signed-off-by: Vishal Badole <Vishal.Badole@....com>
> Acked-by: Shyam Sundar S K <Shyam-sundar.S-k@....com>
> 
> ---
> v1 -> v2:
>     * Replace netdev_err() with extack interface for user error reporting.

In the future, it's a good idea to link to the previous revisions on
https://lore.kernel.org/netdev/ so that other reviewers can more easily look
back at the previous thread.

> ---
>  drivers/net/ethernet/amd/xgbe/xgbe-ethtool.c | 19 +++++++++++++++++--
>  drivers/net/ethernet/amd/xgbe/xgbe.h         |  1 +
>  2 files changed, 18 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/net/ethernet/amd/xgbe/xgbe-ethtool.c b/drivers/net/ethernet/amd/xgbe/xgbe-ethtool.c
> index 12395428ffe1..19cb1e2b7d92 100644
> --- a/drivers/net/ethernet/amd/xgbe/xgbe-ethtool.c
> +++ b/drivers/net/ethernet/amd/xgbe/xgbe-ethtool.c

[...]

> +	/* Check if both tx_usecs and tx_frames are set to 0 simultaneously */
> +	if (!tx_usecs && !tx_frames) {
> +		NL_SET_ERR_MSG_FMT_MOD(extack,
> +				       "tx_usecs and tx_frames must not be 0 together");
> +		return -EINVAL;
> +	}
> +
>  	/* Check the bounds of values for Tx */
> +	if (tx_usecs > XGMAC_MAX_COAL_TX_TICK) {
> +		NL_SET_ERR_MSG_FMT_MOD(extack, "tx-usecs is limited to %d usec",
> +				       XGMAC_MAX_COAL_TX_TICK);
> +		return -EINVAL;
> +	}
>  	if (tx_frames > pdata->tx_desc_count) {
>  		netdev_err(netdev, "tx-frames is limited to %d frames\n",
>  			   pdata->tx_desc_count);

Looks like there might be a future cleanup patch to use the extack interface
for user error reporting in the pre-existing code.

Reviewed-by: Joe Damato <joe@...a.to>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ