Re: [Qemu-devel] [PATCH RFC 4/7] net/filter: Introduce a helper to add a filter to the netdev

2016-01-24 Thread Jason Wang
On 01/22/2016 04:36 PM, zhanghailiang wrote: > Signed-off-by: zhanghailiang Commit log please. > --- > include/net/filter.h | 5 + > net/filter.c | 63 > > 2 files changed, 68 insertions(+) > > diff --git a/include/net/filter.

Re: [Qemu-devel] [PATCH RFC 7/7] net/filter: prevent the default filter to be deleted

2016-01-24 Thread Jason Wang
On 01/22/2016 04:36 PM, zhanghailiang wrote: > Signed-off-by: zhanghailiang > --- > net/filter.c | 8 > 1 file changed, 8 insertions(+) > > diff --git a/net/filter.c b/net/filter.c > index a126a3b..4aafff0 100644 > --- a/net/filter.c > +++ b/net/filter.c > @@ -323,11 +323,19 @@ static

Re: [Qemu-devel] [PATCH RFC 1/7] net/filter: Fix the output information for command 'info network'

2016-01-25 Thread Jason Wang
On 01/25/2016 01:58 PM, Hailiang Zhang wrote: > On 2016/1/25 13:01, Jason Wang wrote: >> >> >> On 01/22/2016 04:36 PM, zhanghailiang wrote: >>> The properties of netfilter object could be changed by 'qom-set' >>> command, but the output of 

Re: [Qemu-devel] [PATCH] net: walk through filters reversely if traffic is outgress

2016-01-25 Thread Jason Wang
On 01/25/2016 02:27 PM, Li Zhijian wrote: > > > On 01/25/2016 12:58 PM, Jason Wang wrote: >> >> >> On 01/22/2016 04:11 PM, Li Zhijian wrote: >>> Previously, if the netdev has more than one filters, the ingress >>> or outgress traffic pass the filter

Re: [Qemu-devel] [PATCH RFC 6/7] net/filter: Add a default filter to each netdev

2016-01-25 Thread Jason Wang
On 01/25/2016 03:22 PM, Hailiang Zhang wrote: > On 2016/1/25 13:18, Jason Wang wrote: >> >> >> On 01/22/2016 04:36 PM, zhanghailiang wrote: >>> We add each netdev a default buffer filter, which the name is >>> 'nop', and the default buffer fil

Re: [Qemu-devel] [PATCH RFC 6/7] net/filter: Add a default filter to each netdev

2016-01-26 Thread Jason Wang
On 01/25/2016 07:19 PM, Hailiang Zhang wrote: > On 2016/1/25 15:22, Hailiang Zhang wrote: >> On 2016/1/25 13:18, Jason Wang wrote: >>> >>> >>> On 01/22/2016 04:36 PM, zhanghailiang wrote: >>>> We add each netdev a default buffer filter, which the n

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

2016-01-26 Thread Jason Wang
On 01/26/2016 02:24 AM, Vincenzo Maffione wrote: > This patch simplifies the netmap backend code by means of the nm_open() > helper function provided by netmap_user.h, which hides the details of > open(), iotcl() and mmap() carried out on the netmap device. > > Moreover, the semantic of nm_open()

Re: [Qemu-devel] [RFC 0/10] Support Receive-Segment-Offload(RSC) for WHQL test of Window guest

2016-01-26 Thread Jason Wang
On 01/26/2016 02:44 PM, Fam Zheng wrote: > On Tue, 01/26 06:24, w...@redhat.com wrote: >> Wei Xu (10): >> 'Segment', 'Chain' and 'Status' enumeration. >> Initilize & Cleanup. >> Chain lookup and packets caching. >> Tcp general data coalescing >> The draining timer >> IPv4 checksum. >>

Re: [Qemu-devel] [PATCH V3] net: always walk through filters in reverse if traffic is egress

2016-01-26 Thread Jason Wang
On 01/26/2016 01:00 PM, Li Zhijian wrote: > Previously, if we attach more than filters for one netdev, IN/OUT traffic pass > through filters in a same order. > ingress: netdev ->filter1 ->filter2 ->...filter[n] ->emulated device > egress: emulated device ->filter1 ->filter2 ->...filter[n] ->netde

Re: [Qemu-devel] [PATCH v2] net/filter: Fix the output information for command 'info network'

2016-01-26 Thread Jason Wang
information through nf->info_str, it will >> not be updated while we change the value of netfilter's property. >> >> Here we split a helper function that could collect the output >> information for filter, and also remove the useless member >> 'info_str'

Re: [Qemu-devel] [PATCH RFC 6/7] net/filter: Add a default filter to each netdev

2016-01-26 Thread Jason Wang
On 01/27/2016 08:37 AM, Hailiang Zhang wrote: > On 2016/1/26 11:18, Jason Wang wrote: >> >> >> On 01/25/2016 03:22 PM, Hailiang Zhang wrote: >>> On 2016/1/25 13:18, Jason Wang wrote: >>>> >>>> >>>> On 01/22/2016 04:36 PM, zha

Re: [Qemu-devel] [PATCH V2] net/traffic-mirror:Add traffic-mirror

2016-01-27 Thread Jason Wang
On 01/27/2016 10:40 AM, Zhang Chen wrote: > From: ZhangChen > > Traffic-mirror is a netfilter plugin. > It gives qemu the ability to copy and mirror guest's > net packet. we output packet to chardev. > > usage: > > -netdev tap,id=hn0 > -chardev socket,id=mirror0,host=ip_primary,port=X,server,now

Re: [Qemu-devel] [PATCH] e1000: eliminate infinite loops on out-of-bounds transfer start

