Re: [PATCH net-next 6/6] tools: virtio: introduce vhost_net_test

2024-01-04 Thread Yunsheng Lin
On 2024/1/5 0:17, Eugenio Perez Martin wrote: > On Wed, Jan 3, 2024 at 11:00 AM Yunsheng Lin wrote: ... >> + >> +static void run_tx_test(struct vdev_info *dev, struct vq_info *vq, >> + bool delayed, int batch, int bufs) >> +{ >> + const bool random_batch = batch ==

Re: [PATCH net-next 6/6] tools: virtio: introduce vhost_net_test

2024-01-04 Thread Eugenio Perez Martin
On Wed, Jan 3, 2024 at 11:00 AM Yunsheng Lin wrote: > > introduce vhost_net_test basing on virtio_test to test > vhost_net changing in the kernel. > > Signed-off-by: Yunsheng Lin > --- > tools/virtio/Makefile | 8 +- > tools/virtio/vhost_net_test.c | 574

[PATCH net-next 6/6] tools: virtio: introduce vhost_net_test

2024-01-03 Thread Yunsheng Lin
introduce vhost_net_test basing on virtio_test to test vhost_net changing in the kernel. Signed-off-by: Yunsheng Lin --- tools/virtio/Makefile | 8 +- tools/virtio/vhost_net_test.c | 574 ++ 2 files changed, 579 insertions(+), 3 deletions(-) create

Re: [PATCH net-next 6/6] tools: virtio: introduce vhost_net_test

2023-12-20 Thread Jason Wang
On Thu, Dec 21, 2023 at 10:48 AM Yunsheng Lin wrote: > > On 2023/12/21 10:33, Jason Wang wrote: > > On Wed, Dec 20, 2023 at 8:45 PM Yunsheng Lin wrote: > >> > >> On 2023/12/12 12:35, Jason Wang wrote: +done: > >> + backend.fd = tun_alloc(); > >> + assert(backend.fd >= 0);

Re: [PATCH net-next 6/6] tools: virtio: introduce vhost_net_test

2023-12-20 Thread Yunsheng Lin
On 2023/12/21 10:33, Jason Wang wrote: > On Wed, Dec 20, 2023 at 8:45 PM Yunsheng Lin wrote: >> >> On 2023/12/12 12:35, Jason Wang wrote: +done: >> + backend.fd = tun_alloc(); >> + assert(backend.fd >= 0); >> + vdev_info_init(, features); >> +

Re: [PATCH net-next 6/6] tools: virtio: introduce vhost_net_test

2023-12-20 Thread Jason Wang
On Wed, Dec 20, 2023 at 8:45 PM Yunsheng Lin wrote: > > On 2023/12/12 12:35, Jason Wang wrote: +done: > + backend.fd = tun_alloc(); > + assert(backend.fd >= 0); > + vdev_info_init(, features); > + vq_info_add(, 256); > + run_test(, [0],

Re: [PATCH net-next 6/6] tools: virtio: introduce vhost_net_test

2023-12-20 Thread Yunsheng Lin
On 2023/12/12 12:35, Jason Wang wrote: +done: + backend.fd = tun_alloc(); + assert(backend.fd >= 0); + vdev_info_init(, features); + vq_info_add(, 256); + run_test(, [0], delayed, batch, reset, nbufs); >>> >>> I'd expect we are testing

Re: [PATCH net-next 6/6] tools: virtio: introduce vhost_net_test

2023-12-11 Thread Jason Wang
On Thu, Dec 7, 2023 at 7:28 PM Yunsheng Lin wrote: > > On 2023/12/7 14:00, Jason Wang wrote: > > On Tue, Dec 5, 2023 at 7:35 PM Yunsheng Lin wrote: > ... > > >> + > >> +static int tun_alloc(void) > >> +{ > >> + struct ifreq ifr; > >> + int fd, e; > >> + > >> + fd =

Re: [PATCH net-next 6/6] tools: virtio: introduce vhost_net_test

2023-12-07 Thread Yunsheng Lin
On 2023/12/7 14:00, Jason Wang wrote: > On Tue, Dec 5, 2023 at 7:35 PM Yunsheng Lin wrote: ... >> + >> +static int tun_alloc(void) >> +{ >> + struct ifreq ifr; >> + int fd, e; >> + >> + fd = open("/dev/net/tun", O_RDWR); >> + if (fd < 0) { >> +

Re: [PATCH net-next 6/6] tools: virtio: introduce vhost_net_test

2023-12-06 Thread Jason Wang
On Tue, Dec 5, 2023 at 7:35 PM Yunsheng Lin wrote: > > introduce vhost_net_test basing on virtio_test to test > vhost_net changing in the kernel. > > Signed-off-by: Yunsheng Lin > --- > tools/virtio/Makefile | 8 +- > tools/virtio/vhost_net_test.c | 441

[PATCH net-next 6/6] tools: virtio: introduce vhost_net_test

2023-12-05 Thread Yunsheng Lin
introduce vhost_net_test basing on virtio_test to test vhost_net changing in the kernel. Signed-off-by: Yunsheng Lin --- tools/virtio/Makefile | 8 +- tools/virtio/vhost_net_test.c | 441 ++ 2 files changed, 446 insertions(+), 3 deletions(-) create