gve: Secure enough bytes in the first TX desc for all TCP pkts
authorShailend Chand <shailend@google.com>
Mon, 3 Apr 2023 17:28:09 +0000 (10:28 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 13 Apr 2023 14:55:24 +0000 (16:55 +0200)
commit332e7f93f112bd5ee3bb876cc8b3da9083029e01
tree5b943845ff7f084806343d5943533b87d130dbee
parente3bcf2a77060bea4d8d09cb09d92c7056f07df5a
gve: Secure enough bytes in the first TX desc for all TCP pkts

[ Upstream commit 3ce9345580974863c060fa32971537996a7b2d57 ]

Non-GSO TCP packets whose SKBs' linear portion did not include the
entire TCP header were not populating the first Tx descriptor with
as many bytes as the vNIC expected. This change ensures that all
TCP packets populate the first descriptor with the correct number of
bytes.

Fixes: 893ce44df565 ("gve: Add basic driver framework for Compute Engine Virtual NIC")
Signed-off-by: Shailend Chand <shailend@google.com>
Link: https://lore.kernel.org/r/20230403172809.2939306-1-shailend@google.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/net/ethernet/google/gve/gve.h
drivers/net/ethernet/google/gve/gve_tx.c