[dpdk-dev] [PATCH v3] vhost: read last used index once
Xia, Chenbo
chenbo.xia at intel.com
Wed Apr 28 05:13:06 CEST 2021
> -----Original Message-----
> From: dev <dev-bounces at dpdk.org> On Behalf Of Balazs Nemeth
> Sent: Wednesday, April 7, 2021 5:55 PM
> To: bnemeth at redhat.com; dev at dpdk.org
> Subject: [dpdk-dev] [PATCH v3] vhost: read last used index once
>
> Instead of calculating the address of a packed descriptor based on the
> vq->desc_packed and vq->last_used_idx every time, store that base
> address in desc_base. On arm, this saves 176 bytes in code size of
> function in which vhost_flush_enqueue_batch_packed gets inlined.
>
> Signed-off-by: Balazs Nemeth <bnemeth at redhat.com>
> ---
> lib/librte_vhost/virtio_net.c | 13 ++++++++-----
> 1 file changed, 8 insertions(+), 5 deletions(-)
>
> diff --git a/lib/librte_vhost/virtio_net.c b/lib/librte_vhost/virtio_net.c
> index 179c57b46..f091384a6 100644
> --- a/lib/librte_vhost/virtio_net.c
> +++ b/lib/librte_vhost/virtio_net.c
> --
> 2.30.2
Patch applied to next-virtio/main, thanks
More information about the dev
mailing list