iavf: pack iavf_ring more efficiently
authorAlexander Lobakin <aleksander.lobakin@intel.com>
Thu, 18 Apr 2024 11:36:14 +0000 (13:36 +0200)
committerTony Nguyen <anthony.l.nguyen@intel.com>
Wed, 24 Apr 2024 18:06:26 +0000 (11:06 -0700)
commit97cadd3d3ce3df32647011233a35a1597bb7a55b
tree30146bfcf1d304c822e0d378c773eb92d5f0826c
parente6c91556b97f855436fa45f75e69165d671012a7
iavf: pack iavf_ring more efficiently

Before replacing the Rx buffer management with libie, clean up
&iavf_ring a bit.
There are several fields not used anywhere in the code -- simply remove
them. Move ::tail up to remove a hole. Replace ::arm_wb boolean with
1-bit flag in ::flags to free 1 more byte. Finally, move ::prev_pkt_ctr
out of &iavf_tx_queue_stats -- it doesn't belong there (used for Tx
stall detection). Place it next to the stats on the ring itself to fill
the 4-byte slot.
The result: no holes and all the hot fields fit into the first 64-byte
cacheline.

Signed-off-by: Alexander Lobakin <aleksander.lobakin@intel.com>
Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
drivers/net/ethernet/intel/iavf/iavf_txrx.c
drivers/net/ethernet/intel/iavf/iavf_txrx.h