[v4,4/7] mbuf: add second dynamic field member
Checks
Commit Message
If IOVA as PA is disabled during build, mbuf physical address field is
undefined. This space is used to add the second dynamic field.
Signed-off-by: Shijith Thotton <sthotton@marvell.com>
---
lib/mbuf/rte_mbuf_core.h | 6 +++++-
lib/mbuf/rte_mbuf_dyn.c | 3 +++
2 files changed, 8 insertions(+), 1 deletion(-)
@@ -478,7 +478,11 @@ struct rte_mbuf {
*/
rte_iova_t buf_iova __rte_aligned(sizeof(rte_iova_t));
#else
- uint64_t dummy;
+ /**
+ * Reserved for dynamic field in builds where physical address
+ * field is undefined.
+ */
+ uint64_t dynfield2;
#endif
/* next 8 bytes are initialised on RX descriptor rearm */
@@ -128,6 +128,9 @@ init_shared_mem(void)
*/
memset(shm, 0, sizeof(*shm));
mark_free(dynfield1);
+#if !RTE_IOVA_AS_PA
+ mark_free(dynfield2);
+#endif
/* init free_flags */
for (mask = RTE_MBUF_F_FIRST_FREE; mask <= RTE_MBUF_F_LAST_FREE; mask <<= 1)