<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux.git/drivers/net/vmxnet3, branch v4.9</title>
<subtitle>Linux kernel source tree</subtitle>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/'/>
<entry>
<title>vmxnet3: avoid assumption about invalid dma_pa in vmxnet3_set_mc()</title>
<updated>2016-10-15T21:47:32+00:00</updated>
<author>
<name>Alexey Khoroshilov</name>
<email>khoroshilov@ispras.ru</email>
</author>
<published>2016-10-14T21:01:20+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=fb5c6cfaec126d9a96b9dd471d4711bf4c737a6f'/>
<id>fb5c6cfaec126d9a96b9dd471d4711bf4c737a6f</id>
<content type='text'>
vmxnet3_set_mc() checks new_table_pa returned by dma_map_single()
with dma_mapping_error(), but even there it assumes zero is invalid pa
(it assumes dma_mapping_error(...,0) returns true if new_table is NULL).

The patch adds an explicit variable to track status of new_table_pa.

Found by Linux Driver Verification project (linuxtesting.org).

v2: use "bool" and "true"/"false" for boolean variables.
Signed-off-by: Alexey Khoroshilov &lt;khoroshilov@ispras.ru&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
vmxnet3_set_mc() checks new_table_pa returned by dma_map_single()
with dma_mapping_error(), but even there it assumes zero is invalid pa
(it assumes dma_mapping_error(...,0) returns true if new_table is NULL).

The patch adds an explicit variable to track status of new_table_pa.

Found by Linux Driver Verification project (linuxtesting.org).

v2: use "bool" and "true"/"false" for boolean variables.
Signed-off-by: Alexey Khoroshilov &lt;khoroshilov@ispras.ru&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>vmxnet3: Wake queue from reset work</title>
<updated>2016-10-04T04:36:13+00:00</updated>
<author>
<name>Benjamin Poirier</name>
<email>bpoirier@suse.com</email>
</author>
<published>2016-10-03T02:47:50+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=277964e19e1416ca31301e113edb2580c81a8b66'/>
<id>277964e19e1416ca31301e113edb2580c81a8b66</id>
<content type='text'>
vmxnet3_reset_work() expects tx queues to be stopped (via
vmxnet3_quiesce_dev -&gt; netif_tx_disable). However, this races with the
netif_wake_queue() call in netif_tx_timeout() such that the driver's
start_xmit routine may be called unexpectedly, triggering one of the BUG_ON
in vmxnet3_map_pkt with a stack trace like this:

RIP: 0010:[&lt;ffffffffa00cf4bc&gt;] vmxnet3_map_pkt+0x3ac/0x4c0 [vmxnet3]
 [&lt;ffffffffa00cf7e0&gt;] vmxnet3_tq_xmit+0x210/0x4e0 [vmxnet3]
 [&lt;ffffffff813ab144&gt;] dev_hard_start_xmit+0x2e4/0x4c0
 [&lt;ffffffff813c956e&gt;] sch_direct_xmit+0x17e/0x1e0
 [&lt;ffffffff813c96a7&gt;] __qdisc_run+0xd7/0x130
 [&lt;ffffffff813a6a7a&gt;] net_tx_action+0x10a/0x200
 [&lt;ffffffff810691df&gt;] __do_softirq+0x11f/0x260
 [&lt;ffffffff81472fdc&gt;] call_softirq+0x1c/0x30
 [&lt;ffffffff81004695&gt;] do_softirq+0x65/0xa0
 [&lt;ffffffff81069b89&gt;] local_bh_enable_ip+0x99/0xa0
 [&lt;ffffffffa031ff36&gt;] destroy_conntrack+0x96/0x110 [nf_conntrack]
 [&lt;ffffffff813d65e2&gt;] nf_conntrack_destroy+0x12/0x20
 [&lt;ffffffff8139c6d5&gt;] skb_release_head_state+0xb5/0xf0
 [&lt;ffffffff8139d299&gt;] skb_release_all+0x9/0x20
 [&lt;ffffffff8139cfe9&gt;] __kfree_skb+0x9/0x90
 [&lt;ffffffffa00d0069&gt;] vmxnet3_quiesce_dev+0x209/0x340 [vmxnet3]
 [&lt;ffffffffa00d020a&gt;] vmxnet3_reset_work+0x6a/0xa0 [vmxnet3]
 [&lt;ffffffff8107d7cc&gt;] process_one_work+0x16c/0x350
 [&lt;ffffffff810804fa&gt;] worker_thread+0x17a/0x410
 [&lt;ffffffff810848c6&gt;] kthread+0x96/0xa0
 [&lt;ffffffff81472ee4&gt;] kernel_thread_helper+0x4/0x10

