Update to reference newly named anonymous union markers supported by
standard C and stop referencing zero sized compiler extension markers.

Signed-off-by: Tyler Retzlaff <roret...@linux.microsoft.com>
---
 drivers/net/sfc/sfc_ef100_rx.c | 10 +++++-----
 drivers/net/sfc/sfc_ef10_rx.c  | 14 +++++++-------
 2 files changed, 12 insertions(+), 12 deletions(-)

diff --git a/drivers/net/sfc/sfc_ef100_rx.c b/drivers/net/sfc/sfc_ef100_rx.c
index 2677003..b316a6d 100644
--- a/drivers/net/sfc/sfc_ef100_rx.c
+++ b/drivers/net/sfc/sfc_ef100_rx.c
@@ -553,9 +553,9 @@ 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]) !=
+               RTE_BUILD_BUG_ON(sizeof(pkt->mbuf_rearm_data) !=
                                 sizeof(rxq->rearm_data));
-               pkt->rearm_data[0] = rxq->rearm_data;
+               *(uint64_t *)&pkt->mbuf_rearm_data[0] = rxq->rearm_data;
 
                /* data_off already moved past Rx prefix */
                rx_prefix = (const efx_xword_t *)sfc_ef100_rx_pkt_prefix(pkt);
@@ -757,10 +757,10 @@ struct sfc_ef100_rxq {
        m.nb_segs = 1;
        m.port = port_id;
 
-       /* rearm_data covers structure members filled in above */
+       /* mbuf_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];
+       RTE_BUILD_BUG_ON(sizeof(m.mbuf_rearm_data) != sizeof(uint64_t));
+       return *(uint64_t *)&m.mbuf_rearm_data[0];
 }
 
 static sfc_dp_rx_qcreate_t sfc_ef100_rx_qcreate;
diff --git a/drivers/net/sfc/sfc_ef10_rx.c b/drivers/net/sfc/sfc_ef10_rx.c
index 30a320d..7b9103c 100644
--- a/drivers/net/sfc/sfc_ef10_rx.c
+++ b/drivers/net/sfc/sfc_ef10_rx.c
@@ -322,8 +322,8 @@ 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_BUILD_BUG_ON(sizeof(m->mbuf_rearm_data) != sizeof(rxq->rearm_data));
+       *(uint64_t *)&m->mbuf_rearm_data[0] = rxq->rearm_data;
 
        /* Classify packet based on Rx event */
        /* Mask RSS hash offload flag if RSS is not enabled */
@@ -377,9 +377,9 @@ struct sfc_ef10_rxq {
                        rxq->completed = pending;
                }
 
-               RTE_BUILD_BUG_ON(sizeof(m->rearm_data[0]) !=
+               RTE_BUILD_BUG_ON(sizeof(m->mbuf_rearm_data) !=
                                 sizeof(rxq->rearm_data));
-               m->rearm_data[0] = rxq->rearm_data;
+               *(uint64_t *)&m->mbuf_rearm_data[0] = rxq->rearm_data;
 
                /* Event-dependent information is the same */
                m->ol_flags = m0->ol_flags;
@@ -631,10 +631,10 @@ struct sfc_ef10_rxq {
        m.nb_segs = 1;
        m.port = port_id;
 
-       /* rearm_data covers structure members filled in above */
+       /* mbuf_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];
+       RTE_BUILD_BUG_ON(sizeof(m.mbuf_rearm_data) != sizeof(uint64_t));
+       return *(uint64_t *)&m.mbuf_rearm_data[0];
 }
 
 static sfc_dp_rx_qcreate_t sfc_ef10_rx_qcreate;
-- 
1.8.3.1

Reply via email to