2016-01-27 Thread Jason Wang
On 01/28/2016 02:35 AM, Laszlo Ersek wrote: > Hello Jason, > > On 01/22/16 07:15, Jason Wang wrote: >> >> On 01/22/2016 02:11 PM, Michael Tokarev wrote: >>> 22.01.2016 06:09, Jason Wang wrote: >>>> On 01/19/2016 09:17 PM, Laszlo Ersek wrote: &g

Re: [Qemu-devel] [PATCH V2] net/traffic-mirror:Add traffic-mirror

2016-01-28 Thread Jason Wang
On 01/28/2016 03:44 PM, Zhang Chen wrote: > > > On 01/28/2016 01:44 PM, Jason Wang wrote: >> >> On 01/27/2016 10:40 AM, Zhang Chen wrote: >>> From: ZhangChen >>> >>> Traffic-mirror is a netfilter plugin. >>> It gives qemu the ability to

Re: [Qemu-devel] [PATCH V2] net/traffic-mirror:Add traffic-mirror

2016-01-28 Thread Jason Wang
On 01/28/2016 05:52 PM, Zhang Chen wrote: > > > On 01/28/2016 04:37 PM, Jason Wang wrote: >> >> On 01/28/2016 03:44 PM, Zhang Chen wrote: >>> >>> On 01/28/2016 01:44 PM, Jason Wang wrote: >>>> On 01/27/2016 10:40 AM, Zhang Chen wrote: >

Re: [Qemu-devel] [PATCH V2] net/traffic-mirror:Add traffic-mirror

2016-01-31 Thread Jason Wang
On 01/29/2016 09:38 AM, Li Zhijian wrote: > > > On 01/28/2016 01:44 PM, Jason Wang wrote: >> >> >> On 01/27/2016 10:40 AM, Zhang Chen wrote: >>> From: ZhangChen >>> >>> Traffic-mirror is a netfilter plugin. >>> It gives qemu t

Re: [Qemu-devel] [PATCH RFC v2 2/5] vl: Make object_create() public

2016-01-31 Thread Jason Wang
On 01/27/2016 04:29 PM, zhanghailiang wrote: > Make the helper object_create() public and fix its first > parameter to accept NULL value. Looks not very nice. Maybe pass a new predicate func for sanity check it better. > > Signed-off-by: zhanghailiang > Cc: Paolo Bonzini > --- > v2: > - New

Re: [Qemu-devel] [PATCH RFC v2 3/5] net/filter: Introduce a helper to add a filter to the netdev

2016-01-31 Thread Jason Wang
On 01/27/2016 04:29 PM, zhanghailiang wrote: > We add a new helper function netdev_add_filter(), this function > can help adding a filter object to a netdev. > Besides, we add a is_default member for struct NetFilterState > to indicate whether the filter is default or not. > > Signed-off-by: zhan

Re: [Qemu-devel] [RFC v2 0/10] Support Receive-Segment-Offload(RSC) for WHQL test of Window guest

2016-01-31 Thread Jason Wang
On 02/01/2016 02:13 AM, w...@redhat.com wrote: > From: Wei Xu > > Patch v2 add detailed commit log. > > This patch is to support WHQL test for Windows guest, while this feature also > benifits other guest works as a kernel 'gro' like feature with userspace > implementation. > Feature informatio

Re: [Qemu-devel] [RFC Patch v2 02/10] virtio-net rsc: Initilize & Cleanup

2016-01-31 Thread Jason Wang
On 02/01/2016 02:13 AM, w...@redhat.com wrote: > From: Wei Xu > > The chain list is initialized when the device is getting realized, > and the entry of the chain will be inserted dynamically according > to protocol type of the network traffic. > > All the buffered packets and chain will be destr

Re: [Qemu-devel] [RFC Patch v2 03/10] virtio-net rsc: Chain Lookup, Packet Caching and Framework of IPv4

2016-01-31 Thread Jason Wang
On 02/01/2016 02:13 AM, w...@redhat.com wrote: > From: Wei Xu > > Upon a packet is arriving, a corresponding chain will be selected or created, > or be bypassed if it's not an IPv4 packets. > > The callback in the chain will be invoked to call the real coalescing. > > Since the coalescing is bas

Re: [Qemu-devel] [RFC Patch v2 04/10] virtio-net rsc: Detailed IPv4 and General TCP data coalescing

2016-01-31 Thread Jason Wang
On 02/01/2016 02:13 AM, w...@redhat.com wrote: > From: Wei Xu > > Since this feature also needs to support IPv6, and there are > some protocol specific differences difference for IPv4/6 in the header, > so try to make the interface to be general. > > IPv4/6 should set up both the new and old IP/

Re: [Qemu-devel] [RFC Patch v2 05/10] virtio-net rsc: Create timer to drain the packets from the cache pool

2016-01-31 Thread Jason Wang
On 02/01/2016 02:13 AM, w...@redhat.com wrote: > From: Wei Xu > > The timer will only be triggered if the packets pool is not empty, > and it'll drain off all the cached packets, this is to reduce the > delay to upper layer protocol stack. > > Signed-off-by: Wei Xu > --- > hw/net/virtio-net.c

Re: [Qemu-devel] [RFC Patch v2 06/10] virtio-net rsc: IPv4 checksum

2016-01-31 Thread Jason Wang
On 02/01/2016 02:13 AM, w...@redhat.com wrote: > From: Wei Xu > > If a field in the IPv4 header is modified, then the checksum > have to be recalculated before sending it out. This in fact breaks bisection. I think you need either squash this into previous patch or introduce virtio_net_rsc_ipv4

Re: [Qemu-devel] [RFC Patch v2 07/10] virtio-net rsc: Checking TCP flag and drain specific connection packets

2016-01-31 Thread Jason Wang
On 02/01/2016 02:13 AM, w...@redhat.com wrote: > From: Wei Xu > > Normally it includes 2 typical way to handle a TCP control flag, bypass > and finalize, bypass means should be sent out directly, and finalize > means the packets should also be bypassed, and this should be done > after searching

