summaryrefslogtreecommitdiff
path: root/embassy-net
diff options
context:
space:
mode:
authorMatous Hybl <hyblmatous@gmail.com>2022-04-27 21:27:28 +0200
committerMatous Hybl <hyblmatous@gmail.com>2022-04-27 21:27:28 +0200
commit3a3ed27c303055c6770784f86b996b4721786576 (patch)
tree022452e7c8cf9e96824b757031d78fe1d13985be /embassy-net
parent5b3aaaaa9c1ff3b35f28f7babc628950192ef850 (diff)
downloadembassy-3a3ed27c303055c6770784f86b996b4721786576.zip
net: Add support for packet pools with size 64 and 128
Diffstat (limited to 'embassy-net')
-rw-r--r--embassy-net/Cargo.toml2
-rw-r--r--embassy-net/src/packet_pool.rs6
2 files changed, 8 insertions, 0 deletions
diff --git a/embassy-net/Cargo.toml b/embassy-net/Cargo.toml
index 90e84d82..2d0116bd 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 b43ae2eb..99311ae7 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<PacketPool>;