[PATCH] vhost-user: optimize stats counters performance

Maxime Coquelin maxime.coquelin at redhat.com
Tue Sep 10 16:59:59 CEST 2024



On 8/2/24 16:32, Morten Brørup wrote:
> Optimized the performance of updating the statistics counters by reducing
> the number of branches.
> 
> Ordered the packet size comparisons according to the probability with
> typical internet traffic mix.
> 
> Signed-off-by: Morten Brørup <mb at smartsharesystems.com>
> ---
>   lib/vhost/virtio_net.c | 40 ++++++++++++++--------------------------
>   1 file changed, 14 insertions(+), 26 deletions(-)
> 

Reviewed-by: Maxime Coquelin <maxime.coquelin at redhat.com>

Thanks,
Maxime



More information about the dev mailing list