<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/drivers/net/virtio_net.c, branch linux-5.16.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-5.16.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-5.16.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2021-12-16T11:07:19Z</updated>
<entry>
<title>virtio_net: fix rx_drops stat for small pkts</title>
<updated>2021-12-16T11:07:19Z</updated>
<author>
<name>Wenliang Wang</name>
</author>
<published>2021-12-16T03:11:35Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=053c9e18c6f9cf82242ef35ac21cae1842725714'/>
<id>urn:sha1:053c9e18c6f9cf82242ef35ac21cae1842725714</id>
<content type='text'>
We found the stat of rx drops for small pkts does not increment when
build_skb fail, it's not coherent with other mode's rx drops stat.

Signed-off-by: Wenliang Wang &lt;wangwenliang.1995@bytedance.com&gt;
Acked-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>Revert "virtio-net: don't let virtio core to validate used length"</title>
<updated>2021-11-24T23:47:22Z</updated>
<author>
<name>Michael S. Tsirkin</name>
</author>
<published>2021-11-24T23:44:13Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=fcfb65f8a922c7dd25a2e9913601dae979ce6560'/>
<id>urn:sha1:fcfb65f8a922c7dd25a2e9913601dae979ce6560</id>
<content type='text'>
This reverts commit 816625c13652cef5b2c49082d652875da6f2ad7a.

Attempts to validate length in the core did not work out.
We'll drop them, so revert the dependent changes in drivers.

Signed-off-by: Michael S. Tsirkin &lt;mst@redhat.com&gt;
</content>
</entry>
<entry>
<title>Merge tag 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost</title>
<updated>2021-11-03T22:00:39Z</updated>
<author>
<name>Linus Torvalds</name>
</author>
<published>2021-11-03T22:00:39Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=43e1b12927276cde8052122a24ff796649f09d60'/>
<id>urn:sha1:43e1b12927276cde8052122a24ff796649f09d60</id>
<content type='text'>
Pull virtio updates from Michael Tsirkin:
 "vhost and virtio fixes and features:

   - Hardening work by Jason

   - vdpa driver for Alibaba ENI

   - Performance tweaks for virtio blk

   - virtio rng rework using an internal buffer

   - mac/mtu programming for mlx5 vdpa

   - Misc fixes, cleanups"

* tag 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost: (45 commits)
  vdpa/mlx5: Forward only packets with allowed MAC address
  vdpa/mlx5: Support configuration of MAC
  vdpa/mlx5: Fix clearing of VIRTIO_NET_F_MAC feature bit
  vdpa_sim_net: Enable user to set mac address and mtu
  vdpa: Enable user to set mac and mtu of vdpa device
  vdpa: Use kernel coding style for structure comments
  vdpa: Introduce query of device config layout
  vdpa: Introduce and use vdpa device get, set config helpers
  virtio-scsi: don't let virtio core to validate used buffer length
  virtio-blk: don't let virtio core to validate used length
  virtio-net: don't let virtio core to validate used length
  virtio_ring: validate used buffer length
  virtio_blk: correct types for status handling
  virtio_blk: allow 0 as num_request_queues
  i2c: virtio: Add support for zero-length requests
  virtio-blk: fixup coccinelle warnings
  virtio_ring: fix typos in vring_desc_extra
  virtio-pci: harden INTX interrupts
  virtio_pci: harden MSI-X interrupts
  virtio_config: introduce a new .enable_cbs method
  ...
</content>
</entry>
<entry>
<title>virtio-net: don't let virtio core to validate used length</title>
<updated>2021-11-01T09:26:48Z</updated>
<author>
<name>Jason Wang</name>
</author>
<published>2021-10-27T02:21:05Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=816625c13652cef5b2c49082d652875da6f2ad7a'/>
<id>urn:sha1:816625c13652cef5b2c49082d652875da6f2ad7a</id>
<content type='text'>
For RX virtuqueue, the used length is validated in all the three paths
(big, small and mergeable). For control vq, we never tries to use used
length. So this patch forbids the core to validate the used length.

