File tree Expand file tree Collapse file tree 3 files changed +10
-4
lines changed Expand file tree Collapse file tree 3 files changed +10
-4
lines changed Original file line number Diff line number Diff line change 1111#pragma once
1212
1313#include " gnb_os_sched_affinity_manager.h"
14+ #include " srsran/adt/byte_buffer.h"
1415#include " srsran/adt/optional.h"
1516#include " srsran/adt/variant.h"
1617#include " srsran/ran/band_helper.h"
@@ -1019,7 +1020,7 @@ struct ru_ofh_appconfig {
10191020
10201021struct buffer_pool_appconfig {
10211022 std::size_t nof_segments = 1048576 ;
1022- std::size_t segment_size = 1024 ;
1023+ std::size_t segment_size = byte_buffer_segment_pool_default_segment_size() ;
10231024};
10241025
10251026// / CPU isolation configuration in the gNB app.
Original file line number Diff line number Diff line change 1616namespace srsran {
1717
1818// / Default byte buffer segment size in the byte buffer pool.
19- constexpr static size_t default_byte_buffer_segment_size = 1024 ;
19+ size_t byte_buffer_segment_pool_default_segment_size () ;
2020
2121// / \brief Sets the default size of the default byte_buffer segment pool.
2222// /
@@ -25,7 +25,7 @@ constexpr static size_t default_byte_buffer_segment_size = 1024;
2525// / \param memory_block_size Number, in bytes, for each memory block on which a buffer_byte_segment header and payload
2626// / will be stored.
2727void init_byte_buffer_segment_pool (std::size_t nof_segments,
28- std::size_t memory_block_size = default_byte_buffer_segment_size );
28+ std::size_t memory_block_size = byte_buffer_segment_pool_default_segment_size() );
2929
3030// / \brief Non-owning view to a byte sequence.
3131// / The underlying byte sequence is not contiguous in memory. Instead, it is represented as an intrusive linked list of
Original file line number Diff line number Diff line change 1313
1414using namespace srsran ;
1515
16+ size_t srsran::byte_buffer_segment_pool_default_segment_size ()
17+ {
18+ return 1024 ;
19+ }
20+
1621// / Get default byte buffer segment pool. Initialize pool if not initialized before.
1722detail::byte_buffer_segment_pool& srsran::detail::get_default_byte_buffer_segment_pool ()
1823{
1924 // Initialize byte buffer segment pool, if not yet initialized.
2025 // Note: In case of unit tests, this function will be called rather than init_byte_buffer_segment_pool(...)
2126 constexpr static size_t default_byte_buffer_segment_pool_size = 16384 ;
2227 static auto & pool = detail::byte_buffer_segment_pool::get_instance (default_byte_buffer_segment_pool_size,
23- default_byte_buffer_segment_size );
28+ byte_buffer_segment_pool_default_segment_size () );
2429 return pool;
2530}
2631
You can’t perform that action at this time.
0 commit comments