> 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;
>  };

This packs quite poorly into the mbuf.  Can you put the timeval ahead
of ph_loopcnt?  That will save a few bytes on some architectures.

Reply via email to