From: Andrew Lunn <andrew@lunn.ch>
To: Hangbin Liu <hangbin.liu@linux.dev>
Cc: Jakub Kicinski <kuba@kernel.org>,
Andrew Lunn <andrew+netdev@lunn.ch>,
"David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Paolo Abeni <pabeni@redhat.com>, Shuah Khan <shuah@kernel.org>,
netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-kselftest@vger.kernel.org,
Hangbin Liu <liuhangbin@kylinos.cn>
Subject: Re: [PATCH net-next 1/2] netdevsim: add link speed support
Date: Wed, 2 Sep 2026 14:38:19 +0200 [thread overview]
Message-ID: <9d9bad3a-a43d-47ad-b0d8-ba0878197ffc@lunn.ch> (raw)
In-Reply-To: <apeBoyP1G93wW_VZ@fedora>
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
next prev parent reply other threads:[~2026-09-02 12:38 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-31 3:28 [PATCH net-next 0/2] netdevsim: add link speed support Hangbin Liu
2026-08-31 3:28 ` [PATCH net-next 1/2] " Hangbin Liu
2026-08-31 12:16 ` Andrew Lunn
2026-09-01 6:39 ` Hangbin Liu
2026-09-01 12:43 ` Andrew Lunn
2026-09-02 1:53 ` Hangbin Liu
2026-09-02 12:38 ` Andrew Lunn [this message]
2026-08-31 12:24 ` Andrew Lunn
2026-09-01 6:31 ` Hangbin Liu
2026-08-31 22:08 ` Jakub Kicinski
2026-09-01 6:58 ` Hangbin Liu
2026-09-01 8:23 ` Hangbin Liu
2026-09-01 14:21 ` Andrew Lunn
2026-09-02 2:01 ` Hangbin Liu
2026-09-02 12:49 ` Andrew Lunn
2026-09-01 14:18 ` Andrew Lunn
2026-08-31 3:28 ` [PATCH net-next 2/2] selftests: netdevsim: add speed testing Hangbin Liu
2026-08-31 22:06 ` Jakub Kicinski
2026-09-01 6:42 ` Hangbin Liu
2026-09-01 15:06 ` Jakub Kicinski
2026-09-02 2:04 ` Hangbin Liu
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=9d9bad3a-a43d-47ad-b0d8-ba0878197ffc@lunn.ch \
--to=andrew@lunn.ch \
--cc=andrew+netdev@lunn.ch \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=hangbin.liu@linux.dev \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-kselftest@vger.kernel.org \
--cc=liuhangbin@kylinos.cn \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=shuah@kernel.org \
/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