[v6,17/23] net/thunderx: use mbuf descriptor accessors
Checks
Commit Message
RTE_MARKER typedefs are a GCC extension unsupported by MSVC. Use
new rte_mbuf_rearm_data and rte_mbuf_rx_descriptor_fields1 accessors
that provide a compatible type pointer without using the marker fields.
Signed-off-by: Tyler Retzlaff <roretzla@linux.microsoft.com>
---
drivers/net/thunderx/nicvf_ethdev.c | 4 +---
drivers/net/thunderx/nicvf_rxtx.h | 4 ++--
2 files changed, 3 insertions(+), 5 deletions(-)
@@ -1306,7 +1306,6 @@ enum nicvf_link_speed {
static inline void
nicvf_rxq_mbuf_setup(struct nicvf_rxq *rxq)
{
- uintptr_t p;
struct rte_mbuf mb_def;
struct nicvf *nic = rxq->nic;
@@ -1328,8 +1327,7 @@ enum nicvf_link_speed {
/* Prevent compiler reordering: rearm_data covers previous fields */
rte_compiler_barrier();
- p = (uintptr_t)&mb_def.rearm_data;
- rxq->mbuf_initializer.value = *(uint64_t *)p;
+ rxq->mbuf_initializer.value = *rte_mbuf_rearm_data(&mb_def);
}
static int
@@ -66,7 +66,7 @@ static inline uint16_t __attribute__((const))
#else
init.value += apad;
#endif
- *(uint64_t *)(&pkt->rearm_data) = init.value;
+ *rte_mbuf_rearm_data(pkt) = init.value;
}
static inline void
@@ -80,7 +80,7 @@ static inline uint16_t __attribute__((const))
init.value += apad;
#endif
init.fields.nb_segs = nb_segs;
- *(uint64_t *)(&pkt->rearm_data) = init.value;
+ *rte_mbuf_rearm_data(pkt) = init.value;
}
uint32_t nicvf_dev_rx_queue_count(void *rx_queue);