Subject: kern/37535: tap(4) ethernet header could be 32-bit padded
To: None <email@example.com, firstname.lastname@example.org,>
From: Matthew Mondor <email@example.com>
Date: 12/13/2007 18:25:01
>Synopsis: tap(4) ethernet header could be 32-bit padded
>Arrival-Date: Thu Dec 13 18:25:01 +0000 2007
>Originator: Matthew Mondor
>Release: NetBSD 4.99.37
system: NetBSD sat.xisop 4.99.37 NetBSD 4.99.37 (GENERIC_LAPTOP_MM) #4: Sat Nov 24 22:19:54 EST 2007 firstname.lastname@example.org:/usr/src/sys/arch/i386/compile/GENERIC_LAPTOP_MM i386
Currently the tap(4) packets have a header as follows:
6-bytes dst mac - 6-bytes src mac - 2-bytes ethertype
If reading tap(4) packets into a 32-bit aligned buffer for
performance and to be able to easily map packed IP or
other protocols header structures well, it would be
beneficial that the header be padded with two extra unused
bytes so that protocol headers be 32-bit aligned.
Since this could potentially break compatibility with
existing applications, perhaps that a new ioctl could be
provided to enable 32-bit padded mode.
Although some protocols use 16-bit aligned fields which
cause no problem, there are others with 32-bit aligned
fields and this would be most useful.