739: net: Add support for packet pools with size 64 and 128 r=Dirbaio a=matoushybl



Co-authored-by: Matous Hybl <hyblmatous@gmail.com>
This commit is contained in:
bors[bot] 2022-04-27 19:58:42 +00:00 committed by GitHub
commit ba46df6825
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 0 deletions

View File

@ -28,6 +28,8 @@ pool-4 = []
pool-8 = [] pool-8 = []
pool-16 = [] pool-16 = []
pool-32 = [] pool-32 = []
pool-64 = []
pool-128 = []
[dependencies] [dependencies]

View File

@ -17,6 +17,12 @@ pub const PACKET_POOL_SIZE: usize = 16;
#[cfg(feature = "pool-32")] #[cfg(feature = "pool-32")]
pub const PACKET_POOL_SIZE: usize = 32; pub const PACKET_POOL_SIZE: usize = 32;
#[cfg(feature = "pool-64")]
pub const PACKET_POOL_SIZE: usize = 64;
#[cfg(feature = "pool-128")]
pub const PACKET_POOL_SIZE: usize = 128;
pool!(pub PacketPool: [Packet; PACKET_POOL_SIZE]); pool!(pub PacketPool: [Packet; PACKET_POOL_SIZE]);
pub type PacketBox = Box<PacketPool>; pub type PacketBox = Box<PacketPool>;