One of the prerequisites for FQ_CoDel is ability to track packet
enqueue time. To avoid allocating per-packet mbuf tags, I'd prefer
to include the timestamp directly into the packet header structure.
This can be later used for other purposes as well if need be. OK?
diff --git sys/sys/mbuf.h sys/sys/mbuf.h
index 202ce8ced8b..daa9facf0dd 100644
--- sys/sys/mbuf.h
+++ sys/sys/mbuf.h
@@ -128,10 +128,11 @@ struct pkthdr {
u_int16_t csum_flags; /* checksum flags */
u_int16_t ether_vtag; /* Ethernet 802.1p+Q vlan tag */
u_int ph_rtableid; /* routing table id */
u_int ph_ifidx; /* rcv interface index */
u_int8_t ph_loopcnt; /* mbuf is looping in kernel */
+ struct timeval ph_timestamp; /* packet timestamp */
struct pkthdr_pf pf;
};
/* description of external storage mapped into mbuf, valid if M_EXT set */
struct mbuf_ext {