Re: [PATCH] Test netmap on FreeBSD

2019-10-08 Thread Vincenzo Maffione
This is an example command line for a qemu VM with a vtnet interface connected to a port of a VALE switch called 'vale1': qemu-system-x86_64 fbsd-head.qcow2 -smp 2 -m 2G -vga std -device e1000,netdev=mgmt,mac=00:AA:BB:CC:0a:99 -netdev user,id=mgmt,hostfwd=tcp::20010-:22 -device virtio-net-pci,netd

Re: [PATCH] Test netmap on FreeBSD

2019-10-08 Thread Vincenzo Maffione
Il giorno mar 8 ott 2019 alle ore 11:53 Li-Wen Hsu ha scritto: > On Tue, Oct 8, 2019 at 5:49 PM Stefano Garzarella > wrote: > > > > Hi Thomas, > > > > On Tue, Oct 8, 2019 at 10:49 AM Thomas Huth wrote: > > > > > > FreeBSD offers a package for "netmap", thus let's install it in our > > > FreeBSD

Re: [Qemu-devel] Is network backend netmap worth keeping?

2019-08-08 Thread Vincenzo Maffione
Yes, indeed. Netmap is actively maintained on FreeBSD, and QEMU is packaged on FreeBSD with netmap support enabled. Also keep in mind that, differently from Linux, the (current) tap driver on FreeBSD does not support offloads (e.g. IFF_VNET_HDR, TUNSETVNETHDRSIZE and so on). On the contrary, netmap

Re: [Qemu-devel] [PATCH] shippable: fix build

2019-02-21 Thread Vincenzo Maffione
Hi, Yes, we added a static library that to ease application development (libnetmap.a). It looks like a configure/Makefile issue. Can you reproduce that? (I'm CC-ing Giuseppe, who actually added libnetmap). Cheers, Vincenzo Il giorno gio 21 feb 2019 alle ore 10:14 Stefano Garzarella < sgarz..

Re: [Qemu-devel] [PATCH v1 0/1] Allow TAP to unnegotiate virtio-net header

2019-02-19 Thread Vincenzo Maffione
Il giorno mar 19 feb 2019 alle ore 07:48 Jason Wang ha scritto: > > On 2019/2/18 下午7:53, Vincenzo Maffione wrote: > > Hi Jason, > >Thanks for the quick reply. > > > > My PV device (to be open sourced soon) uses the QEMU net backend > interface, > >

Re: [Qemu-devel] [PATCH v1 0/1] Allow TAP to unnegotiate virtio-net header

2019-02-18 Thread Vincenzo Maffione
5:19 Jason Wang ha scritto: > > On 2019/2/16 上午1:46, Vincenzo Maffione wrote: > > Hi, > >I was doing experiments with a custom paravirtualized net device, > > and I ran into a limitation of the TAP backend. I see from the kernel > > code that it is not possible t

[Qemu-devel] [PATCH v1 1/1] net: tap: allow net frontends to un-negotiate virtio-net header

2019-02-15 Thread Vincenzo Maffione
ng the (zeroed) header on the fly. However, the function tap_using_vnet_hdr() has an assert() that explicitly prevents this situation to happen. This patch removes the assert(), so that net frontends are free to un-negotiate the header. Signed-off-by: Vincenzo Maffione --- net/tap.c | 1 - 1 file chang

[Qemu-devel] [PATCH v1 0/1] Allow TAP to unnegotiate virtio-net header

2019-02-15 Thread Vincenzo Maffione
ement in tap_receive_iov()). However, the tap_using_vnet_hdr() has an assert() that prevents this situation to happen, and I don't understand why. Maybe it is a leftover? I tried to remove the assert and by doing that my paravirtualized device was able to stop using the virtio-net header.

[Qemu-devel] [PATCH v1 3/3] net: netmap: improve netmap_receive_iov()

2018-12-06 Thread Vincenzo Maffione
also ring->head). Signed-off-by: Vincenzo Maffione --- net/netmap.c | 29 + 1 file changed, 17 insertions(+), 12 deletions(-) diff --git a/net/netmap.c b/net/netmap.c index 852106af29..0cc8f545c5 100644 --- a/net/netmap.c +++ b/net/netmap.c @@ -159,21 +159,22

[Qemu-devel] [PATCH v1 0/3] Improvements to the netmap backend

2018-12-06 Thread Vincenzo Maffione
Improvements to the netmap backend, mostly to fix the handling of incomplete multi-slot packets. This has been tested with and without jumbo frames, using pkt-gen to send 60, 1500, 5000 or 9000 bytes packets between two VMs connected through a VALE switch. Vincenzo Maffione (3): net: netmap

[Qemu-devel] [PATCH v1 1/3] net: netmap: small improvements netmap_send()

2018-12-06 Thread Vincenzo Maffione
. Also don't be verbose when incomplete packets are found. Signed-off-by: Vincenzo Maffione --- net/netmap.c | 31 +++ 1 file changed, 19 insertions(+), 12 deletions(-) diff --git a/net/netmap.c b/net/netmap.c index 2d11a8f4be..71a8122bdd 100644 --- a/net/netmap.

[Qemu-devel] [PATCH v1 2/3] net: netmap: simplify netmap_receive()

2018-12-06 Thread Vincenzo Maffione
Improve code reuse by implementing netmap_receive() with a call to netmap_receive_iov(). Signed-off-by: Vincenzo Maffione --- net/netmap.c | 50 +++--- 1 file changed, 11 insertions(+), 39 deletions(-) diff --git a/net/netmap.c b/net/netmap.c index

