[Qemu-devel] [PULL 17/24] vmxnet3: coding: Introduce VMXNET3Class

2016-01-10 Thread Jason Wang
From: Shmulik Ladkani Introduce a class type for vmxnet3, and the usual DEVICE_CLASS/DEVICE_GET_CLASS macros. No semantic change. Signed-off-by: Shmulik Ladkani Signed-off-by: Jason Wang --- hw/net/vmxnet3.c | 10 ++ 1 file changed, 10 insertions(+) diff --git a/hw/net/vmxnet3.c b

[Qemu-devel] [PULL 18/24] vmxnet3: The vmxnet3 device is a PCIE endpoint

2016-01-10 Thread Jason Wang
From: Shmulik Ladkani Report the 'express endpoint' capability if on a PCIE bus. Signed-off-by: Shmulik Ladkani Signed-off-by: Jason Wang --- hw/net/vmxnet3.c | 53 - 1 file changed, 52 insertions(+), 1 deletion(-) diff --gi

[Qemu-devel] [PULL 21/24] net: rocker: fix an incorrect array bounds check

2016-01-10 Thread Jason Wang
o Tang Cc: qemu-sta...@nongnu.org Signed-off-by: Prasad J Pandit Signed-off-by: Jason Wang --- hw/net/rocker/rocker.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/hw/net/rocker/rocker.c b/hw/net/rocker/rocker.c index c57f1a6..2e77e50 100644 --- a/hw/net/rocker/rock

Re: [Qemu-devel] [PATCH] net/slirp: Tell the users when they are using deprecated options

2016-01-11 Thread Jason Wang
On 01/11/2016 11:55 PM, Thomas Huth wrote: > On 15.12.2015 09:35, Thomas Huth wrote: >> 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 will go away in a future version. >> >> Signed-off-by: Thomas Huth >>

Re: [Qemu-devel] [PATCHv7 0/9] slirp: Adding IPv6 support to Qemu -net user mode

2016-01-11 Thread Jason Wang
On 01/12/2016 10:22 AM, Hailiang Zhang wrote: > Hi, > > It seems that, Jan Kiszka is maintaining SLIRP (From MAINTAINERS file), > Maybe he could make a help to merge this series. > > TO: J. Kiszka > > Thanks, > Hailiang Right, and I can take this series in my tree if Jan doesn't have time to do

Re: [Qemu-devel] [PATCH] net/slirp: Tell the users when they are using deprecated options

2016-01-12 Thread Jason Wang
On 01/12/2016 07:45 PM, Cleber Rosa wrote: > > - Original Message - >> From: "Thomas Huth" >> To: "Jason Wang" , "Jan Kiszka" >> , qemu-devel@nongnu.org >> Cc: "Paolo Bonzini" , avocado-de...@redhat.com, "Marku

Re: [Qemu-devel] [Avocado-devel] [PATCH] net/slirp: Tell the users when they are using deprecated options

2016-01-12 Thread Jason Wang
On 01/13/2016 10:58 AM, Jason Wang wrote: > > On 01/12/2016 07:45 PM, Cleber Rosa wrote: >> - Original Message - >>> From: "Thomas Huth" >>> To: "Jason Wang" , "Jan Kiszka" >>> , qemu-devel@nongnu.org >&g

Re: [Qemu-devel] [Avocado-devel] [PATCH] net/slirp: Tell the users when they are using deprecated options

2016-01-13 Thread Jason Wang
On 01/13/2016 03:25 PM, Paolo Bonzini wrote: > > On 13/01/2016 04:13, Jason Wang wrote: >> Rethinking about this. I'm not quite sure we can remove those >> especially "-net user". Google qemu "-net user" gives about 15,900 >> results (and the fir

Re: [Qemu-devel] [Avocado-devel] [PATCH] net/slirp: Tell the users when they are using deprecated options

2016-01-13 Thread Jason Wang
On 01/13/2016 03:27 PM, Thomas Huth wrote: > On 13.01.2016 04:13, Jason Wang wrote: >> >> On 01/13/2016 10:58 AM, Jason Wang wrote: >>> On 01/12/2016 07:45 PM, Cleber Rosa wrote: >>>> - Original Message - >>>>> From: "Thomas Hu

Re: [Qemu-devel] [PATCH v2] net/slirp: Tell the users when they are using deprecated options

2016-01-13 Thread Jason Wang
On 01/13/2016 04:05 PM, Thomas Huth wrote: > 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 > --- > v2: Changed the tex

Re: [Qemu-devel] [PATCH] qemu-doc: Do not promote deprecated -smb and -redir options

2016-01-13 Thread Jason Wang
On 01/13/2016 04:21 PM, Thomas Huth wrote: > Since -smb and -redir are deprecated options, we should not > use them as examples in the documentation anymore. > > Signed-off-by: Thomas Huth > --- > qemu-doc.texi | 9 + > 1 file changed, 5 insertions(+), 4 deletions(-) Applied to my -net

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

2016-01-13 Thread Jason Wang
On 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 check when matches > occur

[Qemu-devel] [PATCH] intel_iommu: large page support

2016-01-13 Thread Jason Wang
entry to make it support large page. And also use the slpte level as key to do IOTLB lookup. MAMV was increased to 18 to support direct invalidation for 1G mapping. Cc: Michael S. Tsirkin Cc: Paolo Bonzini Cc: Richard Henderson Cc: Eduardo Habkost Signed-off-by: Jason Wang --- Test was done by

Re: [Qemu-devel] [PATCH] intel_iommu: large page support

2016-01-14 Thread Jason Wang
On 01/14/2016 05:28 PM, Michael S. Tsirkin wrote: > On Thu, Jan 14, 2016 at 12:47:24AM -0500, Jason Wang wrote: >> > Current intel_iommu only supports 4K page which may not be sufficient >> > to cover guest working set. This patch tries to enable 2M and 1G mapping >>

