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

Mika Westerberg
2026-04-28T17:26:33Z

On Tue, Apr 28, 2026 at 04:59:58PM +0200, Andrew Lunn wrote:
> 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.

Right. This was meant to be a "chicken bit" or "escape hatch" not something
used in daily basis.

I can drop that part from the patch, no problem.