From: Jakub Kicinski <kuba@kernel.org>
To: Vishal Badole <Vishal.Badole@amd.com>
Cc: <Shyam-sundar.S-k@amd.com>, <andrew+netdev@lunn.ch>,
<davem@davemloft.net>, <edumazet@google.com>, <pabeni@redhat.com>,
<netdev@vger.kernel.org>, <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v2 net-next] amd-xgbe: Configure and retrieve 'tx-usecs' for Tx coalescing
Date: Wed, 13 Aug 2025 17:00:12 -0700 [thread overview]
Message-ID: <20250813170012.7436b6e6@kernel.org> (raw)
In-Reply-To: <20250812045035.3376179-1-Vishal.Badole@amd.com>
On Tue, 12 Aug 2025 10:20:35 +0530 Vishal Badole wrote:
> Ethtool has advanced with additional configurable options, but the
> current driver does not support tx-usecs configuration.
Not sure what you mean by this, perhaps:
current driver does not even support tx-usecs configuration.
? tx-usecs is a very old tunable.
> Add support to configure and retrieve 'tx-usecs' using ethtool, which
> specifies the wait time before servicing an interrupt for Tx coalescing.
>
> + /* 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;
> + }
Normal configuration granularity for this parameter is in 10s of usecs.
You seem to be using a timer, so I think you should either round the
value up / down to what the jiffy resolution will give you or
reject configuration that's not expressible in jiffies (not a multiple
of jiffies_to_usecs(1)). Otherwise users may waste time turning this
knob by 100usec which will have zero effect.
--
pw-bot: cr
next prev parent reply other threads:[~2025-08-14 0:00 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-08-12 4:50 Vishal Badole
2025-08-12 6:02 ` Hariprasad Kelam
2025-08-12 18:03 ` Joe Damato
2025-08-14 0:00 ` Jakub Kicinski [this message]
2025-08-15 9:38 ` Badole, Vishal
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=20250813170012.7436b6e6@kernel.org \
--to=kuba@kernel.org \
--cc=Shyam-sundar.S-k@amd.com \
--cc=Vishal.Badole@amd.com \
--cc=andrew+netdev@lunn.ch \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®