Re: [Qemu-devel] [RFC Patch v2 08/10] virtio-net rsc: Sanity check & More bypass cases check

2016-01-31 Thread Jason Wang
On 02/01/2016 02:13 AM, w...@redhat.com wrote: > From: Wei Xu > > More general exception cases check > 1. Incorrect version in IP header > 2. IP options & IP fragment > 3. Not a TCP packets > 4. Sanity size check to prevent buffer overflow attack. > > Signed-off-by: Wei Xu Let's squash this in

Re: [Qemu-devel] [RFC Patch v2 09/10] virtio-net rsc: Add IPv6 support

2016-01-31 Thread Jason Wang
On 02/01/2016 02:13 AM, w...@redhat.com wrote: > From: Wei Xu > > A few more stuffs should be included to support this > 1. Corresponding chain lookup > 2. Coalescing callback for the protocol chain > 3. Filter & Sanity Check. > > Signed-off-by: Wei Xu > --- > hw/net/virtio-net.c | 104 >

Re: [Qemu-devel] [RFC Patch v2 10/10] virtio-net rsc: Add Receive Segment Coalesce statistics

2016-01-31 Thread Jason Wang
On 02/01/2016 02:13 AM, w...@redhat.com wrote: > From: Wei Xu > > Add statistics to log what happened during the process. > > Signed-off-by: Wei Xu > --- > hw/net/virtio-net.c| 49 > +++--- > include/hw/virtio/virtio.h | 33 +

Re: [Qemu-devel] [PATCH RFC v2 2/5] vl: Make object_create() public

2016-01-31 Thread Jason Wang
On 02/01/2016 02:19 PM, Hailiang Zhang wrote: > On 2016/2/1 11:05, Jason Wang wrote: >> >> >> On 01/27/2016 04:29 PM, zhanghailiang wrote: >>> Make the helper object_create() public and fix its first >>> parameter to accept NULL value. >> >> L

Re: [Qemu-devel] [PATCH RFC v2 3/5] net/filter: Introduce a helper to add a filter to the netdev

2016-01-31 Thread Jason Wang
On 02/01/2016 02:13 PM, Hailiang Zhang wrote: > On 2016/2/1 11:14, Jason Wang wrote: >> >> >> On 01/27/2016 04:29 PM, zhanghailiang wrote: >>> We add a new helper function netdev_add_filter(), this function >>> can help adding a filter object to a netdev.

Re: [Qemu-devel] [PATCH RFC v2 3/5] net/filter: Introduce a helper to add a filter to the netdev

2016-02-01 Thread Jason Wang
On 02/01/2016 03:56 PM, Hailiang Zhang wrote: > On 2016/2/1 15:46, Jason Wang wrote: >> >> >> On 02/01/2016 02:13 PM, Hailiang Zhang wrote: >>> On 2016/2/1 11:14, Jason Wang wrote: >>>> >>>> >>>> On 01/27/2016 04:29 PM, zhangha

Re: [Qemu-devel] [PATCH RFC v2 3/5] net/filter: Introduce a helper to add a filter to the netdev

2016-02-01 Thread Jason Wang
On 02/01/2016 04:21 PM, Hailiang Zhang wrote: >> >> Instead of this, I wonder maybe it's better to: >> >> - store the default filter property into a pointer to string > > Do you mean, pass a string parameter which stores the filter property > instead of > assemble

Re: [Qemu-devel] [RFC Patch v2 03/10] virtio-net rsc: Chain Lookup, Packet Caching and Framework of IPv4

2016-02-01 Thread Jason Wang
On 02/01/2016 04:02 PM, Wei Xu wrote: [...] >> >>> +return NULL; >>> +} >>> + >>> +chain->proto = proto; >>> +chain->do_receive = virtio_net_rsc_receive4; >>> + >>> +QTAILQ_INIT(&chain->buffers); >>> +QTAILQ_INSERT_TAIL(&n->rsc_chains, chain, next); >>> +return ch

Re: [Qemu-devel] [RFC Patch v2 04/10] virtio-net rsc: Detailed IPv4 and General TCP data coalescing

2016-02-01 Thread Jason Wang
On 02/01/2016 04:29 PM, Wei Xu wrote: > > On 02/01/2016 02:21 PM, Jason Wang wrote: > >> >> On 02/01/2016 02:13 AM, w...@redhat.com wrote: >>> From: Wei Xu >>> >>> Since this feature also needs to support IPv6, and there are >>> some p

Re: [Qemu-devel] [RFC Patch v2 05/10] virtio-net rsc: Create timer to drain the packets from the cache pool

2016-02-01 Thread Jason Wang
On 02/01/2016 04:39 PM, Wei Xu wrote: > On 02/01/2016 02:28 PM, Jason Wang wrote: >> >> On 02/01/2016 02:13 AM, w...@redhat.com wrote: >>> From: Wei Xu >>> >>> The timer will only be triggered if the packets pool is not empty, >>> and it

Re: [Qemu-devel] [PATCH RFC v2 3/5] net/filter: Introduce a helper to add a filter to the netdev

2016-02-01 Thread Jason Wang
On 02/01/2016 05:22 PM, Hailiang Zhang wrote: > On 2016/2/1 17:04, Jason Wang wrote: >> >> >> On 02/01/2016 03:56 PM, Hailiang Zhang wrote: >>> On 2016/2/1 15:46, Jason Wang wrote: >>>> >>>> >>>> On 02/01/2016 02:13 P

Re: [Qemu-devel] [PATCH RFC v2 3/5] net/filter: Introduce a helper to add a filter to the netdev

