On Thu, 15 Oct 2026 at 19:11, Marcelo Manzo <[email protected]> wrote:
>
> From: Sergey Kambalin <[email protected]>
>
> Implement the receive DMA ring handling: qemu_can_receive()/
> receive() callbacks for the NIC's netdev peer, copying incoming
> frame data into descriptor buffers on the active RX ring,
> classifying broadcast/multicast, and raising the RXDMA_MBDONE
> interrupt as descriptors complete.
>
> Part of Sergey Kambalin's original Raspberry Pi 4B PCIe/GENET
> networking series (patchwork series 829638, posted to qemu-devel in
> 2024, never merged). Carried forward and completed by Marcelo Manzo.
>

Some of my comments on the TX path will apply here too.

> +
> +        /*
> +         * Report no hardware-computed checksum. The IP header's own
> +         * checksum was previously (incorrectly) stored here, but the
> +         * guest's CHECKSUM_COMPLETE path expects a running checksum over
> +         * the L4 payload, not the L3 header checksum -- and it was stored
> +         * in host byte order besides. That mismatch was causing the guest
> +         * to reject otherwise-valid inbound packets ("hw csum failure" in
> +         * dmesg, tied to bcmgenet_rx_poll), breaking DHCP/connectivity
> +         * intermittently. Leaving this at 0 makes the guest fall back to
> +         * verifying checksums itself in software, which succeeds since the
> +         * packet data itself is intact.
> +         */

We don't need comments to document bugs we've fixed (especially bugs
that were only present in previous versions of the patchset, not
upstream). It is useful to note that we don't implement hardware
checksums and rely on the guest to do it in software (i.e. documenting
where we deviate from the actual hardware behaviour).

thanks
-- PMM

Reply via email to