Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Problem with svlan(4) and bge(4)

20 views
Skip to first unread message

Denis Fondras

unread,
Jan 10, 2016, 7:54:58 AM1/10/16
to te...@openbsd.org
Hi,

I have a problem with svlan(4) and bge(4) (Broadcom BCM5721).

With TCO :
----------------------------
denis@jigai:~$ ssh ro...@10.20.30.210
ro...@10.20.30.210's password:
Last login: Sun Jan 10 13:22:27 2016 from 192.168.10.10
OpenBSD 5.9-beta (GENERIC) #1: Sun Jan 10 13:25:07 CET 2016

Welcome to OpenBSD: The proactively secure Unix-like operating system.

Please use the sendbug(1) utility to report bugs in the system.
Before reporting a bug, please try to reproduce it with the latest
version of the code. With bug reports, please try to ensure that
enough information to reproduce the problem is enclosed, and if a
known fix for it exists, include that as well.

# ping 185.22.128.253
PING 185.22.128.253 (185.22.128.253): 56 data bytes
--- 185.22.128.253 ping statistics ---
13 packets transmitted, 0 packets received, 100.0% packet loss
----------------------------

Comment lines 3022-3023 of if_bge.c to disable TCO, make && make install and
reboot.
(network/system/pf config are the same)

Without TCO :
----------------------------
$ ssh ro...@10.20.30.210
ro...@10.20.30.210's password:
Last login: Sun Jan 10 13:27:43 2016 from 192.168.10.10
OpenBSD 5.9-beta (GENERIC) #2: Sun Jan 10 13:30:31 CET 2016

Welcome to OpenBSD: The proactively secure Unix-like operating system.

Please use the sendbug(1) utility to report bugs in the system.
Before reporting a bug, please try to reproduce it with the latest
version of the code. With bug reports, please try to ensure that
enough information to reproduce the problem is enclosed, and if a
known fix for it exists, include that as well.

# ping 185.22.128.253
PING 185.22.128.253 (185.22.128.253): 56 data bytes
64 bytes from 185.22.128.253: icmp_seq=0 ttl=254 time=0.292 ms
64 bytes from 185.22.128.253: icmp_seq=1 ttl=254 time=0.215 ms
64 bytes from 185.22.128.253: icmp_seq=2 ttl=254 time=0.339 ms
64 bytes from 185.22.128.253: icmp_seq=3 ttl=254 time=0.312 ms
--- 185.22.128.253 ping statistics ---
4 packets transmitted, 4 packets received, 0.0% packet loss
round-trip min/avg/max/std-dev = 0.215/0.289/0.339/0.046 ms
----------------------------

