<feed xmlns='http://www.w3.org/2005/Atom'>
<title>BMC/Intel-BMC/linux.git/drivers/net/virtio_net.c, branch dev-4.3</title>
<subtitle>Intel OpenBMC Linux kernel source tree (mirror)</subtitle>
<id>https://git.radix-linux.su/BMC/Intel-BMC/linux.git/atom?h=dev-4.3</id>
<link rel='self' href='https://git.radix-linux.su/BMC/Intel-BMC/linux.git/atom?h=dev-4.3'/>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/BMC/Intel-BMC/linux.git/'/>
<updated>2015-08-27T22:51:45+00:00</updated>
<entry>
<title>virtio-net: avoid unnecessary sg initialzation</title>
<updated>2015-08-27T22:51:45+00:00</updated>
<author>
<name>Jason Wang</name>
<email>jasowang@redhat.com</email>
</author>
<published>2015-08-27T06:53:06+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/BMC/Intel-BMC/linux.git/commit/?id=547c890cfd26010e01b3faf98f29ca9b2252c8d8'/>
<id>urn:sha1:547c890cfd26010e01b3faf98f29ca9b2252c8d8</id>
<content type='text'>
Usually an skb does not have up to MAX_SKB_FRAGS frags. So no need to
initialize the unuse part of sg. This patch initialize the sg based on
the real number it will used:

- during xmit, it could be inferred from nr_frags and can_push.
- for small receive buffer, it will also be 2.

Cc: Michael S. Tsirkin &lt;mst@redhat.com&gt;
Signed-off-by: Jason Wang &lt;jasowang@redhat.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>virtio_net: use DECLARE_EWMA</title>
<updated>2015-08-20T21:10:22+00:00</updated>
<author>
<name>Johannes Berg</name>
<email>johannes@sipsolutions.net</email>
</author>
<published>2015-08-19T07:48:40+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/BMC/Intel-BMC/linux.git/commit/?id=5377d75823ff90c0d5d52d69087707b2e54be21b'/>
<id>urn:sha1:5377d75823ff90c0d5d52d69087707b2e54be21b</id>
<content type='text'>
Instead of using the out-of-line EWMA calculation, use DECLARE_EWMA()
to create static inlines. On x86/64 this results in no change in code
size for me, but reduces the struct receive_queue size by the two
unsigned long values that store the parameters.

Signed-off-by: Johannes Berg &lt;johannes.berg@intel.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net</title>
<updated>2015-08-13T23:23:11+00:00</updated>
<author>
<name>David S. Miller</name>
<email>davem@davemloft.net</email>
</author>
<published>2015-08-13T23:23:11+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/BMC/Intel-BMC/linux.git/commit/?id=182ad468e70fc7e8ff2e5d64344c690beaa00ddd'/>
<id>urn:sha1:182ad468e70fc7e8ff2e5d64344c690beaa00ddd</id>
<content type='text'>
Conflicts:
	drivers/net/ethernet/cavium/Kconfig

The cavium conflict was overlapping dependency
changes.

Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>virtio-net: drop NETIF_F_FRAGLIST</title>
<updated>2015-08-07T07:13:10+00:00</updated>
<author>
<name>Jason Wang</name>
<email>jasowang@redhat.com</email>
</author>
<published>2015-08-05T02:34:04+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/BMC/Intel-BMC/linux.git/commit/?id=48900cb6af4282fa0fb6ff4d72a81aa3dadb5c39'/>
<id>urn:sha1:48900cb6af4282fa0fb6ff4d72a81aa3dadb5c39</id>
<content type='text'>
virtio declares support for NETIF_F_FRAGLIST, but assumes
that there are at most MAX_SKB_FRAGS + 2 fragments which isn't
always true with a fraglist.

A longer fraglist in the skb will make the call to skb_to_sgvec overflow
the sg array, leading to memory corruption.

Drop NETIF_F_FRAGLIST so we only get what we can handle.