[Qemu-devel] [PATCH] qemu-options.hx: add missing id=chr0 chardev argument in vhost-user example

2017-02-20 Thread Vincenzo Maffione
In the vhost-user example, a chardev with id chr0 is referenced by the vhost-user net backend, but the id is not specified in the chardev option. Signed-off-by: Vincenzo Maffione --- qemu-options.hx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/qemu-options.hx b/qemu

[Qemu-devel] [PATCH v3] net: netmap: probe netmap interface for virtio-net header

2016-02-24 Thread Vincenzo Maffione
implementation to work properly with all kinds of netmap ports. Signed-off-by: Vincenzo Maffione --- net/netmap.c | 59 ++- 1 file changed, 38 insertions(+), 21 deletions(-) diff --git a/net/netmap.c b/net/netmap.c index 9710321..1b42728

[Qemu-devel] [PATCH v3] net: netmap: implement virtio-net header probe

2016-02-24 Thread Vincenzo Maffione
to netmap_set_vnet_hdr_len Vincenzo Maffione (1): net: netmap: probe netmap interface for virtio-net header net/netmap.c | 59 ++- 1 file changed, 38 insertions(+), 21 deletions(-) -- 2.7.1

Re: [Qemu-devel] [PATCH v2] net: netmap: probe netmap interface for virtio-net header

2016-02-24 Thread Vincenzo Maffione
2016-02-24 9:21 GMT+01:00 Jason Wang : > > > On 02/23/2016 04:46 PM, Vincenzo Maffione wrote: >> Previous implementation of has_ufo, has_vnet_hdr, has_vnet_hdr_len, etc. >> did not really probe for virtio-net header support for the netmap >> interface attached to the ba

[Qemu-devel] [PATCH v2] net: netmap: implement virtio-net header probe

2016-02-23 Thread Vincenzo Maffione
netmap_set_vnet_hdr_len(). Vincenzo Maffione (1): net: netmap: probe netmap interface for virtio-net header net/netmap.c | 62 +++- 1 file changed, 40 insertions(+), 22 deletions(-) -- 2.7.1

[Qemu-devel] [PATCH v2] net: netmap: probe netmap interface for virtio-net header

2016-02-23 Thread Vincenzo Maffione
implementation to work properly with all kinds of netmap ports. Signed-off-by: Vincenzo Maffione --- net/netmap.c | 62 +++- 1 file changed, 40 insertions(+), 22 deletions(-) diff --git a/net/netmap.c b/net/netmap.c index 9710321..ef64be0

Re: [Qemu-devel] [PATCH] net: netmap: probe netmap interface for virtio-net header

2016-02-18 Thread Vincenzo Maffione
2016-02-18 3:52 GMT+01:00 Jason Wang : > > > On 02/05/2016 06:30 PM, Vincenzo Maffione wrote: >> Previous implementation of has_ufo, has_vnet_hdr, has_vnet_hdr_len, etc. >> did not really probe for virtio-net header support for the netmap >> interface attached to the ba

[Qemu-devel] [PATCH] net: netmap: probe netmap interface for virtio-net header

2016-02-05 Thread Vincenzo Maffione
implementation to work properly with all kinds of netmap ports. Signed-off-by: Vincenzo Maffione --- net/netmap.c | 70 ++-- 1 file changed, 44 insertions(+), 26 deletions(-) diff --git a/net/netmap.c b/net/netmap.c index 9710321..f2dcaeb

[Qemu-devel] [PATCH] net: netmap: implement virtio-net header probe

2016-02-05 Thread Vincenzo Maffione
probe mechanism, fixing the implementation of the involved hooks (has_vnet_hdr, has_vnet_hdr_len, has_ufo, ...). Vincenzo Maffione (1): net: netmap: probe netmap interface for virtio-net header net/netmap.c | 70 ++-- 1 file changed, 44

[Qemu-devel] [PATCH v2] net: netmap: use nm_open() to open netmap ports

2016-01-25 Thread Vincenzo Maffione
, monitors) and use special modes (e.g. host rings only, single queue mode, exclusive access). Signed-off-by: Vincenzo Maffione --- net/netmap.c | 97 1 file changed, 32 insertions(+), 65 deletions(-) diff --git a/net/netmap.c b/net

[Qemu-devel] [PATCH v2] net: netmap: use nm_open() to open netmap port

2016-01-25 Thread Vincenzo Maffione
und in the netmap man page and in the netmap API headers. CHANGELOG: - dropped patch 2, since it requires further rearrangements on our side. Vincenzo Maffione (1): net: netmap: use nm_open() to open netmap ports net/netmap.c | 97 --

Re: [Qemu-devel] [PATCH 2/2] net: netmap: avoid mmap() when ports use the same shared memory area

2016-01-22 Thread Vincenzo Maffione
01/08/2016 09:15 PM, Vincenzo Maffione wrote: >> With this patch, nm_open() does not mmap() the netmap device. This >> operation is performed separately only if the memory area of the >> port just opened was not known before. >> A global list of netmap clients is kept to che

Re: [Qemu-devel] [PATCH 09/10] virtio: read avail_idx from VQ only when necessary

2016-01-21 Thread Vincenzo Maffione
2016-01-19 19:48 GMT+01:00 Paolo Bonzini : > > > On 19/01/2016 17:54, Michael S. Tsirkin wrote: >> On Fri, Jan 15, 2016 at 01:41:57PM +0100, Paolo Bonzini wrote: >>> From: Vincenzo Maffione >>> >>> The virtqueue_pop() implementation needs to check i