Signed-off-by: Benjamin Poirier &lt;bpoirier@suse.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
vmxnet3_reset_work() expects tx queues to be stopped (via
vmxnet3_quiesce_dev -&gt; netif_tx_disable). However, this races with the
netif_wake_queue() call in netif_tx_timeout() such that the driver's
start_xmit routine may be called unexpectedly, triggering one of the BUG_ON
in vmxnet3_map_pkt with a stack trace like this:

RIP: 0010:[&lt;ffffffffa00cf4bc&gt;] vmxnet3_map_pkt+0x3ac/0x4c0 [vmxnet3]
 [&lt;ffffffffa00cf7e0&gt;] vmxnet3_tq_xmit+0x210/0x4e0 [vmxnet3]
 [&lt;ffffffff813ab144&gt;] dev_hard_start_xmit+0x2e4/0x4c0
 [&lt;ffffffff813c956e&gt;] sch_direct_xmit+0x17e/0x1e0
 [&lt;ffffffff813c96a7&gt;] __qdisc_run+0xd7/0x130
 [&lt;ffffffff813a6a7a&gt;] net_tx_action+0x10a/0x200
 [&lt;ffffffff810691df&gt;] __do_softirq+0x11f/0x260
 [&lt;ffffffff81472fdc&gt;] call_softirq+0x1c/0x30
 [&lt;ffffffff81004695&gt;] do_softirq+0x65/0xa0
 [&lt;ffffffff81069b89&gt;] local_bh_enable_ip+0x99/0xa0
 [&lt;ffffffffa031ff36&gt;] destroy_conntrack+0x96/0x110 [nf_conntrack]
 [&lt;ffffffff813d65e2&gt;] nf_conntrack_destroy+0x12/0x20
 [&lt;ffffffff8139c6d5&gt;] skb_release_head_state+0xb5/0xf0
 [&lt;ffffffff8139d299&gt;] skb_release_all+0x9/0x20
 [&lt;ffffffff8139cfe9&gt;] __kfree_skb+0x9/0x90
 [&lt;ffffffffa00d0069&gt;] vmxnet3_quiesce_dev+0x209/0x340 [vmxnet3]
 [&lt;ffffffffa00d020a&gt;] vmxnet3_reset_work+0x6a/0xa0 [vmxnet3]
 [&lt;ffffffff8107d7cc&gt;] process_one_work+0x16c/0x350
 [&lt;ffffffff810804fa&gt;] worker_thread+0x17a/0x410
 [&lt;ffffffff810848c6&gt;] kthread+0x96/0xa0
 [&lt;ffffffff81472ee4&gt;] kernel_thread_helper+0x4/0x10

Signed-off-by: Benjamin Poirier &lt;bpoirier@suse.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net</title>
<updated>2016-08-30T04:54:02+00:00</updated>
<author>
<name>David S. Miller</name>
<email>davem@davemloft.net</email>
</author>
<published>2016-08-30T04:54:02+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=6abdd5f5935fff978f950561f3c5175eb34dad73'/>
<id>6abdd5f5935fff978f950561f3c5175eb34dad73</id>
<content type='text'>
All three conflicts were cases of simple overlapping
changes.

Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
All three conflicts were cases of simple overlapping
changes.

Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>vmxnet3: fix non static symbol warning</title>
<updated>2016-08-25T23:42:22+00:00</updated>
<author>
<name>Wei Yongjun</name>
<email>weiyongjun1@huawei.com</email>
</author>
<published>2016-08-24T15:07:26+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=bb40aca7cf153e3e2941140d3850a4b6c4205ccb'/>
<id>bb40aca7cf153e3e2941140d3850a4b6c4205ccb</id>
<content type='text'>
Fixes the following sparse warning:

drivers/net/vmxnet3/vmxnet3_drv.c:1645:1: warning:
 symbol 'vmxnet3_rq_destroy_all_rxdataring' was not declared. Should it be static?

Signed-off-by: Wei Yongjun &lt;weiyongjun1@huawei.com&gt;
Signed-off-by: Shrikrishna Khare &lt;skhare@vmware.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Fixes the following sparse warning:

drivers/net/vmxnet3/vmxnet3_drv.c:1645:1: warning:
 symbol 'vmxnet3_rq_destroy_all_rxdataring' was not declared. Should it be static?