dmesg :
----------------------------
OpenBSD 5.9-beta (GENERIC) #2: Sun Jan 10 13:30:31 CET 2016
ro...@test.lab.ledeuns.net:/usr/src/sys/arch/amd64/compile/GENERIC
real mem = 8571977728 (8174MB)
avail mem = 8308101120 (7923MB)
mpath0 at root
scsibus0 at mpath0: 256 targets
mainbus0 at root
bios0 at mainbus0: SMBIOS rev. 2.33 @ 0xbfeea000 (36 entries)
bios0: vendor IBM version "IBM BIOS Version 1.45-[PAE145AUS-1.45]-" date
01/23/2009
bios0: IBM IBM eServer 306m -[8849PAU]-
acpi0 at bios0: rev 0
acpi0: sleep states S0 S1 S4 S5
acpi0: tables DSDT FACP SPCR MCFG APIC BOOT SSDT
acpi0: wakeup devices PEG_(S4) EXP1(S4) EXP5(S4) EXP6(S4) PCIB(S5) COM1(S4)
COM2(S4) KBC0(S1) MSE0(S1) AC97(S1) USB1(S1) USB2(S1) USB3(S1) USB4(S1) EUSB(S1)
acpitimer0 at acpi0: 3579545 Hz, 24 bits
acpimcfg0 at acpi0 addr 0xe0000000, bus 0-9
acpimadt0 at acpi0 addr 0xfee00000: PC-AT compat
cpu0 at mainbus0: apid 0 (boot processor)
cpu0: Intel(R) Pentium(R) 4 CPU 3.00GHz, 2992.86 MHz
cpu0:
FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE,SSE3,DTES64,MWAIT,DS-CPL,CNXT-ID,CX16,xTPR,NXE,LONG,LAHF,PERF
cpu0: 1MB 64b/line 8-way L2 cache
cpu0: smt 0, core 0, package 0
mtrr: Pentium Pro MTRR support, 8 var ranges, 88 fixed ranges
cpu0: apic clock running at 199MHz
cpu0: mwait min=64, max=64
cpu at mainbus0: not configured
ioapic0 at mainbus0: apid 2 pa 0xfec00000, version 20, 24 pins
acpiprt0 at acpi0: bus 0 (PCI0)
acpiprt1 at acpi0: bus 1 (PEG_)
acpiprt2 at acpi0: bus 3 (PXHV)
acpiprt3 at acpi0: bus 4 (EXP5)
acpiprt4 at acpi0: bus 5 (EXP6)
acpiprt5 at acpi0: bus 10 (PCIB)
acpicpu0 at acpi0: C1(@1 halt!)
acpibtn0 at acpi0: PWRB
ipmi at mainbus0 not configured
pci0 at mainbus0 bus 0
pchb0 at pci0 dev 0 function 0 "Intel E7230 Host" rev 0x81
ppb0 at pci0 dev 1 function 0 "Intel E7230 PCIE" rev 0x81: msi
pci1 at ppb0 bus 1
ppb1 at pci0 dev 28 function 0 "Intel 82801GB PCIE" rev 0x01: msi
pci2 at ppb1 bus 2
ppb2 at pci2 dev 0 function 0 "Intel 6702PXH PCIE-PCIX" rev 0x09
pci3 at ppb2 bus 3
"Intel IOxAPIC" rev 0x09 at pci2 dev 0 function 1 not configured
ppb3 at pci0 dev 28 function 4 "Intel 82801G PCIE" rev 0x01: msi
pci4 at ppb3 bus 4
bge0 at pci4 dev 0 function 0 "Broadcom BCM5721" rev 0x11, BCM5750 B1 (0x4101):
apic 2 int 16, address 00:14:5e:84:0b:06
brgphy0 at bge0 phy 1: BCM5750 10/100/1000baseT PHY, rev. 0
ppb4 at pci0 dev 28 function 5 "Intel 82801G PCIE" rev 0x01: msi
pci5 at ppb4 bus 5
bge1 at pci5 dev 0 function 0 "Broadcom BCM5721" rev 0x11, BCM5750 B1 (0x4101):
apic 2 int 17, address 00:14:5e:84:0b:07
brgphy1 at bge1 phy 1: BCM5750 10/100/1000baseT PHY, rev. 0
uhci0 at pci0 dev 29 function 0 "Intel 82801GB USB" rev 0x01: apic 2 int 23
uhci1 at pci0 dev 29 function 1 "Intel 82801GB USB" rev 0x01: apic 2 int 19
uhci2 at pci0 dev 29 function 2 "Intel 82801GB USB" rev 0x01: apic 2 int 18
ehci0 at pci0 dev 29 function 7 "Intel 82801GB USB" rev 0x01: apic 2 int 23
usb0 at ehci0: USB revision 2.0
uhub0 at usb0 "Intel EHCI root hub" rev 2.00/1.00 addr 1
ppb5 at pci0 dev 30 function 0 "Intel 82801BA Hub-to-PCI" rev 0xe1
pci6 at ppb5 bus 10
radeondrm0 at pci6 dev 4 function 0 "ATI ES1000" rev 0x02
drm0 at radeondrm0
radeondrm0: apic 2 int 16
pcib0 at pci0 dev 31 function 0 "Intel 82801GB LPC" rev 0x01
pciide0 at pci0 dev 31 function 1 "Intel 82801GB IDE" rev 0x01: DMA, channel 0
configured to compatibility, channel 1 configured to compatibility
atapiscsi0 at pciide0 channel 0 drive 0
scsibus1 at atapiscsi0: 2 targets
cd0 at scsibus1 targ 0 lun 0: <TSSTcorp, CD-ROM TS-L162C, IB02> ATAPI 5/cdrom
removable
cd0(pciide0:0:0): using PIO mode 4, Ultra-DMA mode 2
pciide0: channel 1 ignored (disabled)
ahci0 at pci0 dev 31 function 2 "Intel 82801GR AHCI" rev 0x01: msi, AHCI 1.1
ahci0: port 0: 3.0Gb/s
scsibus2 at ahci0: 32 targets
sd0 at scsibus2 targ 0 lun 0: <ATA, ST3160815AS, 3.AA> SCSI3 0/direct fixed
t10.ATA_ST3160815AS_5RX586FF
sd0: 152627MB, 512 bytes/sector, 312581808 sectors
ichiic0 at pci0 dev 31 function 3 "Intel 82801GB SMBus" rev 0x01: SMBus disabled
usb1 at uhci0: USB revision 1.0
uhub1 at usb1 "Intel UHCI root hub" rev 1.00/1.00 addr 1
usb2 at uhci1: USB revision 1.0
uhub2 at usb2 "Intel UHCI root hub" rev 1.00/1.00 addr 1
usb3 at uhci2: USB revision 1.0
uhub3 at usb3 "Intel UHCI root hub" rev 1.00/1.00 addr 1
isa0 at pcib0
isadma0 at isa0
com0 at isa0 port 0x3f8/8 irq 4: ns16550a, 16 byte fifo
pckbc0 at isa0 port 0x60/5 irq 1 irq 12
pckbd0 at pckbc0 (kbd slot)
wskbd0 at pckbd0: console keyboard
pcppi0 at isa0 port 0x61
spkr0 at pcppi0
uhidev0 at uhub1 port 1 configuration 1 interface 0 "Logitech Logitech USB
Keyboard" rev 2.00/60.00 addr 2
uhidev0: iclass 3/1
ukbd0 at uhidev0: 8 variable keys, 6 key codes
wskbd1 at ukbd0 mux 1
uhidev1 at uhub1 port 1 configuration 1 interface 1 "Logitech Logitech USB
Keyboard" rev 2.00/60.00 addr 2
uhidev1: iclass 3/0, 4 report ids
uhid0 at uhidev1 reportid 3: input=4, output=0, feature=0
uhid1 at uhidev1 reportid 4: input=1, output=0, feature=0
vscsi0 at root
scsibus3 at vscsi0: 256 targets
softraid0 at root
scsibus4 at softraid0: 256 targets
root on sd0a (befa19fc92cec73d.a) swap on sd0b dump on sd0b
radeondrm0: 1280x1024
wsdisplay0 at radeondrm0 mux 1: console (std, vt100 emulation), using wskbd0
wskbd1: connecting to wsdisplay0
wsdisplay0: screen 1-5 added (std, vt100 emulation)