[Qemu-devel] [PATCH 2/2] net: netmap: avoid mmap() when ports use the same shared memory area

2016-01-08 Thread Vincenzo Maffione
With this patch, nm_open() does not mmap() the netmap device. This operation is performed separately only if the memory area of the port just opened was not known before. A global list of netmap clients is kept to check when matches occur. Signed-off-by: Vincenzo Maffione --- net/netmap.c | 38

[Qemu-devel] [PATCH 0/2] net: netmap: use nm_open() to open netmap port

2016-01-08 Thread Vincenzo Maffione
und in the netmap man page and in the netmap API headers. Vincenzo Maffione (2): net: netmap: use nm_open() to open netmap ports net: netmap: avoid mmap() when ports use the same shared memory area net/netmap.c | 129 ++- 1 file c

[Qemu-devel] [PATCH 1/2] net: netmap: use nm_open() to open netmap ports

2016-01-08 Thread Vincenzo Maffione
, monitors) and use special modes (e.g. host rings only, single queue mode, exclusive access). Signed-off-by: Vincenzo Maffione --- net/netmap.c | 97 1 file changed, 32 insertions(+), 65 deletions(-) diff --git a/net/netmap.c b/net

Re: [Qemu-devel] [PATCH v2 0/3] virtio: proposal to optimize accesses to VQs

2015-12-30 Thread Vincenzo Maffione
2015-12-16 16:46 GMT+01:00 Paolo Bonzini : > > > On 16/12/2015 15:25, Vincenzo Maffione wrote: >>> vhost-net actually had better performance, so virtio-net dataplane >>> was never committed. As Michael mentioned, in practice on Linux you >>> use vhost, and

Re: [Qemu-devel] [PATCH v2 0/3] virtio: proposal to optimize accesses to VQs

2015-12-16 Thread Vincenzo Maffione
2015-12-16 12:37 GMT+01:00 Paolo Bonzini : > > > On 16/12/2015 11:39, Vincenzo Maffione wrote: >> No problems. >> >> I have some additional (orthogonal) curiosities: >> >> 1) Assuming "hw/virtio/dataplane/vring.c" is what I think it is (VQ &

Re: [Qemu-devel] [PATCH v2 0/3] virtio: proposal to optimize accesses to VQs

2015-12-16 Thread Vincenzo Maffione
2015-12-16 12:02 GMT+01:00 Michael S. Tsirkin : > On Wed, Dec 16, 2015 at 11:39:46AM +0100, Vincenzo Maffione wrote: >> 2015-12-16 10:34 GMT+01:00 Paolo Bonzini : >> > >> > >> > On 16/12/2015 10:28, Vincenzo Maffione wrote: >> >> Assuming my TX expe

Re: [Qemu-devel] [PATCH v2 0/3] virtio: proposal to optimize accesses to VQs

2015-12-16 Thread Vincenzo Maffione
2015-12-16 10:34 GMT+01:00 Paolo Bonzini : > > > On 16/12/2015 10:28, Vincenzo Maffione wrote: >> Assuming my TX experiments with disconnected backend (and I disable >> CPU dynamic scaling of performance, etc.): >> 1) after patch 1 and 2, virtio bottleneck jumps from ~

Re: [Qemu-devel] [PATCH v2 0/3] virtio: proposal to optimize accesses to VQs

2015-12-16 Thread Vincenzo Maffione
ou call an access_memory() function - it looks like a lot of operations. Cheers, Vincenzo 2015-12-16 9:38 GMT+01:00 Paolo Bonzini : > > > On 15/12/2015 23:33, Vincenzo Maffione wrote: >> This patch slightly rewrites the code to reduce the number of accesses, since >> many of them

[Qemu-devel] [PATCH v2 1/3] virtio: cache used_idx in a VirtQueue field

2015-12-15 Thread Vincenzo Maffione
Accessing used_idx in the VQ requires an expensive access to guest physical memory. Before this patch, 3 accesses are normally done for each pop/push/notify call. However, since the used_idx is only written by us, we can track it in our internal data structure. Signed-off-by: Vincenzo Maffione

[Qemu-devel] [PATCH v2 2/3] virtio: read avail_idx from VQ only when necessary

2015-12-15 Thread Vincenzo Maffione
virtio_queue_empty() to access avail_idx in physical memory only when necessary. Signed-off-by: Vincenzo Maffione --- hw/virtio/virtio.c | 25 + 1 file changed, 21 insertions(+), 4 deletions(-) diff --git a/hw/virtio/virtio.c b/hw/virtio/virtio.c index a35bb38..5a2ea8a 100644 --- a/hw

[Qemu-devel] [PATCH v2 3/3] virtio: combine write of an entry into used ring

2015-12-15 Thread Vincenzo Maffione
Fill in an element of the used ring with a single combined access to the guest physical memory, rather than using two separated accesses. This reduces the overhead due to expensive address translation. Signed-off-by: Vincenzo Maffione --- hw/virtio/virtio.c | 25 - 1

[Qemu-devel] [PATCH v2 0/3] virtio: proposal to optimize accesses to VQs

