Problem with checksum offloading on RPi3 (PF + Jails involved)
Carsten Bäcker
carbaecker at gmx.de
Thu Oct 29 15:31:01 UTC 2020
Sure, i am willing to help.
Device is a Raspberry Pi 3B (not +), using the onboard-ethernet.
I attached a bunch of information.
Configuration is stripped down to the minimum required to reproduce the
problem.
I noticed another side-effect of disabling checksum offloading:
SSH-access using IPv6 (rtsold) works much smoother/more reliable than
before.
Best regards,
Carsten
Am 29.10.2020 um 15:00 schrieb Kristof Provost:
>
> On 29 Oct 2020, at 14:29, Carsten Bäcker wrote:
>
> Hi Hackers,
>
> just stumbled upon a problem on my RPi3, but i am not sure if this is
> arm-related.
>
> Running System:
> "FreeBSD generic 12.1-RELEASE-p9 FreeBSD 12.1-RELEASE-p9 r365508
> GENERIC arm64"
>
> I created a jail and set up NAT using PF. Same configuration runs
> perfectly on my server.
> However the jail was unable to resolve hostnames.
>
> After enabling pflog for the NAT-rules i noticed these errors:
> "[bad udp cksum 0xe58a -> 0x482d!]"
>
> So i disabled checksum offloading and everything worked fine.
> "ifconfig ue0 -rxcsum"
>
> Any chance to get this fixed?
>
> First someone’s going to have to be able to reproduce it.
>
> I fixed issues related to checksums in pf years ago, and while I’ve
> heard vague reports that it still wasn’t fixed in all cases I’ve not
> yet been able to reproduce (or even have someone else reproduce) those
> issues.
>
> My initial suspicion would fall to the network driver rather than pf
> itself.
> Let’s start by figuring out which one that is.
>
> Presumably you’ve got a USB ethernet thing plugged in. Which one?
> (|sudo usbconfig dump_device_desc| will help).
>
> Best,
> Kristof
>
-------------- next part --------------
---<<BOOT>>---
Copyright (c) 1992-2019 The FreeBSD Project.
Copyright (c) 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993, 1994
The Regents of the University of California. All rights reserved.
FreeBSD is a registered trademark of The FreeBSD Foundation.
FreeBSD 12.1-RELEASE-p9 r365508 GENERIC arm64
FreeBSD clang version 8.0.1 (tags/RELEASE_801/final 366581) (based on LLVM 8.0.1)
VT(efifb): resolution 656x416
KLD file umodem.ko is missing dependencies
Starting CPU 1 (1)
Starting CPU 2 (2)
Starting CPU 3 (3)
FreeBSD/SMP: Multiprocessor System Detected: 4 CPUs
random: unblocking device.
random: entropy device external interface
MAP 39f4a000 mode 2 pages 1
MAP 39f4f000 mode 2 pages 1
MAP 3b350000 mode 2 pages 16
MAP 3f100000 mode 1 pages 1
kbd0 at kbdmux0
ofwbus0: <Open Firmware Device Tree>
simplebus0: <Flattened device tree simple bus> on ofwbus0
ofw_clkbus0: <OFW clocks bus> on ofwbus0
clk_fixed0: <Fixed clock> on ofw_clkbus0
clk_fixed1: <Fixed clock> on ofw_clkbus0
regfix0: <Fixed Regulator> on ofwbus0
regfix1: <Fixed Regulator> on ofwbus0
psci0: <ARM Power State Co-ordination Interface Driver> on ofwbus0
lintc0: <BCM2836 Interrupt Controller> mem 0x40000000-0x400000ff on simplebus0
intc0: <BCM2835 Interrupt Controller> mem 0x7e00b200-0x7e00b3ff irq 20 on simplebus0
gpio0: <BCM2708/2835 GPIO controller> mem 0x7e200000-0x7e2000b3 irq 23,24 on simplebus0
gpiobus0: <OFW GPIO bus> on gpio0
generic_timer0: <ARMv7 Generic Timer> irq 0,1,2,3 on ofwbus0
Timecounter "ARM MPCore Timecounter" frequency 19200000 Hz quality 1000
Event timer "ARM MPCore Eventtimer" frequency 19200000 Hz quality 1000
usb_nop_xceiv0: <USB NOP PHY> on ofwbus0
bcm_dma0: <BCM2835 DMA Controller> mem 0x7e007000-0x7e007eff irq 4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19 on simplebus0
bcmwd0: <BCM2708/2835 Watchdog> mem 0x7e100000-0x7e100027 on simplebus0
bcmrng0: <Broadcom BCM2835 RNG> mem 0x7e104000-0x7e10400f irq 21 on simplebus0
mbox0: <BCM2835 VideoCore Mailbox> mem 0x7e00b880-0x7e00b8bf irq 22 on simplebus0
gpioc0: <GPIO controller> on gpio0
uart2: <PrimeCell UART (PL011)> mem 0x7e201000-0x7e201fff irq 25 on simplebus0
uart2: console (115200,n,8,1)
spi0: <BCM2708/2835 SPI controller> mem 0x7e204000-0x7e204fff irq 27 on simplebus0
spibus0: <OFW SPI bus> on spi0
spibus0: <unknown card> at cs 0 mode 0
spibus0: <unknown card> at cs 1 mode 0
iichb0: <BCM2708/2835 BSC controller> mem 0x7e804000-0x7e804fff irq 40 on simplebus0
bcm283x_dwcotg0: <DWC OTG 2.0 integrated USB controller (bcm283x)> mem 0x7e980000-0x7e98ffff,0x7e006000-0x7e006fff irq 46,47 on simplebus0
usbus0 on bcm283x_dwcotg0
sdhci_bcm0: <Broadcom 2708 SDHCI controller> mem 0x7e300000-0x7e3000ff irq 49 on simplebus0
mmc0: <MMC/SD bus> on sdhci_bcm0
fb0: <BCM2835 VT framebuffer driver> on simplebus0
fbd0 on fb0
VT: Replacing driver "efifb" with new "fb".
fb0: 656x416(656x416 at 0,0) 24bpp
fb0: fbswap: 1, pitch 1968, base 0x3eb33000, screen_size 818688
pmu0: <Performance Monitoring Unit> irq 53 on simplebus0
cpulist0: <Open Firmware CPU Group> on ofwbus0
cpu0: <Open Firmware CPU> on cpulist0
bcm2835_cpufreq0: <CPU Frequency Control> on cpu0
cpu1: <Open Firmware CPU> on cpulist0
cpu2: <Open Firmware CPU> on cpulist0
cpu3: <Open Firmware CPU> on cpulist0
gpioled0: <GPIO LEDs> on ofwbus0
gpioled0: <led0> failed to map pin
gpioled0: <led1> failed to map pin
cryptosoft0: <software crypto>
Timecounters tick every 1.000 msec
iicbus0: <OFW I2C bus> on iichb0
iic0: <I2C generic I/O> on iicbus0
usbus0: 480Mbps High Speed USB v2.0
ugen0.1: <DWCOTG OTG Root HUB> at usbus0
uhub0: <DWCOTG OTG Root HUB, class 9/0, rev 2.00/1.00, addr 1> on usbus0
mmcsd0: 16GB <SDHC USD 1.0 SN 4127C1D6 MFG 09/2016 by 116 J`> at mmc0 50.0MHz/4bit/65535-block
bcm2835_cpufreq0: ARM 600MHz, Core 250MHz, SDRAM 400MHz, Turbo OFF
mbox0: mbox response error
bcm2835_cpufreq0: can't set clock rate (id=4)
Release APs...done
CPU 0: ARM Cortex-A53 r0p4 affinity: 0
Trying to mount root from ufs:/dev/ufs/rootfs [rw]...
Instruction Set Attributes 0 = <CRC32>
Instruction Set Attributes 1 = <>
Processor Features 0 = <AdvSIMD,Float,EL3 32,EL2 32,EL1 32,EL0 32>
Processor Features 1 = <0>
Memory Model Features 0 = <4k Granule,64k Granule,S/NS Mem,MixedEndian,16bit ASID,1TB PA>
Memory Model Features 1 = <>
Memory Model Features 2 = <32b CCIDX,48b VA>
Debug Features 0 = <2 CTX Breakpoints,4 Watchpoints,6 Breakpoints,PMUv3,Debug v8>
Debug Features 1 = <0>
Auxiliary Features 0 = <0>
Auxiliary Features 1 = <0>
CPU 1: ARM Cortex-A53 r0p4 affinity: 1
CPU 2: ARM Cortex-A53 r0p4 affinity: 2
CPU 3: ARM Cortex-A53 r0p4 affinity: 3
Warning: no time-of-day clock registered, system time will not be set accurately
uhub0: 1 port with 1 removable, self powered
ugen0.2: <vendor 0x0424 product 0x9514> at usbus0
uhub1 on uhub0
uhub1: <vendor 0x0424 product 0x9514, class 9/0, rev 2.00/2.00, addr 2> on usbus0
uhub1: MTT enabled
uhub1: 5 ports with 4 removable, self powered
ugen0.3: <vendor 0x0424 product 0xec00> at usbus0
smsc0 on uhub1
smsc0: <vendor 0x0424 product 0xec00, rev 2.00/2.00, addr 3> on usbus0
smsc0: chip 0xec00, rev. 0002
miibus0: <MII bus> on smsc0
smscphy0: <SMC LAN8700 10/100 interface> PHY 1 on miibus0
smscphy0: 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, auto
ue0: <USB Ethernet> on smsc0
ue0: Ethernet address: b8:27:eb:55:7e:70
lo0: link state changed to UP
smsc0: chip 0xec00, rev. 0002
ue0: link state changed to DOWN
ue0: link state changed to UP
pflog0: promiscuous mode enabled
Security policy loaded: MAC/ntpd (mac_ntpd)
lo1: link state changed to UP
-------------- next part --------------
www-public {
devfs_ruleset = 4;
enforce_statfs = 2;
exec.clean;
exec.consolelog = /var/log/jails/www-public.log;
exec.start = '/bin/sh /etc/rc';
exec.stop = '/bin/sh /etc/rc.shutdown';
host.hostname = www-public;
mount.devfs;
mount.fstab = /storage/jails/www-public/fstab;
path = /storage/jails/www-public/rootfs;
securelevel = 2;
allow.raw_sockets = 1;
interface = lo1;
ip4.addr = 10.0.0.2;
ip6 = disable;
}
-------------- next part --------------
ext_if = "ue0"
wwwpublicjail = 10.0.0.2
set block-policy return
set skip on lo0
set skip on lo1
table <jails> persist
nat on $ext_if from { $wwwpublicjail } to any -> ($ext_if)
block in all
pass in inet proto icmp all icmp-type echoreq
pass in inet proto tcp to port { ssh }
pass out all
-------------- next part --------------
hostname="generic"
ifconfig_ue0="inet 192.168.178.3 netmask 255.255.255.0"
defaultrouter="192.168.178.1"
sshd_enable="YES"
sendmail_enable="NONE"
sendmail_submit_enable="NO"
sendmail_outbound_enable="NO"
sendmail_msp_queue_enable="NO"
powerd_enable="YES"
cloned_interfaces="lo1"
pf_enable="YES"
pflog_enable="YES"
-------------- next part --------------
ugen0.1: <DWCOTG OTG Root HUB> at usbus0, cfg=0 md=HOST spd=HIGH (480Mbps) pwr=SAVE (0mA)
bLength = 0x0012
bDescriptorType = 0x0001
bcdUSB = 0x0200
bDeviceClass = 0x0009 <HUB>
bDeviceSubClass = 0x0000
bDeviceProtocol = 0x0001
bMaxPacketSize0 = 0x0040
idVendor = 0x0000
idProduct = 0x0000
bcdDevice = 0x0100
iManufacturer = 0x0001 <DWCOTG>
iProduct = 0x0002 <OTG Root HUB>
iSerialNumber = 0x0000 <no string>
bNumConfigurations = 0x0001
ugen0.2: <vendor 0x0424 product 0x9514> at usbus0, cfg=0 md=HOST spd=HIGH (480Mbps) pwr=SAVE (2mA)
bLength = 0x0012
bDescriptorType = 0x0001
bcdUSB = 0x0200
bDeviceClass = 0x0009 <HUB>
bDeviceSubClass = 0x0000
bDeviceProtocol = 0x0002
bMaxPacketSize0 = 0x0040
idVendor = 0x0424
idProduct = 0x9514
bcdDevice = 0x0200
iManufacturer = 0x0000 <no string>
iProduct = 0x0000 <no string>
iSerialNumber = 0x0000 <no string>
bNumConfigurations = 0x0001
ugen0.3: <vendor 0x0424 product 0xec00> at usbus0, cfg=0 md=HOST spd=HIGH (480Mbps) pwr=ON (2mA)
bLength = 0x0012
bDescriptorType = 0x0001
bcdUSB = 0x0200
bDeviceClass = 0x00ff <Vendor specific>
bDeviceSubClass = 0x0000
bDeviceProtocol = 0x0001
bMaxPacketSize0 = 0x0040
idVendor = 0x0424
idProduct = 0xec00
bcdDevice = 0x0200
iManufacturer = 0x0000 <no string>
iProduct = 0x0000 <no string>
iSerialNumber = 0x0000 <no string>
bNumConfigurations = 0x0001
More information about the freebsd-hackers
mailing list