@@ -309,7 +309,7 @@
frag_rx = (union nix_rx_parse_u *)(wqe + 1);
frag_size = rlen + frag_rx->lcptr - frag_rx->laptr;
- *(uint64_t *)(&mbuf->rearm_data) = mbuf_init;
+ *rte_mbuf_rearm_data(mbuf) = mbuf_init;
mbuf->data_len = frag_size;
mbuf->pkt_len = frag_size;
mbuf->ol_flags = ol_flags;
@@ -368,7 +368,7 @@
fsz_w1 >>= 16;
data_off = b_off + frag_rx->lcptr + l3_hdr_size;
- *(uint64_t *)(&mbuf->rearm_data) = mbuf_init | data_off;
+ *rte_mbuf_rearm_data(mbuf) = mbuf_init | data_off;
mbuf->data_len = frag_size;
/* Mark frag as get */
@@ -384,7 +384,7 @@
fsz_w1 >>= 16;
data_off = b_off + frag_rx->lcptr + l3_hdr_size;
- *(uint64_t *)(&mbuf->rearm_data) = mbuf_init | data_off;
+ *rte_mbuf_rearm_data(mbuf) = mbuf_init | data_off;
mbuf->data_len = frag_size;
/* Mark frag as get */
@@ -401,7 +401,7 @@
fsz_w1 >>= 16;
data_off = b_off + frag_rx->lcptr + l3_hdr_size;
- *(uint64_t *)(&mbuf->rearm_data) = mbuf_init | data_off;
+ *rte_mbuf_rearm_data(mbuf) = mbuf_init | data_off;
mbuf->data_len = frag_size;
/* Mark frag as get */
@@ -502,7 +502,7 @@
inner->pkt_len = len;
inner->data_len = len;
- *(uint64_t *)(&inner->rearm_data) = mbuf_init;
+ *rte_mbuf_rearm_data(inner) = mbuf_init;
inner->ol_flags = ((CPT_COMP_HWGOOD_MASK & (1U << ucc)) ?
RTE_MBUF_F_RX_SEC_OFFLOAD :
@@ -584,7 +584,7 @@
/* First frag len */
inner->pkt_len = vgetq_lane_u16(*rx_desc_field1, 2);
inner->data_len = vgetq_lane_u16(*rx_desc_field1, 4);
- p = (uintptr_t)&inner->rearm_data;
+ p = (uintptr_t)rte_mbuf_rearm_data(inner);
*(uint64_t *)p = mbuf_init;
/* Reassembly success */
@@ -774,7 +774,7 @@
mbuf->data_len = sg_len;
sg = sg >> 16;
- p = (uintptr_t)&mbuf->rearm_data;
+ p = (uintptr_t)rte_mbuf_rearm_data(mbuf);
*(uint64_t *)p = rearm & ~0xFFFF;
nb_segs--;
iova_list++;
@@ -825,7 +825,7 @@
head->nb_segs = nb_segs;
}
mbuf = next_frag;
- p = (uintptr_t)&mbuf->rearm_data;
+ p = (uintptr_t)rte_mbuf_rearm_data(mbuf);
*(uint64_t *)p = rearm + ldptr;
mbuf->data_len = (sg & 0xFFFF) - ldptr -
(flags & NIX_RX_OFFLOAD_TSTAMP_F ?
@@ -849,7 +849,7 @@
len = mbuf->pkt_len;
- p = (uintptr_t)&mbuf->rearm_data;
+ p = (uintptr_t)rte_mbuf_rearm_data(mbuf);
*(uint64_t *)p = rearm;
mbuf->data_len = (sg & 0xFFFF) -
(flags & NIX_RX_OFFLOAD_TSTAMP_F ?
@@ -917,7 +917,7 @@
mbuf->ol_flags = ol_flags;
mbuf->pkt_len = len;
mbuf->data_len = len;
- p = (uintptr_t)&mbuf->rearm_data;
+ p = (uintptr_t)rte_mbuf_rearm_data(mbuf);
*(uint64_t *)p = val;
}
@@ -1966,16 +1966,16 @@
rearm3 = vsetq_lane_u64(ol_flags3, rearm3, 1);
/* Update rx_descriptor_fields1 */
- vst1q_u64((uint64_t *)mbuf0->rx_descriptor_fields1, f0);
- vst1q_u64((uint64_t *)mbuf1->rx_descriptor_fields1, f1);
- vst1q_u64((uint64_t *)mbuf2->rx_descriptor_fields1, f2);
- vst1q_u64((uint64_t *)mbuf3->rx_descriptor_fields1, f3);
+ vst1q_u64((uint64_t *)rte_mbuf_rx_descriptor_fields1(mbuf0), f0);
+ vst1q_u64((uint64_t *)rte_mbuf_rx_descriptor_fields1(mbuf1), f1);
+ vst1q_u64((uint64_t *)rte_mbuf_rx_descriptor_fields1(mbuf2), f2);
+ vst1q_u64((uint64_t *)rte_mbuf_rx_descriptor_fields1(mbuf3), f3);
/* Update rearm_data */
- vst1q_u64((uint64_t *)mbuf0->rearm_data, rearm0);
- vst1q_u64((uint64_t *)mbuf1->rearm_data, rearm1);
- vst1q_u64((uint64_t *)mbuf2->rearm_data, rearm2);
- vst1q_u64((uint64_t *)mbuf3->rearm_data, rearm3);
+ vst1q_u64(rte_mbuf_rearm_data(mbuf0), rearm0);
+ vst1q_u64(rte_mbuf_rearm_data(mbuf1), rearm1);
+ vst1q_u64(rte_mbuf_rearm_data(mbuf2), rearm2);
+ vst1q_u64(rte_mbuf_rearm_data(mbuf3), rearm3);
if (flags & NIX_RX_MULTI_SEG_F) {
/* Multi segment is enable build mseg list for
@@ -155,7 +155,7 @@
mbuf->data_len = sg & 0xFFFF;
sg = sg >> 16;
- *(uint64_t *)(&mbuf->rearm_data) = rearm;
+ *rte_mbuf_rearm_data(mbuf) = rearm;
nb_segs--;
iova_list++;
@@ -398,7 +398,7 @@
nix_update_match_id(rx->cn9k.match_id, ol_flags, mbuf);
mbuf->ol_flags = ol_flags;
- *(uint64_t *)(&mbuf->rearm_data) = val;
+ *rte_mbuf_rearm_data(mbuf) = val;
mbuf->pkt_len = len;
mbuf->data_len = len;
@@ -799,16 +799,16 @@
rearm3 = vsetq_lane_u64(ol_flags3, rearm3, 1);
/* Update rx_descriptor_fields1 */
- vst1q_u64((uint64_t *)mbuf0->rx_descriptor_fields1, f0);
- vst1q_u64((uint64_t *)mbuf1->rx_descriptor_fields1, f1);
- vst1q_u64((uint64_t *)mbuf2->rx_descriptor_fields1, f2);
- vst1q_u64((uint64_t *)mbuf3->rx_descriptor_fields1, f3);
+ vst1q_u64((uint64_t *)rte_mbuf_rx_descriptor_fields1(mbuf0), f0);
+ vst1q_u64((uint64_t *)rte_mbuf_rx_descriptor_fields1(mbuf1), f1);
+ vst1q_u64((uint64_t *)rte_mbuf_rx_descriptor_fields1(mbuf2), f2);
+ vst1q_u64((uint64_t *)rte_mbuf_rx_descriptor_fields1(mbuf3), f3);
/* Update rearm_data */
- vst1q_u64((uint64_t *)mbuf0->rearm_data, rearm0);
- vst1q_u64((uint64_t *)mbuf1->rearm_data, rearm1);
- vst1q_u64((uint64_t *)mbuf2->rearm_data, rearm2);
- vst1q_u64((uint64_t *)mbuf3->rearm_data, rearm3);
+ vst1q_u64(rte_mbuf_rearm_data(mbuf0), rearm0);
+ vst1q_u64(rte_mbuf_rearm_data(mbuf1), rearm1);
+ vst1q_u64(rte_mbuf_rearm_data(mbuf2), rearm2);
+ vst1q_u64(rte_mbuf_rearm_data(mbuf3), rearm3);
if (flags & NIX_RX_MULTI_SEG_F) {
/* Multi segment is enable build mseg list for
@@ -437,7 +437,7 @@
/* Prevent compiler reordering: rearm_data covers previous fields */
rte_compiler_barrier();
- tmp = (uint64_t *)&mb_def.rearm_data;
+ tmp = rte_mbuf_rearm_data(&mb_def);
return *tmp;
}