2015-12-15 Thread Vincenzo Maffione
nto 3 patches Vincenzo Maffione (3): virtio: cache used_idx in a VirtQueue field virtio: read avail_idx from VQ only when necessary virtio: combine write of an entry into used ring hw/virtio/virtio.c | 62 -- 1 file changed, 42 insertions(+

Re: [Qemu-devel] [PATCH RFC] virtio: proposal to optimize accesses to VQs

2015-12-15 Thread Vincenzo Maffione
t; != max); > > if (!indirect) > total_bufs = num_bufs; Here (http://article.gmane.org/gmane.comp.emulators.qemu.block/6620) you meant +in_total += desc.len; and +out_total += desc.len; 2015-12-14 17:06 GMT+01:00 Paolo Bonzini

Re: [Qemu-devel] [PATCH RFC] virtio: proposal to optimize accesses to VQs

2015-12-14 Thread Vincenzo Maffione
2015-12-14 17:06 GMT+01:00 Paolo Bonzini : > > > On 14/12/2015 15:51, Vincenzo Maffione wrote: >> >> This patch slightly rewrites the code to reduce the number of accesses, since >> many of them seems unnecessary to me. After this reduction, the bottleneck >

[Qemu-devel] [PATCH RFC] virtio: proposal to optimize accesses to VQs

2015-12-14 Thread Vincenzo Maffione
k the idea makes sense, and a proper patch in this direction would be accepted. Thanks, Vincenzo Vincenzo Maffione (1): virtio: optimize access to guest physical memory hw/virtio/virtio.c | 118 +++-- 1 file changed, 88 insertions(+), 30 dele

[Qemu-devel] [PATCH RFC] virtio: optimize access to guest physical memory

2015-12-14 Thread Vincenzo Maffione
Accessing a location of guest physical memory involves a translation from guest physical addresses to host virtual address. This patch removes unnecessary accesses by virtio implementation, so that at high processing rates the bottleneck goes from ~1Mtts to ~2Mtts. Signed-off-by: Vincenzo

[Qemu-devel] [PATCH v3 2/2] net: netmap: use error_setg() helpers in place of error_report()

2015-11-10 Thread Vincenzo Maffione
This update was required to align error reporting of netmap backend initialization to the modifications introduced by commit a30ecde. Signed-off-by: Vincenzo Maffione --- net/netmap.c | 22 +++--- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/net/netmap.c b/net

[Qemu-devel] [PATCH v3 0/2] Fix compilation of netmap backend

2015-11-10 Thread Vincenzo Maffione
error_report() CHANGELOG: - removed dead return and use error_setg_file_open() in place of error_setg_errno() - I noticed that net_init_netmap() has to return int, so I restored the return statements in that function Vincenzo Maffione (2): net: netmap: Fix compilation issue

[Qemu-devel] [PATCH v3 1/2] net: netmap: Fix compilation issue

2015-11-10 Thread Vincenzo Maffione
Reorganization of struct NetClientOptions (commit e4ba22b) caused a compilation failure of the netmap backend. This patch fixes the issue by properly accessing the union field. Signed-off-by: Vincenzo Maffione --- net/netmap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a

Re: [Qemu-devel] [PATCH v2 2/2] net: netmap: use error_setg_errno() in place of error_report()

2015-11-09 Thread Vincenzo Maffione
Ok, preparing them. 2015-11-06 16:35 GMT+01:00 Eric Blake : > On 11/06/2015 08:13 AM, Vincenzo Maffione wrote: >> This update was required to align error reporting of netmap backend >> initialization to the modifications introduced by commit a30ecde. >> >> Signe

[Qemu-devel] [PATCH v2 2/2] net: netmap: use error_setg_errno() in place of error_report()

2015-11-06 Thread Vincenzo Maffione
This update was required to align error reporting of netmap backend initialization to the modifications introduced by commit a30ecde. Signed-off-by: Vincenzo Maffione --- net/clients.h | 4 ++-- net/netmap.c | 32 2 files changed, 18 insertions(+), 18

[Qemu-devel] [PATCH v2 0/2] Fix compilation of netmap backend

2015-11-06 Thread Vincenzo Maffione
() CHANGELOG: - fixed commit messages to reference appropriate commits - modify netmap_open() to return error in a local Error variable Vincenzo Maffione (2): net: netmap: Fix compilation issue net: netmap: use error_setg_errno() in place of error_report() net/clients.h | 4

[Qemu-devel] [PATCH v2 1/2] net: netmap: Fix compilation issue

2015-11-06 Thread Vincenzo Maffione
Reorganization of struct NetClientOptions (commit e4ba22b) caused a compilation failure of the netmap backend. This patch fixes the issue by properly accessing the union field. Signed-off-by: Vincenzo Maffione --- net/netmap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a

Re: [Qemu-devel] [PATCH 1/2] net: netmap: Fix compilation issue

2015-11-05 Thread Vincenzo Maffione
2015-11-05 16:01 GMT+01:00 Eric Blake : > On 11/05/2015 07:52 AM, Vincenzo Maffione wrote: >> No worries. >> >> It needs --enable-netmap (default is --disable-netmap on linux), and >> --extra-cflags=-I/path/to/netmap/sys for netmap API headers. >> >&g

Re: [Qemu-devel] [PATCH 1/2] net: netmap: Fix compilation issue

2015-11-05 Thread Vincenzo Maffione
ter wrote: >> Vincenzo Maffione writes: >> >>> Reorganization of struct NetClientOptions caused a compilation failure >>> of the netmap backend. This patch fixes the issue by properly accessing the >>> union field. >>> >>> Signed-off-by: Vin

Re: [Qemu-devel] [PATCH 1/2] net: netmap: Fix compilation issue

2015-11-05 Thread Vincenzo Maffione
Sure, no problems. I was looking for that commit, but using git blame didn't work, since there the data structure seems to be part of autogenerated code. 2015-11-05 14:01 GMT+01:00 Markus Armbruster : > Vincenzo Maffione writes: > >> Reorganization of struct NetClientOptions cau

[Qemu-devel] [PATCH 2/2] net: netmap: use error_setg_errno() in place of error_report()

2015-11-05 Thread Vincenzo Maffione
This update was required to align netmap backend to the other net backends in terms of error reporting. Signed-off-by: Vincenzo Maffione --- net/netmap.c | 14 ++ 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/net/netmap.c b/net/netmap.c index 4197a9c..45290d8 100644

[Qemu-devel] [PATCH 1/2] net: netmap: Fix compilation issue

2015-11-05 Thread Vincenzo Maffione
Reorganization of struct NetClientOptions caused a compilation failure of the netmap backend. This patch fixes the issue by properly accessing the union field. Signed-off-by: Vincenzo Maffione --- net/netmap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/netmap.c b

[Qemu-devel] [PATCH 0/2] Fix compilation of netmap backend

2015-11-05 Thread Vincenzo Maffione
() Vincenzo Maffione (2): net: netmap: Fix compilation issue net: netmap: use error_setg_errno() in place of error_report() net/netmap.c | 16 +++- 1 file changed, 7 insertions(+), 9 deletions(-) -- 2.3.3

Re: [Qemu-devel] Contribution - L2TPv3 transport

2014-03-05 Thread Vincenzo Maffione
simpler that doesn't use a timer: > > Rely on the guest to submit a batch of packets for tx. When processing > the descriptor ring in the device emulation code (virtio-net, etc), use > the CORK flag on all packets except the final one. > > This essentially hands the contents of the tx ring to the netdev (tap, > L2TPv3, etc) and then lets them submit the entire batch using > sendmmsg(2). > > When we discussed this previously there was concern about the latency > added by CORK. > -- Vincenzo Maffione

Re: [Qemu-devel] [PATCH v2] net: Disable netmap backend when not supported

2014-02-24 Thread Vincenzo Maffione
Hi, I cannot see it in your net tree. Thanks, Vincenzo 2014-02-21 11:05 GMT+01:00 Stefan Hajnoczi : > On Thu, Feb 20, 2014 at 03:40:43PM +0100, Vincenzo Maffione wrote: > > This patch fixes configure so that the netmap backend is not compiled in > if the > > host does

[Qemu-devel] [PATCH v2] net: Disable netmap backend when not supported

2014-02-20 Thread Vincenzo Maffione
RD macro definitions in the QEMU code, and we open the way for further code simplifications that will be introduced by future patches. Signed-off-by: Vincenzo Maffione --- Note: This patch is against the net-next/net Stefan's branch. Changes against the previous version: (1) more complete commi

Re: [Qemu-devel] [PATCH 0/3] net: drop implicit peer from offload API

2014-02-20 Thread Vincenzo Maffione
/vhost_net.c | 6 +++--- > hw/net/virtio-net.c | 12 ++-- > hw/net/vmxnet3.c| 18 +- > include/net/net.h | 14 +++--- > net/net.c | 36 ++------ > 5 files changed, 43 insertions(+), 43 deletions(-) > > -- > 1.8.5.3 > > -- Vincenzo Maffione

Re: [Qemu-devel] [PATCH] net: Disable netmap backend when not supported

2014-02-19 Thread Vincenzo Maffione
2014-02-19 16:30 GMT+01:00 Stefan Hajnoczi : > On Fri, Feb 14, 2014 at 05:40:24PM +0100, Vincenzo Maffione wrote: > > This patch fixes configure so that netmap is not compiled in if the > > host doesn't support an API version >= 11. > > > > Moreover, some

[Qemu-devel] [PATCH] net: Disable netmap backend when not supported

2014-02-14 Thread Vincenzo Maffione
This patch fixes configure so that netmap is not compiled in if the host doesn't support an API version >= 11. Moreover, some modifications have been done to net/netmap.c in order to reflect the current netmap API (11). Signed-off-by: Vincenzo Maffione --- configure| 3 +++ net/

Re: [Qemu-devel] net: Adding netmap network backend

2014-02-14 Thread Vincenzo Maffione
Ok, this patch should preferably go in before the offloadings. 2014-02-14 16:40 GMT+01:00 Stefan Hajnoczi : > On Fri, Feb 14, 2014 at 02:41:24PM +0100, Vincenzo Maffione wrote: > > It is ok for you if I prepare a patch (touching configure and > > net/netmap.c) that makes sure

Re: [Qemu-devel] net: Adding netmap network backend

2014-02-14 Thread Vincenzo Maffione
Fri, Feb 14, 2014 at 2:20 AM, Vincenzo Maffione > wrote: > >> Yes, for sure we need to do a check. >> >> However, this would involve - I think - some non-trivial modifications to >> net/netmap.c, because without NS_MOREFRAG you cannot split a packet over >> more

Re: [Qemu-devel] net: Adding netmap network backend

2014-02-14 Thread Vincenzo Maffione
/usr/include/net/netmap.h and netmap_user.h out of the box. > > I've no idea what is inside and how compatible it is with whatever > > qemu expects. > > > > I had to explicitly use --disable-netmap for qemu to build on freebsd. > > > > This is FreeBSD 9.1-RELEASE, FWIW. > > Vincenzo: Do you need to add a ./configure check so NS_MOREFRAG is only > used when the host kernel supports it? > -- Vincenzo Maffione

[Qemu-devel] [PATCH v4 2/6] net: extend NetClientInfo for offloading

2014-02-06 Thread Vincenzo Maffione
Some new callbacks have been added to generalize the operations done by virtio-net and vmxnet3 frontends to manipulate TAP offloadings. Signed-off-by: Vincenzo Maffione --- include/net/net.h | 19 +++ net/net.c | 55

[Qemu-devel] [PATCH v4 0/6] Add netmap backend offloadings support

2014-02-06 Thread Vincenzo Maffione
,ifname=vale0:01,id=mynet -smp 2 -vga std -m 3G Changes against the previous version *** (1) make tap offloading callbacks static (2) tap-win32.c modified to initialize offloading callback pointers (3) fix a bug when calling qemu_peer_using_vnet_header Vincenzo Maffione (6

[Qemu-devel] [PATCH v4 5/6] net: make tap offloading callbacks static

2014-02-06 Thread Vincenzo Maffione
Since TAP offloadings are manipulated through a new API, it's not necessary to export them in include/net/tap.h anymore. Signed-off-by: Vincenzo Maffione --- include/net/tap.h | 6 -- net/tap-win32.c | 12 ++-- net/tap.c | 12 ++-- 3 files changed, 12 inser

[Qemu-devel] [PATCH v4 4/6] net: virtio-net and vmxnet3 use offloading API

2014-02-06 Thread Vincenzo Maffione
. netmap). Signed-off-by: Vincenzo Maffione --- hw/net/vhost_net.c | 4 ++-- hw/net/virtio-net.c | 16 ++-- hw/net/vmxnet3.c| 12 +--- 3 files changed, 13 insertions(+), 19 deletions(-) diff --git a/hw/net/vhost_net.c b/hw/net/vhost_net.c index 854997d..c90b9ec 100644

[Qemu-devel] [PATCH v4 3/6] net: TAP uses NetClientInfo offloading callbacks

2014-02-06 Thread Vincenzo Maffione
The TAP NetClientInfo structure is inizialized with the TAP-specific functions that manipulates offloading features. Signed-off-by: Vincenzo Maffione --- net/tap-win32.c | 92 ++--- net/tap.c | 6 2 files changed, 55 insertions

[Qemu-devel] [PATCH v4 6/6] net: add offloading support to netmap backend

2014-02-06 Thread Vincenzo Maffione
Whit this patch, the netmap backend supports TSO/UFO/CSUM offloadings, and accepts the virtio-net header, similarly to what happens with TAP. The offloading callbacks in the NetClientInfo interface have been implemented. Signed-off-by: Vincenzo Maffione --- net/netmap.c | 68

[Qemu-devel] [PATCH v4 1/6] net: change vnet-hdr TAP prototypes

2014-02-06 Thread Vincenzo Maffione
The tap_has_vnet_hdr() and tap_has_vnet_hdr_len() functions used to return int, even though they only return true/false values. This patch changes the prototypes to return bool. Signed-off-by: Vincenzo Maffione --- include/net/tap.h | 4 ++-- net/tap-win32.c | 8 net/tap.c

Re: [Qemu-devel] [PATCH v3 3/5] net: TAP uses NetClientInfo offloading callbacks

2014-02-06 Thread Vincenzo Maffione
Ok, It could go as patch 5/6. Thanks 2014-02-06 Stefan Hajnoczi : > On Mon, Jan 20, 2014 at 06:07:03PM +0100, Vincenzo Maffione wrote: > > The TAP NetClientInfo structure is inizialized with the TAP-specific > > functions that manipulates offloading features. > > > &

Re: [Qemu-devel] [PATCH v3 0/5] Add netmap backend offloadings support

2014-02-06 Thread Vincenzo Maffione
ping Cheers Vincenzo 2014-01-20 Vincenzo Maffione : > The purpose of this patch series is to add offloadings support > (TSO/UFO/CSUM) to the netmap network backend, and make it possible > for the paravirtual network frontends (virtio-net and vmxnet3) to > use it. > In order

[Qemu-devel] [PATCH v3 5/5] net: add offloading support to netmap backend

2014-01-20 Thread Vincenzo Maffione
Whit this patch, the netmap backend supports TSO/UFO/CSUM offloadings, and accepts the virtio-net header, similarly to what happens with TAP. The offloading callbacks in the NetClientInfo interface have been implemented. Signed-off-by: Vincenzo Maffione --- net/netmap.c | 68

[Qemu-devel] [PATCH v3 3/5] net: TAP uses NetClientInfo offloading callbacks

2014-01-20 Thread Vincenzo Maffione
The TAP NetClientInfo structure is inizialized with the TAP-specific functions that manipulates offloading features. Signed-off-by: Vincenzo Maffione --- net/tap.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/net/tap.c b/net/tap.c index c805f3c..d34ec88 100644 --- a/net/tap.c +++ b

[Qemu-devel] [PATCH v3 2/5] net: extend NetClientInfo for offloading

2014-01-20 Thread Vincenzo Maffione
Some new callbacks have been added to generalize the operations done by virtio-net and vmxnet3 frontends to manipulate TAP offloadings. Signed-off-by: Vincenzo Maffione --- include/net/net.h | 19 +++ net/net.c | 55

[Qemu-devel] [PATCH v3 1/5] net: change vnet-hdr TAP prototypes

2014-01-20 Thread Vincenzo Maffione
The tap_has_vnet_hdr() and tap_has_vnet_hdr_len() functions used to return int, even though they only return true/false values. This patch changes the prototypes to return bool. Signed-off-by: Vincenzo Maffione --- include/net/tap.h | 4 ++-- net/tap-win32.c | 8 net/tap.c

[Qemu-devel] [PATCH v3 4/5] net: virtio-net and vmxnet3 use offloading API

2014-01-20 Thread Vincenzo Maffione
. netmap). Signed-off-by: Vincenzo Maffione --- hw/net/virtio-net.c | 16 ++-- hw/net/vmxnet3.c| 12 +--- 2 files changed, 11 insertions(+), 17 deletions(-) diff --git a/hw/net/virtio-net.c b/hw/net/virtio-net.c index 3626608..00c149b 100644 --- a/hw/net/virtio-net.c