Re: [Qemu-devel] [PATCH] cadence_gem: fix buffer overflow

2016-01-14 Thread Jason Wang
On 01/14/2016 05:43 PM, Michael S. Tsirkin wrote: > gem_receive copies a packet received from network into an rxbuf[2048] > array on stack, with size limited by descriptor length set by guest. If > guest is malicious and specifies a descriptor length that is too large, > and should packet size e

Re: [Qemu-devel] [PATCH] net: cadence_gem: check packet size in gem_recieve

2016-01-17 Thread Jason Wang
On 01/15/2016 03:00 PM, P J P wrote: > From: Prasad J Pandit > > While receiving packets in 'gem_receive' routine, if Frame Check > Sequence(FCS) is enabled, it copies the packet into a local > buffer without checking its size. Add check to validate packet > length against the buffer size to avo

Re: [Qemu-devel] [Qemu-arm] [PATCH] cadence_gem: fix buffer overflow

2016-01-17 Thread Jason Wang
On 01/15/2016 02:19 PM, Peter Crosthwaite wrote: > On Thu, Jan 14, 2016 at 2:03 AM, Peter Maydell > wrote: >> On 14 January 2016 at 09:43, Michael S. Tsirkin wrote: >>> gem_receive copies a packet received from network into an rxbuf[2048] >>> array on stack, with size limited by descriptor len

Re: [Qemu-devel] [PATCH] net: cadence_gem: check packet size in gem_recieve

2016-01-17 Thread Jason Wang
On 01/18/2016 01:34 PM, P J P wrote: > +-- On Mon, 18 Jan 2016, Jason Wang wrote --+ > | > +if (size > sizeof(rxbuf) - sizeof(crc_val)) { > | > +size = sizeof(rxbuf) - sizeof(crc_val); > | > +} > | > +bytes_to_copy = size; >

Re: [Qemu-devel] [PATCH] cadence_gem: fix buffer overflow

2016-01-17 Thread Jason Wang
On 01/14/2016 05:43 PM, Michael S. Tsirkin wrote: > gem_receive copies a packet received from network into an rxbuf[2048] > array on stack, with size limited by descriptor length set by guest. If > guest is malicious and specifies a descriptor length that is too large, > and should packet size e

Re: [Qemu-devel] [PATCH] cadence_gem: fix buffer overflow

2016-01-18 Thread Jason Wang
On 01/18/2016 03:04 PM, Peter Crosthwaite wrote: > On Sun, Jan 17, 2016 at 10:50 PM, Jason Wang wrote: >> >> On 01/14/2016 05:43 PM, Michael S. Tsirkin wrote: >>> gem_receive copies a packet received from network into an rxbuf[2048] >>> array on stack, with size

Re: [Qemu-devel] [PATCHv7 0/9] slirp: Adding IPv6 support to Qemu -net user mode

2016-01-18 Thread Jason Wang
On 01/12/2016 12:04 PM, Jason Wang wrote: > On 01/12/2016 10:22 AM, Hailiang Zhang wrote: >> > Hi, >> > >> > It seems that, Jan Kiszka is maintaining SLIRP (From MAINTAINERS file), >> > Maybe he could make a help to merge this series. >> > >

Re: [Qemu-devel] [RFC PATCH v2 00/10] Add colo-proxy based on netfilter

2016-01-18 Thread Jason Wang
On 01/18/2016 03:05 PM, Zhang Chen wrote: > > > On 01/06/2016 01:16 PM, Jason Wang wrote: >> >> On 01/04/2016 07:17 PM, Zhang Chen wrote: >>> >>> On 01/04/2016 05:46 PM, Jason Wang wrote: >>>> On 01/04/2016 04:16 PM, Zhang Chen wrote: >>&

Re: [Qemu-devel] [PATCH] cadence_gem: fix buffer overflow

2016-01-18 Thread Jason Wang
On 01/18/2016 05:08 PM, Peter Crosthwaite wrote: > On Mon, Jan 18, 2016 at 12:12 AM, Jason Wang wrote: >> >> On 01/18/2016 03:04 PM, Peter Crosthwaite wrote: >>> On Sun, Jan 17, 2016 at 10:50 PM, Jason Wang wrote: >>>> On 01/14/2016 05:43 PM, Michael S. Tsi

Re: [Qemu-devel] [Qemu-arm] [PATCH] cadence_gem: fix buffer overflow

2016-01-18 Thread Jason Wang
On 01/18/2016 06:06 PM, Peter Maydell wrote: > On 18 January 2016 at 09:57, Jason Wang wrote: >> Thanks for the pointer. >> >> In section 16.1.5, it said >> >> "Jumbo frames are not supported." >> >> So it was in fact not an unimplemented

Re: [Qemu-devel] [Qemu-arm] [PATCH] cadence_gem: fix buffer overflow

2016-01-18 Thread Jason Wang
On 01/19/2016 12:54 AM, Alistair Francis wrote: > On Mon, Jan 18, 2016 at 2:06 AM, Peter Maydell > wrote: >> On 18 January 2016 at 09:57, Jason Wang wrote: >>> Thanks for the pointer. >>> >>> In section 16.1.5, it said >>> >>> "Jum

Re: [Qemu-devel] [PATCH COLO-Frame v13 34/39] net/filter-buffer: Add default filter-buffer for each netdev

2016-01-18 Thread Jason Wang
l not buffer any packets in default. > So it has no side effect for the netdev. > > Signed-off-by: zhanghailiang > Cc: Jason Wang > Cc: Yang Hongyang This patch did three things: 1) the ability to enable or disable a netfilter 2) the ability to add a default filter 3) default fil

Re: [Qemu-devel] [PATCH COLO-Frame v13 35/39] filter-buffer: Accept zero interval

