Subject: kern/37535: tap(4) ethernet header could be 32-bit padded
To: None <kern-bug-people@netbsd.org, gnats-admin@netbsd.org,>
From: Matthew Mondor <mmondor@pulsar-zone.net>
List: netbsd-bugs
Date: 12/13/2007 18:25:01
>Number:         37535
>Category:       kern
>Synopsis:       tap(4) ethernet header could be 32-bit padded
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    kern-bug-people
>State:          open
>Class:          change-request
>Submitter-Id:   net
>Arrival-Date:   Thu Dec 13 18:25:01 +0000 2007
>Originator:     Matthew Mondor
>Release:        NetBSD 4.99.37
>Organization:
>Environment:
system: NetBSD sat.xisop 4.99.37 NetBSD 4.99.37 (GENERIC_LAPTOP_MM) #4: Sat Nov 24 22:19:54 EST 2007  root@sat.xisop:/usr/src/sys/arch/i386/compile/GENERIC_LAPTOP_MM i386
Architecture: i386
Machine: i386
>Description:
	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.

	Thanks
>How-To-Repeat:
>Fix: