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 <roret...@linux.microsoft.com> --- drivers/net/thunderx/nicvf_ethdev.c | 4 +--- drivers/net/thunderx/nicvf_rxtx.h | 4 ++-- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/drivers/net/thunderx/nicvf_ethdev.c b/drivers/net/thunderx/nicvf_ethdev.c index 609d95d..722751c 100644 --- a/drivers/net/thunderx/nicvf_ethdev.c +++ b/drivers/net/thunderx/nicvf_ethdev.c @@ -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 diff --git a/drivers/net/thunderx/nicvf_rxtx.h b/drivers/net/thunderx/nicvf_rxtx.h index 4b83e33..7c07cde 100644 --- a/drivers/net/thunderx/nicvf_rxtx.h +++ b/drivers/net/thunderx/nicvf_rxtx.h @@ -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); -- 1.8.3.1