mirror of
https://github.com/freebsd/freebsd-src.git
synced 2026-11-07 04:36:52 -10:00
mbuf: move leaf_rcv union farther back in the pkthdr
When the leaf_rcv union was introduced to support ktls RX offload in
4d88d81c31 it was put at the front of the pkthhdr, and pushed the
more commonly accessed csum_flags and rsstype into the next cacheline.
Given that csum_flags is accessed on every pkt sent and every pkt freed,
but the leaf_rcv fields are only used for ktls rx offload, it makes more
sense to have csum_flags in a cacheline that is already likely to be hot.
Reviewed by: kib
Differential Revision: https://reviews.freebsd.org/D60691
Sponsored by: Netflix
This commit is contained in:
1 parent
74d2a0b79f
commit
9890a0d5e0
1 file changed
+7
-7
+7
-7
@@ -157,13 +157,6 @@ struct pkthdr {
|
||||
uint16_t rcvgen; /* ... and generation count */
|
||||
};
|
||||
};
|
||||
union {
|
||||
struct ifnet *leaf_rcvif; /* leaf rcv interface */
|
||||
struct {
|
||||
uint16_t leaf_rcvidx; /* leaf rcv interface index ... */
|
||||
uint16_t leaf_rcvgen; /* ... and generation count */
|
||||
};
|
||||
};
|
||||
SLIST_HEAD(packet_tags, m_tag) tags; /* list of packet tags */
|
||||
int32_t len; /* total packet length */
|
||||
|
||||
@@ -176,6 +169,13 @@ struct pkthdr {
|
||||
#if !defined(__LP64__)
|
||||
uint32_t pad; /* pad for 64bit alignment */
|
||||
#endif
|
||||
union {
|
||||
struct ifnet *leaf_rcvif; /* leaf rcv interface */
|
||||
struct {
|
||||
uint16_t leaf_rcvidx; /* leaf rcv interface index ... */
|
||||
uint16_t leaf_rcvgen; /* ... and generation count */
|
||||
};
|
||||
};
|
||||
union {
|
||||
uint64_t rcv_tstmp; /* timestamp in ns */
|
||||
struct {
|
||||
|
||||
Reference in new issue
Block a user