[v5,07/11] baseband/fpga: use rte_pktmbuf_offset
Checks
Commit Message
Replace explicit packet offset computations with rte_pktmbuf_mtod_offset().
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
---
drivers/baseband/fpga_5gnr_fec/rte_fpga_5gnr_fec.c | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
@@ -1543,8 +1543,7 @@ fpga_harq_write_loopback(struct fpga_queue *q,
rte_bbdev_log(ERR, "HARQ in length > HARQ buffer size\n");
}
- input = (uint64_t *)rte_pktmbuf_mtod_offset(harq_input,
- uint8_t *, in_offset);
+ input = rte_pktmbuf_mtod_offset(harq_input, uint64_t *, in_offset);
while (left_length > 0) {
if (fpga_reg_read_8(q->d->mmio_base,
@@ -1621,8 +1620,8 @@ fpga_harq_read_loopback(struct fpga_queue *q,
}
left_length = harq_in_length;
- input = (uint64_t *)rte_pktmbuf_mtod_offset(harq_output,
- uint8_t *, harq_out_offset);
+ input = rte_pktmbuf_mtod_offset(harq_output, uint64_t *,
+ harq_out_offset);
while (left_length > 0) {
fpga_reg_write_32(q->d->mmio_base,