2016-01-18 Thread Jason Wang
On 12/29/2015 03:09 PM, zhanghailiang wrote: > For default buffer filter, its 'interval' value is zero, > so here we should accept zero interval. > > Signed-off-by: zhanghailiang > Reviewed-by: Yang Hongyang > Cc: Jason Wang > --- > v12: > - Add Reviewe

Re: [Qemu-devel] [PATCH COLO-Frame v13 36/39] filter-buffer: Introduce a helper function to enable/disable default filter

2016-01-18 Thread Jason Wang
On 12/29/2015 03:09 PM, zhanghailiang wrote: > The default buffer filter doesn't buffer packets in default, > but we need to buffer packets for COLO or Micro-checkpoint, > Here we add a helper function to enable/disable filter's buffer > capability. > > Signed-off-by

Re: [Qemu-devel] [RFC PATCH v2 00/10] Introduce Intel 82574 GbE Controller Emulation (e1000e)

2016-01-18 Thread Jason Wang
On 01/19/2016 01:35 AM, Leonid Bloch wrote: > Hello All, > > This series is the latest code of the e1000e device emulation being developed. > > Changes since v1: > > 1. Added support for all the device features: > - Interrupt moderation. > - RSS. > - Multiqueue. > 2. Simulated exact PCI/PCI

Re: [Qemu-devel] [PATCH COLO-Frame v13 38/39] colo: Use default buffer-filter to buffer and release packets

2016-01-18 Thread Jason Wang
On 12/29/2015 03:09 PM, zhanghailiang wrote: > Enable default filter to buffer packets and release the > packets after a checkpoint. > > Signed-off-by: zhanghailiang > Cc: Jason Wang > Cc: Yang Hongyang > --- > v12: > - Add a helper function to check if all net

Re: [Qemu-devel] [PATCH COLO-Frame v13 34/39] net/filter-buffer: Add default filter-buffer for each netdev

2016-01-19 Thread Jason Wang
On 01/19/2016 04:39 PM, Hailiang Zhang wrote: > Hi Jason, > > Thanks for your review. > > On 2016/1/19 11:19, Jason Wang wrote: >> >> >> On 12/29/2015 03:09 PM, zhanghailiang wrote: >>> We add each netdev (except vhost-net) a default filter-buffer

Re: [Qemu-devel] [RFC PATCH v2 00/10] Add colo-proxy based on netfilter

