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 +++
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
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
Haiyang Zhang writes:
> From: Haiyang Zhang
>
> This patch adds range checking for rx packet offset and length.
> It may only happen if there is a host side bug.
>
> Signed-off-by: Haiyang Zhang
> ---
> drivers/net/hyperv/hyperv_net.h | 1 +
> drivers/net/hyperv/netvsc.c | 17
Stephen Hemminger writes:
> These patches change how teardown of Hyper-V network devices
> is done. These are tested on WS2012 and WS2016.
>
> It moves the tx/rx shutdown into the rndis close handling,
> and that makes earlier gpadl changes unnecsssary.
>
Thank you Stephen,
I gave these a try a
David Miller writes:
> From: "Samudrala, Sridhar"
> Date: Tue, 19 Dec 2017 09:41:39 -0800
>
>> This is based on netvsc implementation and here is the commit that
>> added this delay. Not sure if this needs to be 100ms.
>>
>> commit 6123c66854c174e4982f98195100c1d990f9e5e6
>> Author: stephen he
life I guess but let's be consistent).
Signed-off-by: Vitaly Kuznetsov
---
Changes since v1: call rndis_netdev_set_hwcaps() unconditionally; clear
net->hw_features flags we set and set them again based on host's data.
Clear missing features from net->features.
Unfo
Haiyang Zhang writes:
>> -Original Message-
>> From: Vitaly Kuznetsov [mailto:vkuzn...@redhat.com]
>> Sent: Tuesday, November 14, 2017 11:58 AM
>> To: Stephen Hemminger
>> Cc: netdev@vger.kernel.org; linux-ker...@vger.kernel.org;
>> de...@linuxdriver
Stephen Hemminger writes:
> On Tue, 14 Nov 2017 16:22:05 +0100
> Vitaly Kuznetsov wrote:
>
> Yes, this looks like a real issue.
>
>> +/* Query hardware capabilities if we're called from netvsc_probe() */
>> +if (!net->hw_features) {
>> +
additional flags which are set outside
of the driver, e.g. register_netdevice() adds NETIF_F_SOFT_FEATURES and
many others.
Fill hw_features in only when we're called from netvsc_probe() and
hw_features is empty.
Signed-off-by: Vitaly Kuznetsov
---
drivers/net/hyperv/rndis_filter.c
Stephen Hemminger writes:
>
> The NAPI disable is already handled by rndis close.
Sorry, but I'm probably missing something: I can only see
netif_napi_del() call in netvsc_device_remove() but this happens much
later. And I don see us doing napi_disable() anywhere on the path.
But I'm probably mi
Stephen Hemminger writes:
> Several types of control operations require that the underlying RNDIS
> infrastructure be restarted. This patch changes the ordering of the
> shutdown to avoid race conditions.
> Stop all transmits before doing RNDIS halt. This involves stopping the
> network device tr
Stephen Hemminger writes:
> On Nov 2, 2017 19:35, "Vitaly Kuznetsov" wrote:
>
> Hyper-V hosts are known to send RNDIS messages even after we halt the
> device in rndis_filter_halt_device(). Remove user visible messages
> as they are not really useful.
>
>
d messages.
Changes since v1:
- Throw away patches 2 and 3 of the original series as one is unneeded and
the other is not justified [Eric Dumazet, Stephen Hemminger] so I'm only
fixing the hang now, the crash doesn't reproduce. Will keep an eye on it.
Vitaly Kuznetsov (2):
hv_netvsc: n
Hyper-V hosts are known to send RNDIS messages even after we halt the
device in rndis_filter_halt_device(). Remove user visible messages
as they are not really useful.
Signed-off-by: Vitaly Kuznetsov
---
drivers/net/hyperv/rndis_filter.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions
reliably.
Signed-off-by: Vitaly Kuznetsov
---
drivers/net/hyperv/netvsc.c | 69 +++--
1 file changed, 36 insertions(+), 33 deletions(-)
diff --git a/drivers/net/hyperv/netvsc.c b/drivers/net/hyperv/netvsc.c
index 5bb6a20072dd..bfc79698b8f4 100644
--- a/drivers
Vitaly Kuznetsov writes:
>
> Ok, I may have missed something. I'll try reproducing the crash and
> finding a better fine-grained solution.
>
It's been two days and I'm failing to reproduce the crash in
rndis_filter_receive() in my environment so I'll probably
Stephen Hemminger writes:
> On Tue, 31 Oct 2017 14:42:02 +0100
> Vitaly Kuznetsov wrote:
>
>> @@ -2002,7 +2002,9 @@ static int netvsc_probe(struct hv_device *dev,
>> device_info.recv_sections = NETVSC_DEFAULT_RX;
>> device_info.recv_section_size
David Miller writes:
> From: Vitaly Kuznetsov
> Date: Tue, 31 Oct 2017 15:40:06 +0100
>
>> Eric Dumazet writes:
>>
>>> On Tue, 2017-10-31 at 14:42 +0100, Vitaly Kuznetsov wrote:
>>>> RCU_INIT_POINTER() is not suitable here as it doesn't give
Eric Dumazet writes:
> On Tue, 2017-10-31 at 14:42 +0100, Vitaly Kuznetsov wrote:
>> RCU_INIT_POINTER() is not suitable here as it doesn't give us ordering
>> guarantees (see the comment in rcupdate.h). This is also not a hotpath.
>>
>> Signed-off-by: Vitaly K
reliably.
Signed-off-by: Vitaly Kuznetsov
---
drivers/net/hyperv/netvsc.c | 69 +++--
1 file changed, 36 insertions(+), 33 deletions(-)
diff --git a/drivers/net/hyperv/netvsc.c b/drivers/net/hyperv/netvsc.c
index 5bb6a20072dd..bfc79698b8f4 100644
--- a/drivers
RCU_INIT_POINTER() is not suitable here as it doesn't give us ordering
guarantees (see the comment in rcupdate.h). This is also not a hotpath.
Signed-off-by: Vitaly Kuznetsov
---
drivers/net/hyperv/netvsc.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/h
rndis_filter_receive() is called from interrupt context and may race with
rndis_filter_device_remove() resetting extension pointer. RNDIS_MSG_HALT
does not help, host may still send us messages after it. Protect extension
pointer with RCU.
Signed-off-by: Vitaly Kuznetsov
---
drivers/net/hyperv
Hyper-V hosts are known to send RNDIS messages even after we halt the
device in rndis_filter_halt_device(). Remove user visible messages
as they are not really useful.
Signed-off-by: Vitaly Kuznetsov
---
drivers/net/hyperv/rndis_filter.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions
ixing everything VMs seem to survive overnight
test. I'll send one more related patch to VMBus core too.
Vitaly Kuznetsov (4):
hv_netvsc: netvsc_teardown_gpadl() split
hv_netvsc: protect nvdev->extension with RCU
hv_netvsc: reset net_device_ctx->nvdev with rcu_assign_pointer()
We probably don't want to enable code supporting particular hardware by
default e.g. when someone does 'make defconfig'. Other ethernet modules
don't do it.
Signed-off-by: Vitaly Kuznetsov
---
drivers/net/ethernet/huawei/hinic/Kconfig | 1 -
1 file changed, 1 deletion(-)
Stephen Hemminger writes:
> On Thu, 10 Aug 2017 10:55:01 -0600
> David Ahern wrote:
>
>> On 8/10/17 10:48 AM, David Miller wrote:
>> > From: Andrew Lunn
>> > Date: Thu, 10 Aug 2017 18:27:22 +0200
>> >
>> >> On Thu, Aug 10, 2017 at 05:
Andrew Lunn writes:
> On Thu, Aug 10, 2017 at 05:24:55PM +0200, Vitaly Kuznetsov wrote:
>> Andrew Lunn writes:
>>
>> >> We are - rtnetlink_event() does the job. We, however, don't have a
>> >> special IFLA_EVENT_* for name change and end up with IFLA
Andrew Lunn writes:
>> We are - rtnetlink_event() does the job. We, however, don't have a
>> special IFLA_EVENT_* for name change and end up with IFLA_EVENT_NONE.
>
> What is in this event? Old and new name? Just the new name?
Basically, it's everything we know about the interface - type, index,
Eric Dumazet writes:
> On Thu, 2017-08-10 at 10:41 +0200, Vitaly Kuznetsov wrote:
>> Andrew Lunn writes:
>>
>> >> I understand the 'legacy' concern but at the same time we don't want to
>> >> have aftificial limitations too. Name chang
Andrew Lunn writes:
>> I understand the 'legacy' concern but at the same time we don't want to
>> have aftificial limitations too. Name change, in particular, doesn't
>> happen 'under the hood' -- someone privileged enough needs to request
>> the change.
>>
>> Can you think of any particular rea
吉藤英明 writes:
> 2017-08-09 19:42 GMT+09:00 Vitaly Kuznetsov :
>> What happens is: __netvsc_vf_setup() does dev_open() for the VF device and
>> the consecutive dev_change_name() fails with -EBUSY because of the
>> (dev->flags & IFF_UP) check. The history of this code
with -EBUSY because of the
(dev->flags & IFF_UP) check. The history of this code predates git so I
wasn't able to figure out when and why the check was added, everything
seems to work fine without it. dev_change_name() has only two call sites,
both hold rtnl_lock.
Signed-off-by: Vitaly K
Stephen Hemminger writes:
> The following would allow udev a chance at the device.
>
This would of course work but the approach is a bit hackish and can
still fail on a loaded system. Raising the pause interval would be an
option, but again, probably not the best one.
Let me try to send an RFC
Stephen Hemminger writes:
> On Tue, 08 Aug 2017 17:24:03 +0200
> Vitaly Kuznetsov wrote:
>
>> Stephen Hemminger writes:
>>
>> > On Tue, 08 Aug 2017 16:03:56 +0200
>> > Vitaly Kuznetsov wrote:
>> >
>> >> Stephen Hem
Stephen Hemminger writes:
> On Tue, 08 Aug 2017 16:03:56 +0200
> Vitaly Kuznetsov wrote:
>
>> Stephen Hemminger writes:
>>
>> > Previous fix was incomplete.
>> >
>>
>> Not really related to this patch series (which btw fixes my issue,
&
Stephen Hemminger writes:
> Previous fix was incomplete.
>
Not really related to this patch series (which btw fixes my issue,
thanks!), but I found one addition issue. Systemd fails to rename VF
interface:
kernel: mlx4_core 0002:00:02.0 eth2: joined to eth1
kernel: hv_netvsc 33b7a6f9-6736-451
Vitaly Kuznetsov writes:
> Vitaly Kuznetsov writes:
>
>> Stephen Hemminger writes:
>>
>>> With new transparent VF support, it is possible to get a deadlock
>>> when some of the deferred work is running and the unregister_vf
>>> is trying to ca
Vitaly Kuznetsov writes:
> Stephen Hemminger writes:
>
>> With new transparent VF support, it is possible to get a deadlock
>> when some of the deferred work is running and the unregister_vf
>> is trying to cancel the work element. The solution is to use
>> tryl
team device).
>
> Reported-by: Vitaly Kuznetsov
> Fixes: 0c195567a8f6 ("netvsc: transparent VF management")
> Signed-off-by: Stephen Hemminger
> ---
> drivers/net/hyperv/netvsc_drv.c | 12 ++--
> 1 file changed, 10 insertions(+), 2 deletions(-)
>
> diff --gi
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
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
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'
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
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
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:
>>
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
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
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
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
Acked-by: David Vrabel
---
- Changes since 'v2':
Move 'len' calculat
David Vrabel writes:
> On 19/09/16 11:22, Vitaly Kuznetsov wrote:
>> David Miller writes:
>>
>>> From: Vitaly Kuznetsov
>>> Date: Fri, 16 Sep 2016 12:59:14 +0200
>>>
>>>> @@ -595,6 +596,19 @@ static int xennet_start_xmit(struct sk_b
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
Acked-by: David Vrabel
---
- Changes since 'v1':
Recalculate 'len' a
David Miller writes:
> From: Vitaly Kuznetsov
> Date: Fri, 16 Sep 2016 12:59:14 +0200
>
>> @@ -595,6 +596,19 @@ static int xennet_start_xmit(struct sk_buff *skb,
>> struct net_device *dev)
>> offset = offset_in_page(skb->data);
>> len = skb_headlen
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
Acked-by: David Vrabel
---
- This is just a RESEND with David's ACK added.
---
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:
>>
>>
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
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
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
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
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
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-
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
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
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. [
: 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
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
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;
>> +
>>
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
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-
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
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
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
tps://msdn.microsoft.com/en-us/virtualization/hyperv_on_windows/develop/make_mgmt_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: Haiya
nd if the host screws things up there is no easy way to recover anyway.
Signed-off-by: Vitaly Kuznetsov
Acked-by: Haiyang Zhang
---
Changes since v2:
- Rebase to current net-next [David Miller]
Changes since v1 RFC:
- Non-RFC
- Restore (net_dev->num_sc_offered > 0) condition in
rndis_fi
David Miller writes:
> From: Vitaly Kuznetsov
> Date: Wed, 8 Jun 2016 19:17:41 +0200
>
>> I'm hitting 5 second timeout in rndis_filter_set_rss_param() while setting
>> RSS parameters for the device. When this happens we end up returning
>>
nd if the host screws things up there is no easy way to recover anyway.
Signed-off-by: Vitaly Kuznetsov
Acked-by: Haiyang Zhang
---
Changes since v1 RFC:
- Non-RFC
- Restore (net_dev->num_sc_offered > 0) condition in
rndis_filter_device_remove() as without it we may hang when there are no
Vitaly Kuznetsov writes:
> I'm hitting 5 second timeout in rndis_filter_set_rss_param() while setting
> RSS parameters for the device. When this happens we end up returning
> -ETIMEDOUT from the function and rndis_filter_device_add() falls back to
> setting
>
>
nd if the host screws things up there is no easy way to recover anyway.
Signed-off-by: Vitaly Kuznetsov
---
drivers/net/hyperv/netvsc.c | 14 +
drivers/net/hyperv/rndis_filter.c | 115 +-
2 files changed, 30 insertions(+), 99 deletions(-)
diff --git
We unpack 'struct net_device' in netvsc_set_mac_addr() to get to
'struct hv_device' pointer which we use in rndis_filter_set_device_mac()
to get back to 'struct net_device'.
Signed-off-by: Vitaly Kuznetsov
---
drivers/net/hyperv/hyperv_net.h | 2 +-
drivers
Both rndis_filter_open()/rndis_filter_close() use struct hv_device to
reach to struct netvsc_device only and all callers have it already.
While on it, rename net_device to nvdev in rndis_filter_open() as
net_device is misleading.
Signed-off-by: Vitaly Kuznetsov
---
drivers/net/hyperv
net_device_ctx is assigned in the very beginning of the function and 'net'
pointer doesn't change.
Signed-off-by: Vitaly Kuznetsov
---
drivers/net/hyperv/netvsc_drv.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/drivers/net/hyperv/netvsc_drv.c b/drivers/net/hyperv/net
need while their
callers already have the required information.
This is just a cleanup series with no functional changes intended. It
doesn't pretend to be complete, additional cleanup of other functions may
follow.
Vitaly Kuznetsov (5):
hv_netvsc: remove redundant assignment in netvsc_rec
Make it easier to get 'struct netvsc_device' from 'struct net_device' and
'struct hv_device' by introducing inline helpers.
Signed-off-by: Vitaly Kuznetsov
---
drivers/net/hyperv/hyperv_net.h | 12
drivers/net/hyperv/netvsc.c | 11 +
The only caller rndis_filter_device_add() has 'struct net_device' pointer
already.
Signed-off-by: Vitaly Kuznetsov
---
drivers/net/hyperv/rndis_filter.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/drivers/net/hyperv/rndis_filter.c
b/drivers/
ff-by: Vitaly Kuznetsov
---
drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c | 17 ++---
1 file changed, 10 insertions(+), 7 deletions(-)
diff --git a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c
b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c
index 0a5b770..c5fe9158 100644
with no functional changes intended. It
doesn't pretend to be complete, additional cleanup of other functions may
follow.
Vitaly Kuznetsov (5):
hv_netvsc: remove redundant assignment in netvsc_recv_callback()
hv_netvsc: introduce {net,hv}_device_to_netvsc_device() helpers
hv_netvsc: p
Make it easier to get 'struct netvsc_device' from 'struct net_device' and
'struct hv_device' by introducing inline helpers.
Signed-off-by: Vitaly Kuznetsov
---
drivers/net/hyperv/hyperv_net.h | 12
drivers/net/hyperv/netvsc.c | 11 +
net_device_ctx is assigned in the very beginning of the function and 'net'
pointer doesn't change.
Signed-off-by: Vitaly Kuznetsov
---
drivers/net/hyperv/netvsc_drv.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/drivers/net/hyperv/netvsc_drv.c b/drivers/net/hyperv/net
Both rndis_filter_open()/rndis_filter_close() use struct hv_device to
reach to struct netvsc_device only and all callers have it already.
While on it, rename net_device to nvdev in rndis_filter_open() as
net_device is misleading.
Signed-off-by: Vitaly Kuznetsov
---
drivers/net/hyperv
The only caller rndis_filter_device_add() has 'struct net_device' pointer
already.
Signed-off-by: Vitaly Kuznetsov
---
drivers/net/hyperv/rndis_filter.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/drivers/net/hyperv/rndis_filter.c
b/drivers/
We unpack 'struct net_device' in netvsc_set_mac_addr() to get to
'struct hv_device' pointer which we use in rndis_filter_set_device_mac()
to get back to 'struct net_device'.
Signed-off-by: Vitaly Kuznetsov
---
drivers/net/hyperv/hyperv_net.h | 2 +-
drivers
()
2) netvsc_remove()
3) netvsc_send()
To solve these issues without introducing new locks some refactoring is
required. We need to get rid of very complex link graph in all the
internal structures and avoid traveling through structures which are being
removed.
Vitaly Kuznetsov (6):
hv_netvsc
start_remove value in
netvsc_link_change().
Reported-by: Haiyang Zhang
Signed-off-by: Vitaly Kuznetsov
---
drivers/net/hyperv/netvsc_drv.c | 21 +
1 file changed, 17 insertions(+), 4 deletions(-)
diff --git a/drivers/net/hyperv/netvsc_drv.c b/drivers/net/hyperv/netvsc_drv.c
he 'netvsc_device -> rndis_device'
branch and re-creating it making the synchronization easier.
There is one additional redundant pointer left, it is struct net_device
link in struct netvsc_device, it is going to be removed in a separate
commit.
Signed-off-by: Vitaly Kuznetsov
---
d
struct netvsc_device is destroyed on mtu change so keeping the
protection flag there is not a good idea. Move it to struct
net_device_context which is preserved.
Signed-off-by: Vitaly Kuznetsov
---
drivers/net/hyperv/hyperv_net.h | 4 +++-
drivers/net/hyperv/netvsc.c | 3 +--
drivers/net
When netvsc device is removed during mtu change or channels setup we get
into troubles as both paths are trying to remove the device. Synchronize
them with start_remove flag and rtnl lock.
Signed-off-by: Vitaly Kuznetsov
---
drivers/net/hyperv/netvsc_drv.c | 9 +++--
1 file changed, 7
Simplify netvsvc pointer graph by getting rid of the redundant ndev
pointer. We can always get a pointer to struct net_device from somewhere
else.
Signed-off-by: Vitaly Kuznetsov
---
drivers/net/hyperv/hyperv_net.h | 5 +--
drivers/net/hyperv/netvsc.c | 36 +++-
drivers/net
()
before we populate chn_table.
- we populate chn_table[0] only.
The issue could be papered over by checking channel != NULL in
netvsc_send() but populating the whole chn_table and writing the
nvdev pointer afterwards seems more appropriate.
Signed-off-by: Vitaly Kuznetsov
---
drivers/net/hyperv
"Lino Sanfilippo" writes:
> Hi,
>
>>
>> MTU change and set channels operations are implemented as netvsc device
>> re-creation destroying internal structures (struct net_device stays). This
>> is really unfortunate but there is no support from Hyper-V host to do it
>> in a different way. Such re-
new locks some refactoring is
required. We need to get rid of very complex link graph in all the
internal structures and avoid traveling through structures which are being
removed.
Vitaly Kuznetsov (6):
hv_netvsc: move start_remove flag to net_device_context
hv_netvsc: use start_remove flag to
1 - 100 of 130 matches
Mail list logo