mbuf perf test, please ignore
Checks
Commit Message
Playing around with the mbuf structure, trying to reduce the use of the
second cache line in some common scenarios.
Signed-off-by: Morten Brørup <mb@smartsharesystems.com>
---
lib/mbuf/rte_mbuf_core.h | 38 +++++++++++++++++++-------------------
1 file changed, 19 insertions(+), 19 deletions(-)
@@ -594,25 +594,6 @@ struct rte_mbuf {
uint16_t buf_len; /**< Length of segment buffer. */
- struct rte_mempool *pool; /**< Pool from which mbuf was allocated. */
-
- /* second cache line - fields only used in slow path or on TX */
- RTE_MARKER cacheline1 __rte_cache_min_aligned;
-
-#if RTE_IOVA_AS_PA
- /**
- * Next segment of scattered packet. Must be NULL in the last
- * segment or in case of non-segmented packet.
- */
- struct rte_mbuf *next;
-#else
- /**
- * Reserved for dynamic fields
- * when the next pointer is in first cache line (i.e. RTE_IOVA_AS_PA is 0).
- */
- uint64_t dynfield2;
-#endif
-
/* fields to support TX offloads */
RTE_STD_C11
union {
@@ -651,6 +632,25 @@ struct rte_mbuf {
};
};
+ /* second cache line - fields only used in slow path or on TX */
+ RTE_MARKER cacheline1 __rte_cache_min_aligned;
+
+#if RTE_IOVA_AS_PA
+ /**
+ * Next segment of scattered packet. Must be NULL in the last
+ * segment or in case of non-segmented packet.
+ */
+ struct rte_mbuf *next;
+#else
+ /**
+ * Reserved for dynamic fields
+ * when the next pointer is in first cache line (i.e. RTE_IOVA_AS_PA is 0).
+ */
+ uint64_t dynfield2;
+#endif
+
+ struct rte_mempool *pool; /**< Pool from which mbuf was allocated. */
+
/** Shared data for external buffer attached to mbuf. See
* rte_pktmbuf_attach_extbuf().
*/