Am Donnerstag, dem 03.04.2025 um 09:04 -0400 schrieb Michael S.
Tsirkin:
> On Wed, Apr 02, 2025 at 11:12:07PM +0200, Markus Fohrer wrote:
> > Hi,
> > 
> > I'm observing a significant performance regression in KVM guest VMs
> > using virtio-net with recent Linux kernels (6.8.1+ and 6.14).
> > 
> > When running on a host system equipped with a Broadcom NetXtreme-E
> > (bnxt_en) NIC and AMD EPYC CPUs, the network throughput in the
> > guest drops to 100–200 KB/s. The same guest configuration performs
> > normally (~100 MB/s) when using kernel 6.8.0 or when the VM is
> > moved to a host with Intel NICs.
> > 
> > Test environment:
> > - Host: QEMU/KVM, Linux 6.8.1 and 6.14.0
> > - Guest: Linux with virtio-net interface
> > - NIC: Broadcom BCM57416 (bnxt_en driver, no issues at host level)
> > - CPU: AMD EPYC
> > - Storage: virtio-scsi
> > - VM network: virtio-net, virtio-scsi (no CPU or IO bottlenecks)
> > - Traffic test: iperf3, scp, wget consistently slow in guest
> > 
> > This issue is not present:
> > - On 6.8.0 
> > - On hosts with Intel NICs (same VM config)
> > 
> > I have bisected the issue to the following upstream commit:
> > 
> >   49d14b54a527 ("virtio-net: Suppress tx timeout warning for small
> > tx")
> >   https://git.kernel.org/linus/49d14b54a527
> 
> Thanks a lot for the info!
> 
> 
> both the link and commit point at:
> 
> commit 49d14b54a527289d09a9480f214b8c586322310a
> Author: Eric Dumazet <eduma...@google.com>
> Date:   Thu Sep 26 16:58:36 2024 +0000
> 
>     net: test for not too small csum_start in virtio_net_hdr_to_skb()
>     
> 
> is this what you mean?
> 
> I don't know which commit is "virtio-net: Suppress tx timeout warning
> for small tx"
> 
> 
> 
> > Reverting this commit restores normal network performance in
> > affected guest VMs.
> > 
> > I’m happy to provide more data or assist with testing a potential
> > fix.
> > 
> > Thanks,
> > Markus Fohrer
> 
> 
> Thanks! First I think it's worth checking what is the setup, e.g.
> which offloads are enabled.
> Besides that, I'd start by seeing what's doing on. Assuming I'm right
> about
> Eric's patch:
> 
> diff --git a/include/linux/virtio_net.h b/include/linux/virtio_net.h
> index 276ca543ef44d8..02a9f4dc594d02 100644
> --- a/include/linux/virtio_net.h
> +++ b/include/linux/virtio_net.h
> @@ -103,8 +103,10 @@ static inline int virtio_net_hdr_to_skb(struct
> sk_buff *skb,
>  
>               if (!skb_partial_csum_set(skb, start, off))
>                       return -EINVAL;
> +             if (skb_transport_offset(skb) < nh_min_len)
> +                     return -EINVAL;
>  
> -             nh_min_len = max_t(u32, nh_min_len,
> skb_transport_offset(skb));
> +             nh_min_len = skb_transport_offset(skb);
>               p_off = nh_min_len + thlen;
>               if (!pskb_may_pull(skb, p_off))
>                       return -EINVAL;
> 
> 
> sticking a printk before return -EINVAL to show the offset and
> nh_min_len
> would be a good 1st step. Thanks!
> 


Hi Eric,

thanks a lot for the quick response — and yes, you're absolutely right.

Apologies for the confusion: I mistakenly wrote the wrong commit
description in my initial mail.

The correct commit is indeed:

commit 49d14b54a527289d09a9480f214b8c586322310a
Author: Eric Dumazet <eduma...@google.com>
Date:   Thu Sep 26 16:58:36 2024 +0000

    net: test for not too small csum_start in virtio_net_hdr_to_skb()

This is the one I bisected and which causes the performance regression
in my environment.

Thanks again,
Markus


Reply via email to