This consumes a bunch extra bytes per mbuf on _all systems_, regardless of
whether they have offload support or not.

How many bytes? the addition of ph_eth_type adds 2 bytes misaligned before
the int, so padding happens there.  Everything misaligns oddly because of
the struct pkthdr_pf containing a pointer, which that object pointer align.
On amd64, this goes from 64 to 72.  So 8 extra bytes.

Is the size a fair tradeoff???

Is setting fields when majority of drivers don't look at them a fair
tradeoff?

Is there a possibility that in the future someone will make code
changes and forget to update these "cached" fields, because 99% of
drivers work fine without the fields, and introduce a problem only
observable in 1 driver?

All those things together... I don't think this is the right way.



Reply via email to