Index | Thread | Search

From:
Stefan Sperling <stsp@stsp.name>
Subject:
Re: dwqe(4) VLAN offload
To:
Mark Kettenis <mark.kettenis@xs4all.nl>
Cc:
tech@openbsd.org
Date:
Sat, 25 May 2024 22:42:23 +0200

Download raw body.

Thread
On Sat, May 25, 2024 at 03:13:46PM +0200, Mark Kettenis wrote:
> > Date: Wed, 22 May 2024 12:40:12 +0200
> > From: Stefan Sperling <stsp@stsp.name>
> > 
> > The patch below adds support for VLAN tag offloading to dwqe(4).
> > 
> > For now this patch only adds support for 802.1Q, i.e. vlan(4).
> > The device supports QinQ offloading but our network stack does
> > not use hardware offload for svlan(4) (yet?).
> > 
> > Tested on Elkhart Lake, against another vlan(4) interface running
> > on top of em(4).
> > 
> > ok?
> 
> This feature isn't supported on the RK3568:

While Tx vlan offloading is optional, this feature should always
be supported in the Rx path, according to the Linux driver.
My patch and the Linux driver enable it unconditionally for Rx.

Rx vlan offload doesn't affect interface capability flags however
because a per-mbuf flag is used instead.

> I'm not using any VLANs, but it doesn't seem to break non-VLAN usage.
> 
> Does this actually make a difference in performance in any way?

I haven't done performance measurements yet. In the Rx path it saves us
a memmove per packet if VLANs are used. See vlan_strip() in if_vlan.c.