[v6,16/23] net/sfc: 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/sfc/sfc_ef100_rx.c | 7 ++-----
drivers/net/sfc/sfc_ef10_rx.c | 10 +++-------
2 files changed, 5 insertions(+), 12 deletions(-)
@@ -553,9 +553,7 @@ struct sfc_ef100_rxq {
pkt = sfc_ef100_rx_next_mbuf(rxq);
__rte_mbuf_raw_sanity_check(pkt);
- RTE_BUILD_BUG_ON(sizeof(pkt->rearm_data[0]) !=
- sizeof(rxq->rearm_data));
- pkt->rearm_data[0] = rxq->rearm_data;
+ *rte_mbuf_rearm_data(pkt) = rxq->rearm_data;
/* data_off already moved past Rx prefix */
rx_prefix = (const efx_xword_t *)sfc_ef100_rx_pkt_prefix(pkt);
@@ -760,8 +758,7 @@ struct sfc_ef100_rxq {
/* rearm_data covers structure members filled in above */
rte_compiler_barrier();
- RTE_BUILD_BUG_ON(sizeof(m.rearm_data[0]) != sizeof(uint64_t));
- return m.rearm_data[0];
+ return *rte_mbuf_rearm_data(&m);
}
static sfc_dp_rx_qcreate_t sfc_ef100_rx_qcreate;
@@ -322,8 +322,7 @@ struct sfc_ef10_rxq {
m = rxd->mbuf;
- RTE_BUILD_BUG_ON(sizeof(m->rearm_data[0]) != sizeof(rxq->rearm_data));
- m->rearm_data[0] = rxq->rearm_data;
+ *rte_mbuf_rearm_data(m) = rxq->rearm_data;
/* Classify packet based on Rx event */
/* Mask RSS hash offload flag if RSS is not enabled */
@@ -377,9 +376,7 @@ struct sfc_ef10_rxq {
rxq->completed = pending;
}
- RTE_BUILD_BUG_ON(sizeof(m->rearm_data[0]) !=
- sizeof(rxq->rearm_data));
- m->rearm_data[0] = rxq->rearm_data;
+ *rte_mbuf_rearm_data(m) = rxq->rearm_data;
/* Event-dependent information is the same */
m->ol_flags = m0->ol_flags;
@@ -633,8 +630,7 @@ struct sfc_ef10_rxq {
/* rearm_data covers structure members filled in above */
rte_compiler_barrier();
- RTE_BUILD_BUG_ON(sizeof(m.rearm_data[0]) != sizeof(uint64_t));
- return m.rearm_data[0];
+ return *rte_mbuf_rearm_data(&m);
}
static sfc_dp_rx_qcreate_t sfc_ef10_rx_qcreate;