<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/linux.git/drivers/net/ethernet/google, branch v6.6.39</title>
<subtitle>Linux kernel stable tree (mirror)</subtitle>
<id>https://git.radix-linux.su/kernel/linux.git/atom?h=v6.6.39</id>
<link rel='self' href='https://git.radix-linux.su/kernel/linux.git/atom?h=v6.6.39'/>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/'/>
<updated>2024-06-21T12:38:35+00:00</updated>
<entry>
<title>gve: ignore nonrelevant GSO type bits when processing TSO headers</title>
<updated>2024-06-21T12:38:35+00:00</updated>
<author>
<name>Joshua Washington</name>
<email>joshwash@google.com</email>
</author>
<published>2024-06-10T22:57:18+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=d01f39f73bed4cb66ce28374b20d3e447237aeed'/>
<id>urn:sha1:d01f39f73bed4cb66ce28374b20d3e447237aeed</id>
<content type='text'>
[ Upstream commit 1b9f756344416e02b41439bf2324b26aa25e141c ]

TSO currently fails when the skb's gso_type field has more than one bit
set.

TSO packets can be passed from userspace using PF_PACKET, TUNTAP and a
few others, using virtio_net_hdr (e.g., PACKET_VNET_HDR). This includes
virtualization, such as QEMU, a real use-case.

The gso_type and gso_size fields as passed from userspace in
virtio_net_hdr are not trusted blindly by the kernel. It adds gso_type
|= SKB_GSO_DODGY to force the packet to enter the software GSO stack
for verification.

This issue might similarly come up when the CWR bit is set in the TCP
header for congestion control, causing the SKB_GSO_TCP_ECN gso_type bit
to be set.

Fixes: a57e5de476be ("gve: DQO: Add TX path")
Signed-off-by: Joshua Washington &lt;joshwash@google.com&gt;
Reviewed-by: Praveen Kaligineedi &lt;pkaligineedi@google.com&gt;
Reviewed-by: Harshitha Ramamurthy &lt;hramamurthy@google.com&gt;
Reviewed-by: Willem de Bruijn &lt;willemb@google.com&gt;
Suggested-by: Eric Dumazet &lt;edumazet@google.com&gt;
Acked-by: Andrei Vagin &lt;avagin@gmail.com&gt;

v2 - Remove unnecessary comments, remove line break between fixes tag
and signoffs.

v3 - Add back unrelated empty line removal.

Link: https://lore.kernel.org/r/20240610225729.2985343-1-joshwash@google.com
Signed-off-by: Jakub Kicinski &lt;kuba@kernel.org&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>gve: Clear napi-&gt;skb before dev_kfree_skb_any()</title>
<updated>2024-06-21T12:38:25+00:00</updated>
<author>
<name>Ziwei Xiao</name>
<email>ziweixiao@google.com</email>
</author>
<published>2024-06-12T00:16:54+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=2ce5341c36993b776012601921d7688693f8c037'/>
<id>urn:sha1:2ce5341c36993b776012601921d7688693f8c037</id>
<content type='text'>
commit 6f4d93b78ade0a4c2cafd587f7b429ce95abb02e upstream.

gve_rx_free_skb incorrectly leaves napi-&gt;skb referencing an skb after it
is freed with dev_kfree_skb_any(). This can result in a subsequent call
to napi_get_frags returning a dangling pointer.

Fix this by clearing napi-&gt;skb before the skb is freed.

Fixes: 9b8dd5e5ea48 ("gve: DQO: Add RX path")
Cc: stable@vger.kernel.org
Reported-by: Shailend Chand &lt;shailend@google.com&gt;
Signed-off-by: Ziwei Xiao &lt;ziweixiao@google.com&gt;
Reviewed-by: Harshitha Ramamurthy &lt;hramamurthy@google.com&gt;
Reviewed-by: Shailend Chand &lt;shailend@google.com&gt;
Reviewed-by: Praveen Kaligineedi &lt;pkaligineedi@google.com&gt;
Link: https://lore.kernel.org/r/20240612001654.923887-1-ziweixiao@google.com
Signed-off-by: Jakub Kicinski &lt;kuba@kernel.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>gve: Fix skb truesize underestimation</title>
<updated>2024-02-05T20:14:34+00:00</updated>
<author>
<name>Praveen Kaligineedi</name>
<email>pkaligineedi@google.com</email>
</author>
<published>2024-01-24T16:10:25+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=f08daa806ba78a1458dd7589a4857213cab426d9'/>
<id>urn:sha1:f08daa806ba78a1458dd7589a4857213cab426d9</id>
<content type='text'>
[ Upstream commit 534326711000c318fe1523c77308450522baa499 ]

