Netdev List
 help / color / mirror / Atom feed
From: Jakub Kicinski <kuba@kernel.org>
To: Florian Westphal <fw@strlen.de>
Cc: netdev@vger.kernel.org, netfilter-devel@vger.kernel.org
Subject: Re: [PATCH net-next] net: dummy: add phony ndo_setup_tc stub
Date: Tue, 9 Jun 2026 15:52:14 -0700	[thread overview]
Message-ID: <20260609155214.59f02742@kernel.org> (raw)
In-Reply-To: <aiiS2igkkIvGLtpM@strlen.de>

On Wed, 10 Jun 2026 00:25:30 +0200 Florian Westphal wrote:
> Jakub Kicinski <kuba@kernel.org> wrote:
> > On Tue,  9 Jun 2026 16:28:09 +0200 Florian Westphal wrote:  
> > > Unlike netdevsim, dummy is a data sink so no capabilities (e.g.
> > > u32-style matcher, vport device redirects, PPPoE header push/pop etc).
> > > have to be implemented.  
> > 
> > If no "peer" is configured netdevsim is also a data sink.  
> 
> Yes, but you can configure peers.  And then this fake offload stub
> is a liar.
> 
> I would expect that offloads for netdevsim actually work, i.e.
> that a shaper shapes, that ets offload does delay packets and
> in case of flowtable that it will move skbs from one vport to
> another (if that was requested).
> 
> > We added netdevsim because dummy and veth started accumulating
> > "features" which were clearly just for test harnesses. Would be
> > great if we could stay the course and put whatever changes you
> > need in netdevsim, even if it requires some hacks.  
> 
> Is a lot more work.  I don't have time ATM to implement a u32-style
> packet matcher or a fake software flowtable.

There are no real requirements on how netdevsim behaves. The only
requirement is that there's an in-tree test that uses whatever
functionality is being added. So you can implement the features
to whatever depth you need for your current testing.

> > Is there anything fundamentally blocking the use of netdevsim?
> > Or is it just convenience (since netdevsim is a bit of a PITA
> > to create and establish the name of)?  
> 
> I played with netdevsim, aside from the above (i.e., I don't expect
> netdevsim to say 'offloaded' and then ignore all the offloaded
> commands...) the worst part is the naming and the behaviour when
> creating new devices while in a network namespace.  Test is spawned via
> 'unshare -n' -- I did not find a way to really extract the new device name
> reliably except via 'ip link'.

Yes :( we have some helpers in 
tools/testing/selftests/drivers/net/netdevsim/ethtool-common.sh
among other places but libraries are a PITA in ksft as well.

> I think thats solveable, so yes, I could make netdevsim lie instead.
> 
> But I don't think its the right thing to do.
> 
> If you disagree and think that this is fine I can retarget this to
> netdevsim, no problem.

Yes, I'd prefer netdevsim. If nothing else it lets us discard 
"security reports" by saying that nobody should have netdevsim 
loaded on a production system.

  reply	other threads:[~2026-06-09 22:52 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-06-09 14:28 [PATCH net-next] net: dummy: add phony ndo_setup_tc stub Florian Westphal
2026-06-09 22:15 ` Jakub Kicinski
2026-06-09 22:25   ` Florian Westphal
2026-06-09 22:52     ` Jakub Kicinski [this message]
2026-06-09 22:56 ` Pablo Neira Ayuso
2026-06-09 23:03   ` Jakub Kicinski

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=20260609155214.59f02742@kernel.org \
    --to=kuba@kernel.org \
    --cc=fw@strlen.de \
    --cc=netdev@vger.kernel.org \
    --cc=netfilter-devel@vger.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