diff options
| author | bors[bot] <26634292+bors[bot]@users.noreply.github.com> | 2022-04-27 19:58:42 +0000 |
|---|---|---|
| committer | GitHub <[email protected]> | 2022-04-27 19:58:42 +0000 |
| commit | ba46df6825f35e0c3beb90f28b61f3dbe46e005e (patch) | |
| tree | 022452e7c8cf9e96824b757031d78fe1d13985be | |
| parent | 5b3aaaaa9c1ff3b35f28f7babc628950192ef850 (diff) | |
| parent | 3a3ed27c303055c6770784f86b996b4721786576 (diff) | |
Merge #739
739: net: Add support for packet pools with size 64 and 128 r=Dirbaio a=matoushybl
Co-authored-by: Matous Hybl <[email protected]>
| -rw-r--r-- | embassy-net/Cargo.toml | 2 | ||||
| -rw-r--r-- | embassy-net/src/packet_pool.rs | 6 |
2 files changed, 8 insertions, 0 deletions
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 = [] | |||
| 28 | pool-8 = [] | 28 | pool-8 = [] |
| 29 | pool-16 = [] | 29 | pool-16 = [] |
| 30 | pool-32 = [] | 30 | pool-32 = [] |
| 31 | pool-64 = [] | ||
| 32 | pool-128 = [] | ||
| 31 | 33 | ||
| 32 | [dependencies] | 34 | [dependencies] |
| 33 | 35 | ||
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; | |||
| 17 | #[cfg(feature = "pool-32")] | 17 | #[cfg(feature = "pool-32")] |
| 18 | pub const PACKET_POOL_SIZE: usize = 32; | 18 | pub const PACKET_POOL_SIZE: usize = 32; |
| 19 | 19 | ||
| 20 | #[cfg(feature = "pool-64")] | ||
| 21 | pub const PACKET_POOL_SIZE: usize = 64; | ||
| 22 | |||
| 23 | #[cfg(feature = "pool-128")] | ||
| 24 | pub const PACKET_POOL_SIZE: usize = 128; | ||
| 25 | |||
| 20 | pool!(pub PacketPool: [Packet; PACKET_POOL_SIZE]); | 26 | pool!(pub PacketPool: [Packet; PACKET_POOL_SIZE]); |
| 21 | pub type PacketBox = Box<PacketPool>; | 27 | pub type PacketBox = Box<PacketPool>; |
| 22 | 28 | ||