For a skb frag with a newly allocated copy page, the true size is
incorrectly set to packet buffer size. It should be set to PAGE_SIZE
instead.

Fixes: 82fd151d38d9 ("gve: Reduce alloc and copy costs in the GQ rx path")
Signed-off-by: Praveen Kaligineedi &lt;pkaligineedi@google.com&gt;
Link: https://lore.kernel.org/r/20240124161025.1819836-1-pkaligineedi@google.com
Signed-off-by: Jakub Kicinski &lt;kuba@kernel.org&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>gve: Fixes for napi_poll when budget is 0</title>
<updated>2023-11-28T17:19:52+00:00</updated>
<author>
<name>Ziwei Xiao</name>
<email>ziweixiao@google.com</email>
</author>
<published>2023-11-14T00:41:44+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=ff33be9cecee28f021493369bddb826f068a1acb'/>
<id>urn:sha1:ff33be9cecee28f021493369bddb826f068a1acb</id>
<content type='text'>
[ Upstream commit 278a370c1766060d2144d6cf0b06c101e1043b6d ]

Netpoll will explicilty pass the polling call with a budget of 0 to
indicate it's clearing the Tx path only. For the gve_rx_poll and
gve_xdp_poll, they were mistakenly taking the 0 budget as the indication
to do all the work. Add check to avoid the rx path and xdp path being
called when budget is 0. And also avoid napi_complete_done being called
when budget is 0 for netpoll.

Fixes: f5cedc84a30d ("gve: Add transmit and receive support")
Signed-off-by: Ziwei Xiao &lt;ziweixiao@google.com&gt;
Link: https://lore.kernel.org/r/20231114004144.2022268-1-ziweixiao@google.com
Signed-off-by: Jakub Kicinski &lt;kuba@kernel.org&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>gve: Use size_add() in call to struct_size()</title>
<updated>2023-11-20T10:58:56+00:00</updated>
<author>
<name>Gustavo A. R. Silva</name>
<email>gustavoars@kernel.org</email>
</author>
<published>2023-09-15T18:17:49+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=3fc79c5686020fa4623a1b96f666913b14979722'/>
<id>urn:sha1:3fc79c5686020fa4623a1b96f666913b14979722</id>
<content type='text'>
[ Upstream commit d692873cbe861a870cdc9cbfb120eefd113c3dfd ]

If, for any reason, `tx_stats_num + rx_stats_num` wraps around, the
protection that struct_size() adds against potential integer overflows
is defeated. Fix this by hardening call to struct_size() with size_add().

Fixes: 691f4077d560 ("gve: Replace zero-length array with flexible-array member")
Signed-off-by: Gustavo A. R. Silva &lt;gustavoars@kernel.org&gt;
Reviewed-by: Kees Cook &lt;keescook@chromium.org&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>gve: Do not fully free QPL pages on prefill errors</title>
<updated>2023-10-17T11:33:29+00:00</updated>
<author>
<name>Shailend Chand</name>
<email>shailend@google.com</email>
</author>
<published>2023-10-14T01:41:21+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=95535e37e8959f50e7aee365a5bdc9e5ed720443'/>
<id>urn:sha1:95535e37e8959f50e7aee365a5bdc9e5ed720443</id>
<content type='text'>
The prefill function should have only removed the page count bias it
added. Fully freeing the page will cause gve_free_queue_page_list to
free a page the driver no longer owns.

Fixes: 82fd151d38d9 ("gve: Reduce alloc and copy costs in the GQ rx path")
Signed-off-by: Shailend Chand &lt;shailend@google.com&gt;
Link: https://lore.kernel.org/r/20231014014121.2843922-1-shailend@google.com
Signed-off-by: Paolo Abeni &lt;pabeni@redhat.com&gt;
</content>
</entry>
<entry>
<title>gve: fix frag_list chaining</title>
<updated>2023-09-04T05:52:27+00:00</updated>
<author>
<name>Eric Dumazet</name>
<email>edumazet@google.com</email>
</author>
<published>2023-08-31T21:38:12+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=817c7cd2043a83a3d8147f40eea1505ac7300b62'/>
<id>urn:sha1:817c7cd2043a83a3d8147f40eea1505ac7300b62</id>
<content type='text'>
gve_rx_append_frags() is able to build skbs chained with frag_list,
like GRO engine.

Problem is that shinfo-&gt;frag_list should only be used
for the head of the chain.

