Re: [PATCH net-next 1/2] netdevsim: add link speed support
From: Hangbin Liu
Date: Tue Sep 01 2026 - 22:08:04 EST
On Tue, Sep 01, 2026 at 04:21:04PM +0200, Andrew Lunn wrote:
> > OK, here is the reason. In taprio_set_picos_per_byte(), it init NIC speed to
> > SPEED_10. If the NIC doesn't support get_link_ksettings, the final calculated
> > picos_per_byte would be a extremely large number 800000. The later tc taprio
> > testing `tc qdisc ... sched-entry S 02 300` will always failed in
> > fill_sched_entry(), as min_duration is also a large number 48000.
> >
> > After we supports get_link_ksettings for netdevsim, the speed is 5000 and
> > picos_per_byte will be init to 1600. The later min_duration checking in
> > fill_sched_entry() is 300 vs 96. So the tc qdisc command always return 0.
> >
> > To fix the test, I think we should reduce the interval number. e.g.
>
> Why not just set the initial speed to SPEED_10, so nothing changes?
>
`nsim_leaf_tx_share_set` and `nsim_leaf_tx_max_set` compare against
`NSIM_LINK_SPEED_MAX` for TX‑rate setting. Using `SPEED_10` as the value
appears too small. I am concerned this could break other existing tests.
Hangbin