From: Maxime Coquelin Date: Wed, 5 Jun 2019 10:00:38 +0000 (+0200) Subject: net/virtio: fix segment length in mergeable packed Rx X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=3291bb21bb0879693dc21980156b35ef69ff786b;p=dpdk.git 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 --- 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;