[Qemu-devel] [PATCH v3 0/5] Add netmap backend offloadings support

2014-01-20 Thread Vincenzo Maffione
en revised: NETMAP_BDG_OFFSET becomes NETMAP_BDG_VNET_HDR, netmap_set_offload() implemented and netmap_has_vnet_hdr_len() rewritten. Vincenzo Maffione (5): net: change vnet-hdr TAP prototypes net: extend NetClientInfo for offloading net: TAP uses NetClientInfo offloading callbacks net: virt

Re: [Qemu-devel] [PATCH v2 0/6] Add netmap backend offloadings support

2014-01-16 Thread Vincenzo Maffione
2014/1/16 Stefan Hajnoczi > On Tue, Jan 14, 2014 at 11:59:44AM +0100, Vincenzo Maffione wrote: > > (3) There is actually an important problem. In the previous patch > version, TCP/UDP traffic was > > supported between two guests attached to a VALE switch if and only > i

[Qemu-devel] [PATCH v2 5/6] net: virtio-net and vmxnet3 use offloading API

2014-01-14 Thread Vincenzo Maffione
. netmap). Signed-off-by: Vincenzo Maffione --- hw/net/virtio-net.c | 14 +- hw/net/vmxnet3.c| 10 -- 2 files changed, 9 insertions(+), 15 deletions(-) diff --git a/hw/net/virtio-net.c b/hw/net/virtio-net.c index ac8322d..c850d5b 100644 --- a/hw/net/virtio-net.c +++ b/hw

