From: Alyssa Ross <hi@alyssa.is>
To: Jason Wang <jasowang@redhat.com>
Cc: Paolo Abeni <pabeni@redhat.com>,
"Michael S. Tsirkin" <mst@redhat.com>,
netdev@vger.kernel.org, virtualization@lists.linux.dev,
regressions@lists.linux.dev
Subject: Re: [REGRESSION][BISECTED] virtio_net CSUM broken with Cloud Hypervisor
Date: Thu, 30 Oct 2025 12:48:43 +0100 [thread overview]
Message-ID: <87v7jwwqxw.fsf@alyssa.is> (raw)
In-Reply-To: <CACGkMEuTnLX7EPuOLb2UhrZT2oH2AcXPQrvq-uw2ZydYV_FAgQ@mail.gmail.com>
[-- Attachment #1: Type: text/plain, Size: 2190 bytes --]
Jason Wang <jasowang@redhat.com> writes:
> On Thu, Oct 30, 2025 at 4:03 AM Alyssa Ross <hi@alyssa.is> wrote:
>>
>> Since 56a06bd40fab ("virtio_net: enable gso over UDP tunnel support."),
>> networking in Cloud Hypervisor is no longer working for me.
>>
>> I've narrowed down the problem to here:
>>
>> > @@ -2555,14 +2567,21 @@ static void virtnet_receive_done(struct virtnet_info *vi, struct receive_queue *
>> > if (dev->features & NETIF_F_RXHASH && vi->has_rss_hash_report)
>> > virtio_skb_set_hash(&hdr->hash_v1_hdr, skb);
>> >
>> > - if (flags & VIRTIO_NET_HDR_F_DATA_VALID)
>> > - skb->ip_summed = CHECKSUM_UNNECESSARY;
>> > + hdr->hdr.flags = flags;
>>
>> It looks like this was added because virtio_net_handle_csum_offload()
>> looks at the flags from the hdr it's given, rather than having it passed
>> separately, but it appears something later on relies on the previous
>> value of hdr->hdr.flags.
>>
>> From my tracing, hdr->hdr.flags is set to either 0 or
>> VIRTIO_NET_HDR_F_NEEDS_CSUM before this assignment, and flags is always
>> 0, so in some cases VIRTIO_NET_HDR_F_NEEDS_CSUM now ends up being unset.
>
> Are you using XDP, if not there should be no change.
>
>>
>> > + if (virtio_net_handle_csum_offload(skb, &hdr->hdr, vi->rx_tnl_csum)) {
>> > + net_warn_ratelimited("%s: bad csum: flags: %x, gso_type: %x rx_tnl_csum %d\n",
>> > + dev->name, hdr->hdr.flags,
>> > + hdr->hdr.gso_type, vi->rx_tnl_csum);
>> > + goto frame_err;
>> > + }
>>
>> If I change it to save the previous value of hdr->hdr.flags, and restore
>> it again here, everything works again.
>>
>> Disabling offload_csum in Cloud Hypervisor is a usable workaround,
>> because then hdr->hdr.flags is always 0 to begin with anyway.
>>
>> #regzbot introduced: 56a06bd40fab
>
> Is mergeable rx buffer enabled, if not, I wonder if this can be fixed by:
>
> https://marc.info/?l=linux-netdev&m=176170721926346&w=2
That patch does fix it, thank you!
#regzbot fix: virtio-net: fix incorrect flags recording in big mode
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 227 bytes --]
prev parent reply other threads:[~2025-10-30 12:00 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-10-29 20:03 [REGRESSION][BISECTED] virtio_net CSUM broken with Cloud Hypervisor Alyssa Ross
2025-10-30 2:27 ` Jason Wang
2025-10-30 11:48 ` Alyssa Ross [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87v7jwwqxw.fsf@alyssa.is \
--to=hi@alyssa.is \
--cc=jasowang@redhat.com \
--cc=mst@redhat.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=regressions@lists.linux.dev \
--cc=virtualization@lists.linux.dev \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).