Re: [Xen-devel] [PATCH net-next] xen-netfront: avoid packet loss when ethernet header crosses page boundary

2016-08-23 Thread Vitaly Kuznetsov
David Vrabel writes: > On 22/08/16 16:42, Vitaly Kuznetsov wrote: >> >> I see two ways to fix the issue: >> - Change the 'wire' protocol between netfront and netback to start keeping >> the original SKB structure. We'll have to add a flag indicating

Re: [Xen-devel] [PATCH net-next] xen-netfront: avoid packet loss when ethernet header crosses page boundary

2016-08-29 Thread Vitaly Kuznetsov
Vitaly Kuznetsov writes: > David Vrabel writes: > >> On 22/08/16 16:42, Vitaly Kuznetsov wrote: >>> >>> I see two ways to fix the issue: >>> - Change the 'wire' protocol between netfront and netback to start keeping >>> the original S

Re: [Xen-devel] [PATCH net-next] xen-netfront: avoid packet loss when ethernet header crosses page boundary

2016-09-09 Thread Vitaly Kuznetsov
Vitaly Kuznetsov writes: > Vitaly Kuznetsov writes: > >> David Vrabel writes: >> >>> On 22/08/16 16:42, Vitaly Kuznetsov wrote: >>>> >>>> I see two ways to fix the issue: >>>> - Change the 'wire' protocol between netfr

Re: [PATCH net-next] xen-netfront: avoid packet loss when ethernet header crosses page boundary

2016-09-12 Thread Vitaly Kuznetsov
David Vrabel writes: > On 22/08/16 16:42, Vitaly Kuznetsov wrote: >> Small packet loss is reported on complex multi host network configurations >> including tunnels, NAT, ... My investigation led me to the following check >> in netback which drops packets: >> >>

[PATCH net-next] hv_netvsc: fix a race between netvsc_send() and netvsc_init_buf()

2016-10-19 Thread Vitaly Kuznetsov
c_send(). Signed-off-by: Vitaly Kuznetsov --- drivers/net/hyperv/netvsc.c | 7 +++ 1 file changed, 7 insertions(+) diff --git a/drivers/net/hyperv/netvsc.c b/drivers/net/hyperv/netvsc.c index 720b5fa..e2bfaac 100644 --- a/drivers/net/hyperv/netvsc.c +++ b/drivers/net/hyperv/netvsc.c

Re: [PATCH net-next] hv_netvsc: fix a race between netvsc_send() and netvsc_init_buf()

2016-10-20 Thread Vitaly Kuznetsov
e locking, if we read stale NULL value after it was already updated on a different CPU we're fine, we'll just return -EAGAIN. > -Original Message- > From: Vitaly Kuznetsov [mailto:vkuzn...@redhat.com] > Sent: Wednesday, October 19, 2016 2:53 PM > To: netdev@v

Re: [PATCH net-next] hv_netvsc: fix a race between netvsc_send() and netvsc_init_buf()

2016-10-21 Thread Vitaly Kuznetsov
David Miller writes: > From: Vitaly Kuznetsov > Date: Thu, 20 Oct 2016 10:51:04 +0200 > >> Stephen Hemminger writes: >> >>> Do we need ACCESS_ONCE() here to avoid check/use issues? >>> >> >> I think we don't: this is the only place in

Re: [PATCH net-next] hv_netvsc: fix a race between netvsc_send() and netvsc_init_buf()

2016-10-21 Thread Vitaly Kuznetsov
David Miller writes: > From: Vitaly Kuznetsov > Date: Fri, 21 Oct 2016 13:15:53 +0200 > >> David Miller writes: >> >>> From: Vitaly Kuznetsov >>> Date: Thu, 20 Oct 2016 10:51:04 +0200 >>> >>>> Stephen Hemminger writes: >>

Re: [PATCH net-next] net/hyperv: remove use of VLAN_TAG_PRESENT

2017-01-04 Thread Vitaly Kuznetsov
Michał Mirosław writes: > Signed-off-by: Michał Mirosław Can we have a non-empty description please? > --- > drivers/net/hyperv/hyperv_net.h | 2 +- > drivers/net/hyperv/netvsc_drv.c | 13 ++--- > drivers/net/hyperv/rndis_filter.c | 4 ++-- > 3 files changed, 9 insertions(+), 10

[PATCH net-next] hv_netvsc: remove excessive logging on MTU change

