Re: [PATCH] uio_hv_generic: set callbacks on open

2018-12-17 Thread Mohammed Gamal
ixes: cdfa835c6e5e ("uio_hv_generic: defer opening vmbus until first > use") > Reported-by: Mohammed Gamal > Signed-off-by: Stephen Hemminger > --- >  drivers/uio/uio_hv_generic.c | 7 +++ >  1 file changed, 3 insertions(+), 4 deletions(-) > > diff

Re: [PATCH] hv_netvsc: Make sure out channel is fully opened on send

2018-09-27 Thread Mohammed Gamal
On Thu, 2018-09-27 at 12:23 +0200, Stephen Hemminger wrote: > On Thu, 27 Sep 2018 10:57:05 +0200 > Mohammed Gamal wrote: > > > On Wed, 2018-09-26 at 17:13 +, Haiyang Zhang wrote: > > > > -Original Message----- > > > > From: Mohammed Gamal > &g

Re: [PATCH] hv_netvsc: Make sure out channel is fully opened on send

2018-09-27 Thread Mohammed Gamal
On Wed, 2018-09-26 at 17:13 +, Haiyang Zhang wrote: > > -Original Message- > > From: Mohammed Gamal > > Sent: Wednesday, September 26, 2018 12:34 PM > > To: Stephen Hemminger ; netdev@vger.kernel. > > org > > Cc: KY Srinivasan ; Haiyang Zhang &

[PATCH] hv_netvsc: Make sure out channel is fully opened on send

2018-09-26 Thread Mohammed Gamal
() before they're allocated on calling netvsc_device_add() The patch fixes this problem by checking the channel state and returning ENODEV if not yet opened. We also move the call to hv_ringbuf_avail_percent() which may access the uninitialized ring buffer. Signed-off-by: Mohammed Gamal

[PATCH v2] hv_netvsc: Fix net device attach on older Windows hosts

2018-05-09 Thread Mohammed Gamal
-ENODEV. Instead of returning the device instabce, we take the exit path where we call netif_device_attach() Fixes: 7b2ee50c0cd5 ("hv_netvsc: common detach logic") Signed-off-by: Mohammed Gamal <mga...@redhat.com> --- drivers/net/hyperv/rndis_filter.c | 2 +- 1 file changed, 1

Re: [PATCH] hv_netvsc: Fix net device attach on older Windows hosts

2018-05-08 Thread Mohammed Gamal
On Tue, 2018-05-08 at 11:13 -0700, Stephen Hemminger wrote: > On Tue,  8 May 2018 19:40:47 +0200 > Mohammed Gamal <mga...@redhat.com> wrote: > > > On older windows hosts the net_device instance is returned to > > the caller of rndis_filter_device_add() without havi

[PATCH] hv_netvsc: Fix net device attach on older Windows hosts

2018-05-08 Thread Mohammed Gamal
-ENODEV. Make sure we explicitly call netif_device_attach() before returning the net_device instance to make sure the presence bit is set Fixes: 7b2ee50c0cd5 ("hv_netvsc: common detach logic") Signed-off-by: Mohammed Gamal <mga...@redhat.com> --- drivers/net/hyperv/rndis_filt

[PATCH 4/4] hv_netvsc: Pass net_device parameter to revoke and teardown functions

2018-04-05 Thread Mohammed Gamal
The callers to netvsc_revoke_*_buf() and netvsc_teardown_*_gpadl() already have their net_device instances. Pass them as a paramaeter to the function instead of obtaining them from netvsc_device struct everytime Signed-off-by: Mohammed Gamal <mga...@redhat.com> --- drivers/net/hyperv/ne

[PATCH 0/4] hv_netvsc: Fix shutdown issues on older Windows hosts

2018-04-05 Thread Mohammed Gamal
/111 on top of latest upstream Fixes: 0ef58b0a05c1 ("hv_netvsc: change GPAD teardown order on older versions") Mohammed Gamal (4): hv_netvsc: Use Windows version instead of NVSP version on GPAD teardown hv_netvsc: Split netvsc_revoke_buf() and netvsc_teardown_gpadl() hv_netv

[PATCH 3/4] hv_netvsc: Ensure correct teardown message sequence order

2018-04-05 Thread Mohammed Gamal
ioned message sequence for older hosts Fixes: 0ef58b0a05c1 ("hv_netvsc: change GPAD teardown order on older versions") Signed-off-by: Mohammed Gamal <mga...@redhat.com> --- drivers/net/hyperv/netvsc.c | 19 +-- 1 file changed, 13 insertions(+), 6 deletions(-)

[PATCH 2/4] hv_netvsc: Split netvsc_revoke_buf() and netvsc_teardown_gpadl()

2018-04-05 Thread Mohammed Gamal
older versions") Signed-off-by: Mohammed Gamal <mga...@redhat.com> --- drivers/net/hyperv/netvsc.c | 46 + 1 file changed, 34 insertions(+), 12 deletions(-) diff --git a/drivers/net/hyperv/netvsc.c b/drivers/net/hyperv/netvsc.c index d65b7fc

[PATCH 1/4] hv_netvsc: Use Windows version instead of NVSP version on GPAD teardown