All other links should use skb-&gt;next pointer.

Otherwise, built skbs are not valid and can cause crashes.

Equivalent code in GRO (skb_gro_receive()) is:

    if (NAPI_GRO_CB(p)-&gt;last == p)
        skb_shinfo(p)-&gt;frag_list = skb;
    else
        NAPI_GRO_CB(p)-&gt;last-&gt;next = skb;
    NAPI_GRO_CB(p)-&gt;last = skb;

Fixes: 9b8dd5e5ea48 ("gve: DQO: Add RX path")
Signed-off-by: Eric Dumazet &lt;edumazet@google.com&gt;
Cc: Bailey Forrest &lt;bcf@google.com&gt;
Cc: Willem de Bruijn &lt;willemb@google.com&gt;
Cc: Catherine Sullivan &lt;csully@google.com&gt;
Reviewed-by: David Ahern &lt;dsahern@kernel.org&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>gve: RX path for DQO-QPL</title>
<updated>2023-08-06T07:34:36+00:00</updated>
<author>
<name>Rushil Gupta</name>
<email>rushilg@google.com</email>
</author>
<published>2023-08-04T21:34:43+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=e7075ab4fb6b39730dfbfbfa3a5505d678f01d2c'/>
<id>urn:sha1:e7075ab4fb6b39730dfbfbfa3a5505d678f01d2c</id>
<content type='text'>
The RX path allocates the QPL page pool at queue creation, and
tries to reuse these pages through page recycling. This patch
ensures that on refill no non-QPL pages are posted to the device.

When the driver is running low on free buffers, an ondemand
allocation step kicks in that allocates a non-qpl page for
SKB business to free up the QPL page in use.

gve_try_recycle_buf was moved to gve_rx_append_frags so that driver does
not attempt to mark buffer as used if a non-qpl page was allocated
ondemand.

Signed-off-by: Rushil Gupta &lt;rushilg@google.com&gt;
Reviewed-by: Willem de Bruijn &lt;willemb@google.com&gt;
Signed-off-by: Praveen Kaligineedi &lt;pkaligineedi@google.com&gt;
Signed-off-by: Bailey Forrest &lt;bcf@google.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>gve: Tx path for DQO-QPL</title>
<updated>2023-08-06T07:34:36+00:00</updated>
<author>
<name>Rushil Gupta</name>
<email>rushilg@google.com</email>
</author>
<published>2023-08-04T21:34:42+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=a6fb8d5a8b6925f1e635818d3dd2d89531d4a058'/>
<id>urn:sha1:a6fb8d5a8b6925f1e635818d3dd2d89531d4a058</id>
<content type='text'>
Each QPL page is divided into GVE_TX_BUFS_PER_PAGE_DQO buffers.
When a packet needs to be transmitted, we break the packet into max
GVE_TX_BUF_SIZE_DQO sized chunks and transmit each chunk using a TX
descriptor.
We allocate the TX buffers from the free list in dqo_tx.
We store these TX buffer indices in an array in the pending_packet
structure.

The TX buffers are returned to the free list in dqo_compl after
receiving packet completion or when removing packets from miss
completions list.

Signed-off-by: Rushil Gupta &lt;rushilg@google.com&gt;
Reviewed-by: Willem de Bruijn &lt;willemb@google.com&gt;
Signed-off-by: Praveen Kaligineedi &lt;pkaligineedi@google.com&gt;
Signed-off-by: Bailey Forrest &lt;bcf@google.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>gve: Control path for DQO-QPL</title>
<updated>2023-08-06T07:34:36+00:00</updated>
<author>
<name>Rushil Gupta</name>
<email>rushilg@google.com</email>
</author>
<published>2023-08-04T21:34:41+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=66ce8e6b49df401854f0c98bed50a65e4167825b'/>
<id>urn:sha1:66ce8e6b49df401854f0c98bed50a65e4167825b</id>
<content type='text'>
GVE supports QPL ("queue-page-list") mode where
all data is communicated through a set of pre-registered
pages. Adding this mode to DQO descriptor format.

Add checks, abi-changes and device options to support
QPL mode for DQO in addition to GQI. Also, use
pages-per-qpl supplied by device-option to control the
size of the "queue-page-list".

Signed-off-by: Rushil Gupta &lt;rushilg@google.com&gt;
Reviewed-by: Willem de Bruijn &lt;willemb@google.com&gt;
Signed-off-by: Praveen Kaligineedi &lt;pkaligineedi@google.com&gt;
Signed-off-by: Bailey Forrest &lt;bcf@google.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
</feed>
