[v3,3/4] net/virtio: fix segment data len in mergeable packed Rx path
Checks
Commit Message
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 of the first segment only.
Fixes: a76290c8f1cf ("net/virtio: implement Rx path for packed queues")
Cc: stable@dpdk.org
Reported-by: Yaroslav Brustinov <ybrustin@cisco.com>
Reviewed-by: David Marchand <david.marchand@redhat.com>
Signed-off-by: Maxime Coquelin <maxime.coquelin@redhat.com>
---
drivers/net/virtio/virtio_rxtx.c | 2 --
1 file changed, 2 deletions(-)
Comments
On Wed, Jun 05, 2019 at 12:00:38PM +0200, Maxime Coquelin wrote:
>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 of the first segment only.
s/of of/of/
Reviewed-by: Jens Freimann <jfreimann@redhat.com>
regards,
Jens
On 6/5/19 1:16 PM, Jens Freimann wrote:
> On Wed, Jun 05, 2019 at 12:00:38PM +0200, Maxime Coquelin wrote:
>> 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 of the first segment only.
>
> s/of of/of/
Thanks, will fix while applying
> Reviewed-by: Jens Freimann <jfreimann@redhat.com>
> regards,
> Jens
@@ -1875,7 +1875,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;
@@ -1912,7 +1911,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;