Denis Fondras

unread,
Jan 10, 2016, 9:09:18 AM1/10/16
to te...@openbsd.org
Hi,

Following http://article.gmane.org/gmane.os.openbsd.tech/47475, I have a similar
problem with svlan(4) and em(4) (Intel 80003ES2). The main difference with
bge(4) is that ping works with em(4) but not tcp/udp. (obviously my bge(4)
supports IFCAP_CSUM_IPv4 and not my em(4)).
Everything works fine with IPv6 as the TCO capabilities are not supported by
these chips.
Also everything is fine if I don't use svlan(4).

With TCO :
----------------------------
# ssh ro...@185.22.128.253
ssh: connect to host 185.22.128.253 port 22: Operation timed out
----------------------------

Comment lines 1851-1854 of if_em.c to disable TCO, make && make install and
reboot. (network/system/pf config are the same)

Without TCO :
----------------------------
# ssh ro...@185.22.128.253
The authenticity of host '185.22.128.253 (185.22.128.253)' can't be established.
ECDSA key fingerprint is SHA256:Mm4f4qaEuFBUZRoNTOccKdVLPdkISXU2f8v6oz9itec.
Are you sure you want to continue connecting (yes/no)?
----------------------------

dmesg :
----------------------------
OpenBSD 5.9-beta (GENERIC) #0: Sun Jan 10 14:41:37 CET 2016
ro...@test3.lab.ledeuns.net:/usr/src/sys/arch/amd64/compile/GENERIC
RTC BIOS diagnostic error 3
real mem = 8566259712 (8169MB)
avail mem = 8302551040 (7917MB)
mpath0 at root
scsibus0 at mpath0: 256 targets
mainbus0 at root
bios0 at mainbus0: SMBIOS rev. 2.5 @ 0x9fa32000 (69 entries)
bios0: vendor Intel Corporation version "S5000.86B.10.00.0094.101320081858" date
10/13/2008
bios0: Rackable Systems Inc. S5000PSL
acpi0 at bios0: rev 2
acpi0: sleep states S0 S1 S4 S5
acpi0: tables DSDT SLIC FACP APIC SPCR HPET MCFG SSDT SSDT SSDT HEST BERT ERST
EINJ
acpi0: wakeup devices SLPB(S5) PEX0(S5) PS2M(S1) PS2K(S1) UAR1(S5) UAR2(S5)
UHC1(S1) UHC2(S1) UHC3(S1) UHC4(S1) EHCI(S1) PCIX(S5) PCIO(S5) PCIP(S5) PCIQ(S5)
PCIF(S5) [...]
acpitimer0 at acpi0: 3579545 Hz, 24 bits
acpimadt0 at acpi0 addr 0xfee00000: PC-AT compat
cpu0 at mainbus0: apid 0 (boot processor)
cpu0: Intel(R) Xeon(R) CPU L5420 @ 2.50GHz, 2494.09 MHz
cpu0:
FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE,SSE3,DTES64,MWAIT,DS-CPL,VMX,EST,TM2,SSSE3,CX16,xTPR,PDCM,DCA,SSE4.1,XSAVE,NXE,LONG,LAHF,PERF,SENSOR
cpu0: 6MB 64b/line 16-way L2 cache
cpu0: smt 0, core 0, package 0
mtrr: Pentium Pro MTRR support, 8 var ranges, 88 fixed ranges
cpu0: apic clock running at 332MHz
cpu0: mwait min=64, max=64, C-substates=0.2.2.2, IBE
cpu at mainbus0: not configured
cpu at mainbus0: not configured
cpu at mainbus0: not configured
cpu at mainbus0: not configured
cpu at mainbus0: not configured
cpu at mainbus0: not configured
cpu at mainbus0: not configured
ioapic0 at mainbus0: apid 8 pa 0xfec00000, version 20, 24 pins
ioapic1 at mainbus0: apid 9 pa 0xfec80000, version 20, 24 pins
acpihpet0 at acpi0: 14318179 Hz
acpimcfg0 at acpi0 addr 0xa0000000, bus 0-255
acpiprt0 at acpi0: bus 0 (PCI0)
acpiprt1 at acpi0: bus 12 (PC32)
acpiprt2 at acpi0: bus 11 (PEX0)
acpiprt3 at acpi0: bus -1 (PEX1)
acpiprt4 at acpi0: bus -1 (PEX2)
acpiprt5 at acpi0: bus -1 (PEX3)
acpiprt6 at acpi0: bus 1 (PCIE)
acpiprt7 at acpi0: bus 5 (PCIX)
acpiprt8 at acpi0: bus 2 (PCIW)
acpiprt9 at acpi0: bus 3 (PCIO)
acpiprt10 at acpi0: bus -1 (PCIP)
acpiprt11 at acpi0: bus 4 (PCIQ)
acpiprt12 at acpi0: bus 7 (PCIF)
acpiprt13 at acpi0: bus 8 (PCIG)
acpiprt14 at acpi0: bus 9 (PCIH)
acpicpu0 at acpi0: !C2(750@40 io@0x162), C1(1000@20 halt), PSS
acpibtn0 at acpi0: SLPB
acpibtn1 at acpi0: PWRB
ipmi at mainbus0 not configured
cpu0: Enhanced SpeedStep 2494 MHz: speeds: 2497, 1998 MHz
pci0 at mainbus0 bus 0
pchb0 at pci0 dev 0 function 0 "Intel 5000P Host" rev 0xb1
ppb0 at pci0 dev 2 function 0 "Intel 5000 PCIE x8" rev 0xb1
pci1 at ppb0 bus 1
ppb1 at pci1 dev 0 function 0 "Intel 6321ESB PCIE" rev 0x01
pci2 at ppb1 bus 2
ppb2 at pci2 dev 0 function 0 "Intel 6321ESB PCIE" rev 0x01
pci3 at ppb2 bus 3
ppb3 at pci2 dev 2 function 0 "Intel 6321ESB PCIE" rev 0x01
pci4 at ppb3 bus 4
em0 at pci4 dev 0 function 0 "Intel 80003ES2" rev 0x01: msi, address
00:15:17:9a:dd:ec
em1 at pci4 dev 0 function 1 "Intel 80003ES2" rev 0x01: msi, address
00:15:17:9a:dd:ed
ppb4 at pci1 dev 0 function 3 "Intel 6321ESB PCIE-PCIX" rev 0x01
pci5 at ppb4 bus 5
ppb5 at pci0 dev 3 function 0 "Intel 5000 PCIE" rev 0xb1
pci6 at ppb5 bus 6
ppb6 at pci0 dev 4 function 0 "Intel 5000 PCIE x8" rev 0xb1: msi
pci7 at ppb6 bus 7
ppb7 at pci0 dev 5 function 0 "Intel 5000 PCIE" rev 0xb1
pci8 at ppb7 bus 8
ppb8 at pci0 dev 6 function 0 "Intel 5000 PCIE x8" rev 0xb1: msi
pci9 at ppb8 bus 9
ppb9 at pci0 dev 7 function 0 "Intel 5000 PCIE" rev 0xb1
pci10 at ppb9 bus 10
pchb1 at pci0 dev 16 function 0 "Intel 5000 Error Reporting" rev 0xb1
pchb2 at pci0 dev 16 function 1 "Intel 5000 Error Reporting" rev 0xb1
pchb3 at pci0 dev 16 function 2 "Intel 5000 Error Reporting" rev 0xb1
pchb4 at pci0 dev 17 function 0 "Intel 5000 Reserved" rev 0xb1
pchb5 at pci0 dev 19 function 0 "Intel 5000 Reserved" rev 0xb1
pchb6 at pci0 dev 21 function 0 "Intel 5000 FBD" rev 0xb1
pchb7 at pci0 dev 22 function 0 "Intel 5000 FBD" rev 0xb1
ppb10 at pci0 dev 28 function 0 "Intel 6321ESB PCIE" rev 0x09: msi
pci11 at ppb10 bus 11
uhci0 at pci0 dev 29 function 0 "Intel 6321ESB USB" rev 0x09: apic 8 int 23
uhci1 at pci0 dev 29 function 1 "Intel 6321ESB USB" rev 0x09: apic 8 int 22
uhci2 at pci0 dev 29 function 2 "Intel 6321ESB USB" rev 0x09: apic 8 int 23
uhci3 at pci0 dev 29 function 3 "Intel 6321ESB USB" rev 0x09: apic 8 int 22
ehci0 at pci0 dev 29 function 7 "Intel 6321ESB USB" rev 0x09: apic 8 int 23
usb0 at ehci0: USB revision 2.0
uhub0 at usb0 "Intel EHCI root hub" rev 2.00/1.00 addr 1
ppb11 at pci0 dev 30 function 0 "Intel 82801BA Hub-to-PCI" rev 0xd9
pci12 at ppb11 bus 12
12:12:0: mem address conflict 0xfffe0000/0x20000
radeondrm0 at pci12 dev 12 function 0 "ATI ES1000" rev 0x02
drm0 at radeondrm0
radeondrm0: apic 8 int 17
pcib0 at pci0 dev 31 function 0 "Intel 6321ESB LPC" rev 0x09
pciide0 at pci0 dev 31 function 1 "Intel 6321ESB IDE" rev 0x09: DMA, channel 0
configured to compatibility, channel 1 configured to compatibility
pciide0: channel 0 disabled (no drives)
pciide0: channel 1 disabled (no drives)
ahci0 at pci0 dev 31 function 2 "Intel 6321ESB AHCI" rev 0x09: apic 8 int 20,
AHCI 1.1
ahci0: port 1: 1.5Gb/s
scsibus1 at ahci0: 32 targets
sd0 at scsibus1 targ 1 lun 0: <ATA, ST9250411AS, 0003> SCSI3 0/direct fixed
naa.5000c5002466d5ff
sd0: 238475MB, 512 bytes/sector, 488397168 sectors
ichiic0 at pci0 dev 31 function 3 "Intel 6321ESB SMBus" rev 0x09: apic 8 int 20
iic0 at ichiic0
usb1 at uhci0: USB revision 1.0
uhub1 at usb1 "Intel UHCI root hub" rev 1.00/1.00 addr 1
usb2 at uhci1: USB revision 1.0
uhub2 at usb2 "Intel UHCI root hub" rev 1.00/1.00 addr 1
usb3 at uhci2: USB revision 1.0
uhub3 at usb3 "Intel UHCI root hub" rev 1.00/1.00 addr 1
usb4 at uhci3: USB revision 1.0
uhub4 at usb4 "Intel UHCI root hub" rev 1.00/1.00 addr 1
isa0 at pcib0
isadma0 at isa0
com0 at isa0 port 0x3f8/8 irq 4: ns16550a, 16 byte fifo
com1 at isa0 port 0x2f8/8 irq 3: ns16550a, 16 byte fifo
pckbc0 at isa0 port 0x60/5 irq 1 irq 12
pckbd0 at pckbc0 (kbd slot)
wskbd0 at pckbd0: console keyboard
pcppi0 at isa0 port 0x61
spkr0 at pcppi0
uhidev0 at uhub2 port 1 configuration 1 interface 0 "Logitech Logitech USB
Keyboard" rev 2.00/60.00 addr 2
uhidev0: iclass 3/1
ukbd0 at uhidev0: 8 variable keys, 6 key codes
wskbd1 at ukbd0 mux 1
uhidev1 at uhub2 port 1 configuration 1 interface 1 "Logitech Logitech USB
Keyboard" rev 2.00/60.00 addr 2
uhidev1: iclass 3/0, 4 report ids
uhid0 at uhidev1 reportid 3: input=4, output=0, feature=0
uhid1 at uhidev1 reportid 4: input=1, output=0, feature=0
vscsi0 at root
scsibus2 at vscsi0: 256 targets
softraid0 at root
scsibus3 at softraid0: 256 targets
root on sd0a (83a22a9989fbc63c.a) swap on sd0b dump on sd0b