2018-04-05 Thread Mohammed Gamal
ith WS2016 guests. Hence we use Windows version directly to differentiate them. Fixes: 0ef58b0a05c12 ("hv_netvsc: change GPAD teardown order on older versions") Signed-off-by: Mohammed Gamal <mga...@redhat.com> --- drivers/net/hyperv/netvsc.c | 4 ++-- 1 file changed, 2 insertion

Re: [PATCH] hv_netvsc: Make sure out channel is fully opened on send

2018-03-15 Thread Mohammed Gamal
On Wed, 2018-03-14 at 10:22 +0100, Mohammed Gamal wrote: > On Tue, 2018-03-13 at 12:35 -0700, Stephen Hemminger wrote: > > On Tue, 13 Mar 2018 20:06:50 +0100 > > Mohammed Gamal <mga...@redhat.com> wrote: > > > > > Dring high network traffic changes t

Re: [PATCH] hv_netvsc: Make sure out channel is fully opened on send

2018-03-14 Thread Mohammed Gamal
On Tue, 2018-03-13 at 12:35 -0700, Stephen Hemminger wrote: > On Tue, 13 Mar 2018 20:06:50 +0100 > Mohammed Gamal <mga...@redhat.com> wrote: > > > Dring high network traffic changes to network interface parameters > > such as number of channels or MTU can cause a k

[PATCH net-next] hv_netvsc: Correct filter setting for multicast/broadcast

2018-03-09 Thread Mohammed Gamal
Commit 009f766 intended to filter multicast/broadcast, however the NDIS filter wasn't set properly in non-promiscuous modes, which resulted in issues like DHCP timeouts. This patch sets the filter flags correctly. Fixes: 009f766 ("hv_netvsc: filter multicast/broadcast") Signed-off-by

Re: [RFC PATCH 1/2] hv_netvsc: Split netvsc_revoke_buf() and netvsc_teardown_gpadl()

2018-02-01 Thread Mohammed Gamal
On Thu, 2018-02-01 at 09:37 +0100, Mohammed Gamal wrote: > On Wed, 2018-01-31 at 15:01 -0800, Stephen Hemminger wrote: > > On Wed, 31 Jan 2018 12:16:49 +0100 > > Mohammed Gamal <mga...@redhat.com> wrote: > > > > > On Tue, 2018-01-30 at 11:29 -0800, Stephen Hem

Re: [RFC PATCH 1/2] hv_netvsc: Split netvsc_revoke_buf() and netvsc_teardown_gpadl()

2018-02-01 Thread Mohammed Gamal
On Wed, 2018-01-31 at 15:01 -0800, Stephen Hemminger wrote: > On Wed, 31 Jan 2018 12:16:49 +0100 > Mohammed Gamal <mga...@redhat.com> wrote: > > > On Tue, 2018-01-30 at 11:29 -0800, Stephen Hemminger wrote: > > > On Tue, 23 Jan 2018 10:34:04 +0100 > > > M

Re: [RFC PATCH 1/2] hv_netvsc: Split netvsc_revoke_buf() and netvsc_teardown_gpadl()

2018-01-31 Thread Mohammed Gamal
On Tue, 2018-01-30 at 11:29 -0800, Stephen Hemminger wrote: > On Tue, 23 Jan 2018 10:34:04 +0100 > Mohammed Gamal <mga...@redhat.com> wrote: > > > Split each of the functions into two for each of send/recv buffers > > > > Signed-off-by: Mohammed Gamal &

[RFC PATCH 0/2] hv_netvsc: Fix shutdown regression on Win2012 hosts

2018-01-23 Thread Mohammed Gamal
aring down send and receive buffers individally. The second patch uses the finer grained functions to implement the teardown sequence according to the host's version. We keep the behavior introduced in 0cf737808ae7 for Windows 2016 hosts, while we re-introduce the old sequence for earlier verions.

[RFC PATCH 2/2] hv_netvsc: Change GPADL teardown order according to Hyper-V version

2018-01-23 Thread Mohammed Gamal
2016 hosts, while keeping the changes from 0cf7378 for Win2016 and higher hosts. Signed-off-by: Mohammed Gamal <mga...@redhat.com> --- drivers/net/hyperv/netvsc.c | 19 +-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/drivers/net/hyperv/netvsc.c b/dr

[RFC PATCH 1/2] hv_netvsc: Split netvsc_revoke_buf() and netvsc_teardown_gpadl()

2018-01-23 Thread Mohammed Gamal
Split each of the functions into two for each of send/recv buffers Signed-off-by: Mohammed Gamal <mga...@redhat.com> --- drivers/net/hyperv/netvsc.c | 35 +++ 1 file changed, 27 insertions(+), 8 deletions(-) diff --git a/drivers/net/hyperv/netvsc.c b/drive

Re: [PATCH] netvsc: Remove redundant use of ipv6_hdr()

2017-07-19 Thread Mohammed Gamal
- Original Message - > On Wed, 19 Jul 2017 15:19:28 +0200 > Mohammed Gamal <mga...@redhat.com> wrote: > > > This condition already uses an object of type ipv6hdr in the line above. > > Use the object directly instead of calling ipv6_hdr > > >

[PATCH] netvsc: Remove redundant use of ipv6_hdr()

2017-07-19 Thread Mohammed Gamal
This condition already uses an object of type ipv6hdr in the line above. Use the object directly instead of calling ipv6_hdr Signed-off-by: Mohammed Gamal <mga...@redhat.com> --- drivers/net/hyperv/netvsc_drv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drive