net/virtio: restrict pointer aliasing for NEON
authorJoyce Kong <joyce.kong@arm.com>
Fri, 10 Jul 2020 02:38:49 +0000 (10:38 +0800)
committerDavid Marchand <david.marchand@redhat.com>
Fri, 10 Jul 2020 13:35:55 +0000 (15:35 +0200)
commitc92b936fbd0eb88ea0c64da50f9ad3be73c83b73
tree7011323ed912b306769a6be9db5f3fc16f8af39a
parent428e684795fad56aa6140a0bd80df61e217d03a0
net/virtio: restrict pointer aliasing for NEON

Restrict pointer aliasing to allow the compiler to vectorize loops
more aggressively.

With this patch, a 9.6% improvement is observed in throughput for
the virtio-net PVP case, and a 2.4% perf improvement in throughput
for the virtio-user PVP case. All performance data are measured
on ThunderX-2 platform under the 0.001% acceptable packet loss with
2 cores on the vhost side and 1 core on the virtio side.

Signed-off-by: Joyce Kong <joyce.kong@arm.com>
Reviewed-by: Phil Yang <phil.yang@arm.com>
drivers/net/virtio/virtio_rxtx_simple_neon.c