Signed-off-by: Jason Wang &lt;jasowang@redhat.com&gt;
Link: https://lore.kernel.org/r/20211027022107.14357-3-jasowang@redhat.com
Signed-off-by: Michael S. Tsirkin &lt;mst@redhat.com&gt;
</content>
</entry>
<entry>
<title>virtio_net: clarify tailroom logic</title>
<updated>2021-11-01T08:29:47Z</updated>
<author>
<name>Michael S. Tsirkin</name>
</author>
<published>2021-10-09T14:52:50Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=fc02e8cb0300c0146e1d4668a75663eb225d8182'/>
<id>urn:sha1:fc02e8cb0300c0146e1d4668a75663eb225d8182</id>
<content type='text'>
Make tailroom math follow same logic as everything else, subtracing
values in the order in which things are laid out in the buffer.

Tested-by: Corentin Noël &lt;corentin.noel@collabora.com&gt;
Signed-off-by: Michael S. Tsirkin &lt;mst@redhat.com&gt;
</content>
</entry>
<entry>
<title>net: virtio: use eth_hw_addr_set()</title>
<updated>2021-10-28T14:47:30Z</updated>
<author>
<name>Jakub Kicinski</name>
</author>
<published>2021-10-27T15:20:12Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=f2edaa4ad5d51371709196f2c258fbe875962dee'/>
<id>urn:sha1:f2edaa4ad5d51371709196f2c258fbe875962dee</id>
<content type='text'>
Commit 406f42fa0d3c ("net-next: When a bond have a massive amount
of VLANs...") introduced a rbtree for faster Ethernet address look
up. To maintain netdev-&gt;dev_addr in this tree we need to make all
the writes to it go through appropriate helpers.

Even though the current code uses dev-&gt;addr_len the we can switch
to eth_hw_addr_set() instead of dev_addr_set(). The netdev is
always allocated by alloc_etherdev_mq() and there are at least two
places which assume Ethernet address:
 - the line below calling eth_hw_addr_random()
 - virtnet_set_mac_address() -&gt; eth_commit_mac_addr_change()

Acked-by: Michael S. Tsirkin &lt;mst@redhat.com&gt;
Acked-by: Jason Wang &lt;jasowang@redhat.com&gt;
Link: https://lore.kernel.org/r/20211027152012.3393077-1-kuba@kernel.org
Signed-off-by: Jakub Kicinski &lt;kuba@kernel.org&gt;
</content>
</entry>
<entry>
<title>Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net</title>
<updated>2021-10-14T23:50:14Z</updated>
<author>
<name>Jakub Kicinski</name>
</author>
<published>2021-10-14T23:50:14Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=e15f5972b8031f9069f41e24adff63bd34463b3a'/>
<id>urn:sha1:e15f5972b8031f9069f41e24adff63bd34463b3a</id>
<content type='text'>
tools/testing/selftests/net/ioam6.sh
  7b1700e009cc ("selftests: net: modify IOAM tests for undef bits")
  bf77b1400a56 ("selftests: net: Test for the IOAM encapsulation with IPv6")

Signed-off-by: Jakub Kicinski &lt;kuba@kernel.org&gt;
</content>
</entry>
<entry>
<title>virtio_net: skip RCU read lock by checking xdp_enabled of vi</title>
<updated>2021-10-10T10:31:09Z</updated>
<author>
<name>Li RongQing</name>
</author>
<published>2021-10-09T09:32:43Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=6213f07cb542c9651ba614e784bf58ed41354936'/>
<id>urn:sha1:6213f07cb542c9651ba614e784bf58ed41354936</id>
<content type='text'>
networking benchmark shows that __rcu_read_lock and
__rcu_read_unlock takes some cpu cycles, and we can avoid
calling them partially in virtio rx path by check xdp_enabled
of vi, and xdp is disabled most of time

Signed-off-by: Li RongQing &lt;lirongqing@baidu.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>virtio-net: fix for skb_over_panic inside big mode</title>
<updated>2021-10-09T12:50:33Z</updated>
<author>
<name>Xuan Zhuo</name>
</author>
<published>2021-10-09T09:17:53Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=732b74d647048668f0f8dc0c848f0746c69e2e2f'/>
<id>urn:sha1:732b74d647048668f0f8dc0c848f0746c69e2e2f</id>
<content type='text'>
commit 126285651b7f ("Merge ra.kernel.org:/pub/scm/linux/kernel/git/netdev/net")
accidentally reverted the effect of
commit 1a8024239da ("virtio-net: fix for skb_over_panic inside big mode")
on drivers/net/virtio_net.c

As a result, users of crosvm (which is using large packet mode)
are experiencing crashes with 5.14-rc1 and above that do not
occur with 5.13.

Crash trace:

[   61.346677] skbuff: skb_over_panic: text:ffffffff881ae2c7 len:3762 put:3762 head:ffff8a5ec8c22000 data:ffff8a5ec8c22010 tail:0xec2 end:0xec0 dev:&lt;NULL&gt;
[   61.369192] kernel BUG at net/core/skbuff.c:111!
[   61.372840] invalid opcode: 0000 [#1] SMP PTI
[   61.374892] CPU: 5 PID: 0 Comm: swapper/5 Not tainted 5.14.0-rc1 linux-v5.14-rc1-for-mesa-ci.tar.bz2 #1
[   61.376450] Hardware name: ChromiumOS crosvm, BIOS 0

..

[   61.393635] Call Trace:
[   61.394127]  &lt;IRQ&gt;
[   61.394488]  skb_put.cold+0x10/0x10
[   61.395095]  page_to_skb+0xf7/0x410
[   61.395689]  receive_buf+0x81/0x1660
[   61.396228]  ? netif_receive_skb_list_internal+0x1ad/0x2b0
[   61.397180]  ? napi_gro_flush+0x97/0xe0
[   61.397896]  ? detach_buf_split+0x67/0x120
[   61.398573]  virtnet_poll+0x2cf/0x420
[   61.399197]  __napi_poll+0x25/0x150
[   61.399764]  net_rx_action+0x22f/0x280
[   61.400394]  __do_softirq+0xba/0x257
[   61.401012]  irq_exit_rcu+0x8e/0xb0
[   61.401618]  common_interrupt+0x7b/0xa0
[   61.402270]  &lt;/IRQ&gt;

See
https://lore.kernel.org/r/5edaa2b7c2fe4abd0347b8454b2ac032b6694e2c.camel%40collabora.com
for the report.

Apply the original 1a8024239da ("virtio-net: fix for skb_over_panic inside big mode")
again, the original logic still holds:

In virtio-net's large packet mode, there is a hole in the space behind
buf.

    hdr_padded_len - hdr_len

We must take this into account when calculating tailroom.

Cc: Greg KH &lt;gregkh@linuxfoundation.org&gt;
Fixes: fb32856b16ad ("virtio-net: page_to_skb() use build_skb when there's sufficient tailroom")
Fixes: 126285651b7f ("Merge ra.kernel.org:/pub/scm/linux/kernel/git/netdev/net")
Signed-off-by: Xuan Zhuo &lt;xuanzhuo@linux.alibaba.com&gt;
Reported-by: Corentin Noël &lt;corentin.noel@collabora.com&gt;
Tested-by: Corentin Noël &lt;corentin.noel@collabora.com&gt;
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>Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net</title>
<updated>2021-09-23T18:19:49Z</updated>
<author>
<name>Jakub Kicinski</name>
</author>
<published>2021-09-23T18:19:49Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=2fcd14d0f78090f57aecd7f424e2b0373cd631a7'/>
<id>urn:sha1:2fcd14d0f78090f57aecd7f424e2b0373cd631a7</id>
<content type='text'>
net/mptcp/protocol.c
  977d293e23b4 ("mptcp: ensure tx skbs always have the MPTCP ext")
  efe686ffce01 ("mptcp: ensure tx skbs always have the MPTCP ext")

same patch merged in both trees, keep net-next.

Signed-off-by: Jakub Kicinski &lt;kuba@kernel.org&gt;
</content>
</entry>
</feed>
