From 74f2954013ca0efa3007462366116ba45c823558 Mon Sep 17 00:00:00 2001 From: Johannes Schlatow Date: Fri, 9 Nov 2018 18:15:54 +0100 Subject: [PATCH] packet_stream: improve buffer alignment The bulk buffer is now 64Byte-aligned so that the allocated packets get aligned likewise (assumed the packet allocator uses an appropriately aligned block size). This ensures that each packet starts at a new cache line on common platforms. Issue #3053 --- repos/os/include/os/packet_stream.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/repos/os/include/os/packet_stream.h b/repos/os/include/os/packet_stream.h index 869c0bad9..256119044 100644 --- a/repos/os/include/os/packet_stream.h +++ b/repos/os/include/os/packet_stream.h @@ -487,7 +487,7 @@ class Genode::Packet_stream_base _ds_local_base(rm.attach(_ds_cap)), _submit_queue_offset(0), _ack_queue_offset(_submit_queue_offset + submit_queue_size), - _bulk_buffer_offset(_ack_queue_offset + ack_queue_size) + _bulk_buffer_offset(align_addr(_ack_queue_offset + ack_queue_size, 6)) { Genode::size_t ds_size = Genode::Dataspace_client(_ds_cap).size();