RE: [PATCH V2 net 1/1] hv_netvsc: Fix a bug in netvsc_start_xmit()

2015-04-28 Thread Dexuan Cui
the patch, the guest can panic due to memory corruption. I confirm the patch can fix the panic I saw. Tested-by: Dexuan Cui de...@microsoft.com -- Dexuan -- To unsubscribe from this list: send the line unsubscribe netdev in the body of a message to majord...@vger.kernel.org More majordomo info

RE: [PATCH net 1/1] hv_netvsc: Fix a bug in netvsc_start_xmit()

2015-04-27 Thread Dexuan Cui
|| head_room pkt_sz) { packet = kmalloc(pkt_sz, GFP_ATOMIC); if (!packet) { /* out of memory, drop packet */ -- Without the patch, the guest can panic due to memory corruption. I confirm the patch can fix the panic I saw. Tested-by: Dexuan Cui

[PATCH 2/7] Drivers: hv: vmbus: define a new VMBus message type for hvsock

2015-07-06 Thread Dexuan Cui
A function to send the type of message is also added. The coming net/hvsock driver will use this function to proactively request the host to offer a VMBus channel for a new hvsock connection. Signed-off-by: Dexuan Cui de...@microsoft.com --- drivers/hv/channel.c | 15

[PATCH 3/7] Drivers: hv: vmbus: add APIs to send/recv hvsock packet and get the r/w-ability

2015-07-06 Thread Dexuan Cui
This will be used by the coming net/hvsock driver. Signed-off-by: Dexuan Cui de...@microsoft.com --- drivers/hv/channel.c | 131 ++ drivers/hv/hyperv_vmbus.h | 4 ++ drivers/hv/ring_buffer.c | 14 + include/linux/hyperv.h| 33

[PATCH 4/7] Drivers: hv: vmbus: add APIs to register callbacks to process hvsock connection

2015-07-06 Thread Dexuan Cui
With the 2 APIs supplied by the VMBus driver, the coming net/hvsock driver can register 2 callbacks and can know when a new hvsock connection is offered by the host, and when a hvsock connection is being closed by the host. Signed-off-by: Dexuan Cui de...@microsoft.com --- drivers/hv/Makefile

[PATCH 7/7] Drivers: hv: vmbus: disable local interrupt when hvsock's callback is running

2015-07-06 Thread Dexuan Cui
() to A, trying to set channel-onchannel_callbackto NULL; on A, if the IPI handler happens between if (channel-onchannel_callback != NULL) and invoking channel-onchannel_callback, we'll invoke a function pointer of NULL. This is why the patch is necessary. Signed-off-by: Dexuan Cui de...@microsoft.com

[PATCH 5/7] Drivers: hv: vmbus: add a helper function to set a channel's pending send size

2015-07-06 Thread Dexuan Cui
This will be used by the coming net/hvsock driver. Signed-off-by: Dexuan Cui de...@microsoft.com --- include/linux/hyperv.h | 6 ++ 1 file changed, 6 insertions(+) diff --git a/include/linux/hyperv.h b/include/linux/hyperv.h index 307910b3..c52f4cb 100644 --- a/include/linux/hyperv.h +++ b

[PATCH 0/7] introduce Hyper-V VM Sockets(hvsock)

2015-07-06 Thread Dexuan Cui
review the patchset. Looking forward to your comments! Dexuan Cui (7): Drivers: hv: vmbus: define the new offer type for Hyper-V socket (hvsock) Drivers: hv: vmbus: define a new VMBus message type for hvsock Drivers: hv: vmbus: add APIs to send/recv hvsock packet and get the r/w-ability

[PATCH 1/7] Drivers: hv: vmbus: define the new offer type for Hyper-V socket (hvsock)

2015-07-06 Thread Dexuan Cui
A helper function is also added. Signed-off-by: Dexuan Cui de...@microsoft.com --- include/linux/hyperv.h | 7 +++ 1 file changed, 7 insertions(+) diff --git a/include/linux/hyperv.h b/include/linux/hyperv.h index 30d3a1f..aa21814 100644 --- a/include/linux/hyperv.h +++ b/include/linux

[PATCH 6/7] hvsock: introduce Hyper-V VM Sockets feature

2015-07-06 Thread Dexuan Cui
directly by the traditional BSD-style socket APIs. Hyper-V VM Sockets is only available on Windows 10 host and later. The patch implements the necessary support in the guest side by introducing a new socket address family AF_HYPERV. Signed-off-by: Dexuan Cui de...@microsoft.com --- MAINTAINERS

[PATCH 0/7] introduce Hyper-V VM Sockets(hvsock)

2015-07-06 Thread Dexuan Cui
review the patchset. Looking forward to your comments! Dexuan Cui (7): Drivers: hv: vmbus: define the new offer type for Hyper-V socket (hvsock) Drivers: hv: vmbus: define a new VMBus message type for hvsock Drivers: hv: vmbus: add APIs to send/recv hvsock packet and get the r/w-ability

[PATCH v4 0/7] introduce Hyper-V VM Sockets(hvsock)

2015-07-28 Thread Dexuan Cui
.notify_send_pre_block .notify_send_pre_enqueue .notify_send_post_enqueue etc. So I think we'd better introduce a new address family: AF_HYPERV. Please review the patchset. Looking forward to your comments! Dexuan Cui (7): Drivers: hv: vmbus: define the new offer type

[PATCH V4 2/7] Drivers: hv: vmbus: define a new VMBus message type for hvsock

2015-07-28 Thread Dexuan Cui
A function to send the type of message is also added. The coming net/hvsock driver will use this function to proactively request the host to offer a VMBus channel for a new hvsock connection. Signed-off-by: Dexuan Cui de...@microsoft.com --- drivers/hv/channel.c | 15

[PATCH V4 3/7] Drivers: hv: vmbus: add APIs to send/recv hvsock packet and get the r/w-ability

2015-07-28 Thread Dexuan Cui
This will be used by the coming net/hvsock driver. Signed-off-by: Dexuan Cui de...@microsoft.com --- drivers/hv/channel.c | 134 ++ drivers/hv/hyperv_vmbus.h | 4 ++ drivers/hv/ring_buffer.c | 14 + include/linux/hyperv.h| 32

[PATCH V4 6/7] hvsock: introduce Hyper-V VM Sockets feature

2015-07-28 Thread Dexuan Cui
directly by the traditional BSD-style socket APIs. Hyper-V VM Sockets is only available on Windows 10 host and later. The patch implements the necessary support in the guest side by introducing a new socket address family AF_HYPERV. Signed-off-by: Dexuan Cui de...@microsoft.com --- Changes since v1

[PATCH V4 7/7] Drivers: hv: vmbus: disable local interrupt when hvsock's callback is running

2015-07-28 Thread Dexuan Cui
() to A, trying to set channel-onchannel_callbackto NULL; on A, if the IPI handler happens between if (channel-onchannel_callback != NULL) and invoking channel-onchannel_callback, we'll invoke a function pointer of NULL. This is why the patch is necessary. Signed-off-by: Dexuan Cui de...@microsoft.com

[PATCH V4 4/7] Drivers: hv: vmbus: add APIs to register callbacks to process hvsock connection

2015-07-28 Thread Dexuan Cui
With the 2 APIs supplied by the VMBus driver, the coming net/hvsock driver can register 2 callbacks and can know when a new hvsock connection is offered by the host, and when a hvsock connection is being closed by the host. Signed-off-by: Dexuan Cui de...@microsoft.com --- drivers/hv/Makefile

[PATCH V4 1/7] Drivers: hv: vmbus: define the new offer type for Hyper-V socket (hvsock)

2015-07-28 Thread Dexuan Cui
A helper function is also added. Signed-off-by: Dexuan Cui de...@microsoft.com --- include/linux/hyperv.h | 7 +++ 1 file changed, 7 insertions(+) diff --git a/include/linux/hyperv.h b/include/linux/hyperv.h index 30d3a1f..2ca3ac1 100644 --- a/include/linux/hyperv.h +++ b/include/linux

RE: [PATCH V4 7/7] Drivers: hv: vmbus: disable local interrupt when hvsock's callback is running

2015-07-30 Thread Dexuan Cui
From: David Miller Sent: Thursday, July 30, 2015 6:28 From: Dexuan Cui de...@microsoft.com Date: Tue, 28 Jul 2015 05:35:30 -0700 In the SMP guest case, when the per-channel callback hvsock_events() is running on virtual CPU A, if the guest tries to close the connection on virtual CPU

RE: [PATCH V4 6/7] hvsock: introduce Hyper-V VM Sockets feature

2015-07-30 Thread Dexuan Cui
From: David Miller Sent: Thursday, July 30, 2015 6:28 From: Dexuan Cui Date: Tue, 28 Jul 2015 05:35:23 -0700 +/* hvsock_release() can be invoked in 2 paths: + * 1. on process termination: + * hvsock_sk_destruct+0x1a/0x20 + * __sk_free+0x1d/0x130 + * sk_free+0x19/0x20

RE: [PATCH V4 4/7] Drivers: hv: vmbus: add APIs to register callbacks to process hvsock connection

2015-07-30 Thread Dexuan Cui
From: David Miller Sent: Thursday, July 30, 2015 6:27 From: Dexuan Cui Date: Tue, 28 Jul 2015 05:35:11 -0700 With the 2 APIs supplied by the VMBus driver, the coming net/hvsock driver can register 2 callbacks and can know when a new hvsock connection is offered by the host, and when

RE: [PATCH V4 4/7] Drivers: hv: vmbus: add APIs to register callbacks to process hvsock connection

2015-08-07 Thread Dexuan Cui
-Original Message- From: KY Srinivasan Sent: Friday, August 7, 2015 2:28 To: Dexuan Cui de...@microsoft.com; David Miller da...@davemloft.net Cc: o...@aepfle.de; gre...@linuxfoundation.org; jasow...@redhat.com; driverdev-de...@linuxdriverproject.org; linux-ker...@vger.kernel.org

RE: [PATCH V4 7/7] Drivers: hv: vmbus: disable local interrupt when hvsock's callback is running

2015-08-07 Thread Dexuan Cui
From: KY Srinivasan Sent: Friday, August 7, 2015 1:50 To: Dexuan Cui de...@microsoft.com; David Miller da...@davemloft.net Cc: o...@aepfle.de; gre...@linuxfoundation.org; jasow...@redhat.com; driverdev-de...@linuxdriverproject.org; linux-ker...@vger.kernel.org; step...@networkplumber.org

RE: [PATCH V3 3/7] Drivers: hv: vmbus: add APIs to send/recv hvsock packet and get the r/w-ability

2015-07-22 Thread Dexuan Cui
From: Vitaly Kuznetsov Sent: Tuesday, July 21, 2015 22:07 diff --git a/drivers/hv/channel.c b/drivers/hv/channel.c ... +int vmbus_recvpacket_hvsock(struct vmbus_channel *channel, void *buffer, + u32 bufferlen, u32 *buffer_actual_len) +{ + struct

RE: [PATCH V3 3/7] Drivers: hv: vmbus: add APIs to send/recv hvsock packet and get the r/w-ability

2015-07-22 Thread Dexuan Cui
From: Dan Carpenter Sent: Wednesday, July 22, 2015 18:36 To: Dexuan Cui On Wed, Jul 22, 2015 at 10:09:10AM +, Dexuan Cui wrote: I'd suggest you do something like if (ret == -EAGIAIN) return 0; else if (ret) return ret; to make it future-proof

RE: [PATCH V3 3/7] Drivers: hv: vmbus: add APIs to send/recv hvsock packet and get the r/w-ability

2015-07-23 Thread Dexuan Cui
From: Dan Carpenter Sent: Thursday, July 23, 2015 18:25 On Thu, Jul 23, 2015 at 01:10:57PM +0300, Dan Carpenter wrote: In this specific case, writing it as if (ret != 0) caused the bug. If we had written it as if (ret) return ret; then there are no zeroes so wouldn't have been any

[V2 4/7] Drivers: hv: vmbus: add APIs to register callbacks to process hvsock connection

2015-07-14 Thread Dexuan Cui
With the 2 APIs supplied by the VMBus driver, the coming net/hvsock driver can register 2 callbacks and can know when a new hvsock connection is offered by the host, and when a hvsock connection is being closed by the host. Signed-off-by: Dexuan Cui de...@microsoft.com --- drivers/hv/Makefile

[V2 3/7] Drivers: hv: vmbus: add APIs to send/recv hvsock packet and get the r/w-ability

2015-07-14 Thread Dexuan Cui
This will be used by the coming net/hvsock driver. Signed-off-by: Dexuan Cui de...@microsoft.com --- drivers/hv/channel.c | 131 ++ drivers/hv/hyperv_vmbus.h | 4 ++ drivers/hv/ring_buffer.c | 14 + include/linux/hyperv.h| 33

[V2 6/7] hvsock: introduce Hyper-V VM Sockets feature

2015-07-14 Thread Dexuan Cui
directly by the traditional BSD-style socket APIs. Hyper-V VM Sockets is only available on Windows 10 host and later. The patch implements the necessary support in the guest side by introducing a new socket address family AF_HYPERV. Signed-off-by: Dexuan Cui de...@microsoft.com --- Changes since v1

[V2 5/7] Drivers: hv: vmbus: add a helper function to set a channel's pending send size

2015-07-14 Thread Dexuan Cui
This will be used by the coming net/hvsock driver. Signed-off-by: Dexuan Cui de...@microsoft.com --- include/linux/hyperv.h | 6 ++ 1 file changed, 6 insertions(+) diff --git a/include/linux/hyperv.h b/include/linux/hyperv.h index 307910b3..c52f4cb 100644 --- a/include/linux/hyperv.h +++ b

[V2 2/7] Drivers: hv: vmbus: define a new VMBus message type for hvsock

2015-07-14 Thread Dexuan Cui
A function to send the type of message is also added. The coming net/hvsock driver will use this function to proactively request the host to offer a VMBus channel for a new hvsock connection. Signed-off-by: Dexuan Cui de...@microsoft.com --- drivers/hv/channel.c | 15

[V2 0/7] introduce Hyper-V VM Sockets(hvsock)

2015-07-14 Thread Dexuan Cui
forward to your comments! Dexuan Cui (7): Drivers: hv: vmbus: define the new offer type for Hyper-V socket (hvsock) Drivers: hv: vmbus: define a new VMBus message type for hvsock Drivers: hv: vmbus: add APIs to send/recv hvsock packet and get the r/w-ability Drivers: hv: vmbus: add APIs

[V2 1/7] Drivers: hv: vmbus: define the new offer type for Hyper-V socket (hvsock)

2015-07-14 Thread Dexuan Cui
A helper function is also added. Signed-off-by: Dexuan Cui de...@microsoft.com --- include/linux/hyperv.h | 7 +++ 1 file changed, 7 insertions(+) diff --git a/include/linux/hyperv.h b/include/linux/hyperv.h index 30d3a1f..aa21814 100644 --- a/include/linux/hyperv.h +++ b/include/linux

[V2 7/7] Drivers: hv: vmbus: disable local interrupt when hvsock's callback is running

2015-07-14 Thread Dexuan Cui
() to A, trying to set channel-onchannel_callbackto NULL; on A, if the IPI handler happens between if (channel-onchannel_callback != NULL) and invoking channel-onchannel_callback, we'll invoke a function pointer of NULL. This is why the patch is necessary. Signed-off-by: Dexuan Cui de...@microsoft.com

RE: [V2 3/7] Drivers: hv: vmbus: add APIs to send/recv hvsock packet and get the r/w-ability

2015-07-16 Thread Dexuan Cui
-Original Message- From: David Miller Sent: Thursday, July 16, 2015 12:16 From: Dexuan Cui Date: Tue, 14 Jul 2015 02:58:56 -0700 +int vmbus_sendpacket_hvsock(struct vmbus_channel *channel, void *buf, u32 len) +{ + struct vmpacket_descriptor desc; + struct

RE: [V2 6/7] hvsock: introduce Hyper-V VM Sockets feature

2015-07-16 Thread Dexuan Cui
From: David Miller Sent: Thursday, July 16, 2015 12:19 From: Dexuan Cui Date: Tue, 14 Jul 2015 03:00:48 -0700 + pr_debug(hvsock_sk_destruct: called\n); Debug logging just to state that a function is called is not appropriate, we have very sophisticated tracing facilities

RE: [V2 1/7] Drivers: hv: vmbus: define the new offer type for Hyper-V socket (hvsock)

2015-07-16 Thread Dexuan Cui
From: David Miller Sent: Thursday, July 16, 2015 12:13 From: Dexuan Cui Date: Tue, 14 Jul 2015 02:58:03 -0700 A helper function is also added. diff --git a/include/linux/hyperv.h b/include/linux/hyperv.h @@ -236,6 +236,7 @@ struct vmbus_channel_offer { #define

RE: [PATCH 0/7] introduce Hyper-V VM Sockets(hvsock)

2015-07-17 Thread Dexuan Cui
-Original Message- From: Stefan Hajnoczi Sent: Thursday, July 16, 2015 23:59 On Mon, Jul 06, 2015 at 07:39:35AM -0700, Dexuan Cui wrote: Hyper-V VM Sockets (hvsock) is a byte-stream based communication mechanism between Windowsd 10 (or later) host and a guest. It's kind of TCP

RE: [PATCH net-next 1/1] hv_netvsc: Wait for sub-channels to be processed during probe

2015-07-17 Thread Dexuan Cui
From: K. Y. Srinivasan Sent: Friday, July 17, 2015 3:17 Subject: [PATCH net-next 1/1] hv_netvsc: Wait for sub-channels to be processed during probe diff --git a/drivers/net/hyperv/hyperv_net.h b/drivers/net/hyperv/hyperv_net.h ... @@ -1116,6 +1127,9 @@ int rndis_filter_device_add(struct

RE: [PATCH net-next 1/1] hv_netvsc: Wait for sub-channels to be processed during probe

2015-07-17 Thread Dexuan Cui
From: K. Y. Srinivasan Sent: Friday, July 17, 2015 3:17 Subject: [PATCH net-next 1/1] hv_netvsc: Wait for sub-channels to be processed during probe The current code returns from probe without waiting for the proper handling of subchannels that may be requested. If the netvsc driver were to

RE: [V2 6/7] hvsock: introduce Hyper-V VM Sockets feature

2015-07-20 Thread Dexuan Cui
-Original Message- From: Vitaly Kuznetsov Sent: Friday, July 17, 2015 23:04 To: Dexuan Cui Dexuan Cui writes: From: David Miller Sent: Thursday, July 16, 2015 12:19 From: Dexuan Cui Date: Tue, 14 Jul 2015 03:00:48 -0700 +pr_debug(hvsock_sk_destruct: called\n

RE: [PATCH net-next 1/1] hv_netvsc: Wait for sub-channels to be processed during probe

2015-07-20 Thread Dexuan Cui
From: KY Srinivasan Sent: Friday, July 17, 2015 23:33 From: Dexuan Cui Sent: Friday, July 17, 2015 3:01 AM From: K. Y. Srinivasan Sent: Friday, July 17, 2015 3:17 Subject: [PATCH net-next 1/1] hv_netvsc: Wait for sub-channels to be processed during probe diff --git a/drivers

[PATCH V3 1/7] Drivers: hv: vmbus: define the new offer type for Hyper-V socket (hvsock)

2015-07-21 Thread Dexuan Cui
A helper function is also added. Signed-off-by: Dexuan Cui de...@microsoft.com --- include/linux/hyperv.h | 7 +++ 1 file changed, 7 insertions(+) diff --git a/include/linux/hyperv.h b/include/linux/hyperv.h index 30d3a1f..2ca3ac1 100644 --- a/include/linux/hyperv.h +++ b/include/linux

[PATCH V3 3/7] Drivers: hv: vmbus: add APIs to send/recv hvsock packet and get the r/w-ability

2015-07-21 Thread Dexuan Cui
This will be used by the coming net/hvsock driver. Signed-off-by: Dexuan Cui de...@microsoft.com --- drivers/hv/channel.c | 133 ++ drivers/hv/hyperv_vmbus.h | 4 ++ drivers/hv/ring_buffer.c | 14 + include/linux/hyperv.h| 32

[PATCH V3 2/7] Drivers: hv: vmbus: define a new VMBus message type for hvsock

2015-07-21 Thread Dexuan Cui
A function to send the type of message is also added. The coming net/hvsock driver will use this function to proactively request the host to offer a VMBus channel for a new hvsock connection. Signed-off-by: Dexuan Cui de...@microsoft.com --- drivers/hv/channel.c | 15

[PATCH V3 0/7] introduce Hyper-V VM Sockets(hvsock)

2015-07-21 Thread Dexuan Cui
.notify_recv_post_dequeue .notify_send_init .notify_send_pre_block .notify_send_pre_enqueue .notify_send_post_enqueue etc. So I think we'd better introduce a new address family: AF_HYPERV. Please review the patchset. Looking forward to your comments! Dexuan

[PATCH V3 7/7] Drivers: hv: vmbus: disable local interrupt when hvsock's callback is running

2015-07-21 Thread Dexuan Cui
() to A, trying to set channel-onchannel_callbackto NULL; on A, if the IPI handler happens between if (channel-onchannel_callback != NULL) and invoking channel-onchannel_callback, we'll invoke a function pointer of NULL. This is why the patch is necessary. Signed-off-by: Dexuan Cui de...@microsoft.com

[PATCH V3 6/7] hvsock: introduce Hyper-V VM Sockets feature

2015-07-21 Thread Dexuan Cui
directly by the traditional BSD-style socket APIs. Hyper-V VM Sockets is only available on Windows 10 host and later. The patch implements the necessary support in the guest side by introducing a new socket address family AF_HYPERV. Signed-off-by: Dexuan Cui de...@microsoft.com --- Changes since v1

[PATCH V3 5/7] Drivers: hv: vmbus: add a helper function to set a channel's pending send size

2015-07-21 Thread Dexuan Cui
This will be used by the coming net/hvsock driver. Signed-off-by: Dexuan Cui de...@microsoft.com --- include/linux/hyperv.h | 6 ++ 1 file changed, 6 insertions(+) diff --git a/include/linux/hyperv.h b/include/linux/hyperv.h index fda9790..47c5c1a 100644 --- a/include/linux/hyperv.h +++ b

[PATCH V3 4/7] Drivers: hv: vmbus: add APIs to register callbacks to process hvsock connection

2015-07-21 Thread Dexuan Cui
With the 2 APIs supplied by the VMBus driver, the coming net/hvsock driver can register 2 callbacks and can know when a new hvsock connection is offered by the host, and when a hvsock connection is being closed by the host. Signed-off-by: Dexuan Cui de...@microsoft.com --- drivers/hv/Makefile

RE: linux-next network throughput performance regression

2015-11-08 Thread Dexuan Cui
> From: devel [mailto:driverdev-devel-boun...@linuxdriverproject.org] On Behalf > Of Eric Dumazet > Sent: Sunday, November 8, 2015 3:36 > To: David Ahern > Cc: netdev@vger.kernel.org; Haiyang Zhang ; linux- > ker...@vger.kernel.org;

RE: linux-next network throughput performance regression

2015-11-08 Thread Dexuan Cui
> -Original Message- > From: David Miller [mailto:da...@davemloft.net] > Sent: Monday, November 9, 2015 10:53 > To: Dexuan Cui <de...@microsoft.com> > Cc: eric.duma...@gmail.com; d...@cumulusnetworks.com; Simon Xiao > <six...@microsoft.com>; netdev@vger.kern

RE: linux-next network throughput performance regression

2015-11-08 Thread Dexuan Cui
> From: David Miller [mailto:da...@davemloft.net] > Sent: Monday, November 9, 2015 11:24 > ... > > Thanks, David! > > I understand 1 TX queue is the bottleneck (however in Simon's > > test, TX=1 => 36.7Gb/s, TX=8 => 37.7 Gb/s, so it looks the TX=1 bottleneck > > is not so obvious). > > I'm just

RE: [PATCH 6/7] hvsock: introduce Hyper-V VM Sockets feature

2015-07-07 Thread Dexuan Cui
-Original Message- From: Olaf Hering [mailto:o...@aepfle.de] Sent: Tuesday, July 7, 2015 18:10 To: Dexuan Cui; Paul Bolle Cc: gre...@linuxfoundation.org; da...@davemloft.net; netdev@vger.kernel.org; linux-ker...@vger.kernel.org; driverdev- de...@linuxdriverproject.org

RE: [PATCH 6/7] hvsock: introduce Hyper-V VM Sockets feature

2015-07-07 Thread Dexuan Cui
-Original Message- From: Paul Bolle Sent: Tuesday, July 7, 2015 17:38 To: Dexuan Cui Subject: Re: [PATCH 6/7] hvsock: introduce Hyper-V VM Sockets feature Just two nits. On ma, 2015-07-06 at 07:47 -0700, Dexuan Cui wrote: --- /dev/null +++ b/net/hv_sock/Kconfig +config

RE: [PATCH 6/7] hvsock: introduce Hyper-V VM Sockets feature

2015-07-07 Thread Dexuan Cui
-Original Message- From: Stephen Hemminger Sent: Wednesday, July 8, 2015 2:31 Subject: Re: [PATCH 6/7] hvsock: introduce Hyper-V VM Sockets feature On Mon, 6 Jul 2015 07:47:29 -0700 Dexuan Cui de...@microsoft.com wrote: Hyper-V VM sockets (hvsock) supplies a byte-stream based

RE: [PATCH 6/7] hvsock: introduce Hyper-V VM Sockets feature

2015-07-07 Thread Dexuan Cui
-Original Message- From: Olaf Hering Sent: Tuesday, July 7, 2015 18:59 Subject: Re: [PATCH 6/7] hvsock: introduce Hyper-V VM Sockets feature On Tue, Jul 07, Dexuan Cui wrote: OK, removing the line seems better than 'default n', though both reproduce the same

RE: [PATCH net-next] net, cgroup: cgroup_sk_updat_lock was missing initializer

2015-12-14 Thread Dexuan Cui
> -Original Message- > From: David Miller [mailto:da...@davemloft.net] > Sent: Tuesday, December 15, 2015 3:21 > To: t...@kernel.org > Cc: Dexuan Cui <de...@microsoft.com>; pa...@netfilter.org; ka...@trash.net; > kad...@blackhole.kfki.hu; dan...@iogearbox.net; da

RE: [PATCHSET v4] netfilter, cgroup: implement cgroup2 path match in xt_cgroup

2015-12-14 Thread Dexuan Cui
> -Original Message- > From: netdev-ow...@vger.kernel.org [mailto:netdev-ow...@vger.kernel.org] > On Behalf Of Tejun Heo > Sent: Tuesday, December 8, 2015 6:39 > To: da...@davemloft.net; pa...@netfilter.org; ka...@trash.net; > kad...@blackhole.kfki.hu; dan...@iogearbox.net;

RE: [PATCH V5 4/9] Drivers: hv: ring_buffer: enhance hv_ringbuffer_read() to support hvsock

2016-01-03 Thread Dexuan Cui
> -Original Message- > From: David Miller [mailto:da...@davemloft.net] > Sent: Saturday, January 2, 2016 12:30 > To: Dexuan Cui <de...@microsoft.com> > Cc: gre...@linuxfoundation.org; step...@networkplumber.org; > netdev@vger.kernel.org; linux-ker...@vger.ker

RE: [PATCH V5 5/9] Drivers: hv: vmbus: add APIs to send/recv hvsock packets

2016-01-05 Thread Dexuan Cui
> From: Vitaly Kuznetsov [mailto:vkuzn...@redhat.com] > Sent: Tuesday, January 5, 2016 20:39 > ... > > +/* > > + * vmbus_sendpacket_hvsock - Send the hvsock payload 'buf' of a length > > 'len' > > + */ > > +int vmbus_sendpacket_hvsock(struct vmbus_channel *channel, void *buf, > u32 len) > > ... >

RE: [PATCH V5 7/9] Drivers: hv: vmbus: add a mechanism to pass hvsock events to the hvsock driver

2016-01-05 Thread Dexuan Cui
> From: Vitaly Kuznetsov [mailto:vkuzn...@redhat.com] > > diff --git a/drivers/hv/channel_mgmt.c b/drivers/hv/channel_mgmt.c > > > > +/* hvsock related definitions */ > > +enum hvsock_event { > > + /* The host application is close()-ing the connection */ > > + HVSOCK_RESCIND_CHANNEL, > > +}; >

RE: [PATCH V5 4/9] Drivers: hv: ring_buffer: enhance hv_ringbuffer_read() to support hvsock

2016-01-05 Thread Dexuan Cui
> From: Vitaly Kuznetsov [mailto:vkuzn...@redhat.com] > Sent: Tuesday, January 5, 2016 20:31 > ... > > To get the payload of hvsock, we need raw=0 to skip the level-1 header > > (i.e., struct vmpacket_descriptor desc) and we also need to skip the > > level-2 header (i.e., struct

RE: [PATCH V5 9/9] hvsock: introduce Hyper-V VM Sockets feature

2016-01-05 Thread Dexuan Cui
> From: Vitaly Kuznetsov [mailto:vkuzn...@redhat.com] > Sent: Tuesday, January 5, 2016 17:52 > > Just some minor nitpicks below -- I have to admit I didn't test the feature. > > [..skip..] > > > + > > + if (sk->sk_err) { > > + ret = -sk->sk_err; > > + goto out_wait_error;

[PATCH V5 7/9] Drivers: hv: vmbus: add a mechanism to pass hvsock events to the hvsock driver

2015-12-24 Thread Dexuan Cui
For now only 1 event is defined: HVSOCK_RESCIND_CHANNEL. We'll have more events in the future. Signed-off-by: Dexuan Cui <de...@microsoft.com> --- drivers/hv/channel_mgmt.c | 18 ++ include/linux/hyperv.h| 17 + 2 files changed, 35 insertions(+) diff

[PATCH V5 6/9] Drivers: hv: vmbus: add a hvsock flag in struct hv_driver

2015-12-24 Thread Dexuan Cui
Only the coming hv_sock driver has a "true" value for this flag. We treat the hvsock offers/channels as special VMBus devices. Since the hv_sock driver handles all the hvsock offers/channels, we need to tweak vmbus_match() for hv_sock driver, so we introduce this flag. Signed-off-by:

[PATCH V5 8/9] Drivers: hv: vmbus: add an API vmbus_hvsock_device_unregister()

2015-12-24 Thread Dexuan Cui
The hvsock driver needs this API to release all the resources related to the channel. Signed-off-by: Dexuan Cui <de...@microsoft.com> --- drivers/hv/channel_mgmt.c | 33 - drivers/hv/connection.c | 4 ++-- include/linux/hyperv.h| 2 ++ 3 files chang

[PATCH V5 0/9] introduce Hyper-V VM Sockets(hvsock

2015-12-24 Thread Dexuan Cui
ue .notify_send_init .notify_send_pre_block .notify_send_pre_enqueue .notify_send_post_enqueue etc. So I think we'd better introduce a new address family: AF_HYPERV. Please review the patchset. Looking forward to your comments! Dexuan Cui (9): Drivers: hv: vmbus: add a helper func

[PATCH V5 4/9] Drivers: hv: ring_buffer: enhance hv_ringbuffer_read() to support hvsock

2015-12-24 Thread Dexuan Cui
the hvsock send/recv APIs. Signed-off-by: Dexuan Cui <de...@microsoft.com> Cc: Vitaly Kuznetsov <vkuzn...@redhat.com> --- drivers/hv/channel.c | 10 + drivers/hv/hyperv_vmbus.h | 13 +++- drivers/hv/ring_buffer.c | 54 --- i

[PATCH V5 3/9] Drivers: hv: vmbus: define a new VMBus message type for hvsock

2015-12-24 Thread Dexuan Cui
A function to send the type of message is also added. The coming net/hvsock driver will use this function to proactively request the host to offer a VMBus channel for a new hvsock connection. Signed-off-by: Dexuan Cui <de...@microsoft.com> --- drivers/hv/channel.c

[PATCH V5 5/9] Drivers: hv: vmbus: add APIs to send/recv hvsock packets

2015-12-24 Thread Dexuan Cui
This will be used by the coming net/hvsock driver. Signed-off-by: Dexuan Cui <de...@microsoft.com> --- drivers/hv/channel.c | 59 ++ include/linux/hyperv.h | 9 2 files changed, 68 insertions(+) diff --git a/drivers/hv/chann

[PATCH v12 net-next 1/1] hv_sock: introduce Hyper-V Sockets

2016-06-24 Thread Dexuan Cui
mt_service The patch implements the necessary support in the guest side by introducing a new socket address family AF_HYPERV. Signed-off-by: Dexuan Cui <de...@microsoft.com> Cc: "K. Y. Srinivasan" <k...@microsoft.com> Cc: Haiyang Zhang <haiya...@microsoft.com> Cc: Vitaly Kuz

[PATCH v12 net-next 0/1] introduce Hyper-V VM Sockets(hv_sock)

2016-06-24 Thread Dexuan Cui
e and free the buffers dynamically only when we recv/send data. This means: when a connection is idle, no memory is consumed as recv/send buffers at all. Dexuan Cui (1): hv_sock: introduce Hyper-V Sockets MAINTAINERS |2 + include/linux/hyperv.h | 14 + include/linux/sock

RE: [PATCH v12 net-next 1/1] hv_sock: introduce Hyper-V Sockets

2016-06-28 Thread Dexuan Cui
> From: David Miller [mailto:da...@davemloft.net] > Sent: Tuesday, June 28, 2016 17:34 > To: Dexuan Cui <de...@microsoft.com> > Cc: gre...@linuxfoundation.org; netdev@vger.kernel.org; linux- > ker...@vger.kernel.org; de...@linuxdriverproject.org; o...@aepfle.de; > a

[PATCH V6 3/8] Drivers: hv: vmbus: vmbus_sendpacket_ctl: hvsock: avoid unnecessary signaling

2016-01-26 Thread Dexuan Cui
When the hvsock channel's outbound ringbuffer is full (i.e., hv_ringbuffer_write() returns -EAGAIN), we should avoid the unnecessary signaling the host. Signed-off-by: Dexuan Cui <de...@microsoft.com> --- drivers/hv/channel.c | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff

[PATCH V6 4/8] Drivers: hv: vmbus: define a new VMBus message type for hvsock

2016-01-26 Thread Dexuan Cui
A function to send the type of message is also added. The coming net/hvsock driver will use this function to proactively request the host to offer a VMBus channel for a new hvsock connection. Signed-off-by: Dexuan Cui <de...@microsoft.com> --- drivers/hv/channel.c

[PATCH V6 5/8] Drivers: hv: vmbus: add a hvsock flag in struct hv_driver

2016-01-26 Thread Dexuan Cui
Only the coming hv_sock driver has a "true" value for this flag. We treat the hvsock offers/channels as special VMBus devices. Since the hv_sock driver handles all the hvsock offers/channels, we need to tweak vmbus_match() for hv_sock driver, so we introduce this flag. Signed-off-by:

[PATCH V6 0/8] introduce Hyper-V VM Socket(hv_sock)

2016-01-26 Thread Dexuan Cui
.notify_recv_pre_block .notify_recv_pre_dequeue .notify_recv_post_dequeue .notify_send_init .notify_send_pre_block .notify_send_pre_enqueue .notify_send_post_enqueue etc. So I think we'd better introduce a new address family: AF_HYPERV. Please review

[PATCH V6 2/8] Drivers: hv: vmbus: define the new offer type for Hyper-V socket (hvsock)

2016-01-26 Thread Dexuan Cui
A helper function is also added. Signed-off-by: Dexuan Cui <de...@microsoft.com> --- include/linux/hyperv.h | 7 +++ 1 file changed, 7 insertions(+) diff --git a/include/linux/hyperv.h b/include/linux/hyperv.h index e4867a7..c0eddd7 100644 --- a/include/linux/hyperv.h +++ b/include

[PATCH V6 7/8] Drivers: hv: vmbus: add an API vmbus_hvsock_device_unregister()

2016-01-26 Thread Dexuan Cui
The hvsock driver needs this API to release all the resources related to the channel. Signed-off-by: Dexuan Cui <de...@microsoft.com> --- drivers/hv/channel_mgmt.c | 33 - drivers/hv/connection.c | 4 ++-- include/linux/hyperv.h| 2 ++ 3 files chang

[PATCH V6 6/8] Drivers: hv: vmbus: add a per-channel rescind callback

2016-01-26 Thread Dexuan Cui
This will be used by the coming hv_sock driver. Signed-off-by: Dexuan Cui <de...@microsoft.com> --- drivers/hv/channel_mgmt.c | 11 +++ include/linux/hyperv.h| 9 + 2 files changed, 20 insertions(+) diff --git a/drivers/hv/channel_mgmt.c b/drivers/hv/channel_mgmt.c

[PATCH V6 8/8] hvsock: introduce Hyper-V Socket feature

2016-01-26 Thread Dexuan Cui
by the traditional BSD-style socket APIs. Hyper-V Socket is only available on new Windows hosts. The patch implements the necessary support in the guest side by introducing a new socket address family AF_HYPERV. Signed-off-by: Dexuan Cui <de...@microsoft.com> Cc: Vitaly Kuznetsov

[PATCH V6 1/8] Drivers: hv: vmbus: add a helper function to set a channel's pending send size

2016-01-26 Thread Dexuan Cui
This will be used by the coming net/hvsock driver. Signed-off-by: Dexuan Cui <de...@microsoft.com> --- include/linux/hyperv.h | 6 ++ 1 file changed, 6 insertions(+) diff --git a/include/linux/hyperv.h b/include/linux/hyperv.h index 753dbad..e4867a7 100644 --- a/include/linux/hyperv.h

RE: [PATCH V6 8/8] hvsock: introduce Hyper-V Socket feature

2016-01-26 Thread Dexuan Cui
> From: Olaf Hering [mailto:o...@aepfle.de] > Sent: Tuesday, January 26, 2016 18:24 > To: Dexuan Cui <de...@microsoft.com> > Cc: gre...@linuxfoundation.org; da...@davemloft.net; > step...@networkplumber.org; netdev@vger.kernel.org; linux- > ker...@vger.

RE: [PATCH V6 0/8] introduce Hyper-V VM Socket(hv_sock)

2016-02-13 Thread Dexuan Cui
> From: devel [mailto:driverdev-devel-boun...@linuxdriverproject.org] On Behalf > Of Dexuan Cui > Sent: Tuesday, January 26, 2016 17:40 > ... > Dexuan Cui (8): > Drivers: hv: vmbus: add a helper function to set a channel's pending > send size > Drivers: hv: vmbus: d

RE: When will net-next merge with linux-next?

2016-03-15 Thread Dexuan Cui
> From: gre...@linuxfoundation.org [mailto:gre...@linuxfoundation.org] > Sent: Tuesday, March 15, 2016 23:06 > To: Dexuan Cui <de...@microsoft.com> > Cc: David Miller <da...@davemloft.net>; netdev@vger.kernel.org; KY > Srinivasan <k...@microsoft.com>; Haiy

When will net-next merge with linux-next?

2016-03-14 Thread Dexuan Cui
Hi David, I have a pending patch of the hv_sock driver, which should go into the kernel through the net-next tree: https://lkml.org/lkml/2016/2/14/7 The VMBus side's supporting patches of hv_sock have been in Greg's tree and linux-next for more than 1 month, but they haven't been in net-next yet,

RE: When will net-next merge with linux-next?

2016-03-15 Thread Dexuan Cui
> From: gre...@linuxfoundation.org [mailto:gre...@linuxfoundation.org] > Sent: Tuesday, March 15, 2016 0:22 > To: Dexuan Cui <de...@microsoft.com> > Cc: David Miller <da...@davemloft.net>; netdev@vger.kernel.org; KY > Srinivasan <k...@microsoft.com>; Haiy

RE: When will net-next merge with linux-next?

2016-03-15 Thread Dexuan Cui
> From: gre...@linuxfoundation.org [mailto:gre...@linuxfoundation.org] > Sent: Wednesday, March 16, 2016 10:41 > To: Dexuan Cui <de...@microsoft.com> > Cc: David Miller <da...@davemloft.net>; netdev@vger.kernel.org; KY > Srinivasan <k...@microsoft.com>; Haiy

RE: [PATCH v7 net-next 1/1] hv_sock: introduce Hyper-V Sockets

2016-04-07 Thread Dexuan Cui
> From: Joe Perches [mailto:j...@perches.com] > Sent: Thursday, April 7, 2016 19:30 > To: Dexuan Cui <de...@microsoft.com>; gre...@linuxfoundation.org; > da...@davemloft.net; netdev@vger.kernel.org; linux-ker...@vger.kernel.org; > de...@linuxdriverproject.org; o...@aepfle.d

[PATCH v7 net-next 1/1] hv_sock: introduce Hyper-V Sockets

2016-04-07 Thread Dexuan Cui
mt_service The patch implements the necessary support in the guest side by introducing a new socket address family AF_HYPERV. Signed-off-by: Dexuan Cui <de...@microsoft.com> Cc: "K. Y. Srinivasan" <k...@microsoft.com> Cc: Haiyang Zhang <haiya...@microsoft.com> Cc:

[PATCH v8 net-next 1/1] hv_sock: introduce Hyper-V Sockets

2016-04-07 Thread Dexuan Cui
mt_service The patch implements the necessary support in the guest side by introducing a new socket address family AF_HYPERV. Signed-off-by: Dexuan Cui <de...@microsoft.com> Cc: "K. Y. Srinivasan" <k...@microsoft.com> Cc: Haiyang Zhang <haiya...@microsoft.com> Cc:

[PATCH v8 net-next 0/1] introduce Hyper-V VM Sockets(hv_sock)

2016-04-07 Thread Dexuan Cui
inor changes of coding style and comments Changes since v7 - a few minor changes of coding style: thanks, Joe Perches! - added some lines of comments about GUID/UUID before the struct sockaddr_hv. Dexuan Cui (1): hv_sock: introduce Hyper-V Sockets MAINTAINERS |2 + include/linux/h

RE: [PATCH net-next] net: add the AF_KCM entries to family name tables

2016-04-06 Thread Dexuan Cui
> From: netdev-ow...@vger.kernel.org [mailto:netdev-ow...@vger.kernel.org] > On Behalf Of Dexuan Cui > Sent: Tuesday, April 5, 2016 22:41 > To: da...@davemloft.net; netdev@vger.kernel.org > Subject: [PATCH net-next] net: add the AF_KCM entries to family name tables > > This

RE: [PATCH net-next] net: add the AF_KCM entries to family name tables

2016-04-06 Thread Dexuan Cui
> From: David Miller [mailto:da...@davemloft.net] > Sent: Thursday, April 7, 2016 5:00 > To: Dexuan Cui <de...@microsoft.com> > Cc: netdev@vger.kernel.org > Subject: Re: [PATCH net-next] net: add the AF_KCM entries to family name > tables > > From: Dexuan Cui <de.

RE: [PATCH net-next] net: add the AF_KCM entries to family name tables

2016-04-06 Thread Dexuan Cui
> From: David Miller [mailto:da...@davemloft.net] > Sent: Thursday, April 7, 2016 11:59 > To: Dexuan Cui <de...@microsoft.com> > Cc: netdev@vger.kernel.org > Subject: Re: [PATCH net-next] net: add the AF_KCM entries to family name > tables > > From: Dexuan Cui <de

RE: [PATCH v8 net-next 1/1] hv_sock: introduce Hyper-V Sockets

2016-04-07 Thread Dexuan Cui
> From: Joe Perches [mailto:j...@perches.com] > Sent: Friday, April 8, 2016 9:15 > On Thu, 2016-04-07 at 18:36 -0700, Dexuan Cui wrote: > > diff --git a/include/net/af_hvsock.h b/include/net/af_hvsock.h > [] > > +#define VMBUS_RINGBUFFER_SIZE_HVSOCK_RECV (5 *

[PATCH v7 net-next 0/1] introduce Hyper-V VM Sockets(hv_sock)

2016-04-07 Thread Dexuan Cui
avoided the introduction of new VMBUS driver APIs vmbus_sendpacket_hvsock() and vmbus_recvpacket_hvsock() and used vmbus_sendpacket()/vmbus_recvpacket() in the higher level (i.e., the vmsock driver). Thank Vitaly! Changes since v6 (http://lkml.iu.edu/hypermail/linux/kernel/1601.3/01813.html) - only a few minor c

[PATCH net-next 1/3] net: add the AF_KCM entries to family name tables

2016-03-21 Thread Dexuan Cui
This is for the recent kcm driver, which introduces AF_KCM(41) in b7ac4eb(kcm: Kernel Connection Multiplexor module). Signed-off-by: Dexuan Cui <de...@microsoft.com> Cc: Signed-off-by: Tom Herbert <t...@herbertland.com> --- net/core/sock.c | 9 ++--- 1 file changed, 6 inse

[PATCH net-next 2/3] hv_sock: introduce Hyper-V Sockets

2016-03-21 Thread Dexuan Cui
mt_service The patch implements the necessary support in the guest side by introducing a new socket address family AF_HYPERV. Signed-off-by: Dexuan Cui <de...@microsoft.com> Cc: "K. Y. Srinivasan" <k...@microsoft.com> Cc: Haiyang Zhang <haiya...@microsoft.com> Cc: Vitaly

  1   2   >