Christian Weisgerber

unread,
Jan 10, 2016, 10:46:26 AM1/10/16
to te...@openbsd.org
On 2016-01-10, Denis Fondras <ope...@ledeuns.net> wrote:

> Following http://article.gmane.org/gmane.os.openbsd.tech/47475, I have a similar
> problem with svlan(4) and em(4) (Intel 80003ES2). The main difference with
> bge(4) is that ping works with em(4) but not tcp/udp. (obviously my bge(4)
> supports IFCAP_CSUM_IPv4 and not my em(4)).

You don't actually describe your interface configuration. I _guess_
you are trying to terminate IP traffic directly on an svlan(4)
interface. That sounds very unusual.

Do we want to support this?

I can see why it might fail. Since svlan(4) encapsulation is not
covered by the hardware VLAN support, it changes the offsets to the
IP/TCP headers, which is something the em(4) driver doesn't handle.
For bge(4), the chip probably gets confused.

--
Christian "naddy" Weisgerber na...@mips.inka.de

Denis Fondras

unread,
Jan 10, 2016, 12:00:09 PM1/10/16
to te...@openbsd.org
On Sun, Jan 10, 2016 at 03:42:34PM +0000, Christian Weisgerber wrote:
> You don't actually describe your interface configuration. I _guess_
> you are trying to terminate IP traffic directly on an svlan(4)
> interface. That sounds very unusual.
>

