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

2015-07-28 Thread Dexuan Cui
tify_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 Cui

[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 --- 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/hyperv.h @@ -236,6

[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 --- drivers/hv/channel.c | 134 ++ drivers/hv/hyperv_vmbus.h | 4 ++ drivers/hv/ring_buffer.c | 14 + include/linux/hyperv.h| 32 +++ 4 files

[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 --- drivers/hv/channel.c | 15 +++ drivers/hv

[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 --- drivers/hv/Makefile | 4

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

2015-07-28 Thread Dexuan Cui
This will be used by the coming net/hvsock driver. Signed-off-by: Dexuan Cui --- 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/include/linux

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

2015-07-28 Thread Dexuan Cui
other 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 --- 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
_cb() 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-b

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 > > 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

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 > &g

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 co

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

2015-08-05 Thread Dexuan Cui
> -Original Message- > From: devel [mailto:driverdev-devel-boun...@linuxdriverproject.org] On Behalf > Of Dexuan Cui > Sent: Thursday, July 30, 2015 18:18 > To: David Miller ; KY Srinivasan > Cc: o...@aepfle.de; gre...@linuxfoundation.org; jasow...@redhat.com;

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

2015-08-05 Thread Dexuan Cui
> From: devel [mailto:driverdev-devel-boun...@linuxdriverproject.org] On Behalf > Of Dexuan Cui > Sent: Thursday, July 30, 2015 18:20 > To: David Miller ; KY Srinivasan > Cc: o...@aepfle.de; gre...@linuxfoundation.org; jasow...@redhat.com; > driverdev-devel@linuxdriverproj

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 ; David Miller > Cc: o...@aepfle.de; gre...@linuxfoundation.org; jasow...@redhat.com; > driverdev-devel@linuxdriverproject.org; linux-ker...@vger.kernel.org; > step...@networkplumber.org; stefa.

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 ; David Miller > Cc: o...@aepfle.de; gre...@linuxfoundation.org; jasow...@redhat.com; > driverdev-devel@linuxdriverproject.org; linux-ker...@vger.kernel.org; > step...@netw

RE: [PATCH] hv: use substraction to update ring buffer index

2017-01-15 Thread Dexuan Cui
> From: devel [mailto:driverdev-devel-boun...@linuxdriverproject.org] On > Behalf Of Long Li > Sent: Thursday, January 5, 2017 12:08 > To: KY Srinivasan ; Haiyang Zhang > > Cc: de...@linuxdriverproject.org; linux-ker...@vger.kernel.org > Subject: [PATCH] hv: use substraction to update ring buffer

[PATCH] Drivers: hv: vmbus: finally fix hv_need_to_signal_on_read()

2017-01-23 Thread Dexuan Cui
aw(), put_pkt_raw() and commit_rd_index()). Fixes: a389fcfd2cb5 ("Drivers: hv: vmbus: Fix signaling logic in hv_need_to_signal_on_read()") Signed-off-by: Dexuan Cui Reported-by: Rolf Neugebauer Tested-by: Rolf Neugebauer Cc: "K. Y. Srinivasan" Cc: Haiyang Zhang Cc: Stephen Hemminge

RE: [PATCH] Drivers: hv: vmbus: finally fix hv_need_to_signal_on_read()

2017-01-25 Thread Dexuan Cui
> From: Stephen Hemminger [mailto:step...@networkplumber.org] > Sent: Wednesday, January 25, 2017 00:08 > To: Dexuan Cui > Cc: gre...@linuxfoundation.org; driverdev-devel@linuxdriverproject.org; KY > Srinivasan ; Haiyang Zhang ; > Stephen Hemminger ; o...@aepfle.de; Rolf &g

RE: [PATCH] Drivers: hv: vmbus: finally fix hv_need_to_signal_on_read()

2017-01-25 Thread Dexuan Cui
> From: gre...@linuxfoundation.org [mailto:gre...@linuxfoundation.org] > > Dexuan Cui wrote: > > As I checked against the kernels listed on the homapage, > > the below versions are impacted: > > v3.16.39 > > v3.18.47 > > v4.1.38 > > v4.8.17 >

RE: [PATCH] Drivers: hv: vmbus: finally fix hv_need_to_signal_on_read()

2017-01-26 Thread Dexuan Cui
> From: gre...@linuxfoundation.org [mailto:gre...@linuxfoundation.org] > > > > It's interesting v4.4.44 is not impacted, but actually it needs both > > > > the 2 > patches: > > > > i.e. this patch, and the previous one: > > > > Commit a389fcfd2cb5 ("Drivers: hv: vmbus: Fix signaling logic in > > >

RE: [PATCH] Drivers: hv: vmbus: finally fix hv_need_to_signal_on_read()

2017-01-26 Thread Dexuan Cui
> From: gre...@linuxfoundation.org [mailto:gre...@linuxfoundation.org] > > > From: gre...@linuxfoundation.org [mailto:gre...@linuxfoundation.org] > > > > > > It's interesting v4.4.44 is not impacted, but actually it needs > > > > > > both the 2 > > > patches: > > > > > > i.e. this patch, and the p

RE: [PATCH] Drivers: hv: vmbus: finally fix hv_need_to_signal_on_read()

2017-01-26 Thread Dexuan Cui
> From: gre...@linuxfoundation.org [mailto:gre...@linuxfoundation.org] > > Hi Greg, > > I expect this patch (i.e. the "real" patch) would go in your char-misc tree > > first, > > then it would be merged into Linus's tree, as we usually did. > > That's fine, I'll wait for the maintainer of the sub

RE: [PATCH] Drivers: hv: vmbus: finally fix hv_need_to_signal_on_read()

2017-01-26 Thread Dexuan Cui
> From: gre...@linuxfoundation.org [mailto:gre...@linuxfoundation.org] > To: Dexuan Cui > > > > v4.4.44 needs 2 patches, i.e. a389fcfd2cb5, and this patch (which is not in > > Linus's tree yet). Only backporting the first patch immediately is not > > enough &g

[PATCH] PCI: hv: fix wslot_to_devfn()

2017-02-07 Thread Dexuan Cui
l device driver's .remove() is invoked by hv_pci_remove() -> pci_stop_root_bus(), some warnings can be noticed because the VM has lost the access to the underlying device at that time. Signed-off-by: Jake Oshins Signed-off-by: Dexuan Cui Cc: sta...@vger.kernel.org Cc: K. Y. Srinivasan C

RE: [PATCH 2/2] x86/vdso: Add VCLOCK_HVCLOCK vDSO clock read method

2017-02-12 Thread Dexuan Cui
> From: Thomas Gleixner [mailto:t...@linutronix.de] > Sent: Saturday, February 11, 2017 02:02 > ... > That's important if the stuff happens cross CPU. If the update happens on > the same CPU then this is a different story and as there are VMexits > involved they might provide the required ordering

RE: [PATCH v3 3/3] Drivers: hv: vmbus: serialize Offer and Rescind offer

2015-01-28 Thread Dexuan Cui
> -Original Message- > From: Vitaly Kuznetsov [mailto:vkuzn...@redhat.com] > Sent: Tuesday, January 20, 2015 23:45 PM > To: KY Srinivasan; de...@linuxdriverproject.org > Cc: Haiyang Zhang; linux-ker...@vger.kernel.org; Dexuan Cui; Jason Wang; > Radim Krčmář; Dan Carpenter

RE: [PATCH v3 3/3] Drivers: hv: vmbus: serialize Offer and Rescind offer

2015-01-28 Thread Dexuan Cui
> -Original Message- > From: Vitaly Kuznetsov [mailto:vkuzn...@redhat.com] > Sent: Wednesday, January 28, 2015 20:09 PM > To: Dexuan Cui > Cc: KY Srinivasan; de...@linuxdriverproject.org; Haiyang Zhang; linux- > ker...@vger.kernel.org; Jason Wang; Radim Krčmář; Dan Carpe

[PATCH 1/3] hv: hv_util: move vmbus_open() to a later place

2015-01-29 Thread Dexuan Cui
Before the line vmbus_open() returns, srv->util_cb can be already running and the variablies, like util_fw_version, are needed by the srv->util_cb. So we have to make sure the variables are initialized before the vmbus_open(). CC: "K. Y. Srinivasan" Signed-off-by: Dexuan Cui

[PATCH 2/3] hv: vmbus_post_msg: retry the hypercall on HV_STATUS_INVALID_CONNECTION_ID

2015-01-29 Thread Dexuan Cui
I got the hypercall error code on Hyper-V 2008 R2 when keeping running "rmmod hv_netvsc; modprobe hv_netvsc; rmmod hv_utils; modprobe hv_utils" in a Linux guest. Without the patch, the driver can occasionally fail to load. CC: "K. Y. Srinivasan" Signed-off-by: Dexuan Cui -

[PATCH 3/3] hv: vmbus_open(): reset the channel state on ENOMEM

2015-01-29 Thread Dexuan Cui
Without this patch, the state is put to CHANNEL_OPENING_STATE, and when the driver is loaded next time, vmbus_open() will fail immediately due to newchannel->state != CHANNEL_OPEN_STATE. CC: "K. Y. Srinivasan" Signed-off-by: Dexuan Cui --- drivers/hv/channel.c | 8 +--- 1 fi

RE: [PATCH v3 3/3] Drivers: hv: vmbus: serialize Offer and Rescind offer

2015-01-29 Thread Dexuan Cui
> -Original Message- > From: Jason Wang [mailto:jasow...@redhat.com] > Sent: Thursday, January 29, 2015 18:09 PM > To: Dexuan Cui > Cc: Vitaly Kuznetsov; KY Srinivasan; de...@linuxdriverproject.org; Haiyang > Zhang; > linux-ker...@vger.kernel.org; Radim Krčmář; Dan Ca

RE: [PATCH 1/3] hv: hv_util: move vmbus_open() to a later place

2015-01-29 Thread Dexuan Cui
> -Original Message- > From: Vitaly Kuznetsov [mailto:vkuzn...@redhat.com] > Sent: Thursday, January 29, 2015 21:13 PM > To: Dexuan Cui > Cc: gre...@linuxfoundation.org; linux-ker...@vger.kernel.org; driverdev- > de...@linuxdriverproject.org; o...@aepfle.de; a...@cano

RE: [PATCH 3/3] hv: vmbus_open(): reset the channel state on ENOMEM

2015-01-29 Thread Dexuan Cui
> -Original Message- > From: Vitaly Kuznetsov [mailto:vkuzn...@redhat.com] > Sent: Thursday, January 29, 2015 21:22 PM > To: Dexuan Cui > Cc: gre...@linuxfoundation.org; linux-ker...@vger.kernel.org; driverdev- > de...@linuxdriverproject.org; o...@aepfle.de; a...@cano

RE: [PATCH 2/3] hv: vmbus_post_msg: retry the hypercall on HV_STATUS_INVALID_CONNECTION_ID

2015-01-29 Thread Dexuan Cui
> -Original Message- > From: Vitaly Kuznetsov [mailto:vkuzn...@redhat.com] > Sent: Thursday, January 29, 2015 21:31 PM > To: Dexuan Cui > Cc: gre...@linuxfoundation.org; linux-ker...@vger.kernel.org; driverdev- > de...@linuxdriverproject.org; o...@aepfle.de; a...@cano

RE: [PATCH 2/3] hv: vmbus_post_msg: retry the hypercall on HV_STATUS_INVALID_CONNECTION_ID

2015-01-29 Thread Dexuan Cui
> -Original Message- > From: Jason Wang [mailto:jasow...@redhat.com] > Sent: Friday, January 30, 2015 10:47 AM > To: Dexuan Cui > Cc: gre...@linuxfoundation.org; linux-ker...@vger.kernel.org; driverdev- > de...@linuxdriverproject.org; o...@aepfle.de; a...@canonical.co

RE: [PATCH 2/3] hv: vmbus_post_msg: retry the hypercall on HV_STATUS_INVALID_CONNECTION_ID

2015-01-31 Thread Dexuan Cui
> -Original Message- > From: Vitaly Kuznetsov [mailto:vkuzn...@redhat.com] > Sent: Saturday, January 31, 2015 1:29 AM > To: Dexuan Cui > Cc: gre...@linuxfoundation.org; linux-ker...@vger.kernel.org; driverdev- > de...@linuxdriverproject.org; o...@aepfle.de; a...@cano

RE: [PATCH 3/3] hv: vmbus_open(): reset the channel state on ENOMEM

2015-02-01 Thread Dexuan Cui
> -Original Message- > From: KY Srinivasan > Sent: Monday, February 2, 2015 3:42 AM > To: Dexuan Cui; Vitaly Kuznetsov > Cc: gre...@linuxfoundation.org; linux-ker...@vger.kernel.org; driverdev- > de...@linuxdriverproject.org; o...@aepfle.de; a...@canonical.com; >

[PATCH v2 1/3] hv: hv_util: move vmbus_open() to a later place

2015-02-01 Thread Dexuan Cui
v Signed-off-by: Dexuan Cui --- v2: This is a RESEND. I just added Vitaly's Reviewed-by. drivers/hv/hv_util.c | 11 ++- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/drivers/hv/hv_util.c b/drivers/hv/hv_util.c index 3b9c9ef..c5be773 100644 --- a/drivers/hv/hv_ut

[PATCH v2 2/3] hv: vmbus_post_msg: retry the hypercall on some transient errors

2015-02-01 Thread Dexuan Cui
patch, the driver can occasionally fail to load. Also let's retry HV_STATUS_INSUFFICIENT_MEMORY, though we didn't get it before. Removed 'case -ENOMEM', since the hypervisor doesn't return this. CC: "K. Y. Srinivasan" Signed-off-by: Dexuan Cui ---

[PATCH v2 3/3] hv: vmbus_open(): reset the channel state on ENOMEM

2015-02-01 Thread Dexuan Cui
Without this patch, the state is put to CHANNEL_OPENING_STATE, and when the driver is loaded next time, vmbus_open() will fail immediately due to newchannel->state != CHANNEL_OPEN_STATE. CC: "K. Y. Srinivasan" Signed-off-by: Dexuan Cui --- v2: this is a RESEND. drivers/hv/

RE: [PATCH v2 1/3] hv: hv_util: move vmbus_open() to a later place

2015-02-02 Thread Dexuan Cui
> -Original Message- > From: Jason Wang [mailto:jasow...@redhat.com] > Sent: Monday, February 2, 2015 17:36 PM > To: Dexuan Cui > Cc: gre...@linuxfoundation.org; linux-ker...@vger.kernel.org; driverdev- > de...@linuxdriverproject.org; o...@aepfle.de; a...@canonical.co

RE: [PATCH v2 2/3] hv: vmbus_post_msg: retry the hypercall on some transient errors

2015-02-02 Thread Dexuan Cui
> -Original Message- > From: Jason Wang [mailto:jasow...@redhat.com] > Sent: Monday, February 2, 2015 17:41 PM > To: Dexuan Cui > Cc: gre...@linuxfoundation.org; linux-ker...@vger.kernel.org; driverdev- > de...@linuxdriverproject.org; o...@aepfle.de; a...@canonical.co

RE: [PATCH 3/4] Drivers: hv: vmbus: protect vmbus_get_outgoing_channel() against channel removal

2015-02-03 Thread Dexuan Cui
> -Original Message- > From: Vitaly Kuznetsov [mailto:vkuzn...@redhat.com] > Sent: Wednesday, February 4, 2015 1:01 AM > To: KY Srinivasan; de...@linuxdriverproject.org > Cc: Haiyang Zhang; linux-ker...@vger.kernel.org; Dexuan Cui; Jason Wang > Subject: [PATCH 3/4]

RE: [PATCH 4/4] hyperv: netvsc: improve protection against rescind offer

2015-02-03 Thread Dexuan Cui
> -Original Message- > From: Vitaly Kuznetsov [mailto:vkuzn...@redhat.com] > Sent: Wednesday, February 4, 2015 1:01 AM > To: KY Srinivasan; de...@linuxdriverproject.org > Cc: Haiyang Zhang; linux-ker...@vger.kernel.org; Dexuan Cui; Jason Wang > Subject: [PATCH 4/4] hyper

RE: [PATCH 2/4] Drivers: hv: vmbus: do not lose rescind offer on failure in vmbus_process_offer()

2015-02-03 Thread Dexuan Cui
> -Original Message- > From: Vitaly Kuznetsov [mailto:vkuzn...@redhat.com] > Sent: Wednesday, February 4, 2015 1:01 AM > To: KY Srinivasan; de...@linuxdriverproject.org > Cc: Haiyang Zhang; linux-ker...@vger.kernel.org; Dexuan Cui; Jason Wang > Subject: [PATCH 2/4] Driv

RE: [PATCH 1/4] Drivers: hv: vmbus: implement get/put usage workflow for vmbus channels

2015-02-04 Thread Dexuan Cui
> -Original Message- > From: Vitaly Kuznetsov [mailto:vkuzn...@redhat.com] > Sent: Wednesday, February 4, 2015 1:01 AM > To: KY Srinivasan; de...@linuxdriverproject.org > Cc: Haiyang Zhang; linux-ker...@vger.kernel.org; Dexuan Cui; Jason Wang > Subject: [PATCH 1/4]

RE: [PATCH 1/4] Drivers: hv: vmbus: implement get/put usage workflow for vmbus channels

2015-02-04 Thread Dexuan Cui
> -Original Message- > From: Vitaly Kuznetsov [mailto:vkuzn...@redhat.com] > Sent: Wednesday, February 4, 2015 17:32 PM > To: Dexuan Cui > Cc: KY Srinivasan; de...@linuxdriverproject.org; Haiyang Zhang; linux- > ker...@vger.kernel.org; Jason Wang > Subject: Re: [P

RE: [PATCH 0/4] Drivers: hv: Further protection for the rescind path

2015-02-05 Thread Dexuan Cui
> -Original Message- > From: Vitaly Kuznetsov [mailto:vkuzn...@redhat.com] > Sent: Thursday, February 5, 2015 18:10 PM > To: KY Srinivasan > Cc: de...@linuxdriverproject.org; Haiyang Zhang; linux-ker...@vger.kernel.org; > Dexuan Cui; Jason Wang > Subject: Re: [P

RE: [PATCH 0/4] Drivers: hv: Further protection for the rescind path

2015-02-06 Thread Dexuan Cui
> -Original Message- > From: KY Srinivasan > Sent: Friday, February 6, 2015 6:47 AM > To: Dexuan Cui; Vitaly Kuznetsov > Cc: de...@linuxdriverproject.org; Haiyang Zhang; linux-ker...@vger.kernel.org; > Jason Wang > Subject: RE: [PATCH 0/4] Drivers: hv: Further prote

RE: [PATCH 0/6] Drivers: hv: vmbus

2015-02-15 Thread Dexuan Cui
> drivers/hv/connection.c |7 +--- > drivers/hv/hv_util.c |2 +- > drivers/hv/vmbus_drv.c| 26 +--- > include/linux/hyperv.h|1 + > 6 files changed, 74 insertions(+), 66 deletions(-) > > -- The patchse

RE: [PATCH 0/6] Drivers: hv: vmbus

2015-02-16 Thread Dexuan Cui
> -Original Message- > From: KY Srinivasan > Sent: Monday, February 16, 2015 13:28 PM > To: Dexuan Cui; gre...@linuxfoundation.org; linux-ker...@vger.kernel.org; > de...@linuxdriverproject.org; o...@aepfle.de; a...@canonical.com; > vkuzn...@redhat.com > Subject: RE: [P

[PATCH] tools: hv: fcopy_daemon: support >2GB files for x86_32 guest

2015-03-04 Thread Dexuan Cui
Without this patch, hv_fcopy_daemon's hv_copy_data() -> pwrite() will fail for >2GB file offset. Signed-off-by: Alex Ng Signed-off-by: Dexuan Cui Cc: K. Y. Srinivasan --- I tested the patch on x86_32 and x86_64 Ubuntu 15.04 nightly build(this is a generic issue and I think all t

RE: [PATCH] hv_vmbus: Add gradually increased delay for retries in vmbus_post_msg()

2015-03-27 Thread Dexuan Cui
7 +455,9 @@ int vmbus_post_msg(void *buffer, size_t buflen) > } > > retries++; > - msleep(1000); > + msleep(msec); > + if (msec < 2048) > + msec *= 2; > } > retur

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

2016-06-24 Thread Dexuan Cui
the per-connection static send/recv buffers Instead, we allocate 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

[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 Cc: "K. Y. Srinivasan" Cc: Haiyang Zhang Cc: Vitaly Kuznetsov Cc: Cathy Avery --- You can also get the patch here: https://github.com

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 > Cc: gre...@linuxfoundation.org; net...@vger.kernel.org; linux- > ker...@vger.kernel.org; de...@linuxdriverproject.org; o...@aepfle.de; > a...@canonical.com; jasow...

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 21:45 > To: Dexuan Cui > Cc: gre...@linuxfoundation.org; net...@vger.kernel.org; linux- > ker...@vger.kernel.org; de...@linuxdriverproject.org; o...@aepfle.de; > a...@canonical.com; jasow...

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

2016-06-29 Thread Dexuan Cui
> From: Rick Jones [mailto:rick.jon...@hpe.com] > Sent: Tuesday, June 28, 2016 23:43 > To: Dexuan Cui ; David Miller > Cc: gre...@linuxfoundation.org; net...@vger.kernel.org; linux- > ker...@vger.kernel.org; de...@linuxdriverproject.org; o...@aepfle.de; > a...@canonical.com; j

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

2016-06-29 Thread Dexuan Cui
the per-connection static send/recv buffers Instead, we allocate 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 Changes since v12: return ENO

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

2016-06-29 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 Cc: "K. Y. Srinivasan" Cc: Haiyang Zhang Cc: Vitaly Kuznetsov Cc: Cathy Avery --- You can also get the patch here (ae3cbdabca): http

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

2016-06-30 Thread Dexuan Cui
> From: David Miller [mailto:da...@davemloft.net] > Sent: Thursday, June 30, 2016 20:45 > To: Dexuan Cui > Cc: gre...@linuxfoundation.org; net...@vger.kernel.org; linux- > ker...@vger.kernel.org; de...@linuxdriverproject.org; o...@aepfle.de; > a...@canonical.com; jasow...

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

2016-06-30 Thread Dexuan Cui
the per-connection static send/recv buffers Instead, we allocate 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 Changes since v12: return ENO

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

2016-06-30 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 Cc: "K. Y. Srinivasan" Cc: Haiyang Zhang Cc: Vitaly Kuznetsov Cc: Cathy Avery --- You can also get the patch here (8ba95c8ec9): http

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

2016-06-30 Thread Dexuan Cui
> From: Olaf Hering [mailto:o...@aepfle.de] > Sent: Friday, July 1, 2016 0:12 > To: Dexuan Cui > Cc: da...@davemloft.net; gre...@linuxfoundation.org; > net...@vger.kernel.org; linux-ker...@vger.kernel.org; > de...@linuxdriverproject.org; a...@canonical.com; jasow...@redhat.com;

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

2016-07-04 Thread Dexuan Cui
> From: linux-kernel-ow...@vger.kernel.org [mailto:linux-kernel- > ow...@vger.kernel.org] On Behalf Of Dexuan Cui > Sent: Thursday, June 30, 2016 23:59 > diff --git a/include/linux/socket.h b/include/linux/socket.h > index b5cc5a6..0b68b58 100644 > --- a/include/linux/socket

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

2016-07-04 Thread Dexuan Cui
> From: David Miller [mailto:da...@davemloft.net] > Sent: Tuesday, July 5, 2016 14:27 > To: Dexuan Cui > Subject: Re: [PATCH v14 net-next 1/1] hv_sock: introduce Hyper-V Sockets > > From: Dexuan Cui > Date: Tue, 5 Jul 2016 01:58:31 + > > > Not sure if y

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

2016-07-05 Thread Dexuan Cui
> From: Joe Perches [mailto:j...@perches.com] > > > +#define sk_to_hvsock(__sk)   ((struct hvsock_sock *)(__sk)) > > +#define hvsock_to_sk(__hvsk) ((struct sock *)(__hvsk)) > > Might as well be static inlines Hi Joe, Thank you for the suggestions (again)! :-) I'll change them to static inlines.

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

2016-07-05 Thread Dexuan Cui
> From: Joe Perches [mailto:j...@perches.com] > Sent: Tuesday, July 5, 2016 17:39 > To: Dexuan Cui ; da...@davemloft.net; > gre...@linuxfoundation.org; net...@vger.kernel.org; linux- > ker...@vger.kernel.org; de...@linuxdriverproject.org; o...@aepfle.de; > a...@canonical.com; j

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

2016-07-08 Thread Dexuan Cui
> From: Olaf Hering [mailto:o...@aepfle.de] > Sent: Friday, July 8, 2016 0:02 > On Thu, Jun 30, Dexuan Cui wrote: > > > +/* The MTU is 16KB per the host side's design. */ > > +struct hvsock_recv_buf { > > + unsigned int data_len; > > + unsig

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

2016-07-08 Thread Dexuan Cui
the per-connection static send/recv buffers Instead, we allocate 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 Changes since v12: return ENO

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

2016-07-08 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 Cc: "K. Y. Srinivasan" Cc: Haiyang Zhang Cc: Vitaly Kuznetsov Cc: Cathy Avery --- You can also get the patch here (2764221d): http

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

2016-07-08 Thread Dexuan Cui
> From: Dexuan Cui > Sent: Friday, July 8, 2016 15:47 > > You can also get the patch here (2764221d): > https://github.com/dcui/linux/commits/decui/hv_sock/net-next/20160708_v15 > > In v14: > fix some coding style issues pointed out by David. > > In v15: > Just

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

2016-07-11 Thread Dexuan Cui
> From: Vitaly Kuznetsov [mailto:vkuzn...@redhat.com] > ... > Some comments below. The vast majority of them are really minor, the > only thing which bothers me a little bit is WARN() in hvsock_sendmsg() > which I think shouldn't be there. But I may have missed something. Thank you for the very

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

2016-07-11 Thread Dexuan Cui
boptimal considering memory consumption, however unluckily we have to live with it, before the host comes up with a new design in the future. :-( 3) remove the per-connection static send/recv buffers Instead, we allocate and free the buffers dynamically only when we recv/send data. This means: whe

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

2016-07-11 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 Cc: "K. Y. Srinivasan" Cc: Haiyang Zhang Cc: Vitaly Kuznetsov Cc: Cathy Avery Cc: Olaf Hering --- You can also get the patch by

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

2016-07-13 Thread Dexuan Cui
> From: Michal Kubecek [mailto:mkube...@suse.cz] > > .. > > +static struct sock *hvsock_find_connected_socket_by_channel( > > + const struct vmbus_channel *channel) > > +{ > > + struct hvsock_sock *hvsk; > > + > > + list_for_each_entry(hvsk, &hvsock_connected_list, connected_list) { > > +

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

2016-07-13 Thread Dexuan Cui
> From: Michal Kubecek [mailto:mkube...@suse.cz] > > .. > > However, though Hyper-V Sockets may seem conceptually similar to > > AF_VOSCK, there are differences in the transportation layer, and IMO these > > make the direct code reusing impractical: > > > > 1. In AF_VSOCK, the endpoint type is:

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

2016-07-15 Thread Dexuan Cui
re. :-( 3) remove the per-connection static send/recv buffers Instead, we allocate 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 Changes si

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

2016-07-15 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 Cc: "K. Y. Srinivasan" Cc: Haiyang Zhang Cc: Vitaly Kuznetsov Cc: Cathy Avery Cc: Olaf Hering --- You can also get the patch by

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

2016-07-19 Thread Dexuan Cui
> From: kbuild test robot [mailto:l...@intel.com] > Sent: Wednesday, July 20, 2016 1:10 > > Hi, > > [auto build test WARNING on net-next/master] > > url:https://github.com/0day-ci/linux/commits/Dexuan-Cui/introduce- > Hyper-V-VM-Sockets-hv_sock/20160715-223433 >

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

2016-07-19 Thread Dexuan Cui
> From: David Miller [mailto:da...@davemloft.net] > >> From: kbuild test robot [mailto:l...@intel.com] > >> [auto build test WARNING on net-next/master] > >> > >> url:https://github.com/0day-ci/linux/commits/Dexuan-Cui/introduce- > >> Hyper-

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

2016-07-22 Thread Dexuan Cui
re. :-( 3) remove the per-connection static send/recv buffers Instead, we allocate 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 Changes si

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

2016-07-22 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 Cc: "K. Y. Srinivasan" Cc: Haiyang Zhang Cc: Vitaly Kuznetsov Cc: Cathy Avery Cc: Olaf Hering --- You can also get the patch by

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

2016-07-25 Thread Dexuan Cui
> From: David Miller [mailto:da...@davemloft.net] > > From: Dexuan Cui > Date: Sat, 23 Jul 2016 01:35:51 + > > > +static struct sock *hvsock_create(struct net *net, struct socket *sock, > > + gfp_t priority, unsigned short type) > &

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

2016-07-25 Thread Dexuan Cui
> From: David Miller [mailto:da...@davemloft.net] > ... > From: Dexuan Cui > Date: Tue, 26 Jul 2016 03:09:16 + > > > BTW, during the past month, at least 7 other people also reviewed > > the patch and gave me quite a few good comments, which have > > been ad

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

2016-07-26 Thread Dexuan Cui
> From: devel [mailto:driverdev-devel-boun...@linuxdriverproject.org] On > Behalf Of Dexuan Cui > ... > > From: David Miller [mailto:da...@davemloft.net] > > ... > > From: Dexuan Cui > > Date: Tue, 26 Jul 2016 03:09:16 + > > > > > BTW, dur

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

2016-07-26 Thread Dexuan Cui
> From: Michal Kubecek [mailto:mkube...@suse.cz] > Sent: Tuesday, July 26, 2016 17:57 > ... > On Tue, Jul 26, 2016 at 07:09:41AM +0000, Dexuan Cui wrote: > > ... I don't think Michal > > Kubecek was suggesting I build my code using the existing AF_VSOCK > > cod

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

2016-07-27 Thread Dexuan Cui
> From: netdev-ow...@vger.kernel.org [mailto:netdev- > ow...@vger.kernel.org] On Behalf Of Dexuan Cui > Sent: Tuesday, July 26, 2016 21:22 > ... > This is because, the design of AF_HYPERV in the Hyper-V host side is > suboptimal IMHO (the current host side design requires the lea

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

2016-07-27 Thread Dexuan Cui
> From: David Miller [mailto:da...@davemloft.net] > Sent: Wednesday, July 27, 2016 1:45 > To: Dexuan Cui > > From: Dexuan Cui > Date: Tue, 26 Jul 2016 07:09:41 + > > > I googled "S390 hypervisor socket" but didn't find anything related (I >

RE: [PATCH 1/2] hyperv: make mmio resource local

2016-08-22 Thread Dexuan Cui
t; -DEFINE_SEMAPHORE(hyperv_mmio_lock); > +static struct resource *hyperv_mmio; > +static DEFINE_SEMAPHORE(hyperv_mmio_lock); > > static int vmbus_exists(void) > { > -- I also found this and was trying to fix this. :-) Reviewed-by: Dexuan Cui

RE: [PATCH 0/2] hyperv: minor cleanups

2016-08-22 Thread Dexuan Cui
> From: devel [mailto:driverdev-devel-boun...@linuxdriverproject.org] On Behalf > Of sthem...@exchange.microsoft.com > Sent: Tuesday, August 23, 2016 1:33 > To: KY Srinivasan ; Haiyang Zhang > > Cc: de...@linuxdriverproject.org; Stephen Hemminger > > Subject: [PATCH 0/2] hyperv: minor cleanups >

RE: [PATCH 2/2] hv_pci: make hv_irq functions static

2016-08-22 Thread Dexuan Cui
id hv_irq_mask(struct irq_data *data) > * is built out of this PCI bus's instance GUID and the function > * number of the device. > */ > -void hv_irq_unmask(struct irq_data *data) > +static void hv_irq_unmask(struct irq_data *data) > { > str

[PATCH 0/5] PCI: hv: some minor bug fixes and cleanups

2016-08-22 Thread Dexuan Cui
1. use zero-length array to make the code more readable. 2. remove an unused struct member. 3. small error handling improvement to some error cases. Dexuan Cui (5): PCI: hv: use zero-length message in struct pci_packet PCI: hv: use pci_function_description[0] in struct definitions PCI: hv

[PATCH 1/5] PCI: hv: use zero-length array in struct pci_packet

2016-08-22 Thread Dexuan Cui
And, rename struct pci_message's field "message_type" to "type. This makes the code more readable. No functionality change. Cc: Jake Oshins Cc: K. Y. Srinivasan Cc: Haiyang Zhang Cc: Vitaly Kuznetsov Signed-off-by: Dexuan Cui --- drivers/pci/ho

[PATCH 2/5] PCI: hv: use pci_function_description[0] in struct definitions

2016-08-22 Thread Dexuan Cui
The 2 structs can use a zero-length array here, because dynamic memory of the correct size is allocated in hv_pci_devices_present() and we don't need this extra element. No functional change. Cc: Jake Oshins Cc: K. Y. Srinivasan Cc: Haiyang Zhang Cc: Vitaly Kuznetsov Signed-off-by: D

[PATCH 3/5] PCI: hv: remove the unused 'wrk' in struct hv_pcibus_device

2016-08-22 Thread Dexuan Cui
The member is not used. Cc: Jake Oshins Cc: K. Y. Srinivasan Cc: Haiyang Zhang Cc: Vitaly Kuznetsov Signed-off-by: Dexuan Cui --- drivers/pci/host/pci-hyperv.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/pci/host/pci-hyperv.c b/drivers/pci/host/pci-hyperv.c index cdbadea5

[PATCH 4/5] PCI: hv: hv_compose_msi_msg: handle the 'ret' value

2016-08-22 Thread Dexuan Cui
I happened to find this when reading the code. I didn't get a real issue however. Cc: Jake Oshins Cc: K. Y. Srinivasan Cc: Haiyang Zhang Cc: Vitaly Kuznetsov Signed-off-by: Dexuan Cui --- drivers/pci/host/pci-hyperv.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff

[PATCH 5/5] PCI: hv: hv_pci_generic_compl(): handle the error case

2016-08-22 Thread Dexuan Cui
uznetsov Signed-off-by: Dexuan Cui --- drivers/pci/host/pci-hyperv.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/pci/host/pci-hyperv.c b/drivers/pci/host/pci-hyperv.c index f337239..a93bd5d 100644 --- a/drivers/pci/host/pci-hyperv.c +++ b/drivers/pci/host/pci-hyper

RE: [PATCH 0/5] PCI: hv: some minor bug fixes and cleanups

2016-09-06 Thread Dexuan Cui
> From: Bjorn Helgaas [mailto:helg...@kernel.org] > Sent: Wednesday, September 7, 2016 1:25 > To: Dexuan Cui > Cc: Bjorn Helgaas ; linux-...@vger.kernel.org; > gre...@linuxfoundation.org; KY Srinivasan ; linux- > ker...@vger.kernel.org; de...@linuxdriverproject.org; o

RE: [PATCH 2/2] pci-hyperv: properly handle device eject

2016-09-13 Thread Dexuan Cui
> From: devel [mailto:driverdev-devel-boun...@linuxdriverproject.org] On Behalf > Of Long Li > Sent: Tuesday, September 13, 2016 7:54 > ... > A PCI_EJECT message can arrive at the same time we are calling > pci_scan_child_bus in the workqueue for the previous PCI_BUS_RELATIONS > message, in this ca

<    1   2   3   4   5   6   >