2016-02-01 Thread Jason Wang
On 02/01/2016 05:39 PM, Hailiang Zhang wrote: > On 2016/2/1 17:18, Jason Wang wrote: >> >> >> On 02/01/2016 04:21 PM, Hailiang Zhang wrote: >>>>>>>> >>>>>>>> Instead of this, I wonder maybe it's better to: >

[Qemu-devel] [PULL 00/17] Net patches

2016-02-01 Thread Jason Wang
The following changes since commit 0430891ce162b986c6e02a7729a942ecd2a32ca4: hw: Clean up includes (2016-01-29 15:07:25 +) are available in the git repository at: https://github.com/jasowang/qemu.git tags/net-pull-request for you to fetch changes up to e8a7a1a574ed6728422959c8aa79ca584c

[Qemu-devel] [PULL 01/17] net/slirp: Tell the users when they are using deprecated options

2016-02-01 Thread Jason Wang
From: Thomas Huth We don't want to support the legacy -tftp, -bootp, -smb and -net channel options forever. So let's start telling the users that they are deprecated and what option should be used instead. Signed-off-by: Thomas Huth Signed-off-by: Jason Wang --- net/slirp.c |

[Qemu-devel] [PULL 02/17] qemu-doc: Do not promote deprecated -smb and -redir options

2016-02-01 Thread Jason Wang
From: Thomas Huth Since -smb and -redir are deprecated options, we should not use them as examples in the documentation anymore. Signed-off-by: Thomas Huth Signed-off-by: Jason Wang --- qemu-doc.texi | 9 + 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/qemu-doc.texi b

[Qemu-devel] [PULL 06/17] slirp: Generalizing and neutralizing ARP code

2016-02-01 Thread Jason Wang
From: Guillaume Subiron Basically, this patch replaces "arp" by "resolution" every time "arp" means "mac resolution" and not specifically ARP. This prepares for IPv6 support. Signed-off-by: Guillaume Subiron Signed-off-by: Samuel Thibault Reviewed-by

[Qemu-devel] [PULL 03/17] net: cadence_gem: check packet size in gem_recieve

2016-02-01 Thread Jason Wang
: Ling Liu Signed-off-by: Prasad J Pandit Signed-off-by: Jason Wang --- hw/net/cadence_gem.c | 4 1 file changed, 4 insertions(+) diff --git a/hw/net/cadence_gem.c b/hw/net/cadence_gem.c index f9e4091..e513d9d 100644 --- a/hw/net/cadence_gem.c +++ b/hw/net/cadence_gem.c @@ -678,6 +678,10 @@ stat

[Qemu-devel] [PULL 04/17] cadence_gem: fix buffer overflow

2016-02-01 Thread Jason Wang
sults in a buffer overflow. Reported-by: 刘令 Signed-off-by: Michael S. Tsirkin Signed-off-by: Jason Wang --- hw/net/cadence_gem.c | 8 1 file changed, 8 insertions(+) diff --git a/hw/net/cadence_gem.c b/hw/net/cadence_gem.c index e513d9d..0346f3e 100644 --- a/hw/net/cadence_gem.c ++

[Qemu-devel] [PULL 05/17] slirp: goto bad in udp_input if sosendto fails

2016-02-01 Thread Jason Wang
the execution of this function. Signed-off-by: Guillaume Subiron Signed-off-by: Samuel Thibault Reviewed-by: Thomas Huth Signed-off-by: Jason Wang --- slirp/udp.c | 1 + 1 file changed, 1 insertion(+) diff --git a/slirp/udp.c b/slirp/udp.c index fee13b4..ce63414 100644 --- a/slirp/udp.c

[Qemu-devel] [PULL 10/17] slirp: Factorizing and cleaning solookup()

2016-02-01 Thread Jason Wang
prepares for IPv6 support. Signed-off-by: Guillaume Subiron Signed-off-by: Samuel Thibault Reviewed-by: Thomas Huth Signed-off-by: Jason Wang --- slirp/socket.c| 37 - slirp/socket.h| 5 +++-- slirp/tcp_input.c | 13 +++-- slirp/udp.c | 21

[Qemu-devel] [PULL 08/17] slirp: Make Socket structure IPv6 compatible

2016-02-01 Thread Jason Wang
: Jason Wang --- slirp/ip_icmp.c | 2 ++ slirp/slirp.c | 51 ++- slirp/socket.c| 14 +++--- slirp/socket.h| 19 +++ slirp/tcp_input.c | 2 ++ slirp/tcp_subr.c | 2 ++ slirp/udp.c | 4 7 files

[Qemu-devel] [PULL 07/17] slirp: Adding address family switch for produced frames

2016-02-01 Thread Jason Wang
From: Guillaume Subiron In if_encap, a switch is added to prepare for the IPv6 case. Some code is factorized. This prepares for IPv6 support. Signed-off-by: Guillaume Subiron Signed-off-by: Samuel Thibault Reviewed-by: Thomas Huth --- slirp/slirp.c | 61 +

[Qemu-devel] [PULL 09/17] slirp: Factorizing address translation

2016-02-01 Thread Jason Wang
: Jason Wang --- slirp/bootp.c| 2 +- slirp/ip_icmp.c | 19 ++ slirp/socket.c | 112 +-- slirp/socket.h | 5 +++ slirp/tcp_subr.c | 35 - slirp/tftp.c | 6 +-- slirp/udp.c | 37

[Qemu-devel] [PULL 11/17] slirp: Add sockaddr_equal, make solookup family-agnostic

2016-02-01 Thread Jason Wang
Signed-off-by: Jason Wang --- slirp/socket.c| 21 ++--- slirp/socket.h| 22 +- slirp/tcp_input.c | 23 ++- slirp/udp.c | 10 -- 4 files changed, 49 insertions(+), 27 deletions(-) diff --git a/slirp/socket.c b/slirp

