]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
gve: pull network headers into skb linear part
authorAnkit Garg <nktgrg@google.com>
Tue, 3 Mar 2026 19:55:48 +0000 (11:55 -0800)
committerPaolo Abeni <pabeni@redhat.com>
Thu, 5 Mar 2026 14:49:51 +0000 (15:49 +0100)
commit0c7025fd24db5b2f8cbd2e1f0050c033b923fd48
treee6e488a78e317662e677e10db24b6f15aefabc31
parentea4c1176871fd70a06eadcbd7c828f6cb9a1b0cd
gve: pull network headers into skb linear part

Currently, in DQO mode with hw-gro enabled, entire received packet is
placed into skb fragments when header-split is disabled. This leaves
the skb linear part empty, forcing the networking stack to do multiple
small memory copies to access eth, IP and TCP headers.

This patch adds a single memcpy to put all headers into linear portion
before packet reaches the SW GRO stack; thus eliminating multiple
smaller memcpy calls.

Additionally, the criteria for calling napi_gro_frags() was updated.
Since skb->head is now populated, we instead check if the SKB is the
cached NAPI scratchpad to ensure we continue using the zero-allocation
path.

Signed-off-by: Ankit Garg <nktgrg@google.com>
Reviewed-by: Eric Dumazet <edumazet@google.com>
Reviewed-by: Harshitha Ramamurthy <hramamurthy@google.com>
Signed-off-by: Joshua Washington <joshwash@google.com>
Link: https://patch.msgid.link/20260303195549.2679070-4-joshwash@google.com
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
drivers/net/ethernet/google/gve/gve_rx_dqo.c