<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/drivers/net/hyperv/netvsc.c, branch linux-4.7.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-4.7.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-4.7.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2016-05-16T17:26:01Z</updated>
<entry>
<title>hv_netvsc: set nvdev link after populating chn_table</title>
<updated>2016-05-16T17:26:01Z</updated>
<author>
<name>Vitaly Kuznetsov</name>
</author>
<published>2016-05-13T11:55:25Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=88098834827025cc04c15f1b4b0d9bbef3cf55af'/>
<id>urn:sha1:88098834827025cc04c15f1b4b0d9bbef3cf55af</id>
<content type='text'>
Crash in netvsc_send() is observed when netvsc device is re-created on
mtu change/set channels. The crash is caused by dereferencing of NULL
channel pointer which comes from chn_table. The root cause is a mixture
of two facts:
- we set nvdev pointer in net_device_context in alloc_net_device()
  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 &lt;vkuznets@redhat.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>hv_netvsc: get rid of struct net_device pointer in struct netvsc_device</title>
<updated>2016-05-16T17:26:00Z</updated>
<author>
<name>Vitaly Kuznetsov</name>
</author>
<published>2016-05-13T11:55:23Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=0a1275ca5128b84ffffc149960969ed351ae00eb'/>
<id>urn:sha1:0a1275ca5128b84ffffc149960969ed351ae00eb</id>
<content type='text'>
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 &lt;vkuznets@redhat.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>hv_netvsc: untangle the pointer mess</title>
<updated>2016-05-16T17:26:00Z</updated>
<author>
<name>Vitaly Kuznetsov</name>
</author>
<published>2016-05-13T11:55:22Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=3d541ac5a92af708d0085925d136f875f3a58d57'/>
<id>urn:sha1:3d541ac5a92af708d0085925d136f875f3a58d57</id>
<content type='text'>
We have the following structures keeping netvsc adapter state:
- struct net_device
- struct net_device_context
- struct netvsc_device
- struct rndis_device
- struct hv_device
and there are pointers/dependencies between them:
- struct net_device_context is contained in struct net_device
- struct hv_device has driver_data pointer which points to
  'struct net_device' OR 'struct netvsc_device' depending on driver's
  state (!).
- struct net_device_context has a pointer to 'struct hv_device'.
- struct netvsc_device has pointers to 'struct hv_device' and
  'struct net_device_context'.
- struct rndis_device has a pointer to 'struct netvsc_device'.

Different functions get different structures as parameters and use these
pointers for traveling. The problem is (in addition to keeping in mind
this complex graph) that some of these structures (struct netvsc_device
and struct rndis_device) are being removed and re-created on mtu change
(as we implement it as re-creation of hyper-v device) so our travel using
these pointers is dangerous.

Simplify this to a the following:
- add struct netvsc_device pointer to struct net_device_context (which is
  a part of struct net_device and thus never disappears)
- remove struct hv_device and struct net_device_context pointers from
  struct netvsc_device
- replace pointer to 'struct netvsc_device' with pointer to
  'struct net_device'.
- always keep 'struct net_device' in hv_device driver_data.

We'll end up with the following 'circular' structure:

net_device:
 [net_device_context] -&gt; netvsc_device -&gt; rndis_device -&gt; net_device
                      -&gt; hv_device -&gt; net_device

On MTU change we'll be removing the 'netvsc_device -&gt; 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 &lt;vkuznets@redhat.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>hv_netvsc: move start_remove flag to net_device_context</title>
<updated>2016-05-16T17:26:00Z</updated>
<author>
<name>Vitaly Kuznetsov</name>
</author>
<published>2016-05-13T11:55:20Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=f580aec4bfd7babe51f086e599400027def08ed8'/>
<id>urn:sha1:f580aec4bfd7babe51f086e599400027def08ed8</id>
<content type='text'>
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 &lt;vkuznets@redhat.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>hv_netvsc: Implement support for VF drivers on Hyper-V</title>
<updated>2016-04-18T18:51:47Z</updated>
<author>
<name>KY Srinivasan</name>
</author>
<published>2016-04-14T23:31:54Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=84bf9cefb162b197da20a0f4388929f4b5ba5db4'/>
<id>urn:sha1:84bf9cefb162b197da20a0f4388929f4b5ba5db4</id>
<content type='text'>
Support VF drivers on Hyper-V. On Hyper-V, each VF instance presented to
the guest has an associated synthetic interface that shares the MAC address
with the VF instance. Typically these are bonded together to support
live migration. By default, the host delivers all the incoming packets
on the synthetic interface. Once the VF is up, we need to explicitly switch
the data path on the host to divert traffic onto the VF interface. Even after
switching the data path, broadcast and multicast packets are always delivered
on the synthetic interface and these will have to be injected back onto the
VF interface (if VF is up).
This patch implements the necessary support in netvsc to support Linux
VF drivers.

