<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/linux.git/drivers/net/hyperv, branch v4.14.263</title>
<subtitle>Linux kernel stable tree (mirror)</subtitle>
<id>https://git.radix-linux.su/kernel/linux.git/atom?h=v4.14.263</id>
<link rel='self' href='https://git.radix-linux.su/kernel/linux.git/atom?h=v4.14.263'/>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/'/>
<updated>2020-09-23T08:46:33+00:00</updated>
<entry>
<title>hv_netvsc: Remove "unlikely" from netvsc_select_queue</title>
<updated>2020-09-23T08:46:33+00:00</updated>
<author>
<name>Haiyang Zhang</name>
<email>haiyangz@microsoft.com</email>
</author>
<published>2020-08-20T21:53:14+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=e5c9e466e9a446780914383bcfd388cd9398be59'/>
<id>urn:sha1:e5c9e466e9a446780914383bcfd388cd9398be59</id>
<content type='text'>
commit 4d820543c54c47a2bd3c95ddbf52f83c89a219a0 upstream.

When using vf_ops-&gt;ndo_select_queue, the number of queues of VF is
usually bigger than the synthetic NIC. This condition may happen
often.
Remove "unlikely" from the comparison of ndev-&gt;real_num_tx_queues.

Fixes: b3bf5666a510 ("hv_netvsc: defer queue selection to VF")
Signed-off-by: Haiyang Zhang &lt;haiyangz@microsoft.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>hv_netvsc: Fix the queue_mapping in netvsc_vf_xmit()</title>
<updated>2020-08-26T08:29:59+00:00</updated>
<author>
<name>Haiyang Zhang</name>
<email>haiyangz@microsoft.com</email>
</author>
<published>2020-08-20T21:53:15+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=30cb922fdc59f81403a9ce9fdbc277be0d9da3ee'/>
<id>urn:sha1:30cb922fdc59f81403a9ce9fdbc277be0d9da3ee</id>
<content type='text'>
[ Upstream commit c3d897e01aef8ddc43149e4d661b86f823e3aae7 ]

netvsc_vf_xmit() / dev_queue_xmit() will call VF NIC’s ndo_select_queue
or netdev_pick_tx() again. They will use skb_get_rx_queue() to get the
queue number, so the “skb-&gt;queue_mapping - 1” will be used. This may
cause the last queue of VF not been used.

Use skb_record_rx_queue() here, so that the skb_get_rx_queue() called
later will get the correct queue number, and VF will be able to use
all queues.

Fixes: b3bf5666a510 ("hv_netvsc: defer queue selection to VF")
Signed-off-by: Haiyang Zhang &lt;haiyangz@microsoft.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>hv_netvsc: do not use VF device if link is down</title>
<updated>2020-08-21T07:48:01+00:00</updated>
<author>
<name>Stephen Hemminger</name>
<email>stephen@networkplumber.org</email>
</author>
<published>2020-08-04T16:54:15+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=236a93cb8a0beae688ccc1146247d81bb2f1114a'/>
<id>urn:sha1:236a93cb8a0beae688ccc1146247d81bb2f1114a</id>
<content type='text'>
[ Upstream commit 7c9864bbccc23e1812ac82966555d68c13ea4006 ]

If the accelerated networking SRIOV VF device has lost carrier
use the synthetic network device which is available as backup
path. This is a rare case since if VF link goes down, normally
the VMBus device will also loose external connectivity as well.
But if the communication is between two VM's on the same host
the VMBus device will still work.

Reported-by: "Shah, Ashish N" &lt;ashish.n.shah@intel.com&gt;
Fixes: 0c195567a8f6 ("netvsc: transparent VF management")
Signed-off-by: Stephen Hemminger &lt;stephen@networkplumber.org&gt;
Reviewed-by: Haiyang Zhang &lt;haiyangz@microsoft.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>hv_netvsc: flag software created hash value</title>
<updated>2020-01-27T13:46:51+00:00</updated>
<author>
<name>Stephen Hemminger</name>
<email>sthemmin@microsoft.com</email>
</author>
<published>2019-11-01T23:42:37+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=de67fb88a153da82174e8496166fcb72e337d962'/>
<id>urn:sha1:de67fb88a153da82174e8496166fcb72e337d962</id>
<content type='text'>
[ Upstream commit df9f540ca74297a84bafacfa197e9347b20beea5 ]