Signed-off-by: Wei Yongjun &lt;weiyongjun1@huawei.com&gt;
Signed-off-by: Shrikrishna Khare &lt;skhare@vmware.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>vmxnet3: fix tx data ring copy for variable size</title>
<updated>2016-08-20T05:44:22+00:00</updated>
<author>
<name>Shrikrishna Khare</name>
<email>skhare@vmware.com</email>
</author>
<published>2016-08-19T17:33:42+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=ff2e7d5d51469e98196f7933c83b781e96517e7c'/>
<id>ff2e7d5d51469e98196f7933c83b781e96517e7c</id>
<content type='text'>
'Commit 3c8b3efc061a ("vmxnet3: allow variable length transmit data ring
buffer")' changed the size of the buffers in the tx data ring from a
fixed size of 128 bytes to a variable size.

However, while copying data to the data ring, vmxnet3_copy_hdr continues
to carry the old code that assumes fixed buffer size of 128. This patch
fixes it by adding correct offset based on the actual data ring buffer
size.

Signed-off-by: Guolin Yang &lt;gyang@vmware.com&gt;
Signed-off-by: Shrikrishna Khare &lt;skhare@vmware.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
'Commit 3c8b3efc061a ("vmxnet3: allow variable length transmit data ring
buffer")' changed the size of the buffers in the tx data ring from a
fixed size of 128 bytes to a variable size.

However, while copying data to the data ring, vmxnet3_copy_hdr continues
to carry the old code that assumes fixed buffer size of 128. This patch
fixes it by adding correct offset based on the actual data ring buffer
size.

Signed-off-by: Guolin Yang &lt;gyang@vmware.com&gt;
Signed-off-by: Shrikrishna Khare &lt;skhare@vmware.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>vmxnet3: update to version 3</title>
<updated>2016-06-17T05:37:05+00:00</updated>
<author>
<name>Shrikrishna Khare</name>
<email>skhare@vmware.com</email>
</author>
<published>2016-06-16T17:51:59+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=6af9d787459e3ea32da446fe0aa76cff65fd2f8c'/>
<id>6af9d787459e3ea32da446fe0aa76cff65fd2f8c</id>
<content type='text'>
With all vmxnet3 version 3 changes incorporated in the vmxnet3 driver,
the driver can configure emulation to run at vmxnet3 version 3, provided
the emulation advertises support for version 3.

Signed-off-by: Shrikrishna Khare &lt;skhare@vmware.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
With all vmxnet3 version 3 changes incorporated in the vmxnet3 driver,
the driver can configure emulation to run at vmxnet3 version 3, provided
the emulation advertises support for version 3.

Signed-off-by: Shrikrishna Khare &lt;skhare@vmware.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>vmxnet3: introduce command to register memory region</title>
<updated>2016-06-17T05:37:05+00:00</updated>
<author>
<name>Shrikrishna Khare</name>
<email>skhare@vmware.com</email>
</author>
<published>2016-06-16T17:51:58+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=474432229f9482f0f4a2732f2e130dc48247f1d7'/>
<id>474432229f9482f0f4a2732f2e130dc48247f1d7</id>
<content type='text'>
In vmxnet3 version 3, the emulation added support for the vmxnet3 driver
to communicate information about the memory regions the driver will use
for rx/tx buffers. The driver can also indicate which rx/tx queue the
memory region is applicable for. If this information is communicated
to the emulation, the emulation will always keep these memory regions
mapped, thereby avoiding the mapping/unmapping overhead for every packet.

Currently, Linux vmxnet3 driver does not leverage this capability. The
feasibility of using this approach for the Linux vmxnet3 driver will be
investigated independently and if possible, will be part of a different
patch. This patch only exposes the emulation capability to the driver
(vmxnet3_defs.h is identical between the driver and the emulation).

Signed-off-by: Guolin Yang &lt;gyang@vmware.com&gt;
Signed-off-by: Shrikrishna Khare &lt;skhare@vmware.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
In vmxnet3 version 3, the emulation added support for the vmxnet3 driver
to communicate information about the memory regions the driver will use
for rx/tx buffers. The driver can also indicate which rx/tx queue the
memory region is applicable for. If this information is communicated
to the emulation, the emulation will always keep these memory regions
mapped, thereby avoiding the mapping/unmapping overhead for every packet.

Currently, Linux vmxnet3 driver does not leverage this capability. The
feasibility of using this approach for the Linux vmxnet3 driver will be
investigated independently and if possible, will be part of a different
patch. This patch only exposes the emulation capability to the driver
(vmxnet3_defs.h is identical between the driver and the emulation).

