mb_def.port = rxq->port_id;
rte_mbuf_refcnt_set(&mb_def, 1);
+ /* compile-time verifies the rearm_data first 8bytes */
+ RTE_BUILD_BUG_ON(offsetof(struct rte_mbuf, data_off) <
+ offsetof(struct rte_mbuf, rearm_data));
+ RTE_BUILD_BUG_ON(offsetof(struct rte_mbuf, refcnt) <
+ offsetof(struct rte_mbuf, rearm_data));
+ RTE_BUILD_BUG_ON(offsetof(struct rte_mbuf, refcnt) <
+ offsetof(struct rte_mbuf, rearm_data));
+ RTE_BUILD_BUG_ON(offsetof(struct rte_mbuf, nb_segs) <
+ offsetof(struct rte_mbuf, rearm_data));
+ RTE_BUILD_BUG_ON(offsetof(struct rte_mbuf, port) <
+ offsetof(struct rte_mbuf, rearm_data));
+ RTE_BUILD_BUG_ON(offsetof(struct rte_mbuf, data_off) -
+ offsetof(struct rte_mbuf, rearm_data) > 6);
+ RTE_BUILD_BUG_ON(offsetof(struct rte_mbuf, refcnt) -
+ offsetof(struct rte_mbuf, rearm_data) > 6);
+ RTE_BUILD_BUG_ON(offsetof(struct rte_mbuf, refcnt) -
+ offsetof(struct rte_mbuf, rearm_data) > 6);
+ RTE_BUILD_BUG_ON(offsetof(struct rte_mbuf, nb_segs) -
+ offsetof(struct rte_mbuf, rearm_data) > 6);
+ RTE_BUILD_BUG_ON(offsetof(struct rte_mbuf, port) -
+ offsetof(struct rte_mbuf, rearm_data) > 6);
+
/* prevent compiler reordering: rearm_data covers previous fields */
rte_compiler_barrier();
p = (uintptr_t)&mb_def.rearm_data;
0, 0, 0, /* ignore non-length fields */
};
+ /* compile-time verifies the shuffle mask */
+ RTE_BUILD_BUG_ON(offsetof(struct rte_mbuf, pkt_len) !=
+ offsetof(struct rte_mbuf, rx_descriptor_fields1) + 4);
+ RTE_BUILD_BUG_ON(offsetof(struct rte_mbuf, data_len) !=
+ offsetof(struct rte_mbuf, rx_descriptor_fields1) + 8);
+ RTE_BUILD_BUG_ON(offsetof(struct rte_mbuf, hash.rss) !=
+ offsetof(struct rte_mbuf, rx_descriptor_fields1) + 12);
+
for (pos = 0; pos < nb_pkts; pos += HNS3_DEFAULT_DESCS_PER_LOOP,
rxdp += HNS3_DEFAULT_DESCS_PER_LOOP) {
uint64x2x2_t descs[HNS3_DEFAULT_DESCS_PER_LOOP];
svuint32_t rss_tbl1 = svld1_u32(PG32_256BIT, rss_adjust);
svuint32_t rss_tbl2 = svld1_u32(PG32_256BIT, &rss_adjust[8]);
+ /* compile-time verifies the xlen_adjust mask */
+ RTE_BUILD_BUG_ON(offsetof(struct rte_mbuf, data_len) !=
+ offsetof(struct rte_mbuf, pkt_len) + 4);
+ RTE_BUILD_BUG_ON(offsetof(struct rte_mbuf, vlan_tci) !=
+ offsetof(struct rte_mbuf, data_len) + 2);
+
for (pos = 0; pos < nb_pkts; pos += HNS3_SVE_DEFAULT_DESCS_PER_LOOP,
rxdp += HNS3_SVE_DEFAULT_DESCS_PER_LOOP) {
svuint64_t vld_clz, mbp1st, mbp2st, mbuf_init;