2016-01-19 Thread Jason Wang
On 01/20/2016 11:29 AM, Zhang Chen wrote: > >> Sure. >> >> Two main comments/suggestions: >> >> - TCP analysis is missed in current version, maybe you point a git tree >> (or another version of RFC) to me for a better understanding of the >> design. (Just a skeleton for TCP should be sufficient t

Re: [Qemu-devel] [PATCH COLO-Frame v13 34/39] net/filter-buffer: Add default filter-buffer for each netdev

2016-01-20 Thread Jason Wang
On 01/20/2016 03:14 PM, Hailiang Zhang wrote: > On 2016/1/20 10:39, Jason Wang wrote: >> >> >> On 01/19/2016 04:39 PM, Hailiang Zhang wrote: >>> Hi Jason, >>> >>> Thanks for your review. >>> >>> On 2016/1/19 11:19, Jason Wang

Re: [Qemu-devel] [RFC PATCH v2 00/10] Add colo-proxy based on netfilter

2016-01-20 Thread Jason Wang
On 01/20/2016 03:44 PM, Wen Congyang wrote: >> > >> > ... >> > -chardev socket,id=comparer0,host=ip_primary,port=X,server,nowait >> > -chardev socket,id=comparer1,host=ip_primary,port=Y,server,nowait >> > -chardev socket,id=mirrorer0,host=ip_primary,port=Z,server,nowait >> > -netdev tap,id=hn0 >

Re: [Qemu-devel] [RFC PATCH v2 00/10] Add colo-proxy based on netfilter

2016-01-20 Thread Jason Wang
On 01/20/2016 05:49 PM, Wen Congyang wrote: > On 01/20/2016 05:20 PM, Jason Wang wrote: >> >> On 01/20/2016 03:44 PM, Wen Congyang wrote: >>>>> ... >>>>> -chardev socket,id=comparer0,host=ip_primary,port=X,server,nowait >>>>> -char

Re: [Qemu-devel] [RFC PATCH v2 00/10] Add colo-proxy based on netfilter

2016-01-20 Thread Jason Wang
On 01/20/2016 06:01 PM, Wen Congyang wrote: > On 01/20/2016 02:54 PM, Jason Wang wrote: >> >> On 01/20/2016 11:29 AM, Zhang Chen wrote: >>>> Sure. >>>> >>>> Two main comments/suggestions: >>>> >>>> - TCP analysis is mis

Re: [Qemu-devel] [PATCH 1/1] static checker: e1000-82540em got aliased to e1000

2015-12-20 Thread Jason Wang
C", > +"e1000-82540em": "e1000", > } > > for item in changes: Acked-by: Jason Wang

Re: [Qemu-devel] [PATCH 0/3] correct some register return values for vxmnet3

2015-12-22 Thread Jason Wang
On 12/22/2015 03:05 PM, Dmitry Fleytman wrote: > >> On 22 Dec 2015, at 04:44 AM, Miao Yan > > wrote: >> >> Hi Dmitry, >> >> 2015-12-22 1:19 GMT+08:00 Dmitry Fleytman > >: >>> Hello Miao, >>> >>> While patches look good technically, I cannot

Re: [Qemu-devel] [PATCH v3 0/5] correct some register return values for vxmnet3

2015-12-23 Thread Jason Wang
On 12/23/2015 02:29 PM, Dmitry Fleytman wrote: > Reviewed-by: Dmitry Fleytman > >> On 23 Dec 2015, at 08:06 AM, Miao Yan wrote: >> >> Qemu vmxnet3 emulation doesn't recognize VMXNET3_CMD_GET_DID_LO, >> VMXNET3_CMD_GET_DID_HI and VMXNET3_CMD_GET_DEV_EXTRA_INFO command and >> returns -1 on all of

Re: [Qemu-devel] [PATCH 1/4] net/filter: fix nf->netdev_id leak

2015-12-23 Thread Jason Wang
On 12/23/2015 03:43 PM, Li Zhijian wrote: > Cc: Jason Wang > Signed-off-by: Li Zhijian > --- > net/filter.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/net/filter.c b/net/filter.c > index 1365bad..f777ba2 100644 > --- a/net/filter.c > +++ b/n

Re: [Qemu-devel] [PATCH 2/4] net/dump: fix nfds->filename leak

2015-12-23 Thread Jason Wang
On 12/23/2015 03:43 PM, Li Zhijian wrote: > Cc: Jason Wang > Signed-off-by: Li Zhijian > --- > net/dump.c | 8 > 1 file changed, 8 insertions(+) > > diff --git a/net/dump.c b/net/dump.c > index ce16a4b..347b5ca 100644 > --- a/net/dump.c > +++ b/

Re: [Qemu-devel] [PATCH v4 0/7] vmxnet3: Fine-tune device capabilities

2015-12-27 Thread Jason Wang
On 12/24/2015 03:17 PM, Shmulik Ladkani wrote: > Various fixes to what the vmxnet3 device reports in its PCI > configuration space, in order to be aligned with VMware virtual hardware > exposed by ESXi/Workstation. > > Since v3: Place back-compat flags into HW_COMPAT_2_5 > Since v2: Introduce th

Re: [Qemu-devel] [PATCH v2] net: rocker: fix an incorrect array bounds check

2015-12-27 Thread Jason Wang
On 12/23/2015 01:14 PM, P J P wrote: > +-- On Tue, 22 Dec 2015, Peter Maydell wrote --+ > | Could you submit patches in the usual git send-email format, > | please? It's easier for maintainers to process them if they're > | not in an odd arrangement that requires manual intervention. > | (In part

Re: [Qemu-devel] [PATCH v2] net: rocker: fix an incorrect array bounds check

2015-12-28 Thread Jason Wang
On 12/28/2015 06:54 PM, P J P wrote: > From: Prasad J Pandit > > While processing transmit(tx) descriptors in 'tx_consume' routine > the switch emulator suffers from an off-by-one error, if a > descriptor was to have more than allowed(ROCKER_TX_FRAGS_MAX=16) > fragments. Fix an incorrect bounds

Re: [Qemu-devel] [RFC PATCH v2 00/10] Add colo-proxy based on netfilter

2015-12-28 Thread Jason Wang
On 12/29/2015 02:31 PM, Zhang Chen wrote: > Hi~ > Just a small ping... > No news for a week. > Colo proxy is a part of COLO project, we need review and comments. > > > Thanks > zhangchen Hi, will find sometime to review this this week. Thanks > > > On 12/22/2015 06:42 PM, Zhang Chen wrote: >>

Re: [Qemu-devel] [RFC PATCH v2 00/10] Add colo-proxy based on netfilter

2015-12-30 Thread Jason Wang
On 12/22/2015 06:42 PM, Zhang Chen wrote: > From: zhangchen > > Hi,all > > This patch add an colo-proxy object, COLO-Proxy is a part of COLO, > based on qemu netfilter and it's a plugin for qemu netfilter. the function > keep Secondary VM connect normal to Primary VM and compare packets > sent b

Re: [Qemu-devel] [PATCH] net: ne2000: fix bounds check in ioport operations

2015-12-30 Thread Jason Wang
On 12/30/2015 03:44 PM, P J P wrote: > From: Prasad J Pandit > > While doing ioport r/w oprations, ne2000 device emulation suffers > from OOB r/w error. Update respective array bounds check to avoid > OOB access. > > Reported-by: Ling Liu > Signed-off-by: Prasad J Pandit > --- > hw/net/ne2000

Re: [Qemu-devel] [PATVH v2] net: ne2000: fix bounds check in ioport operations

2015-12-30 Thread Jason Wang
On 12/31/2015 12:53 PM, P J P wrote: > From: Prasad J Pandit > > While doing ioport r/w operations, ne2000 device emulation suffers > from OOB r/w errors. Update respective array bounds check to avoid > OOB access. > > Reported-by: Ling Liu > Signed-off-by: Prasad J Pandit > --- > hw/net/ne20

Re: [Qemu-devel] [PATVH v2] net: ne2000: fix bounds check in ioport operations

2015-12-30 Thread Jason Wang
On 12/31/2015 01:56 PM, P J P wrote: > +-- On Thu, 31 Dec 2015, Jason Wang wrote --+ > | > -(addr >= NE2000_PMEM_START && addr < NE2000_MEM_SIZE)) { > | > +if (addr < 32 || (addr >= NE2000_PMEM_START && addr < > NE2000_MEM_SIZE))

Re: [Qemu-devel] [RFC PATCH v2 00/10] Add colo-proxy based on netfilter

2016-01-03 Thread Jason Wang
On 12/31/2015 04:02 PM, Li Zhijian wrote: > > > On 12/31/2015 10:36 AM, Jason Wang wrote: >> >> >> On 12/22/2015 06:42 PM, Zhang Chen wrote: >>> From: zhangchen >>> >>> Hi,all >>> >>> This patch add an colo-proxy obje

Re: [Qemu-devel] [RFC PATCH v2 00/10] Add colo-proxy based on netfilter

2016-01-03 Thread Jason Wang
On 12/31/2015 04:40 PM, Zhang Chen wrote: > > > On 12/31/2015 10:36 AM, Jason Wang wrote: >> >> On 12/22/2015 06:42 PM, Zhang Chen wrote: >>> From: zhangchen >>> >>> Hi,all >>> >>> This patch add an colo-proxy object, COLO-Prox

Re: [Qemu-devel] [PATCH] l2tpv3: fix cookie decoding

2016-01-03 Thread Jason Wang
On 12/31/2015 10:34 PM, Alexis D...t wrote: > If a 32 bits l2tpv3 frame cookie MSB if set to 1, the cast to uint64_t > cookie will > spread 1 to the four most significant bytes. > Then the condition (cookie != s->rx_cookie) becomes false. > > Signed-off-by: Alexis Dambricourt > --- > net/l2tpv3

Re: [Qemu-devel] [PATCH v3] net: ne2000: fix bounds check in ioport operations

2016-01-03 Thread Jason Wang
On 12/31/2015 07:35 PM, P J P wrote: > From: Prasad J Pandit > > While doing ioport r/w operations, ne2000 device emulation suffers > from OOB r/w errors. Update respective array bounds check to avoid > OOB access. > > Reported-by: Ling Liu > Signed-off-by: Prasad J Pandit > --- > hw/net/ne20

Re: [Qemu-devel] [RFC PATCH v2 00/10] Add colo-proxy based on netfilter

2016-01-04 Thread Jason Wang
On 01/04/2016 04:16 PM, Zhang Chen wrote: > > > On 01/04/2016 01:37 PM, Jason Wang wrote: >> >> On 12/31/2015 04:40 PM, Zhang Chen wrote: >>> >>> On 12/31/2015 10:36 AM, Jason Wang wrote: >>>> On 12/22/2015 06:42 PM, Zhang Chen wrote: >>

Re: [Qemu-devel] [PATCH v2] l2tpv3: fix cookie decoding

2016-01-05 Thread Jason Wang
On 01/05/2016 07:26 AM, Alexis Dambricourt wrote: > If a 32 bits l2tpv3 frame cookie MSB if set to 1, the cast to uint64_t > cookie will spread 1 to the four most significant bytes. > Then the condition (cookie != s->rx_cookie) becomes false. > > Signed-off-by: Alexis Dambricourt > --- > net/l2

Re: [Qemu-devel] [RFC PATCH v2 00/10] Add colo-proxy based on netfilter

2016-01-05 Thread Jason Wang
On 01/04/2016 07:17 PM, Zhang Chen wrote: > > > On 01/04/2016 05:46 PM, Jason Wang wrote: >> >> On 01/04/2016 04:16 PM, Zhang Chen wrote: >>> >>> On 01/04/2016 01:37 PM, Jason Wang wrote: >>>> On 12/31/2015 04:40 PM, Zhang Chen wrote: >>&

Re: [Qemu-devel] [RFC PATCH v2 00/10] Add colo-proxy based on netfilter

2016-01-05 Thread Jason Wang
On 01/05/2016 12:52 AM, Dr. David Alan Gilbert wrote: > * Jason Wang (jasow...@redhat.com) wrote: >> >> On 01/04/2016 04:16 PM, Zhang Chen wrote: >>> >>> On 01/04/2016 01:37 PM, Jason Wang wrote: >>>> On 12/31/2015 04:40 PM, Zhang Chen wrote: &

Re: [Qemu-devel] [PATCH V3 1/2] net/filter-mirror:Add filter-mirror

2016-02-22 Thread Jason Wang
On 02/17/2016 11:53 AM, Zhang Chen wrote: > > > On 02/15/2016 03:06 PM, Zhang Chen wrote: >> >> >> On 02/15/2016 01:23 PM, Jason Wang wrote: >>> >>> On 02/04/2016 05:00 PM, Zhang Chen wrote: >>>> >>>> On 02/04/2016 03:43 PM, Zh

Re: [Qemu-devel] [PATCH V4 0/2] net/filter-mirror:add filter-mirror and unit test

2016-02-22 Thread Jason Wang
On 02/18/2016 04:10 PM, Zhang Chen wrote: > From: ZhangChen > > Filter-mirror is a netfilter plugin. > It gives qemu the ability to mirror > packets to a chardev. > > > v4: > - Address Jason's comments. > > v3: > - Add filter-mirror unit test according >to Jason's comments > - Address zha

Re: [Qemu-devel] [PATCH V4 1/2] net/filter-mirror:Add filter-mirror

2016-02-22 Thread Jason Wang
On 02/18/2016 04:10 PM, Zhang Chen wrote: > From: ZhangChen > > Filter-mirror is a netfilter plugin. > It gives qemu the ability to mirror > packets to a chardev. > > usage: > > -netdev tap,id=hn0 > -chardev socket,id=mirror0,host=ip_primary,port=X,server,nowait > -filter-mirror,id=m0,netdev=hn0

Re: [Qemu-devel] [PATCH V4 2/2] tests/test-filter-mirror:add filter-mirror unit test

2016-02-22 Thread Jason Wang
On 02/18/2016 04:10 PM, Zhang Chen wrote: > From: ZhangChen > > In this unit test we will test the mirror function. > > start qemu with: > -netdev socket,id=qtest-bn0,fd=%d > -device e1000,netdev=qtest-bn0,id=qtest-e0 > -chardev socket,id=mirror0,path=/tmp/filter-mirror-test.sock,ser

Re: [Qemu-devel] [PATCH] net: ne2000: check ring buffer control registers

2016-02-22 Thread Jason Wang
On 02/09/2016 02:47 PM, P J P wrote: > Hello Jason, > > +-- On Fri, 5 Feb 2016, Jason Wang wrote --+ > | I suspect this could even work. Consider after realizing, s->stop is > | zero, any attempt to set STARTPG will fail? > > Ie after 'pci_ne2000_realize'?

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

2016-02-22 Thread Jason Wang
On 02/18/2016 09:34 PM, Vincenzo Maffione wrote: >>> static void netmap_set_offload(NetClientState *nc, int csum, int tso4, int >>> tso6, >>> >> @@ -376,7 +394,7 @@ static void netmap_set_offload(NetClientState *nc, >>> >> int csum, int tso4, int tso6, >>> >> * enables the offloadings. >

Re: [Qemu-devel] [PATCH 1/2] hw/virtio: fix double use of a virtio flag

2016-02-22 Thread Jason Wang
BLE_LEGACY (1 << > VIRTIO_PCI_FLAG_DISABLE_LEGACY_BIT) > #define VIRTIO_PCI_FLAG_DISABLE_MODERN (1 << > VIRTIO_PCI_FLAG_DISABLE_MODERN_BIT) > #define VIRTIO_PCI_FLAG_DISABLE_PCIE (1 << VIRTIO_PCI_FLAG_DISABLE_PCIE_BIT) Acked-by: Jason Wang

Re: [Qemu-devel] [PATCH 2/2] hw/virtio: group virtio flags into an enum

2016-02-22 Thread Jason Wang
On 02/10/2016 08:22 PM, Marcel Apfelbaum wrote: > Minimizes the possibility to assign > the same bit to different features. > > Signed-off-by: Marcel Apfelbaum > --- > hw/virtio/virtio-pci.h | 16 ++-- > 1 file changed, 10 insertions(+), 6 deletions(-) > > diff --git a/hw/virtio/vir

Re: [Qemu-devel] [PATCH V2 1/2] hw/virtio: fix double use of a virtio flag

2016-02-22 Thread Jason Wang
O_PCI_FLAG_DISABLE_LEGACY (1 << > VIRTIO_PCI_FLAG_DISABLE_LEGACY_BIT) > #define VIRTIO_PCI_FLAG_DISABLE_MODERN (1 << > VIRTIO_PCI_FLAG_DISABLE_MODERN_BIT) > #define VIRTIO_PCI_FLAG_DISABLE_PCIE (1 << VIRTIO_PCI_FLAG_DISABLE_PCIE_BIT) Acked-by: Jason Wang

Re: [Qemu-devel] [PATCH V2 2/2] hw/virtio: group virtio flags into an enum

2016-02-22 Thread Jason Wang
a state */ > -#define VIRTIO_PCI_FLAG_MIGRATE_EXTRA_BIT 4 > #define VIRTIO_PCI_FLAG_MIGRATE_EXTRA (1 << > VIRTIO_PCI_FLAG_MIGRATE_EXTRA_BIT) > > /* have pio notification for modern device ? */ > -#define VIRTIO_PCI_FLAG_MODERN_PIO_NOTIFY_BIT 5 > #define VIRTIO_PCI_FLAG_MODERN_PIO_NOTIFY \ > (1 << VIRTIO_PCI_FLAG_MODERN_PIO_NOTIFY_BIT) > Acked-by: Jason Wang

Re: [Qemu-devel] [PULL 8/9] static checker: e1000-82540em got aliased to e1000

2016-02-22 Thread Jason Wang
lagged: >>> >>>Section "e1000-82540em" does not exist in dest >>> >>> Add the mapping to the changed section names dictionary so the checker >>> can proceed. >>> >>> Signed-off-by: Amit Shah >>> Acked-by: Jason W

Re: [Qemu-devel] [PATCH] net: check packet payload length

2016-02-22 Thread Jason Wang
On 02/18/2016 06:33 PM, P J P wrote: > Hello Markus, > > +-- On Thu, 18 Feb 2016, Markus Armbruster wrote --+ > | > | if ((data[14] & 0xf0) != 0x40) > | Buffer overrun when length <= 14. > | > | proto = data[23]; > | Buffer overrun when length <= 23. > | > | I think we sh

Re: [Qemu-devel] [PATCH COLO-Frame v14 31/40] net/filter: Add a 'status' property for filter object

2016-02-23 Thread Jason Wang
On 02/18/2016 11:27 AM, Hailiang Zhang wrote: >>> +static void netfilter_set_status(Object *obj, const char *str, >>> Error **errp) >>> +{ >>> +NetFilterState *nf = NETFILTER(obj); >>> + >>> +if (!strcmp(str, "enable")) { >>> +nf->enabled = true; >>> +} else if (!strcmp(str, "

Re: [Qemu-devel] [PATCH COLO-Frame v14 32/40] net/filter: Introduce a helper to add a filter to the netdev

2016-02-23 Thread Jason Wang
On 02/18/2016 11:30 AM, Hailiang Zhang wrote: > On 2016/2/18 11:19, Jason Wang wrote: >> >> >> On 02/06/2016 05:28 PM, zhanghailiang wrote: >>> We add a new helper function netdev_add_filter(), >>> this function can help adding a filter object to a netde

Re: [Qemu-devel] [PATCH COLO-Frame v14 37/40] COLO: enable buffer filters for PVM

2016-02-23 Thread Jason Wang
On 02/18/2016 11:46 AM, Hailiang Zhang wrote: > On 2016/2/18 11:31, Jason Wang wrote: >> >> >> On 02/06/2016 05:28 PM, zhanghailiang wrote: >>> Enable all buffer filters that added by COLO while >>> go into COLO process, and disable them while exit COL

Re: [Qemu-devel] [PATCH COLO-Frame v14 37/40] COLO: enable buffer filters for PVM

2016-02-23 Thread Jason Wang
On 02/18/2016 03:30 PM, Hailiang Zhang wrote: > Hi Jason, > > On 2016/2/18 11:46, Hailiang Zhang wrote: >> On 2016/2/18 11:31, Jason Wang wrote: >>> >>> >>> On 02/06/2016 05:28 PM, zhanghailiang wrote: >>>> Enable all buffer filters that adde

Re: [Qemu-devel] [PATCH] net: ne2000: check ring buffer control registers

2016-02-23 Thread Jason Wang
On 02/23/2016 04:28 PM, P J P wrote: >Hello Jason, > > +-- On Tue, 23 Feb 2016, Jason Wang wrote --+ > | I mean with your patch, driver will only be allowed to set EN0_STOPPG > | before EN0_STARTPG. So if a driver want to set STARTPG first, the check > | >

Re: [Qemu-devel] [PATCH] net: check packet payload length

2016-02-23 Thread Jason Wang
On 02/23/2016 07:11 PM, P J P wrote: > Hello Jason, > > +-- On Tue, 23 Feb 2016, Jason Wang wrote --+ > | Let's avoid adding assert() here since it could be triggered by guest. > > Okay. > > | I think you need audit all the callers to see if the issue mentione

Re: [Qemu-devel] [PATCH V5 1/2] net/filter-mirror:Add filter-mirror

2016-02-23 Thread Jason Wang
On 02/23/2016 08:00 PM, Zhang Chen wrote: > Filter-mirror is a netfilter plugin. > It gives qemu the ability to mirror > packets to a chardev. > > usage: > > -netdev tap,id=hn0 > -chardev socket,id=mirror0,host=ip_primary,port=X,server,nowait > -filter-mirror,id=m0,netdev=hn0,queue=tx/rx/all,outd

Re: [Qemu-devel] [PATCH V5 2/2] tests/test-filter-mirror:add filter-mirror unit test

2016-02-23 Thread Jason Wang
On 02/23/2016 08:00 PM, Zhang Chen wrote: > In this unit test we will test the mirror function. > > start qemu with: > -netdev socket,id=qtest-bn0,fd=sockfd > -device e1000,netdev=qtest-bn0,id=qtest-e0 > -chardev > socket,id=mirror0,path=/tmp/filter-mirror-test.sock,server,nowait

Re: [Qemu-devel] [PATCH] net/filter-redirector:Add filter-redirector

2016-02-23 Thread Jason Wang
On 02/18/2016 03:50 PM, Zhang Chen wrote: > > > On 02/18/2016 10:41 AM, Jason Wang wrote: >> >> On 02/05/2016 02:50 PM, Zhang Chen wrote: >>> From: ZhangChen >>> >>> Filter-redirector is a netfilter plugin. >>> It gives qemu the ab

[Qemu-devel] [PATCH] net: filter: correctly remove filter from the list during finalization

2016-02-23 Thread Jason Wang
dumped) This is because we don't check whether or not the filter was in the list of netdev. This patch fixes this. Cc: Yang Hongyang Signed-off-by: Jason Wang --- net/filter.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/net/filter.c b/net/filter.c index d2a514e..7c

Re: [Qemu-devel] [PATCH V6 0/2] net/filter-mirror:add filter-mirror and unit test

2016-02-24 Thread Jason Wang
On 02/24/2016 02:54 PM, Zhang Chen wrote: > Filter-mirror is a netfilter plugin. > It gives qemu the ability to mirror > packets to a chardev. > > v6: > - Address Jason's comments. > > v5: > - Address Jason's comments. > > v4: > - Address Jason's comments. > > v3: > - Add filter-mirror unit t

Re: [Qemu-devel] [PATCH v2] net: ne2000: check ring buffer control registers

2016-02-24 Thread Jason Wang
On 02/24/2016 02:11 PM, P J P wrote: > From: Prasad J Pandit > > Ne2000 NIC uses ring buffer of NE2000_MEM_SIZE(49152) > bytes to process network packets. Registers PSTART & PSTOP > define ring buffer size & location. Setting these registers > to invalid values could lead to infinite loop or OOB

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

2016-02-24 Thread 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 backend. These callbacks were correct for > VALE ports, but incorrect for har

Re: [Qemu-devel] [PATCH v2 1/2] net: check packet payload length

2016-02-25 Thread Jason Wang
On 02/24/2016 12:08 AM, P J P wrote: > From: Prasad J Pandit > > While computing IP checksum, 'net_checksum_calculate' reads > payload length from the packet. It could exceed the given 'data' > buffer size. Add a check to avoid it. > > Reported-by: Liu Ling > Signed-off-by: Prasad J Pandit > -

Re: [Qemu-devel] 答复: [PATCH v2] net: ne2000: check ring buffer control registers

2016-02-25 Thread Jason Wang
issues. Thanks for the testing. (Btw please use bottom posting on the list). Apply the patch with your "Tested-by". > -邮件原件- > 发件人: Jason Wang [mailto:jasow...@redhat.com] > 发送时间: 2016年2月24日 16:13 > 收件人: P J P; Qemu Developers > 抄送: yanghongke; Prasad J Pandit >

Re: [Qemu-devel] [PATCH] net: filter: correctly remove filter from the list during finalization

2016-02-25 Thread Jason Wang
On 02/24/2016 07:53 PM, Yang Hongyang wrote: > > On Wed, Feb 24, 2016 at 11:44 AM, Jason Wang <mailto:jasow...@redhat.com>> wrote: > > Qemu may crash when we want to add two filters on the same netdev but > the initialization of second fails (e.g missing par

Re: [Qemu-devel] [PATCH] vhost-user: verify that number of queues is less than MAX_QUEUE_NUM

2016-02-25 Thread Jason Wang
"vhost-user number of queues must be in range [1, %d]", > + MAX_QUEUE_NUM); > return -1; > } > Acked-by: Jason Wang

Re: [Qemu-devel] [PATCH] MAINTAINERS: Add entries for include/net/ files

2016-02-25 Thread Jason Wang
s(+) > > diff --git a/MAINTAINERS b/MAINTAINERS > index 5b29408..5fc99cd 100644 > --- a/MAINTAINERS > +++ b/MAINTAINERS > @@ -1123,6 +1123,7 @@ Network device backends > M: Jason Wang > S: Maintained > F: net/ > +F: include/net/ > T: git git://github.c

Re: [Qemu-devel] [PATCH] filter/fiter-buffer: Add a 'status' property for filter object

2016-02-25 Thread Jason Wang
Here we use the 'disable' callback of NetFilterClass > to realize this capability. We register it with filter_buffer_flush(). > The other types of filters can realize their own 'disable' callback. > > We will skip the disabled filter when delivering packets in net la

Re: [Qemu-devel] [PATCH V6 0/2] net/filter-mirror:add filter-mirror and unit test

2016-02-25 Thread Jason Wang
On 02/24/2016 04:08 PM, Jason Wang wrote: > > On 02/24/2016 02:54 PM, Zhang Chen wrote: >> Filter-mirror is a netfilter plugin. >> It gives qemu the ability to mirror >> packets to a chardev. >> >> v6: >> - Address Jason's comments. >

Re: [Qemu-devel] [PATCH] net: simplify net_init_tap_one logic

2016-02-25 Thread Jason Wang
On 02/26/2016 07:05 AM, Paolo Bonzini wrote: > net_init_tap_one receives in vhostfdname a fd name from vhostfd= or > vhostfds=, or NULL if there is no vhostfd=/vhostfds=. It is simpler > to just check vhostfdname, than it is to check for vhostfd= or > vhostfds=. This also calms down Coverity, w

Re: [Qemu-devel] [PATCH V7 0/2] net/filter-mirror:add filter-mirror and unit test

2016-02-28 Thread Jason Wang
On 02/26/2016 04:12 PM, Zhang Chen wrote: > Filter-mirror is a netfilter plugin. > It gives qemu the ability to mirror > packets to a chardev. > > v7: > - fix mktemp() to mkstemp() > > v6: > - Address Jason's comments. > > v5: > - Address Jason's comments. > > v4: > - Address Jason's comments

Re: [Qemu-devel] [PATCH] net/filter-redirector:Add filter-redirector

2016-02-28 Thread Jason Wang
On 02/24/2016 05:03 PM, Zhang Chen wrote: > > If queue=rx, filter-redirector will get the packet that guest send, > then redirect > to outdev(if none, do nothing). but queue=rx/tx/all not related to > indev. please > look the flow chart below. queue=xxx just work for one > way(filter->outdev). >

Re: [Qemu-devel] [PATCH v2 1/2] filter: Add 'status' property for filter object

2016-02-28 Thread Jason Wang
introduced status changing callback/notifier for filter class. > > We will skip the disabled ('off') filter when delivering packets in net layer. > > Signed-off-by: zhanghailiang > Cc: Jason Wang > Cc: Yang Hongyang > --- > v2: > - Split the processing of buf

Re: [Qemu-devel] [PATCH v2 2/2] filter-buffer: Add status_changed callback processing

2016-02-28 Thread Jason Wang
me the release > packets timer. > > Signed-off-by: zhanghailiang > Cc: Jason Wang > Cc: Yang Hongyang > --- > v2: > - New patch > --- > net/filter-buffer.c | 19 +++ > 1 file changed, 19 insertions(+) > > diff --git a/net/filter-buffer.c b/net/filter

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

2016-02-28 Thread Jason Wang
On 02/24/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 backend. These callbacks were correct for > VALE ports, but incorrect for har

Re: [Qemu-devel] [PATCH v2 1/2] filter: Add 'status' property for filter object

2016-02-29 Thread Jason Wang
On 02/29/2016 03:34 PM, Hailiang Zhang wrote: > On 2016/2/29 15:26, Jason Wang wrote: >> >> >> On 02/29/2016 09:46 AM, zhanghailiang wrote: >>> With this property, users can control if this filter is 'on' >>> or 'off'. The default beh

Re: [Qemu-devel] [PATCH v2 2/2] filter-buffer: Add status_changed callback processing

2016-02-29 Thread Jason Wang
On 02/29/2016 03:36 PM, Hailiang Zhang wrote: > On 2016/2/29 15:27, Jason Wang wrote: >> >> >> On 02/29/2016 09:46 AM, zhanghailiang wrote: >>> While the status of filter-buffer changing from 'on' to 'off', >>> it need to release all th

Re: [Qemu-devel] [PATCH] net/virtio: fix multi-queue negotiation

2015-06-24 Thread Jason Wang
On 06/19/2015 02:05 AM, Marcel Apfelbaum wrote: > Clear host multi-queue related features if the peer > doesn't support it. > > Signed-off-by: Marcel Apfelbaum > --- > Notes: > This fixes a guest CPU soft lock, however the virtio-net > device will not work correctly. It seems that is > peer's

Re: [Qemu-devel] [PATCH v3 2/2] vhost user: Add RARP injection for legacy guest

2015-06-24 Thread Jason Wang
On 06/23/2015 01:49 PM, Michael S. Tsirkin wrote: > On Tue, Jun 23, 2015 at 10:12:17AM +0800, Jason Wang wrote: >> > >> > >> > On 06/18/2015 11:16 PM, Thibaut Collet wrote: >>> > > On Tue, Jun 16, 2015 at 10:05 AM, Jason Wang >>> > >

Re: [Qemu-devel] [PATCH v3 2/2] vhost user: Add RARP injection for legacy guest

2015-06-25 Thread Jason Wang
On 06/24/2015 07:05 PM, Michael S. Tsirkin wrote: > On Wed, Jun 24, 2015 at 04:31:15PM +0800, Jason Wang wrote: >> >> On 06/23/2015 01:49 PM, Michael S. Tsirkin wrote: >>> On Tue, Jun 23, 2015 at 10:12:17AM +0800, Jason Wang wrote: >>>>> >>>

<    5   6   7   8   9   10   11   12   13   14   >