From 3291bb21bb0879693dc21980156b35ef69ff786b Mon Sep 17 00:00:00 2001 From: Maxime Coquelin Date: Wed, 5 Jun 2019 12:00:38 +0200 Subject: [PATCH] net/virtio: fix segment length in mergeable packed Rx Head segment data_len field is wrongly summed with the length of all the segments of the chain, whereas it should be the length of the first segment only. Fixes: a76290c8f1cf ("net/virtio: implement Rx path for packed queues") Cc: stable@dpdk.org Reported-by: Yaroslav Brustinov Reviewed-by: David Marchand Reviewed-by: Jens Freimann Reviewed-by: Tiwei Bie Signed-off-by: Maxime Coquelin --- drivers/net/virtio/virtio_rxtx.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/net/virtio/virtio_rxtx.c b/drivers/net/virtio/virtio_rxtx.c index e23cd04dd8..8dccd694e9 100644 --- a/drivers/net/virtio/virtio_rxtx.c +++ b/drivers/net/virtio/virtio_rxtx.c @@ -1870,7 +1870,6 @@ virtio_recv_mergeable_pkts_packed(void *rx_queue, rxm->data_len = (uint16_t)(len[i]); rx_pkts[nb_rx]->pkt_len += (uint32_t)(len[i]); - rx_pkts[nb_rx]->data_len += (uint16_t)(len[i]); if (prev) prev->next = rxm; @@ -1907,7 +1906,6 @@ virtio_recv_mergeable_pkts_packed(void *rx_queue, prev->next = rxm; prev = rxm; rx_pkts[nb_rx]->pkt_len += len[extra_idx]; - rx_pkts[nb_rx]->data_len += len[extra_idx]; extra_idx += 1; } seg_res -= rcv_cnt; -- 2.20.1