Port-arm archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: genet0 speeds under NetBSD/aarch64 on Rpi4 8 GB using UEFI/ACPI v1.17 firmware



On Jul 22, 2020, at 10:43 PM, Jason Thorpe <thorpej%me.com@localhost> wrote:

> 
>> On Jul 22, 2020, at 6:34 PM, Paul Mather <bsd-lists%gromit.dlib.vt.edu@localhost> wrote:
>> 
>> Am I right in assuming the difference is due to the implementation of genet0 in the UEFI/ACPI firmware? I am guessing the driver implementation under Raspberry Pi OS is better taking advantage of the hardware, including maybe any hardware offload it may provide??
>> 
>> Is there anything obvious I can do to improve network speeds under NetBSD/aarch64?
>> 
>> I am using "ACPI" in my firmware, not "ACPI + devicetree".  Should I be using the latter with NetBSD/aarch64?
> 
> The driver for "genet" in NetBSD is a native driver; calls are not being made into UEFI.


The reason I thought genet was tied into the UEFI/ACPI firmware is because the release notes for v1.17 actually included a line saying, "Improve Genet driver [tianocore/edk2-platforms@2242b99]".  The link actually refers to a commit in the upstream tianocore project having this commit message:

=====
Silicon/BcmGenetDxe: don't consume RX buffer until it's actually copied
This was originally a bit sloppy, and could hypothetically under heavy
load result in a buffer being overwritten by hardware before the received
buffer is copied.

Signed-off-by: Andrei Warkentin <andrey.warkentin%gmail.com@localhost>
Reviewed-by: Pete Batard <pete%akeo.ie@localhost>
Reviewed-by: Leif Lindholm <leif%nuviainc.com@localhost>
=====

Thinking about it, though, I'm guessing this is referencing the ethernet driver used in the UEFI/ACPI firmware to do stuff such as PXE and HTTP net booting.


> Can you provide the output of "ifconfig genet0"?  If I had to guess, I'd assume that RPI Linux has the checksum offload feature enabled by default, while NetBSD does not (on any network driver that supports it).

Here is the NetBSD/aarch64 -CURRENT ifconfig output on the RPi4:

genet0: flags=0x8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500
        ec_capabilities=0x1<VLAN_MTU>
        ec_enabled=0
        address: dc:a6:32:b0:24:d4
        media: Ethernet autoselect (1000baseT full-duplex)
        status: active

(I've omitted the inet and inet6 lines that follow after "status: active".)

I have a RPi3 running NetBSD/aarch64 9-STABLE.  It is not using UEFI/ACPI, but boots via the regular bootcode.bin mechanism.  Here is the output I get from ifconfig on that system:

mue0: flags=0x8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500
        capabilities=7ff80<TSO4,IP4CSUM_Rx,IP4CSUM_Tx,TCP4CSUM_Rx>
        capabilities=7ff80<TCP4CSUM_Tx,UDP4CSUM_Rx,UDP4CSUM_Tx,TCP6CSUM_Rx>
        capabilities=7ff80<TCP6CSUM_Tx,UDP6CSUM_Rx,UDP6CSUM_Tx,TSO6>
        enabled=0
        ec_capabilities=1<VLAN_MTU>
        ec_enabled=0
        address: b8:27:eb:47:86:58
        media: Ethernet autoselect (1000baseT full-duplex,master)
        status: active

(I've also omitted the inet and inet6 lines in the above output.)

The driver does report offload capabilities under 9-STABLE for the RPi3.

I can provide the Raspberry Pi OS NIC details if needed, though I'll have to reboot into it.

Cheers,

Paul.


Home | Main Index | Thread Index | Old Index