Sorry, the configuration is actually :
/etc/hostname.em1 :
up

/etc/hostname.svlan1003 :
vlandev em1
inet 100.67.233.1/30
up
!route add 185.22.128.252/30 100.67.233.2

Network diagram :
OpenBSD(vlanid:1003) ---- Switch ---- (vlanid:1003)router --- client(185.22.128.253)

> I can see why it might fail. Since svlan(4) encapsulation is not
> covered by the hardware VLAN support, it changes the offsets to the
> IP/TCP headers, which is something the em(4) driver doesn't handle.
>

Thank you for the insight.

Denis

David Gwynne

unread,
Jan 10, 2016, 7:14:19 PM1/10/16
to Denis Fondras, te...@openbsd.org
naddy is right, the extre header confuses things. i just rewrote
vlan(4) and thought this could happen.

this is a minimal diff that should work.

can you try this and see?

Index: if_vlan.c
===================================================================
RCS file: /cvs/src/sys/net/if_vlan.c,v
retrieving revision 1.150
diff -u -p -r1.150 if_vlan.c
--- if_vlan.c 8 Dec 2015 11:35:42 -0000 1.150
+++ if_vlan.c 11 Jan 2016 00:07:20 -0000
@@ -430,24 +430,24 @@ vlan_config(struct ifvlan *ifv, struct i
vlan_set_promisc(&ifv->ifv_if);
}

- /*
- * If the parent interface can do hardware-assisted
- * VLAN encapsulation, then propagate its hardware-
- * assisted checksumming flags.
- *
- * If the card cannot handle hardware tagging, it cannot
- * possibly compute the correct checksums for tagged packets.
- */
- if (p->if_capabilities & IFCAP_VLAN_HWTAGGING)
+ if (ifv->ifv_type != ETHERTYPE_VLAN) {
+ /*
+ * Hardware VLAN tagging only works with the default VLAN
+ * ethernet type (0x8100).
+ */
+ ifv->ifv_if.if_capabilities = 0;
+ } else if (p->if_capabilities & IFCAP_VLAN_HWTAGGING) {
+ /*
+ * If the parent interface can do hardware-assisted
+ * VLAN encapsulation, then propagate its hardware-
+ * assisted checksumming flags.
+ *
+ * If the card cannot handle hardware tagging, it cannot
+ * possibly compute the correct checksums for tagged packets.
+ */
ifv->ifv_if.if_capabilities = p->if_capabilities &
IFCAP_CSUM_MASK;
-
- /*
- * Hardware VLAN tagging only works with the default VLAN
- * ethernet type (0x8100).
- */
- if (ifv->ifv_type != ETHERTYPE_VLAN)
- ifv->ifv_if.if_capabilities &= ~IFCAP_VLAN_HWTAGGING;
+ }

/*
* Set up our ``Ethernet address'' to reflect the underlying

Denis Fondras

unread,
Jan 12, 2016, 5:09:13 PM1/12/16
to David Gwynne, te...@openbsd.org
Hi David,

> naddy is right, the extre header confuses things. i just rewrote
> vlan(4) and thought this could happen.
>
> this is a minimal diff that should work.
>
> can you try this and see?
>

It works like a charm on both bge(4) and em(4) in my test setup.

Thank you,
Denis

0 new messages