When RTE_ETH_TX_OFFLOAD_MBUF_FAST_FREE is used, the usage pattern of some of the mbuf fields differs:
- The "pool" pointer becomes rarely used. (Only one packet per burst.)
- The "next" pointer becomes unused.
- The "tx_offload" field is still used. (Set by application, read by driver.)
This means that the 2nd cache line in the mbuf now only contains one hot field, "tx_offload".
So, if we swap the "tx_offload" field (in the 2nd cache line) with the "pool" field (in the 1st cache line), the 2nd cache line becomes rarely used.
This should provide a performance improvement for applications (using RTE_ETH_TX_OFFLOAD_MBUF_FAST_FREE) when under cache pressure.
PS: Back in the days, the mbuf description said that the 1st cache line was for RX purposes, and the 2nd cache line was for TX purposes. This is not true anymore, so let's not limit out thinking by that (obsolete) design.
Med venlig hilsen / Kind regards,
-Morten Brørup