Re: [PATCH 5/9] thunderbolt / net: Let the service drivers configure interrupt throttling

Andrew Lunn
2026-04-28T15:00:10Z

On Tue, Apr 28, 2026 at 09:22:05AM +0200, Mika Westerberg wrote:
> Instead of the core driver programming fixed value for throttling let
> the service drivers to specify the interval if they need this. We also
> allow user to tune this through a module parameter if the default is not
> good fit.
>
> Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com>
> ---
> drivers/net/thunderbolt/main.c | 7 ++++
> drivers/thunderbolt/dma_test.c | 5 +++
> drivers/thunderbolt/nhi.c | 58 ++++++++++++++++++----------------
> drivers/thunderbolt/nhi_regs.h | 3 +-
> include/linux/thunderbolt.h | 5 +++
> 5 files changed, 50 insertions(+), 28 deletions(-)
>
> diff --git a/drivers/net/thunderbolt/main.c b/drivers/net/thunderbolt/main.c
> index 49673f7e0055..8771ca807933 100644
> --- a/drivers/net/thunderbolt/main.c
> +++ b/drivers/net/thunderbolt/main.c
> @@ -218,6 +218,10 @@ static bool tbnet_e2e = true;
> module_param_named(e2e, tbnet_e2e, bool, 0444);
> MODULE_PARM_DESC(e2e, "USB4NET full end-to-end flow control (default: true)");
>
> +static unsigned int tbnet_throttling = 128000;
> +module_param_named(throttling, tbnet_throttling, uint, 0444);
> +MODULE_PARM_DESC(throttling, "Interrupt throttling rate in ns (default: 128000)");

As i mentioned elsewhere, netdev does not allow module
parameters. They are hard to use, especially when you have lots of
instances of a device, or you need to set it on the kernel command
line because by the time the kernel has booted, it is too late, etc.
And they are undocumented, and every driver does it differently.

The correct way to do this for netdev it ethtool -C.

For something which is not a netdev, like your stream file, you have
more flexibility, but the same usability issues apply.

Andrew