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 <ybrustin@cisco.com> Reviewed-by: David Marchand <david.marchand@redhat.com> Reviewed-by: Jens Freimann <jfreimann@redhat.com> Reviewed-by: Tiwei Bie <tiwei.bie@intel.com> Signed-off-by: Maxime Coquelin <maxime.coquelin@redhat.com>
This commit is contained in:
parent
366599450d
commit
3291bb21bb
@ -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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user