When the driver needs to create a hash value because it
was not done at higher level, then the hash should be marked
as a software not hardware hash.

Fixes: f72860afa2e3 ("hv_netvsc: Exclude non-TCP port numbers from vRSS hashing")
Signed-off-by: Stephen Hemminger &lt;sthemmin@microsoft.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>netvsc: unshare skb in VF rx handler</title>
<updated>2020-01-27T13:46:36+00:00</updated>
<author>
<name>Stephen Hemminger</name>
<email>stephen@networkplumber.org</email>
</author>
<published>2019-05-28T18:47:30+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=7313729555616597f2ca79cb72de28778298abeb'/>
<id>urn:sha1:7313729555616597f2ca79cb72de28778298abeb</id>
<content type='text'>
[ Upstream commit 996ed04741467f6d1552440c92988b132a9487ec ]

The netvsc VF skb handler should make sure that skb is not
shared. Similar logic already exists in bonding and team device
drivers.

This is not an issue in practice because the VF devicex
does not send up shared skb's. But the netvsc driver
should do the right thing if it did.

Fixes: 0c195567a8f6 ("netvsc: transparent VF management")
Signed-off-by: Stephen Hemminger &lt;sthemmin@microsoft.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>hv_netvsc: Fix memory leak when removing rndis device</title>
<updated>2020-01-23T07:20:34+00:00</updated>
<author>
<name>Mohammed Gamal</name>
<email>mgamal@redhat.com</email>
</author>
<published>2020-01-14T13:09:50+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=a1eb61dd2b1c4d3a3b23dd824ba71c877caba18c'/>
<id>urn:sha1:a1eb61dd2b1c4d3a3b23dd824ba71c877caba18c</id>
<content type='text'>
[ Upstream commit 536dc5df2808efbefc5acee334d3c4f701790ec0 ]

kmemleak detects the following memory leak when hot removing
a network device:

unreferenced object 0xffff888083f63600 (size 256):
  comm "kworker/0:1", pid 12, jiffies 4294831717 (age 1113.676s)
  hex dump (first 32 bytes):
    00 40 c7 33 80 88 ff ff 00 00 00 00 10 00 00 00  .@.3............
    00 00 00 00 ad 4e ad de ff ff ff ff 00 00 00 00  .....N..........
  backtrace:
    [&lt;00000000d4a8f5be&gt;] rndis_filter_device_add+0x117/0x11c0 [hv_netvsc]
    [&lt;000000009c02d75b&gt;] netvsc_probe+0x5e7/0xbf0 [hv_netvsc]
    [&lt;00000000ddafce23&gt;] vmbus_probe+0x74/0x170 [hv_vmbus]
    [&lt;00000000046e64f1&gt;] really_probe+0x22f/0xb50
    [&lt;000000005cc35eb7&gt;] driver_probe_device+0x25e/0x370
    [&lt;0000000043c642b2&gt;] bus_for_each_drv+0x11f/0x1b0
    [&lt;000000005e3d09f0&gt;] __device_attach+0x1c6/0x2f0
    [&lt;00000000a72c362f&gt;] bus_probe_device+0x1a6/0x260
    [&lt;0000000008478399&gt;] device_add+0x10a3/0x18e0
    [&lt;00000000cf07b48c&gt;] vmbus_device_register+0xe7/0x1e0 [hv_vmbus]
    [&lt;00000000d46cf032&gt;] vmbus_add_channel_work+0x8ab/0x1770 [hv_vmbus]
    [&lt;000000002c94bb64&gt;] process_one_work+0x919/0x17d0
    [&lt;0000000096de6781&gt;] worker_thread+0x87/0xb40
    [&lt;00000000fbe7397e&gt;] kthread+0x333/0x3f0
    [&lt;000000004f844269&gt;] ret_from_fork+0x3a/0x50

rndis_filter_device_add() allocates an instance of struct rndis_device
which never gets deallocated as rndis_filter_device_remove() sets
net_device-&gt;extension which points to the rndis_device struct to NULL,
leaving the rndis_device dangling.