[Qemu-devel] [PULL 15/17] net: netmap: use nm_open() to open netmap ports

2016-02-01 Thread Jason Wang
special netmap ports (e.g. pipes, monitors) and use special modes (e.g. host rings only, single queue mode, exclusive access). Signed-off-by: Vincenzo Maffione Signed-off-by: Jason Wang --- net/netmap.c | 97 1 file changed, 32 insertions

[Qemu-devel] [PULL 12/17] slirp: Make udp_attach IPv6 compatible

2016-02-01 Thread Jason Wang
From: Guillaume Subiron A sa_family_t is now passed in argument to udp_attach instead of using a hardcoded "AF_INET" to call qemu_socket(). This prepares for IPv6 support. Signed-off-by: Guillaume Subiron Signed-off-by: Samuel Thibault Reviewed-by: Thomas Huth Signed-off-by:

[Qemu-devel] [PULL 13/17] slirp: Adding family argument to tcp_fconnect()

2016-02-01 Thread Jason Wang
From: Guillaume Subiron This patch simply adds a sa_family_t argument to remove the hardcoded "AF_INET" in the call of qemu_socket(). This prepares for IPv6 support. Signed-off-by: Guillaume Subiron Signed-off-by: Samuel Thibault Reviewed-by: Thomas Huth Signed-off-by:

[Qemu-devel] [PULL 16/17] net: always walk through filters in reverse if traffic is egress

2016-02-01 Thread Jason Wang
ters in reverse to simplify the possible filters configuration in the future. Signed-off-by: Wen Congyang Signed-off-by: Li Zhijian Reviewed-by: Yang Hongyang Signed-off-by: Jason Wang --- include/net/net.h | 2 +- net/filter.c | 21 +++-- net/net.c | 20 +++-

[Qemu-devel] [PULL 14/17] e1000: eliminate infinite loops on out-of-bounds transfer start

2016-02-01 Thread Jason Wang
ll in buffers safely for bogus DMA addresses, so we just extend the existing failsafes with the above condition. This is CVE-2016-1981. Cc: "Michael S. Tsirkin" Cc: Petr Matousek Cc: Stefano Stabellini Cc: Prasad Pandit Cc: Michael Roth Cc: Jason Wang Cc: qemu-sta...@nongnu.org RHBZ:

[Qemu-devel] [PULL 17/17] net/filter: Fix the output information for command 'info network'

2016-02-01 Thread Jason Wang
7;s property. Here we split a helper function that could collect the output information for filter, and also remove the useless member 'info_str' from struct NetFilterState. Signed-off-by: zhanghailiang Cc: Jason Wang Cc: Eric Blake Cc: Markus Armbruster Cc: Yang Hongyang Reviewe

Re: [Qemu-devel] [PULL 00/17] Net patches

2016-02-02 Thread Jason Wang
On 02/02/2016 07:05 PM, Peter Maydell wrote: > On 2 February 2016 at 02:36, Jason Wang wrote: >> The following changes since commit 0430891ce162b986c6e02a7729a942ecd2a32ca4: >> >> hw: Clean up includes (2016-01-29 15:07:25 +) >> >> are available in the

Re: [Qemu-devel] [PULL 00/17] Net patches

2016-02-04 Thread Jason Wang
On 02/03/2016 05:09 PM, Samuel Thibault wrote: > Jason Wang, on Wed 03 Feb 2016 12:52:24 +0800, wrote: >>> Hi. I'm afraid this failed to build on w32: >>> >>> declaration specifiers or ‘...’ before ‘sa_family_t’ >> - switch to use unsigned short >>

[Qemu-devel] [PULL V2 01/17] net/slirp: Tell the users when they are using deprecated options

2016-02-04 Thread Jason Wang
From: Thomas Huth We don't want to support the legacy -tftp, -bootp, -smb and -net channel options forever. So let's start telling the users that they are deprecated and what option should be used instead. Signed-off-by: Thomas Huth Signed-off-by: Jason Wang --- net/slirp.c |

[Qemu-devel] [PULL V2 00/17] Net patches

2016-02-04 Thread Jason Wang
The following changes since commit 87574621b18f86eab295a2c207e0b42c77b5dfa0: Merge remote-tracking branch 'remotes/kraxel/tags/pull-vga-20160203-1' into staging (2016-02-03 12:23:48 +) are available in the git repository at: https://github.com/jasowang/qemu.git tags/net-pull-request fo

[Qemu-devel] [PULL V2 05/17] slirp: goto bad in udp_input if sosendto fails

2016-02-04 Thread Jason Wang
the execution of this function. Signed-off-by: Guillaume Subiron Signed-off-by: Samuel Thibault Reviewed-by: Thomas Huth Signed-off-by: Jason Wang --- slirp/udp.c | 1 + 1 file changed, 1 insertion(+) diff --git a/slirp/udp.c b/slirp/udp.c index fee13b4..ce63414 100644 --- a/slirp/udp.c

[Qemu-devel] [PULL V2 02/17] qemu-doc: Do not promote deprecated -smb and -redir options

2016-02-04 Thread Jason Wang
From: Thomas Huth Since -smb and -redir are deprecated options, we should not use them as examples in the documentation anymore. Signed-off-by: Thomas Huth Signed-off-by: Jason Wang --- qemu-doc.texi | 9 + 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/qemu-doc.texi b

[Qemu-devel] [PULL V2 08/17] slirp: Make Socket structure IPv6 compatible

2016-02-04 Thread Jason Wang
: Jason Wang --- slirp/ip_icmp.c | 2 ++ slirp/slirp.c | 51 ++- slirp/socket.c| 14 +++--- slirp/socket.h| 19 +++ slirp/tcp_input.c | 2 ++ slirp/tcp_subr.c | 2 ++ slirp/udp.c | 4 7 files

