[dpdk-dev] [PATCH v3 0/8] vhost rxtx refactor and fixes
Thomas Monjalon
thomas.monjalon at 6wind.com
Tue Mar 15 00:09:34 CET 2016
2016-03-10 12:32, Yuanhan Liu:
> v3: - quite few minor changes, including using likely/unlikely
> when possible.
>
> - Added a new patch 8 to avoid desc dead loop chain
>
> The first 3 patches refactor 3 major functions at vhost_rxtx.c.
> It simplifies the code logic, making it more readable. OTOH, it
> reduces binary code size, due to a lot of duplicate code are
> removed, as well as some huge inline functions are diminished.
>
> Patch 4 gets rid of the rte_memcpy for virtio_hdr copy, which
> nearly saves 12K bytes of binary code size!
>
> Patch 5 removes "unlikely" for VIRTIO_NET_F_MRG_RXBUF detection.
>
> Patch 6, 7 and 8 do some sanity check for two desc fields, to make
> vhost robust and be protected from malicious guest or abnormal use
> cases.
>
> ---
> Yuanhan Liu (8):
> vhost: refactor rte_vhost_dequeue_burst
> vhost: refactor virtio_dev_rx
> vhost: refactor virtio_dev_merge_rx
> vhost: do not use rte_memcpy for virtio_hdr copy
> vhost: don't use unlikely for VIRTIO_NET_F_MRG_RXBUF detection
> vhost: do sanity check for desc->len
> vhost: do sanity check for desc->next against with vq->size
> vhost: avoid dead loop chain.
Applied with 3/8 v4, thanks.
More information about the dev
mailing list