diff options
author | David Gwynne <dlg@cvs.openbsd.org> | 2024-11-14 01:51:58 +0000 |
---|---|---|
committer | David Gwynne <dlg@cvs.openbsd.org> | 2024-11-14 01:51:58 +0000 |
commit | 14b67a935975944976d9b11882248e792c7518e4 (patch) | |
tree | a3693901a3c947acaf255479116493d5ccdf4d55 /usr.sbin/unbound/configure.ac | |
parent | a68ec967e3187390b53c55a1a4ed2565cc2fdab4 (diff) |
provide a way to negotiate network offloads between the kernel and userland.
userland can request that network packets that are read from or
written to the device special file get prepended with a "tun_hdr"
struct. this struct contains bits which say what offloads are
requested for the packet, including things like ip/tcp/udp/icmp
checksums, tcp segmentation offloads, or ethernet vlan tags.
userland can write a packet with any of these offloads requested
into the kernel at any time, but has to request which ones it's
able to handle coming from the kernel. enabling the tun_hdr struct
and which offloads userland can handle is done with a new TUNSCAP
ioctl.
this is based on the virtio_net_hdr in linux, which jan@ actually
implemented and had working with vmd. however, claudio@ and i
strongly opposed to what feels like a layer violation by pulling
virtio structures into the tun driver, and then trying to emulate
virtio/linux semantics in our network stack, and playing catch up
when the "upstream" projects decide to change the shape or meaning
of these bits. tun_hdr is specific to the openbsd network stack and
it's semantics, which simplifies our kernel implementation. jan has
been pretty gracious about the extra work on the vmd side of things.
tested by and ok jan@
ok claudio@
Diffstat (limited to 'usr.sbin/unbound/configure.ac')
0 files changed, 0 insertions, 0 deletions