From: Jason Wang <jasowang@redhat.com>
To: Jiri Pirko <jiri@resnulli.us>
Cc: Jakub Kicinski <kuba@kernel.org>,
netdev@vger.kernel.org, pabeni@redhat.com, davem@davemloft.net,
edumazet@google.com, parav@nvidia.com, mst@redhat.com,
xuanzhuo@linux.alibaba.com, shuah@kernel.org, petrm@nvidia.com,
liuhangbin@gmail.com, vladimir.oltean@nxp.com,
bpoirier@nvidia.com, idosch@nvidia.com,
virtualization@lists.linux.dev
Subject: Re: [patch net-next 0/6] selftests: virtio_net: introduce initial testing infrastructure
Date: Wed, 17 Apr 2024 12:36:03 +0800 [thread overview]
Message-ID: <CACGkMEu5VDMiFQdGbkn3H82SGDB4BE1Br8SV_hjdsPxZAH=Z9A@mail.gmail.com> (raw)
In-Reply-To: <Zh53DaJkqxPC4_ZX@nanopsycho>
On Tue, Apr 16, 2024 at 9:03 PM Jiri Pirko <jiri@resnulli.us> wrote:
>
> Tue, Apr 16, 2024 at 11:53:35AM CEST, jiri@resnulli.us wrote:
> >Mon, Apr 15, 2024 at 07:26:59PM CEST, kuba@kernel.org wrote:
> >>On Sat, 13 Apr 2024 15:23:53 +0200 Jiri Pirko wrote:
> >>> That is a goal. Currently I do it with:
> >>> vng --qemu-opts="-nic tap,id=nd0,ifname=xtap0,model=virtio-net-pci,script=no,downscript=no,mac=52:54:00:12:34:57 -nic tap,id=nd1,ifname=xtap1,model=virtio-net-pci,script=no,downscript=no,mac=52:54:00:12:34:58"
> >>>
> >>> and setting loop manually with tc-matchall-mirred
> >>>
> >>> Implementing virtio loop instantiation in vng is on the todo list for
> >>> this.
> >>
> >>Just to be clear - I think the loop configuration is better off outside
> >>vng. It may need SUID and such. We just need to make vng spawn the two
> >>interfaces with a less verbose syntax. --network-count 2 ?
> >
> >Well, you ask vng for network device by:
> >--net=user/bridge
> >
> >Currently putting the option multiple times is ignored, but I don't see
> >why that can't work.
> >
> >Regarding the loop configuration, I would like to make this as
> >convenient for the user as possible, I was thinking about something like
> >--net=loop which would create the tc-based loop.
> >
> >How to do this without root, I'm not sure. Perhaps something similar
> >like qemu-bridge-helper could be used.
>
> Ha, qemu knows how to solve this already:
> -netdev hubport,id=id,hubid=hubid[,netdev=nd]
> Create a hub port on the emulated hub with ID hubid.
>
> The hubport netdev lets you connect a NIC to a QEMU emulated hub
> instead of a single netdev. Alternatively, you can also connect
> the hubport to another netdev with ID nd by using the netdev=nd
> option.
>
> I cooked-up a testing vng patch, so the user can pass "--net=loop":
> https://github.com/arighi/virtme-ng/commit/84a26ba92c9834c09d16fc1a4dc3a69c4d758236
>
Note: another way, there's a vdpa(virto)-net simulator which can only
do loopback. The advantage is that you don't even need Qemu.
Thanks
>
prev parent reply other threads:[~2024-04-17 4:36 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-04-12 15:13 [patch net-next 0/6] selftests: virtio_net: introduce initial testing infrastructure Jiri Pirko
2024-04-12 15:13 ` [patch net-next 1/6] virtio: add debugfs infrastructure to allow to debug virtio features Jiri Pirko
2024-04-12 15:13 ` [patch net-next 2/6] selftests: forwarding: move couple of initial check to the beginning Jiri Pirko
2024-04-12 15:13 ` [patch net-next 3/6] selftests: forwarding: add ability to assemble NETIFS array by driver name Jiri Pirko
2024-04-12 20:38 ` Benjamin Poirier
2024-04-13 13:27 ` Jiri Pirko
2024-04-14 19:32 ` Benjamin Poirier
2024-04-15 8:40 ` Jiri Pirko
2024-04-12 15:13 ` [patch net-next 4/6] selftests: forwarding: add check_driver() helper Jiri Pirko
2024-04-12 15:13 ` [patch net-next 5/6] selftests: forwarding: add wait_for_dev() helper Jiri Pirko
2024-04-12 20:43 ` Benjamin Poirier
2024-04-13 13:29 ` Jiri Pirko
2024-04-12 15:13 ` [patch net-next 6/6] selftests: virtio_net: add initial tests Jiri Pirko
2024-04-12 20:46 ` Benjamin Poirier
2024-04-13 13:29 ` Jiri Pirko
2024-04-13 1:04 ` [patch net-next 0/6] selftests: virtio_net: introduce initial testing infrastructure Jakub Kicinski
2024-04-13 13:23 ` Jiri Pirko
2024-04-15 17:26 ` Jakub Kicinski
2024-04-16 9:53 ` Jiri Pirko
2024-04-16 13:03 ` Jiri Pirko
2024-04-17 4:36 ` Jason Wang [this message]
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='CACGkMEu5VDMiFQdGbkn3H82SGDB4BE1Br8SV_hjdsPxZAH=Z9A@mail.gmail.com' \
--to=jasowang@redhat.com \
--cc=bpoirier@nvidia.com \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=idosch@nvidia.com \
--cc=jiri@resnulli.us \
--cc=kuba@kernel.org \
--cc=liuhangbin@gmail.com \
--cc=mst@redhat.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=parav@nvidia.com \
--cc=petrm@nvidia.com \
--cc=shuah@kernel.org \
--cc=virtualization@lists.linux.dev \
--cc=vladimir.oltean@nxp.com \
--cc=xuanzhuo@linux.alibaba.com \
/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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).