2016-11-28 Thread Vitaly Kuznetsov
00:15:5d:1e:91:12 link state up This information is useful as debug at most. Signed-off-by: Vitaly Kuznetsov --- drivers/net/hyperv/netvsc.c | 8 drivers/net/hyperv/rndis_filter.c | 6 +++--- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/drivers/net/hyperv/netvsc.c

[PATCH net 1/4] hv_netvsc: don't lose VF information

2016-08-11 Thread Vitaly Kuznetsov
struct netvsc_device is not suitable for storing VF information as this structure is being destroyed on MTU change / set channel operation (see rndis_filter_device_remove()). Move all VF related stuff to struct net_device_context which is persistent. Signed-off-by: Vitaly Kuznetsov --- drivers

[PATCH net 0/4] hv_netvsc: fixes for VF removal path

2016-08-11 Thread Vitaly Kuznetsov
Kernel crash is reported after VF is removed and detached from netvsc device. My investigation led me to PATCH2 of this series but PATCH1 is required to support the change. I also noticed a couple of other issues while debugging and I fix them with PATCH3 and PATCH4. Please review. Vitaly

[PATCH net 2/4] hv_netvsc: reset vf_inject on VF removal

2016-08-11 Thread Vitaly Kuznetsov
We reset vf_inject on VF going down (netvsc_vf_down()) but we don't on VF removal (netvsc_unregister_vf()) so vf_inject stays 'true' while vf_netdev is already NULL and we're trying to inject packets into NULL net device in netvsc_recv_callback() causing kernel to crash. S

[PATCH net 4/4] hv_netvsc: avoid deadlocks between rtnl lock and netvsc_inject_disable()

2016-08-11 Thread Vitaly Kuznetsov
zero. Instead of introducing additional synchronization I suggest we drop gwrk.dwrk completely and call NETDEV_NOTIFY_PEERS directly. As we're acting under rtnl lock this is legitimate. Signed-off-by: Vitaly Kuznetsov --- drivers/net/hyperv/hyperv_net.h | 7 --- drivers/net/h

[PATCH net 3/4] hv_netvsc: protect module refcount by checking net_device_ctx->vf_netdev

2016-08-11 Thread Vitaly Kuznetsov
We're not guaranteed to see NETDEV_REGISTER/NETDEV_UNREGISTER notifications only once per VF but we increase/decrease module refcount unconditionally. Check vf_netdev to make sure we don't take/release it twice. We presume that only one VF per netvsc device may exist. Signed-off-

Re: [PATCH net 2/4] hv_netvsc: reset vf_inject on VF removal