[Qemu-devel] [PULL V2 04/17] cadence_gem: fix buffer overflow

2016-02-04 Thread Jason Wang
sults in a buffer overflow. Reported-by: 刘令 Signed-off-by: Michael S. Tsirkin Signed-off-by: Jason Wang --- hw/net/cadence_gem.c | 8 1 file changed, 8 insertions(+) diff --git a/hw/net/cadence_gem.c b/hw/net/cadence_gem.c index e513d9d..0346f3e 100644 --- a/hw/net/cadence_gem.c ++

[Qemu-devel] [PULL V2 06/17] slirp: Generalizing and neutralizing ARP code

2016-02-04 Thread Jason Wang
From: Guillaume Subiron Basically, this patch replaces "arp" by "resolution" every time "arp" means "mac resolution" and not specifically ARP. This prepares for IPv6 support. Signed-off-by: Guillaume Subiron Signed-off-by: Samuel Thibault Reviewed-by

[Qemu-devel] [PULL V2 03/17] net: cadence_gem: check packet size in gem_recieve

2016-02-04 Thread Jason Wang
: Ling Liu Signed-off-by: Prasad J Pandit Signed-off-by: Jason Wang --- hw/net/cadence_gem.c | 4 1 file changed, 4 insertions(+) diff --git a/hw/net/cadence_gem.c b/hw/net/cadence_gem.c index f9e4091..e513d9d 100644 --- a/hw/net/cadence_gem.c +++ b/hw/net/cadence_gem.c @@ -678,6 +678,10 @@ stat

[Qemu-devel] [PULL V2 11/17] slirp: Add sockaddr_equal, make solookup family-agnostic

2016-02-04 Thread Jason Wang
Signed-off-by: Jason Wang --- slirp/socket.c| 21 ++--- slirp/socket.h| 24 +++- slirp/tcp_input.c | 23 ++- slirp/udp.c | 10 -- 4 files changed, 51 insertions(+), 27 deletions(-) diff --git a/slirp/socket.c b/slirp

[Qemu-devel] [PULL V2 07/17] slirp: Adding address family switch for produced frames

2016-02-04 Thread Jason Wang
From: Guillaume Subiron In if_encap, a switch is added to prepare for the IPv6 case. Some code is factorized. This prepares for IPv6 support. Signed-off-by: Guillaume Subiron Signed-off-by: Samuel Thibault Reviewed-by: Thomas Huth --- slirp/slirp.c | 61 +

[Qemu-devel] [PULL V2 09/17] slirp: Factorizing address translation

2016-02-04 Thread Jason Wang
: Jason Wang --- slirp/bootp.c| 2 +- slirp/ip_icmp.c | 19 ++ slirp/socket.c | 112 +-- slirp/socket.h | 5 +++ slirp/tcp_subr.c | 35 - slirp/tftp.c | 6 +-- slirp/udp.c | 37

[Qemu-devel] [PULL V2 12/17] slirp: Make udp_attach IPv6 compatible

2016-02-04 Thread Jason Wang
From: Guillaume Subiron A unsigned short is now passed in argument to udp_attach instead of using a hardcoded "AF_INET" to call qemu_socket(). This prepares for IPv6 support. Signed-off-by: Guillaume Subiron Signed-off-by: Samuel Thibault Reviewed-by: Thomas Huth Signed-off-by:

[Qemu-devel] [PULL V2 15/17] net: netmap: use nm_open() to open netmap ports

2016-02-04 Thread Jason Wang
special netmap ports (e.g. pipes, monitors) and use special modes (e.g. host rings only, single queue mode, exclusive access). Signed-off-by: Vincenzo Maffione Signed-off-by: Jason Wang --- net/netmap.c | 97 1 file changed, 32 insertions

[Qemu-devel] [PULL V2 10/17] slirp: Factorizing and cleaning solookup()

2016-02-04 Thread Jason Wang
prepares for IPv6 support. Signed-off-by: Guillaume Subiron Signed-off-by: Samuel Thibault Reviewed-by: Thomas Huth Signed-off-by: Jason Wang --- slirp/socket.c| 37 - slirp/socket.h| 5 +++-- slirp/tcp_input.c | 13 +++-- slirp/udp.c | 21

[Qemu-devel] [PULL V2 13/17] slirp: Adding family argument to tcp_fconnect()

2016-02-04 Thread Jason Wang
From: Guillaume Subiron This patch simply adds a unsigned short family argument to remove the hardcoded "AF_INET" in the call of qemu_socket(). This prepares for IPv6 support. Signed-off-by: Guillaume Subiron Signed-off-by: Samuel Thibault Reviewed-by: Thomas Huth Signed-off-by:

[Qemu-devel] [PULL V2 14/17] e1000: eliminate infinite loops on out-of-bounds transfer start

2016-02-04 Thread Jason Wang
ll in buffers safely for bogus DMA addresses, so we just extend the existing failsafes with the above condition. This is CVE-2016-1981. Cc: "Michael S. Tsirkin" Cc: Petr Matousek Cc: Stefano Stabellini Cc: Prasad Pandit Cc: Michael Roth Cc: Jason Wang Cc: qemu-sta...@nongnu.org RHBZ:

[Qemu-devel] [PULL V2 16/17] net: always walk through filters in reverse if traffic is egress

2016-02-04 Thread Jason Wang
ters in reverse to simplify the possible filters configuration in the future. Signed-off-by: Wen Congyang Signed-off-by: Li Zhijian Reviewed-by: Yang Hongyang Signed-off-by: Jason Wang --- include/net/net.h | 2 +- net/filter.c | 21 +++-- net/net.c | 20 +++-

[Qemu-devel] [PULL V2 17/17] net/filter: Fix the output information for command 'info network'

