lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CACGkMEu5VDMiFQdGbkn3H82SGDB4BE1Br8SV_hjdsPxZAH=Z9A@mail.gmail.com>
Date: Wed, 17 Apr 2024 12:36:03 +0800
From: Jason Wang <jasowang@...hat.com>
To: Jiri Pirko <jiri@...nulli.us>
Cc: Jakub Kicinski <kuba@...nel.org>, netdev@...r.kernel.org, pabeni@...hat.com, 
	davem@...emloft.net, edumazet@...gle.com, parav@...dia.com, mst@...hat.com, 
	xuanzhuo@...ux.alibaba.com, shuah@...nel.org, petrm@...dia.com, 
	liuhangbin@...il.com, vladimir.oltean@....com, bpoirier@...dia.com, 
	idosch@...dia.com, virtualization@...ts.linux.dev
Subject: Re: [patch net-next 0/6] selftests: virtio_net: introduce initial
 testing infrastructure

On Tue, Apr 16, 2024 at 9:03 PM Jiri Pirko <jiri@...nulli.us> wrote:
>
> Tue, Apr 16, 2024 at 11:53:35AM CEST, jiri@...nulli.us wrote:
> >Mon, Apr 15, 2024 at 07:26:59PM CEST, kuba@...nel.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

>


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