Signed-off-by: K. Y. Srinivasan &lt;kys@microsoft.com&gt;
Reviewed-by: Haiyang Zhang &lt;haiyangz@microsoft.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>hv_netvsc: Fix book keeping of skb during batching process</title>
<updated>2016-01-25T18:51:53Z</updated>
<author>
<name>Haiyang Zhang</name>
</author>
<published>2016-01-25T17:49:31Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=c85e4924452ae8225c8829f3fa8a2f7baa34bc5c'/>
<id>urn:sha1:c85e4924452ae8225c8829f3fa8a2f7baa34bc5c</id>
<content type='text'>
Since eliminating send_completion_tid from struct hv_netvsc_packet, we
haven't add proper book keeping for the skb of the batched packet. This
patch fixes this issue and allows the previous skb is properly freed.
Otherwise, a panic may happen.
Thanks to Simon Xiao &lt;sixiao@microsoft.com&gt; for bisecting and analysis.

Signed-off-by: Haiyang Zhang &lt;haiyangz@microsoft.com&gt;
Reviewed-by: K. Y. Srinivasan &lt;kys@microsoft.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>hv_netvsc: Fix race condition on Multi-Send Data field</title>
<updated>2015-12-14T05:02:06Z</updated>
<author>
<name>Haiyang Zhang</name>
</author>
<published>2015-12-10T20:19:35Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=cf8190e4c26c8ccf87d80793f8f1f7fe150cdf8c'/>
<id>urn:sha1:cf8190e4c26c8ccf87d80793f8f1f7fe150cdf8c</id>
<content type='text'>
In commit 2a04ae8acb14 ("hv_netvsc: remove locking in netvsc_send()"), the
locking for MSD (Multi-Send Data) field was removed. This could cause a
race condition between RNDIS control messages and data packets processing,
because these two types of traffic are not synchronized.
This patch fixes this issue by sending control messages out directly
without reading MSD field.

Signed-off-by: Haiyang Zhang &lt;haiyangz@microsoft.com&gt;
Reviewed-by: K. Y. Srinivasan &lt;kys@microsoft.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>hv_netvsc: Eliminate status from struct hv_netvsc_packet</title>
<updated>2015-12-03T04:43:25Z</updated>
<author>
<name>KY Srinivasan</name>
</author>
<published>2015-12-02T00:43:18Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=10082f98878a9dff1563745f9f1dd9d1ff142700'/>
<id>urn:sha1:10082f98878a9dff1563745f9f1dd9d1ff142700</id>
<content type='text'>
Eliminate status from struct hv_netvsc_packet.

Signed-off-by: K. Y. Srinivasan &lt;kys@microsoft.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>hv_netvsc: Eliminate xmit_more from struct hv_netvsc_packet</title>
<updated>2015-12-03T04:43:25Z</updated>
<author>
<name>KY Srinivasan</name>
</author>
<published>2015-12-02T00:43:17Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=bde79be529c43b5a5a877b3e0b93607d22a8b01e'/>
<id>urn:sha1:bde79be529c43b5a5a877b3e0b93607d22a8b01e</id>
<content type='text'>
Eliminate xmit_more from struct hv_netvsc_packet.

Signed-off-by: K. Y. Srinivasan &lt;kys@microsoft.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>hv_netvsc: Eliminate is_data_pkt from struct hv_netvsc_packet</title>
<updated>2015-12-03T04:43:25Z</updated>
<author>
<name>KY Srinivasan</name>
</author>
<published>2015-12-02T00:43:15Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=694a9fb0263dddfb07bc490a02e59d6962602fe8'/>
<id>urn:sha1:694a9fb0263dddfb07bc490a02e59d6962602fe8</id>
<content type='text'>
Eliminate is_data_pkt from struct hv_netvsc_packet.

Signed-off-by: K. Y. Srinivasan &lt;kys@microsoft.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
</feed>
