net/ice: write rx timestamp to the first mbuf segment in scattered rx

Message ID 9edcb5d7-3e62-4299-a9d4-703a8ca1789a@allegro-packets.com (mailing list archive)
State Superseded, archived
Delegated to: Qi Zhang
Headers
Series net/ice: write rx timestamp to the first mbuf segment in scattered rx |

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/Intel-compilation warning apply issues
ci/loongarch-compilation warning apply patch failure
ci/iol-testing warning apply patch failure

Commit Message

Martin Weiser Aug. 8, 2023, 9:41 a.m. UTC
  Previously, the rx timestamp was written to the last segment of the mbuf
chain, which was unexpected.

Signed-off-by: Martin Weiser <martin.weiser@allegro-packets.com>
---
  drivers/net/ice/ice_rxtx.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
  

Patch

diff --git a/drivers/net/ice/ice_rxtx.c b/drivers/net/ice/ice_rxtx.c
index 64c4486b4b..e07c6d1f15 100644
--- a/drivers/net/ice/ice_rxtx.c
+++ b/drivers/net/ice/ice_rxtx.c
@@ -2150,7 +2150,7 @@  ice_recv_scattered_pkts(void *rx_queue,
              }
              rxq->hw_time_update = rte_get_timer_cycles() /
                           (rte_get_timer_hz() / 1000);
-            *RTE_MBUF_DYNFIELD(rxm,
+            *RTE_MBUF_DYNFIELD(first_seg,
                         (ice_timestamp_dynfield_offset),
                         rte_mbuf_timestamp_t *) = ts_ns;
              pkt_flags |= ice_timestamp_dynflag;