Since net_device-&gt;extension is eventually freed in free_netvsc_device(),
we refrain from setting it to NULL inside rndis_filter_device_remove()

Signed-off-by: Mohammed Gamal &lt;mgamal@redhat.com&gt;
Reviewed-by: Haiyang Zhang &lt;haiyangz@microsoft.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>hv_netvsc: Fix unwanted rx_table reset</title>
<updated>2020-01-12T11:12:01+00:00</updated>
<author>
<name>Haiyang Zhang</name>
<email>haiyangz@microsoft.com</email>
</author>
<published>2019-12-20T02:28:10+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=1051a28b7255e6624d379f2bd45713352f9470cf'/>
<id>urn:sha1:1051a28b7255e6624d379f2bd45713352f9470cf</id>
<content type='text'>
[ Upstream commit b0689faa8efc5a3391402d7ae93bd373b7248e51 ]

In existing code, the receive indirection table, rx_table, is in
struct rndis_device, which will be reset when changing MTU, ringparam,
etc. User configured receive indirection table values will be lost.

To fix this, move rx_table to struct net_device_context, and check
netif_is_rxfh_configured(), so rx_table will be set to default only
if no user configured value.

Fixes: ff4a44199012 ("netvsc: allow get/set of RSS indirection table")
Signed-off-by: Haiyang Zhang &lt;haiyangz@microsoft.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>hv_netvsc: Fix error handling in netvsc_attach()</title>
<updated>2019-11-12T18:18:43+00:00</updated>
<author>
<name>Haiyang Zhang</name>
<email>haiyangz@microsoft.com</email>
</author>
<published>2019-10-30T15:32:13+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=904e41c939f48a6ab38db3009ac3f59805e56a86'/>
<id>urn:sha1:904e41c939f48a6ab38db3009ac3f59805e56a86</id>
<content type='text'>
[ Upstream commit 719b85c336ed35565d0f3982269d6f684087bb00 ]

If rndis_filter_open() fails, we need to remove the rndis device created
in earlier steps, before returning an error code. Otherwise, the retry of
netvsc_attach() from its callers will fail and hang.

Fixes: 7b2ee50c0cd5 ("hv_netvsc: common detach logic")
Signed-off-by: Haiyang Zhang &lt;haiyangz@microsoft.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>hv_netvsc: Fix a warning of suspicious RCU usage</title>
<updated>2019-09-10T09:32:12+00:00</updated>
<author>
<name>Dexuan Cui</name>
<email>decui@microsoft.com</email>
</author>
<published>2019-08-09T01:58:08+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=269e9955574cab8597fc7b0089bdc69522289f02'/>
<id>urn:sha1:269e9955574cab8597fc7b0089bdc69522289f02</id>
<content type='text'>
[ Upstream commit 6d0d779dca73cd5acb649c54f81401f93098b298 ]

This fixes a warning of "suspicious rcu_dereference_check() usage"
when nload runs.

Fixes: 776e726bfb34 ("netvsc: fix RCU warning in get_stats")
Signed-off-by: Dexuan Cui &lt;decui@microsoft.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>hv_netvsc: Fix unwanted wakeup after tx_disable</title>
<updated>2019-04-17T06:37:51+00:00</updated>
<author>
<name>Haiyang Zhang</name>
<email>haiyangz@microsoft.com</email>
</author>
<published>2019-03-28T19:40:36+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=789185d40eff67b9d89367d1442b62c8f31ce872'/>
<id>urn:sha1:789185d40eff67b9d89367d1442b62c8f31ce872</id>
<content type='text'>
[ Upstream commit 1b704c4a1ba95574832e730f23817b651db2aa59 ]

After queue stopped, the wakeup mechanism may wake it up again
when ring buffer usage is lower than a threshold. This may cause
send path panic on NULL pointer when we stopped all tx queues in
netvsc_detach and start removing the netvsc device.

This patch fix it by adding a tx_disable flag to prevent unwanted
queue wakeup.

Fixes: 7b2ee50c0cd5 ("hv_netvsc: common detach logic")
Reported-by: Mohammed Gamal &lt;mgamal@redhat.com&gt;
Signed-off-by: Haiyang Zhang &lt;haiyangz@microsoft.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
</feed>