[Qemu-devel] [PATCH v2 6/6] net: add offloadings support to netmap backend

2014-01-14 Thread Vincenzo Maffione
Whit this patch, the netmap backend supports TSO/UFO/CSUM offloadings, and accepts the virtio-net header, similarly to what happens with TAP. The offloading callbacks in the NetClientInfo interface have been implemented. Signed-off-by: Vincenzo Maffione --- net/netmap.c | 59

[Qemu-devel] [PATCH v2 4/6] net: TAP uses NetClientInfo offloading callbacks

2014-01-14 Thread Vincenzo Maffione
The TAP NetClientInfo structure is inizialized with the TAP-specific callbacks that manipulates backend offloading features. Signed-off-by: Vincenzo Maffione --- net/tap.c | 5 + 1 file changed, 5 insertions(+) diff --git a/net/tap.c b/net/tap.c index 42f768c..e6c598d 100644 --- a/net

[Qemu-devel] [PATCH v2 0/6] Add netmap backend offloadings support

2014-01-14 Thread Vincenzo Maffione
netmap.c. What do you think about that? What's the best way to manage this temporary lack of support? Vincenzo Maffione (6): net: change vnet-hdr TAP prototypes net: removing tap_using_vnet_hdr() function net: extend NetClientInfo for offloading manipulations net: TAP uses NetC

