[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 --- drivers/net/hyperv/rndis_filter.c | 2 +- 1 file changed, 1 insertion(+), 1 deletio

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 wrote: > > > On older windows hosts the net_device instance is returned to > > the caller of rndis_filter_device_add() without having the presence > > bit

[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 --- drivers/net/hyperv/rndis_filter.c | 4 +++- 1 file

[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 --- drivers/net/hyperv/netvsc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff

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

2018-04-05 Thread Mohammed Gamal
/1/23/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

[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 --- 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..f4df5de 100644 --- a/d

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

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

[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 --- drivers/net/hyperv/netvsc.c | 37

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 wrote: > > > > > Dring high network traffic changes to network interface > >

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 wrote: > > > Dring high network traffic changes to network interface parameters > > such as number of channels or MTU can cause a kernel panic with a > > N

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

2018-03-13 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

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

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 wrote: > > > > > On Tue, 2018-01-30 at 11:29 -0800, Stephen Hemminger wrote: > > &g

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 wrote: > > > On Tue, 2018-01-30 at 11:29 -0800, Stephen Hemminger wrote: > > > On Tue, 23 Jan 2018 10:34:04 +0100 > > > Mohammed Gamal wrote: &

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 wrote: > > > Split each of the functions into two for each of send/recv buffers > > > > Signed-off-by: Mohammed Gamal > > Splitting these funct

[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 --- drivers/net/hyperv/netvsc.c | 19 +-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/drivers/net/hyperv/netvsc.c b/drivers/net/hyperv/netvsc.c ind

[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 --- drivers/net/hyperv/netvsc.c | 35 +++ 1 file changed, 27 insertions(+), 8 deletions(-) diff --git a/drivers/net/hyperv/netvsc.c b/drivers/net/hyperv/netvsc.c

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

2018-01-23 Thread Mohammed Gamal
or tearing 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 earlie

[PATCH] vmxnet3: Use correct minimum MTU value

2017-10-17 Thread Mohammed Gamal
ich is compatible with is according to spec. Reported-by: Bo Yang Signed-off-by: Mohammed Gamal --- drivers/net/vmxnet3/vmxnet3_defs.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/vmxnet3/vmxnet3_defs.h b/drivers/net/vmxnet3/vmxnet3_defs.h index c3a3164..4ad905a

[PATCH] xen-netfront, xen-netback: Use correct minimum MTU values

2017-10-16 Thread Mohammed Gamal
this value which causes network problems. Reported-by: Chen Shi Signed-off-by: Mohammed Gamal --- drivers/net/xen-netback/interface.c | 2 +- drivers/net/xen-netfront.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/net/xen-netback/interface.c b/drivers