Cc: Michael S. Tsirkin &lt;mst@redhat.com&gt;
Signed-off-by: Jason Wang &lt;jasowang@redhat.com&gt;
Acked-by: Michael S. Tsirkin &lt;mst@redhat.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>virtio_net: add gro capability</title>
<updated>2015-08-03T21:22:53+00:00</updated>
<author>
<name>Eric Dumazet</name>
<email>edumazet@google.com</email>
</author>
<published>2015-07-31T16:25:17+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/BMC/Intel-BMC/linux.git/commit/?id=0fbd050a7d262b74527a289ae75a33626d1060a8'/>
<id>urn:sha1:0fbd050a7d262b74527a289ae75a33626d1060a8</id>
<content type='text'>
Straightforward patch to add GRO processing to virtio_net.

napi_complete_done() usage allows more aggressive aggregation,
opted-in by setting /sys/class/net/xxx/gro_flush_timeout

Tested:

Setting /sys/class/net/xxx/gro_flush_timeout to 1000 nsec,
Rick Jones reported following results.

One VM of each on a pair of OpenStack compute nodes with E5-2650Lv3 CPUs
and Intel 82599ES-based NICs. So, two "before" and two "after" VMs.
The OpenStack compute nodes were running OpenStack Kilo, with VxLAN
encapsulation being used through OVS so no GRO coming-up the host
stack.  The compute nodes themselves were running a 3.14-based kernel.

Single-stream netperf, CPU utilizations and thus service demands are
based on intra-guest reported CPU.

Throughput Mbit/s, bigger is better
        Min     Median  Average Max
4.2.0-rc3+      1364    1686    1678    1938
4.2.0-rc3+flush1k       1824    2269    2275    2647

Send Service Demand, smaller is better
        Min     Median  Average Max
4.2.0-rc3+      0.236   0.558   0.524   0.802
4.2.0-rc3+flush1k       0.176   0.503   0.471   0.738

Receive Service Demand, smaller is better.
        Min     Median  Average Max
4.2.0-rc3+      1.906   2.188   2.191   2.531
4.2.0-rc3+flush1k       0.448   0.529   0.533   0.692

Signed-off-by: Eric Dumazet &lt;edumazet@google.com&gt;
Tested-by: Rick Jones &lt;rick.jones2@hp.com&gt;
Cc: "Michael S. Tsirkin" &lt;mst@redhat.com&gt;
Acked-by: Michael S. Tsirkin &lt;mst@redhat.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>virtio_net: don't require ANY_LAYOUT with VERSION_1</title>
<updated>2015-07-20T19:43:33+00:00</updated>
<author>
<name>Michael S. Tsirkin</name>
<email>mst@redhat.com</email>
</author>
<published>2015-07-15T12:26:19+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/BMC/Intel-BMC/linux.git/commit/?id=75993300d008f418ee2569a632185fc1d7d50674'/>
<id>urn:sha1:75993300d008f418ee2569a632185fc1d7d50674</id>
<content type='text'>
ANY_LAYOUT is a compatibility feature. It's implied
for VERSION_1 devices, and non-transitional devices
might not offer it. Change code to behave accordingly.

Signed-off-by: Michael S. Tsirkin &lt;mst@redhat.com&gt;
Reviewed-by: Paolo Bonzini &lt;pbonzini@redhat.com&gt;
Reviewed-by: Stefan Hajnoczi &lt;stefanha@redhat.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>virtio: document queue state logic</title>
<updated>2015-04-06T20:44:24+00:00</updated>
<author>
<name>Michael S. Tsirkin</name>
<email>mst@redhat.com</email>
</author>
<published>2015-04-02T11:05:47+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/BMC/Intel-BMC/linux.git/commit/?id=60302ff631f0f3eac0ec592e128b776f0676b397'/>
<id>urn:sha1:60302ff631f0f3eac0ec592e128b776f0676b397</id>
<content type='text'>
commit d631b94e7a15277858ec5f88d674d93080506999
    virtio: change comment in transmit

started clarifying the logic behind queue state management,
but introduced an inaccuracy: TX_BUSY does not cause
a BUG message.

Clean this up some more, explaining the tradeoffs in detail.