[Qemu-devel] [PATCH v2 1/6] net: change vnet-hdr TAP prototypes

2014-01-14 Thread Vincenzo Maffione
The tap_has_vnet_hdr() and tap_has_vnet_hdr_len() functions used to return int, even though they only return true/false values. This patch changes the prototypes to return bool. Signed-off-by: Vincenzo Maffione --- include/net/tap.h | 4 ++-- net/tap-win32.c | 8 net/tap.c

[Qemu-devel] [PATCH v2 2/6] net: removing tap_using_vnet_hdr() function

2014-01-14 Thread Vincenzo Maffione
ly in tap_set_vnet_hdr_len() and remove tap_using_vnet_hdr(), making the code simpler. Signed-off-by: Vincenzo Maffione --- hw/net/virtio-net.c | 4 hw/net/vmxnet3.c| 2 -- include/net/tap.h | 1 - net/tap-win32.c | 4 net/tap.c | 11 +-- 5 files changed, 1 inse

[Qemu-devel] [PATCH v2 3/6] net: extend NetClientInfo for offloading manipulations

2014-01-14 Thread Vincenzo Maffione
manipulate backend offloadings. Signed-off-by: Vincenzo Maffione --- include/net/net.h | 17 + net/net.c | 46 ++ 2 files changed, 63 insertions(+) diff --git a/include/net/net.h b/include/net/net.h index 11e1468..29a0698 100644

Re: [Qemu-devel] [PATCH 4/5] net: add offloadings support to netmap backend

2014-01-13 Thread Vincenzo Maffione
2014/1/13 Stefan Hajnoczi > On Fri, Dec 13, 2013 at 01:05:02PM +0100, Vincenzo Maffione wrote: > > +static void netmap_using_vnet_hdr(NetClientState *nc, bool enable) > > +{ > > +} > > I was trying to figure out whether it's okay for this function to be a > nop

Re: [Qemu-devel] [PATCH 1/5] net: extend NetClientInfo for offloading manipulations

2014-01-13 Thread Vincenzo Maffione
Ok. I did not include those modifications into the patch in order to avoid modifications to the TAP netdev. 2014/1/13 Stefan Hajnoczi > On Fri, Dec 13, 2013 at 01:04:59PM +0100, Vincenzo Maffione wrote: > > diff --git a/include/net/net.h b/include/net/net.h > > index 11e1468.

[Qemu-devel] [PATCH 4/5] net: add offloadings support to netmap backend