2016-02-04 Thread Jason Wang
7;s property. Here we split a helper function that could collect the output information for filter, and also remove the useless member 'info_str' from struct NetFilterState. Signed-off-by: zhanghailiang Cc: Jason Wang Cc: Eric Blake Cc: Markus Armbruster Cc: Yang Hongyang Reviewe

Re: [Qemu-devel] [POC]colo-proxy in qemu

2015-11-10 Thread Jason Wang
On 11/10/2015 04:30 PM, zhanghailiang wrote: > On 2015/11/10 15:35, Jason Wang wrote: >> >> >> On 11/10/2015 01:26 PM, Tkid wrote: >>> Hi,all >>> >>> We are planning to reimplement colo proxy in userspace (Here is in >>> qemu) to &g

Re: [Qemu-devel] [POC]colo-proxy in qemu

2015-11-10 Thread Jason Wang
On 11/10/2015 05:35 PM, Tkid wrote: > > > On 11/10/2015 03:35 PM, Jason Wang wrote: >> On 11/10/2015 01:26 PM, Tkid wrote: >>> Hi,all >>> >>> We are planning to reimplement colo proxy in userspace (Here is in >>> qemu) to >>> cache

Re: [Qemu-devel] [POC]colo-proxy in qemu

2015-11-10 Thread Jason Wang
On 11/10/2015 05:41 PM, Dr. David Alan Gilbert wrote: > * Jason Wang (jasow...@redhat.com) wrote: >> >> On 11/10/2015 01:26 PM, Tkid wrote: >>> Hi,all >>> >>> We are planning to reimplement colo proxy in userspace (Here is in >>> qemu) to >

Re: [Qemu-devel] [PATCH v5 0/8] e1000: Various fixes and registers' implementation

2015-11-10 Thread Jason Wang
On 11/10/2015 09:19 PM, Leonid Bloch wrote: > On Tue, Nov 10, 2015 at 3:01 PM, Jason Wang wrote: >> >> On 11/10/2015 07:39 PM, Leonid Bloch wrote: >>> On Tue, Nov 10, 2015 at 8:21 AM, Jason Wang wrote: >>>> On 11/09/2015 10:59 PM, Leonid Bloch wrote: >&g

Re: [Qemu-devel] [POC]colo-proxy in qemu

2015-11-10 Thread Jason Wang
On 11/11/2015 09:23 AM, Dong, Eddie wrote: >> - What's the plan for vhost? Userspace network in qemu is rather slow, most >> user will choose vhost. > [Dong, Eddie] Hi Jason: > How about we take staging approach? In general, COLO opens a door of > high performance HA solution, but it will

Re: [Qemu-devel] [PATCH v5 0/8] e1000: Various fixes and registers' implementation

2015-11-11 Thread Jason Wang
On 11/11/2015 04:06 PM, Leonid Bloch wrote: > On Wed, Nov 11, 2015 at 5:22 AM, Jason Wang wrote: >> > >> > >> > On 11/10/2015 09:19 PM, Leonid Bloch wrote: >>> >> On Tue, Nov 10, 2015 at 3:01 PM, Jason Wang wrote: >>>> >>> >

Re: [Qemu-devel] [PATCH v6 0/9] e1000: Various fixes and registers' implementation

2015-11-12 Thread Jason Wang
On 11/11/2015 09:52 PM, Leonid Bloch wrote: > This series fixes issues with packet/octet counting in e1000's Statistic > registers, fixes a bug in the packet address filtering procedure, and > implements many MAC registers that were absent before, some Statistic > counters among them. > > Besides

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

2015-11-12 Thread Jason Wang
On 11/10/2015 05:47 PM, Vincenzo Maffione wrote: > This patch series adds some fixes to the netmap net backend. It contains > two changes: > (1) Fix compilation issue of netmap.c introduced by the reorganization > of struct NetClientOptions > (2) Address the FIXME comment that was

[Qemu-devel] [PULL v2 00/12] Net patches

2015-11-12 Thread Jason Wang
The following changes since commit 31e49ac192f782d594bbd04070fe79e800b7813f: Merge remote-tracking branch 'remotes/cohuck/tags/s390x-2015' into staging (2015-11-11 18:23:08 +) are available in the git repository at: https://github.com/jasowang/qemu.git tags/net-pull-request for you

[Qemu-devel] [PULL v2 02/12] e1000: Cosmetic and alignment fixes

2015-11-12 Thread Jason Wang
. Signed-off-by: Leonid Bloch Signed-off-by: Dmitry Fleytman Signed-off-by: Jason Wang --- hw/net/e1000.c | 166 hw/net/e1000_regs.h | 2 +- 2 files changed, 89 insertions(+), 79 deletions(-) diff --git a/hw/net/e1000.c b/hw/net/e1000.c

[Qemu-devel] [PULL v2 01/12] slirp: Fix type casts and format strings in debug code

2015-11-12 Thread Jason Wang
From: Stefan Weil Casting pointers to long won't work on 64 bit Windows. It is not needed with the right format strings. Signed-off-by: Stefan Weil Signed-off-by: Jason Wang --- slirp/bootp.c | 12 +--- slirp/if.c | 4 ++-- slirp/ip_icmp.c| 4 ++-- slirp/ip_in

[Qemu-devel] [PULL v2 11/12] net: netmap: Fix compilation issue