Signed-off-by: Michael S. Tsirkin &lt;mst@redhat.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>virtio: simplify the using of received in virtnet_poll</title>
<updated>2015-03-29T19:37:17+00:00</updated>
<author>
<name>Li RongQing</name>
<email>roy.qing.li@gmail.com</email>
</author>
<published>2015-03-26T07:39:45+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/BMC/Intel-BMC/linux.git/commit/?id=faadb05f4b7f11b3063a20d7fc5afcbf1124dbeb'/>
<id>urn:sha1:faadb05f4b7f11b3063a20d7fc5afcbf1124dbeb</id>
<content type='text'>
received is 0, no need to minus it and use "+=" to reassign it

Signed-off-by: Li RongQing &lt;roy.qing.li@gmail.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>virtio: change comment in transmit</title>
<updated>2015-03-25T01:22:50+00:00</updated>
<author>
<name>stephen hemminger</name>
<email>stephen@networkplumber.org</email>
</author>
<published>2015-03-24T23:22:07+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/BMC/Intel-BMC/linux.git/commit/?id=d631b94e7a15277858ec5f88d674d93080506999'/>
<id>urn:sha1:d631b94e7a15277858ec5f88d674d93080506999</id>
<content type='text'>
The original comment was not really informative or funny
as well as sexist. Replace it with a better explanation of
why the driver does stop and what the impacts are.

Signed-off-by: Stephen Hemminger &lt;stephen@networkplumber.org&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>virtio-net: correctly delete napi hash</title>
<updated>2015-03-12T18:37:17+00:00</updated>
<author>
<name>Jason Wang</name>
<email>jasowang@redhat.com</email>
</author>
<published>2015-03-12T05:57:44+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/BMC/Intel-BMC/linux.git/commit/?id=ab3971b1e7d72270a2a259a29c1a40351b889740'/>
<id>urn:sha1:ab3971b1e7d72270a2a259a29c1a40351b889740</id>
<content type='text'>
We don't delete napi from hash list during module exit. This will
cause the following panic when doing module load and unload:

BUG: unable to handle kernel paging request at 0000004e00000075
IP: [&lt;ffffffff816bd01b&gt;] napi_hash_add+0x6b/0xf0
PGD 3c5d5067 PUD 0
Oops: 0000 [#1] SMP
...
Call Trace:
[&lt;ffffffffa0a5bfb7&gt;] init_vqs+0x107/0x490 [virtio_net]
[&lt;ffffffffa0a5c9f2&gt;] virtnet_probe+0x562/0x791815639d880be [virtio_net]
[&lt;ffffffff8139e667&gt;] virtio_dev_probe+0x137/0x200
[&lt;ffffffff814c7f2a&gt;] driver_probe_device+0x7a/0x250
[&lt;ffffffff814c81d3&gt;] __driver_attach+0x93/0xa0
[&lt;ffffffff814c8140&gt;] ? __device_attach+0x40/0x40
[&lt;ffffffff814c6053&gt;] bus_for_each_dev+0x63/0xa0
[&lt;ffffffff814c7a79&gt;] driver_attach+0x19/0x20
[&lt;ffffffff814c76f0&gt;] bus_add_driver+0x170/0x220
[&lt;ffffffffa0a60000&gt;] ? 0xffffffffa0a60000
[&lt;ffffffff814c894f&gt;] driver_register+0x5f/0xf0
[&lt;ffffffff8139e41b&gt;] register_virtio_driver+0x1b/0x30
[&lt;ffffffffa0a60010&gt;] virtio_net_driver_init+0x10/0x12 [virtio_net]

This patch fixes this by doing this in virtnet_free_queues(). And also
don't delete napi in virtnet_freeze() since it will call
virtnet_free_queues() which has already did this.

Fixes 91815639d880 ("virtio-net: rx busy polling support")
Cc: Rusty Russell &lt;rusty@rustcorp.com.au&gt;
Cc: Michael S. Tsirkin &lt;mst@redhat.com&gt;
Signed-off-by: Jason Wang &lt;jasowang@redhat.com&gt;
Acked-by: Michael S. Tsirkin &lt;mst@redhat.com&gt;
Reviewed-by: Michael S. Tsirkin &lt;mst@redhat.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
</feed>