2013-12-13 Thread Vincenzo Maffione
Whit this patch, the netmap backend supports TSO/UFO/CSUM offloadings, and accepts the virtio-net header, similarly to what happens with TAP. The offloading callbacks in the NetClientInfo interface have been implemented. Signed-off-by: Vincenzo Maffione --- net/netmap.c | 64

[Qemu-devel] [PATCH 3/5] net: virtio-net and vmxnet3 use offloading API

2013-12-13 Thread Vincenzo Maffione
With this patch, virtio-net and vmxnet3 frontends make use of the qemu_peer_* API for backend offloadings manipulations, instead of calling TAP-specific functions directly. Signed-off-by: Vincenzo Maffione --- hw/net/virtio-net.c | 12 ++-- hw/net/vmxnet3.c| 14 +++--- 2

[Qemu-devel] [PATCH 1/5] net: extend NetClientInfo for offloading manipulations

2013-12-13 Thread Vincenzo Maffione
manipulate backend offloadings. Signed-off-by: Vincenzo Maffione --- include/net/net.h | 19 +++ net/net.c | 55 +++ 2 files changed, 74 insertions(+) diff --git a/include/net/net.h b/include/net/net.h index 11e1468

[Qemu-devel] [PATCH 5/5] net: virtio-net and vmxnet3 can use netmap offloadings

2013-12-13 Thread Vincenzo Maffione
With this patch we remove the existing checks in the virtio-net and vmxnet3 frontends that prevents them from using offloadings with backends different from TAP (e.g. netmap). Signed-off-by: Vincenzo Maffione --- hw/net/virtio-net.c | 4 hw/net/vmxnet3.c| 4 +--- 2 files changed, 1

[Qemu-devel] [PATCH 2/5] net: TAP uses NetClientInfo offloading callbacks

2013-12-13 Thread Vincenzo Maffione
The TAP NetClientInfo structure is inizialized with the TAP-specific callbacks that manipulates backend offloading features. Signed-off-by: Vincenzo Maffione --- net/tap.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/net/tap.c b/net/tap.c index 39c1cda..175fcb3 100644 --- a/net

[Qemu-devel] [PATCH 0/5] Add netmap backend offloadings support

2013-12-13 Thread Vincenzo Maffione
,ifname=vale0:01,id=mynet -smp 2 -vga std -m 3G Vincenzo Maffione (5): net: extend NetClientInfo for offloading manipulations net: TAP uses NetClientInfo offloading callbacks net: virtio-net and vmxnet3 use offloading API net: add offloadings support to netmap backend net: virtio-net and

Re: [Qemu-devel] [PULL 1/4] net: Adding netmap network backend

2013-12-11 Thread Vincenzo Maffione
es a switch and > > > +# YYY identifies a port of the switch. VALE ports having the > > > +# same XXX are therefore connected to the same switch. > > > +# > > > +# @devname: #optional path of the netmap device (default: > '/dev/netmap'). > > > +# > > > +# Since 1.8 > > > > s/1.8/2.0/ > > Thank you for spotting this. Sending a separate patch to fix this since > the pull request has been merged. > > Stefan > -- Vincenzo Maffione

Re: [Qemu-devel] [PATCH] net: QEMU_NET_PACKET_FLAG_MORE introduced

2013-12-09 Thread Vincenzo Maffione
6PM +0100, Vincenzo Maffione wrote: > > > > > > > > 2013/12/9 Stefan Hajnoczi > > > > On Mon, Dec 09, 2013 at 01:14:31PM +0200, Michael S. Tsirkin wrote: > > > On Mon, Dec 09, 2013 at 11:55:57AM +0100, Vincenzo Maffione wrote: > >

Re: [Qemu-devel] [PATCH] net: QEMU_NET_PACKET_FLAG_MORE introduced

2013-12-09 Thread Vincenzo Maffione
2013/12/9 Stefan Hajnoczi > On Mon, Dec 09, 2013 at 01:14:31PM +0200, Michael S. Tsirkin wrote: > > On Mon, Dec 09, 2013 at 11:55:57AM +0100, Vincenzo Maffione wrote: > > > If you don't think adding the new flag support for virtio-net is a > good idea > >

Re: [Qemu-devel] [PATCH] net: QEMU_NET_PACKET_FLAG_MORE introduced

2013-12-09 Thread Vincenzo Maffione
) we could also make it optional. Cheers Vincenzo 2013/12/9 Michael S. Tsirkin > On Mon, Dec 09, 2013 at 11:20:29AM +0100, Vincenzo Maffione wrote: > > Hello, > >I've done some netperf TCP_STREAM and TCP_RR virtio-net tests, using > the > > same

[Qemu-devel] [PATCH] net: QEMU_NET_PACKET_FLAG_MORE introduced

2013-12-06 Thread Vincenzo Maffione
-to-guest UDP_STREAM netperf test (64 bytes packets) with virtio-net frontends: 820 Kpps ==> 1000 Kpps (+22%). Measured improvement of a guest-to-guest UDP test (64 bytes packets) with e1000 frontends and netmap clients on the guests: 1.8 Mpps ==> 3.1 Mpps (+72%). Signed-off-by: Vi

[Qemu-devel] [PATCH] MAINTAINERS: Add netmap maintainers

2013-11-06 Thread Vincenzo Maffione
Signed-off-by: Vincenzo Maffione --- MAINTAINERS | 8 1 file changed, 8 insertions(+) diff --git a/MAINTAINERS b/MAINTAINERS index 77edacf..7295f33 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -707,6 +707,14 @@ S: Maintained F: net/ T: git git://github.com/stefanha/qemu.git net

  1   2   >