One of the [many] nice properties of the traditional Don Becker drivers
has been that often the driver-private structures are arranged such that
the structure is broken up on cacheline boundaries. The RX thread has
a cacheline, the TX thread has a cacheline, etc. Jes Sorensen also
independently, in his review of 8139cp.c, suggested that the
driver-private struct be update with attention to cacheline boundaries.
Early next year, I would like to start cleaning up some of the net
drivers along these lines (no pun intended). To make it easier for
vendors and random coders to cacheline-align struct members, I would
like to make more explicit these cacheline boundaries, in a manner that
is portable between 32-bit and 64-bit systems.
I attach a sample implementation, and request feedback on this approach.
The general idea is to make implementing this sort of concept "harder
to screw up."