Skip to content
Snippets Groups Projects
Commit f08ba30d authored by Vlad Zolotarov's avatar Vlad Zolotarov Committed by Pekka Enberg
Browse files

virtio-net: don't copy a virtio_net_hdr in receiver()


don't copy a virtio virtio_net_hdr to a local buffer in receiver().
This prevents CPU's optimizations.
Cast the mbuf's beginning to the virtio_net_hdr and use the relevant
fields where needed allowing a proper load prediction (as a result of
branch prediction).

Reviewed-by: default avatarDor Laor <dor@cloudius-systems.com>
Reviewed-by: default avatarZhi Yong Wu <zwu.kernel@gmail.com>
Signed-off-by: default avatarVlad Zolotarov <vladz@cloudius-systems.com>
Signed-off-by: default avatarPekka Enberg <penberg@cloudius-systems.com>
parent 94e9e41c
No related branches found
No related tags found
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment