From: Kirill A. Korinsky Subject: sys/cnmac: enable HW offload of VLAN To: OpenBSD tech Date: Thu, 22 Oct 2026 03:24:38 +0200 tech@, I'd like to enable VLAN aware hardware checksumming at cnmac. It helps in the case when the device routes traffic from one vlan to another one at the same cnmac port. Tested on CN70xx/CN71xx (ER-4) where iperf in single stream which routes traffic from one vlan to another one at the same cnamc increases from ~500 Mbit/s to ~900 Mbit/s. Ok? Index: arch/octeon/dev/if_cnmac.c =================================================================== RCS file: /home/cvs/src/sys/arch/octeon/dev/if_cnmac.c,v diff -u -p -r1.92 if_cnmac.c --- arch/octeon/dev/if_cnmac.c 15 Jul 2026 11:48:03 -0000 1.92 +++ arch/octeon/dev/if_cnmac.c 22 Oct 2026 00:48:27 -0000 @@ -382,8 +382,9 @@ cnmac_attach(struct device *parent, stru ifp->if_hardmtu = CNMAC_MAX_MTU; ifq_init_maxlen(&ifp->if_snd, max(GATHER_QUEUE_SIZE, IFQ_MAXLEN)); - ifp->if_capabilities = IFCAP_VLAN_MTU | IFCAP_CSUM_TCPv4 | - IFCAP_CSUM_UDPv4 | IFCAP_CSUM_TCPv6 | IFCAP_CSUM_UDPv6; + ifp->if_capabilities = IFCAP_VLAN_MTU | IFCAP_VLAN_HWOFFLOAD | + IFCAP_CSUM_TCPv4 | IFCAP_CSUM_UDPv4 | + IFCAP_CSUM_TCPv6 | IFCAP_CSUM_UDPv6; #ifndef SMALL_KERNEL ifp->if_capabilities |= IFCAP_LRO; #endif -- wbr, Kirill