[dpdk-dev] examples/vhost: fix out of sequence packets
Commit Message
Issue description: when packets go through vhost example to virtio
device and come back to another virtio device or physical NIC, the
sequence of packets will be changed.
Reported-by: Thomas Long <thomas.long@intel.com>
Signed-off-by: Jianfeng Tan <jianfeng.tan@intel.com>
---
examples/vhost/main.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
Comments
On Wed, Jan 20, 2016 at 03:18:11AM +0800, Jianfeng Tan wrote:
> Issue description: when packets go through vhost example to virtio
> device and come back to another virtio device or physical NIC, the
> sequence of packets will be changed.
>
> Reported-by: Thomas Long <thomas.long@intel.com>
> Signed-off-by: Jianfeng Tan <jianfeng.tan@intel.com>
Acked-by: Yuanhan Liu <yuanhan.liu@linux.intel.com>
--yliu
2016-01-20 10:47, Yuanhan Liu:
> On Wed, Jan 20, 2016 at 03:18:11AM +0800, Jianfeng Tan wrote:
> > Issue description: when packets go through vhost example to virtio
> > device and come back to another virtio device or physical NIC, the
> > sequence of packets will be changed.
> >
> > Reported-by: Thomas Long <thomas.long@intel.com>
> > Signed-off-by: Jianfeng Tan <jianfeng.tan@intel.com>
>
> Acked-by: Yuanhan Liu <yuanhan.liu@linux.intel.com>
Applied, thanks
@@ -1336,8 +1336,8 @@ switch_worker(__attribute__((unused)) void *arg)
rte_pktmbuf_free(pkts_burst[--tx_count]);
}
}
- while (tx_count)
- virtio_tx_route(vdev, pkts_burst[--tx_count], (uint16_t)dev->device_fh);
+ for (i = 0; i < tx_count; ++i)
+ virtio_tx_route(vdev, pkts_burst[i], (uint16_t)dev->device_fh);
}
/*move to the next device in the list*/