2015-11-12 Thread Jason Wang
Signed-off-by: Jason Wang --- net/netmap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/netmap.c b/net/netmap.c index 508b829..4197a9c 100644 --- a/net/netmap.c +++ b/net/netmap.c @@ -439,7 +439,7 @@ int net_init_netmap(const NetClientOptions *opts

[Qemu-devel] [PULL v2 04/12] e1000: Introduced an array to control the access to the MAC registers

2015-11-12 Thread Jason Wang
e. Signed-off-by: Leonid Bloch Signed-off-by: Dmitry Fleytman Signed-off-by: Jason Wang --- hw/net/e1000.c | 58 ++ 1 file changed, 46 insertions(+), 12 deletions(-) diff --git a/hw/net/e1000.c b/hw/net/e1000.c index 7088027..e079f25 10064

[Qemu-devel] [PULL v2 03/12] e1000: Add support for migrating the entire MAC registers' array

2015-11-12 Thread Jason Wang
enable migration to older versions of QEMU. Additionally, this parameter will be used to control the access to the extra MAC registers in the future. Signed-off-by: Leonid Bloch Signed-off-by: Dmitry Fleytman Signed-off-by: Jason Wang --- hw/net/e1000.c | 21 + 1 file changed

[Qemu-devel] [PULL v2 05/12] e1000: Trivial implementation of various MAC registers

2015-11-12 Thread Jason Wang
RNBCTSCTFC MGTPRC MGTPDC MGTPTC RFC RJC SCC ECOL LATECOL MCC COLCDC TNCRS SEC CEXTERR RLECXONRXC XONTXC XOFFRXC XOFFTXC Signed-off-by: Leonid Bloch Signed-off-by: Dmitry Fleytman Signed-off-by: Jason Wang --- hw/net/e1000.c

[Qemu-devel] [PULL v2 07/12] e1000: Fixing the received/transmitted octets' counters

2015-11-12 Thread Jason Wang
compatible with the QEMU coding style, while ensuring that in the unlikely case of reaching the maximal value, the counter will stick there, as it supposed to. Signed-off-by: Leonid Bloch Signed-off-by: Dmitry Fleytman Signed-off-by: Jason Wang --- hw/net/e1000.c | 26

[Qemu-devel] [PULL v2 06/12] e1000: Fixing the received/transmitted packets' counters

2015-11-12 Thread Jason Wang
From: Leonid Bloch According to Intel's specs, these counters (as the other Statistic registers) stick at 0x when this maximal value is reached. Previously, they would reset after the max. value. Signed-off-by: Leonid Bloch Signed-off-by: Dmitry Fleytman Signed-off-by: Jason

[Qemu-devel] [PULL v2 08/12] e1000: Fixing the packet address filtering procedure

2015-11-12 Thread Jason Wang
: Dmitry Fleytman Signed-off-by: Jason Wang --- hw/net/e1000.c | 10 +++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/hw/net/e1000.c b/hw/net/e1000.c index 9967b5d..821fed4 100644 --- a/hw/net/e1000.c +++ b/hw/net/e1000.c @@ -872,6 +872,7 @@ receive_filter(E1000State *s

[Qemu-devel] [PULL v2 10/12] e1000: Introducing backward compatibility command line parameter

2015-11-12 Thread Jason Wang
u-system-x86_64 -device e1000,extra_mac_registers=off,... ... As mentioned above, the default value is "on". Signed-off-by: Leonid Bloch Signed-off-by: Dmitry Fleytman Signed-off-by: Jason Wang --- hw/net/e1000.c | 2 ++ include/hw/compat.h | 6 +- 2 files changed, 7 insertion

[Qemu-devel] [PULL v2 09/12] e1000: Implementing various counters

2015-11-12 Thread Jason Wang
ility flag will be set (in the next patch in this series). Signed-off-by: Leonid Bloch Signed-off-by: Dmitry Fleytman Signed-off-by: Jason Wang --- hw/net/e1000.c | 90 ++ 1 file changed, 85 insertions(+), 5 deletions(-) diff --git a/h

[Qemu-devel] [PULL v2 12/12] net: netmap: use error_setg() helpers in place of error_report()

2015-11-12 Thread Jason Wang
From: Vincenzo Maffione This update was required to align error reporting of netmap backend initialization to the modifications introduced by commit a30ecde. Reviewed-by: Eric Blake Reviewed-by: Markus Armbruster Signed-off-by: Vincenzo Maffione Signed-off-by: Jason Wang --- net/netmap.c

Re: [Qemu-devel] [PATCH 0/2] net/tap-win32 bugfixes

2015-11-17 Thread Jason Wang
On 11/18/2015 03:09 AM, Andrew Baumann wrote: > Since I just discovered that you're in feature freeze, I wanted to > submit two smallish bug fixes for the win32 tap device. The changes > are independent, but without both fixes the tap device is unusable > (for me, at least!). > > Cheers, > Andrew

Re: [Qemu-devel] [PATCH] vhost-user: ignore qemu-only features

2015-11-17 Thread Jason Wang
_VLAN, > -VIRTIO_NET_F_CTRL_RX_EXTRA, > -VIRTIO_NET_F_CTRL_MAC_ADDR, > -VIRTIO_NET_F_CTRL_GUEST_OFFLOADS, > - > -VIRTIO_NET_F_GUEST_ANNOUNCE, > > VIRTIO_NET_F_MQ, > Acked-by: Jason Wang

Re: [Qemu-devel] [PATCH] vhost-user: ignore qemu-only features

2015-11-17 Thread Jason Wang
On 11/18/2015 10:08 AM, Jason Wang wrote: > > On 11/17/2015 10:57 PM, Michael S. Tsirkin wrote: >> Some feratures (such as ctrl vq) are supported >> by qemu without need to communicate with the >> backend. >> >> Drop them from the feature mask so we set them &

[Qemu-devel] [RFC] virtio: convert to use DMA api

2015-11-22 Thread Jason Wang
- Implement this for all transports Signed-off-by: Jason Wang --- hw/block/virtio-blk.c | 2 +- hw/char/virtio-serial-bus.c | 2 +- hw/scsi/virtio-scsi.c | 2 +- hw/virtio/virtio-pci.c| 9 + hw/virtio/virtio.c| 36

<    3   4   5   6   7   8   9   10   11   12   >