sm: declare types

Declare the struct types before use.
Store the cache line offset rather than void * in the tx.
Use the EVENT_RECV's pointer for the data rather than have
a copy in the rx.