Signed-off-by: Guolin Yang &lt;gyang@vmware.com&gt;
Signed-off-by: Shrikrishna Khare &lt;skhare@vmware.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>vmxnet3: add support for get_coalesce, set_coalesce ethtool operations</title>
<updated>2016-06-17T05:37:04+00:00</updated>
<author>
<name>Shrikrishna Khare</name>
<email>skhare@vmware.com</email>
</author>
<published>2016-06-16T17:51:57+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=4edef40ef5f8d09a0b1ded4d1d9b0e988cd98e97'/>
<id>4edef40ef5f8d09a0b1ded4d1d9b0e988cd98e97</id>
<content type='text'>
The emulation supports a variety of coalescing modes viz. disabled
(no coalescing), adaptive, static (number of packets to batch before
raising an interrupt), rate based (number of interrupts per second).

This patch implements get_coalesce and set_coalesce methods to allow
querying and configuring different coalescing modes.

Signed-off-by: Keyong Sun &lt;sunk@vmware.com&gt;
Signed-off-by: Manoj Tammali &lt;tammalim@vmware.com&gt;
Signed-off-by: Shrikrishna Khare &lt;skhare@vmware.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The emulation supports a variety of coalescing modes viz. disabled
(no coalescing), adaptive, static (number of packets to batch before
raising an interrupt), rate based (number of interrupts per second).

This patch implements get_coalesce and set_coalesce methods to allow
querying and configuring different coalescing modes.

Signed-off-by: Keyong Sun &lt;sunk@vmware.com&gt;
Signed-off-by: Manoj Tammali &lt;tammalim@vmware.com&gt;
Signed-off-by: Shrikrishna Khare &lt;skhare@vmware.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>vmxnet3: add receive data ring support</title>
<updated>2016-06-17T05:37:04+00:00</updated>
<author>
<name>Shrikrishna Khare</name>
<email>skhare@vmware.com</email>
</author>
<published>2016-06-16T17:51:56+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=50a5ce3e7116a70edb7a1d1d209e3bc537752427'/>
<id>50a5ce3e7116a70edb7a1d1d209e3bc537752427</id>
<content type='text'>
vmxnet3 driver preallocates buffers for receiving packets and posts the
buffers to the emulation. In order to deliver a received packet to the
guest, the emulation must map buffer(s) and copy the packet into it.

To avoid this memory mapping overhead, this patch introduces the receive
data ring - a set of small sized buffers that are always mapped by
the emulation. If a packet fits into the receive data ring buffer, the
emulation delivers the packet via the receive data ring (which must be
copied by the guest driver), or else the usual receive path is used.

Receive Data Ring buffer length is configurable via ethtool -G ethX rx-mini

Signed-off-by: Shrikrishna Khare &lt;skhare@vmware.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
vmxnet3 driver preallocates buffers for receiving packets and posts the
buffers to the emulation. In order to deliver a received packet to the
guest, the emulation must map buffer(s) and copy the packet into it.

To avoid this memory mapping overhead, this patch introduces the receive
data ring - a set of small sized buffers that are always mapped by
the emulation. If a packet fits into the receive data ring buffer, the
emulation delivers the packet via the receive data ring (which must be
copied by the guest driver), or else the usual receive path is used.

Receive Data Ring buffer length is configurable via ethtool -G ethX rx-mini

Signed-off-by: Shrikrishna Khare &lt;skhare@vmware.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>vmxnet3: allow variable length transmit data ring buffer</title>
<updated>2016-06-17T05:37:04+00:00</updated>
<author>
<name>Shrikrishna Khare</name>
<email>skhare@vmware.com</email>
</author>
<published>2016-06-16T17:51:55+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=3c8b3efc061a745d888869dc3462ac4f7dd582d9'/>
<id>3c8b3efc061a745d888869dc3462ac4f7dd582d9</id>
<content type='text'>
vmxnet3 driver supports transmit data ring viz. a set of fixed size
buffers used by the driver to copy packet headers. Small packets that
fit these buffers are copied into these buffers entirely.

Currently this buffer size of fixed at 128 bytes. This patch extends
transmit data ring implementation to allow variable length transmit
data ring buffers. The length of the buffer is read from the emulation
during initialization.

Signed-off-by: Sriram Rangarajan &lt;rangarajans@vmware.com&gt;
Signed-off-by: Shrikrishna Khare &lt;skhare@vmware.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
vmxnet3 driver supports transmit data ring viz. a set of fixed size
buffers used by the driver to copy packet headers. Small packets that
fit these buffers are copied into these buffers entirely.

Currently this buffer size of fixed at 128 bytes. This patch extends
transmit data ring implementation to allow variable length transmit
data ring buffers. The length of the buffer is read from the emulation
during initialization.

Signed-off-by: Sriram Rangarajan &lt;rangarajans@vmware.com&gt;
Signed-off-by: Shrikrishna Khare &lt;skhare@vmware.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</pre>
</div>
</content>
</entry>
</feed>