2016-08-11 Thread Vitaly Kuznetsov
Yuval Mintz writes: >> +static void netvsc_inject_enable(struct net_device_context >> +*net_device_ctx) { >> +net_device_ctx->vf_inject = true; >> +} >> + >> +static void netvsc_inject_disable(struct net_device_context >> +*net_device_ctx) { >> +net_device_ctx->vf_inject = false; >> + >>

Re: [RFC 2/2] netvsc: use RCU for VF net device reference

2016-08-15 Thread Vitaly Kuznetsov
Stephen Hemminger writes: > Rather than keeping a pointer, a flag, and reference count, use RCU and > existing > device reference count to protect the synthetic to VF relationship. Thanks! I like the idea. Some nitpicks below ... > > One other change is that injected packets must be accounted

[PATCH net v2 2/5] hv_netvsc: avoid deadlocks between rtnl lock and vf_use_cnt wait

2016-08-15 Thread Vitaly Kuznetsov
nd call NETDEV_NOTIFY_PEERS directly. As we're acting under rtnl lock this is legitimate. Signed-off-by: Vitaly Kuznetsov Acked-by: Haiyang Zhang --- Changes since v1: - Move the patch ahead in the series to avoid introducing new blocking issues and solving them later in the series. [

[PATCH net v2 3/5] hv_netvsc: reset vf_inject on VF removal

2016-08-15 Thread Vitaly Kuznetsov
We reset vf_inject on VF going down (netvsc_vf_down()) but we don't on VF removal (netvsc_unregister_vf()) so vf_inject stays 'true' while vf_netdev is already NULL and we're trying to inject packets into NULL net device in netvsc_recv_callback() causing kernel to crash. S

[PATCH net v2 5/5] hv_netvsc: fix bonding devices check in netvsc_netdev_event()

2016-08-15 Thread Vitaly Kuznetsov
: Vitaly Kuznetsov --- drivers/net/hyperv/netvsc_drv.c | 9 +++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/drivers/net/hyperv/netvsc_drv.c b/drivers/net/hyperv/netvsc_drv.c index 62a4e6e..3ba29fc 100644 --- a/drivers/net/hyperv/netvsc_drv.c +++ b/drivers/net/hyperv

[PATCH net v2 0/5] hv_netvsc: fixes for VF removal path

2016-08-15 Thread Vitaly Kuznetsov
ght thing to do long-term, we can either put this on top of this series or do it later in net-next. Vitaly Kuznetsov (5): hv_netvsc: don't lose VF information hv_netvsc: avoid deadlocks between rtnl lock and vf_use_cnt wait hv_netvsc: reset vf_inject on VF removal hv_netvsc: protec

[PATCH net v2 1/5] hv_netvsc: don't lose VF information

2016-08-15 Thread Vitaly Kuznetsov
struct netvsc_device is not suitable for storing VF information as this structure is being destroyed on MTU change / set channel operation (see rndis_filter_device_remove()). Move all VF related stuff to struct net_device_context which is persistent. Signed-off-by: Vitaly Kuznetsov Acked-by

[PATCH net v2 4/5] hv_netvsc: protect module refcount by checking net_device_ctx->vf_netdev

2016-08-15 Thread Vitaly Kuznetsov
We're not guaranteed to see NETDEV_REGISTER/NETDEV_UNREGISTER notifications only once per VF but we increase/decrease module refcount unconditionally. Check vf_netdev to make sure we don't take/release it twice. We presume that only one VF per netvsc device may exist. Signed-off-

[PATCH net-next] xen-netfront: avoid packet loss when ethernet header crosses page boundary

2016-08-22 Thread Vitaly Kuznetsov
erable short-term and shouldn't bring significant performance degradation as such packets are rare. That's what this patch is trying to achieve with skb_copy(). Signed-off-by: Vitaly Kuznetsov --- drivers/net/xen-netfront.c | 14 ++ 1 file changed, 14 insertions(+) d

[PATCH] xen-netfront: avoid crashing on resume after a failure in talk_to_netback()

2017-05-04 Thread Vitaly Kuznetsov
again after resume. Reset drvdata in netback_changed() the same way we reset it in netfront_probe() and check for NULL in both netfront_resume() and netback_changed() to properly handle the situation. Signed-off-by: Vitaly Kuznetsov --- I apologize for sending this during the merge window, I'

Re: [PATCH] xen-netfront: avoid crashing on resume after a failure in talk_to_netback()

2017-05-05 Thread Vitaly Kuznetsov
David Miller writes: > From: Vitaly Kuznetsov > Date: Thu, 4 May 2017 14:23:04 +0200 > >> Unavoidable crashes in netfront_resume() and netback_changed() after a >> previous fail in talk_to_netback() (e.g. when we fail to read MAC from >> xenstore) were disc

[PATCH v2] xen-netfront: avoid crashing on resume after a failure in talk_to_netback()

2017-05-11 Thread Vitaly Kuznetsov
after resume. Fix the bug by removing the whole xen device completely with device_unregister(), this guarantees we won't have any calls into netfront after a failure. Signed-off-by: Vitaly Kuznetsov --- Changes since v1: instead of cleaning drvdata and checking for it in netfront_re

Re: [RFC PATCH 1/12] x86/Hyper-V: Add visibility parameter for vmbus_establish_gpadl()

2021-03-03 Thread Vitaly Kuznetsov
Tianyu Lan writes: > From: Tianyu Lan > > Add visibility parameter for vmbus_establish_gpadl() and prepare > to change host visibility when create gpadl for buffer. > "No functional change" as you don't actually use the parameter. > Signed-off-by: Sunil Muthuswamy > Co-Developed-by: Sunil Mut

Re: [RFC PATCH 2/12] x86/Hyper-V: Add new hvcall guest address host visibility support

2021-03-03 Thread Vitaly Kuznetsov
Tianyu Lan writes: > From: Tianyu Lan > > Add new hvcall guest address host visibility support. Mark vmbus > ring buffer visible to host when create gpadl buffer and mark back > to not visible when tear down gpadl buffer. > > Signed-off-by: Sunil Muthuswamy > Co-Developed-by: Sunil Muthuswamy

Re: [PATCH net-next] hv_netvsc: Add error handling while switching data path

2021-03-30 Thread Vitaly Kuznetsov
Haiyang Zhang writes: > Add error handling in case of failure to send switching data path message > to the host. > > Reported-by: Shachar Raindel > Signed-off-by: Haiyang Zhang > > --- > drivers/net/hyperv/hyperv_net.h | 6 +- > drivers/net/hyperv/netvsc.c | 35 +++

<    1   2