On Wed, Sep 02, 2026 at 09:53:39AM +0800, Hangbin Liu wrote:
> On Tue, Sep 01, 2026 at 02:43:39PM +0200, Andrew Lunn wrote:
> > On Tue, Sep 01, 2026 at 02:39:32PM +0800, Hangbin Liu wrote:
> > > On Mon, Aug 31, 2026 at 02:16:46PM +0200, Andrew Lunn wrote:
> > > > >  static void nsim_ethtool_ring_init(struct netdevsim *ns)
> > > > > @@ -250,12 +276,16 @@ void nsim_ethtool_init(struct netdevsim *ns)
> > > > >       ns->ethtool.fec.active_fec = ETHTOOL_FEC_NONE;
> > > > >  
> > > > >       ns->ethtool.channels = ns->nsim_bus_dev->num_queues;
> > > > > +     ns->ethtool.duplex = DUPLEX_FULL;
> > > > > +     ns->ethtool.speed = SPEED_5000;
> > > > >  
> > > > >       ethtool = debugfs_create_dir("ethtool", 
> > > > > ns->nsim_dev_port->ddir);
> > > > >       ns->ethtool_ddir = ethtool;
> > > > >  
> > > > >       debugfs_create_u32("get_err", 0600, ethtool, 
> > > > > &ns->ethtool.get_err);
> > > > >       debugfs_create_u32("set_err", 0600, ethtool, 
> > > > > &ns->ethtool.set_err);
> > > > > +     debugfs_create_u32("speed", 0600, ethtool, &ns->ethtool.speed);
> > > > > +     debugfs_create_u8("duplex", 0600, ethtool, &ns->ethtool.duplex);
> > > > 
> > > > debugfs_create_bool() ?
> > > 
> > > I'm not sure if anyone want to set nsim duplex to unknown for testing.
> > > Do you think that we should disable this behavior?
> > 
> > Ah, i did not think of DUPLEX_UNKNOWN.
> > 
> > We need to consider Jakubs reply, what are you actually testing here,
> > do such tests make any sense?
> 
> I'm fixing a bug in bonding that need to test with different speed slaves.
> So I add this feature for netdevsim.

That would of been useful to put into the commit message, after the

---.

Better still, create a self test for the bonding bug you have found,
show that it fails. Then have the fix, and show that the self test
then passes. That makes it a lot clearer why this change is useful,
plus it gives us a regression test to ensure bonding does not break
again.

        Andrew

Reply via email to