From 3a3ed27c303055c6770784f86b996b4721786576 Mon Sep 17 00:00:00 2001 From: Matous Hybl Date: Wed, 27 Apr 2022 21:27:28 +0200 Subject: [PATCH] net: Add support for packet pools with size 64 and 128 --- embassy-net/Cargo.toml | 2 ++ embassy-net/src/packet_pool.rs | 6 ++++++ 2 files changed, 8 insertions(+) diff --git a/embassy-net/Cargo.toml b/embassy-net/Cargo.toml index 90e84d828..2d0116bd5 100644 --- a/embassy-net/Cargo.toml +++ b/embassy-net/Cargo.toml @@ -28,6 +28,8 @@ pool-4 = [] pool-8 = [] pool-16 = [] pool-32 = [] +pool-64 = [] +pool-128 = [] [dependencies] diff --git a/embassy-net/src/packet_pool.rs b/embassy-net/src/packet_pool.rs index b43ae2eb2..99311ae74 100644 --- a/embassy-net/src/packet_pool.rs +++ b/embassy-net/src/packet_pool.rs @@ -17,6 +17,12 @@ pub const PACKET_POOL_SIZE: usize = 16; #[cfg(feature = "pool-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]); pub type PacketBox = Box;