*rx_pkts++ = m;
- *(uint64_t *)(&m->rearm_data) = rxq->rearm_data;
- /* rearm_data rewrites ol_flags which is updated below */
- rte_compiler_barrier();
+ RTE_BUILD_BUG_ON(sizeof(m->rearm_data[0]) != sizeof(rxq->rearm_data));
+ m->rearm_data[0] = rxq->rearm_data;
/* Classify packet based on Rx event */
sfc_ef10_rx_ev_to_offloads(rxq, rx_ev, m);
rte_pktmbuf_data_len(m) = pkt_len;
rte_pktmbuf_pkt_len(m) = pkt_len;
- m->next = NULL;
+ SFC_ASSERT(m->next == NULL);
/* Remember mbuf to copy offload flags and packet type from */
m0 = m;
if (ready > rxq->prepared)
*rx_pkts++ = m;
- *(uint64_t *)(&m->rearm_data) = rxq->rearm_data;
- /* rearm_data rewrites ol_flags which is updated below */
- rte_compiler_barrier();
+ RTE_BUILD_BUG_ON(sizeof(m->rearm_data[0]) !=
+ sizeof(rxq->rearm_data));
+ m->rearm_data[0] = rxq->rearm_data;
/* Event-dependent information is the same */
m->ol_flags = m0->ol_flags;
rte_pktmbuf_data_len(m) = pkt_len;
rte_pktmbuf_pkt_len(m) = pkt_len;
- m->next = NULL;
+ SFC_ASSERT(m->next == NULL);
}
return n_rx_pkts;
/* rearm_data covers structure members filled in above */
rte_compiler_barrier();
- return *(uint64_t *)(&m.rearm_data);
+ RTE_BUILD_BUG_ON(sizeof(m.rearm_data[0]) != sizeof(uint64_t));
+ return m.rearm_data[0];
}
static sfc_dp_rx_qcreate_t sfc_ef10_rx_qcreate;
rxd = &rxq->sw_desc[id];
rxd->mbuf = m;
- rte_mbuf_refcnt_set(m, 1);
+ SFC_ASSERT(rte_mbuf_refcnt_read(m) == 1);
m->data_off = RTE_PKTMBUF_HEADROOM;
- m->next = NULL;
- m->nb_segs = 1;
+ SFC_ASSERT(m->next == NULL);
+ SFC_ASSERT(m->nb_segs == 1);
m->port = port_id;
addr[i] = rte_pktmbuf_mtophys(m);