Re: Chelsio (cxgbe) VF on FreeBSD guest under KVM requires -rxcsum

From: John Nielsen <lists_at_jnielsen.net>
Date: Sat, 27 Sep 2025 16:26:54 UTC
> On Sep 26, 2025, at 3:44 PM, Michael Tuexen <michael.tuexen@lurchi.franken.de> wrote:
> 
>> On 26. Sep 2025, at 20:52, John Nielsen <lists@jnielsen.net> wrote:
>> 
>>> On Sep 26, 2025, at 1:46 AM, Michael Tuexen <michael.tuexen@lurchi.franken.de> wrote:
>>> 
>>>> 
>>>> On 26. Sep 2025, at 02:58, John Nielsen <lists@jnielsen.net> wrote:
>>>> 
>>>> Not sure if this is a known issue or even an issue on the FreeBSD side but decided to ask here first. I’m happy to put in a bug report if appropriate.
>>>> 
>>>> I have a hypervisor machine running Arch Linux with KVM, Qemu and libvirtd. The machine has a Chelsio T520-CR adapter. I recently began passing through virtual functions of the NIC to several of the guests I run on the hypervisor. One of the guests runs Windows 11, and the change was seamless. Two of the guests are running FreeBSD (14.3 or so). On each of them the VFs were readily identified and configured (using DHCP in one case), and ping and ARP appeared to work fine. However, TCP and UDP traffic to the guests never received a response. After some head-scratching and troubleshooting I discovered that running “ifconfig cxlv0 -rxcsum” immediately allowed traffic to flow as expected.
>>> 
>>> I don't have access to such a network card. Just to be clear: you are running the “ifconfig cxlv0 -rxcsum” command inside the guest running FreeBSD, right?
>> 
>> Yes.
>> 
>>> What is the peer, when you mention TCP and UDP do not work? Is it the host running Linux? Is it another VM? Is it some external host?
>> 
>> My laptop on the same subnet primarily, but. Also tested from another physical machine running FreeBSD.
> OK. That does not seem to be related to what I initially thought.
> 
> Could you run
> tcpdump -i outgoing_interface -w laptop.pcap
> on your laptop and
> tcpdump -i cxlv0 -w vm.pcap
> on your vm at the same time and try to do some TCP based communication.
> Maybe two times, one time with ifconfig cxlv0 rxcsum and one time with ifconfig cxlv0 -rxcsum.
> 
> If you are fine with doing the measurements, you can send the .pcap files
> to tuexen@freebsd.org <mailto:tuexen@freebsd.org> <mailto:tuexen@freebsd.org>.
> 
> At least I would like to understand what is going on.

Thank you, I sent you those packet captures under separate cover.

From what I can tell so far the VM does receive incoming packets even when rxcsum is enabled, and the checksums appear correct at least according to tcpdump. But something prevents the packets from being processed or sent up the stack. The VM’s sshd never generates a SYN/ACK in response to a connection attempt. A DNS query from the VM looks like it gets a response on the wire but the response doesn’t make it to the process doing the query.

-John