From 17146791064365d29b925ea128685f8c63ce57e3 Mon Sep 17 00:00:00 2001 From: Harald Welte Date: Sun, 15 Dec 2019 17:35:58 +0100 Subject: [PATCH] pseudo_talloc: Increment number of buffers from 10 to 20 We need at least one per IN/IRQ endpoint, as well as at least 3 for every OUT endpoint. Plus some more depending on the application, in case of cardem there could be one in uart_tx and one in uart_rx. So for cardem, it should be 7 per slot, resulting 14 for dual-slot devices like OWHW and QMOD. Given that we have plenty of RAM available (utilization up from 49% to 56% with this change), we can be on the comfortable size and easily have 20 buffers for now. Future MITM / triple-play applications likely need more. Change-Id: I022ba3bb3e1f5fd0c364aafe1a23f8fd9b2d8499 Related: OS#4251 --- firmware/libcommon/source/pseudo_talloc.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/firmware/libcommon/source/pseudo_talloc.c b/firmware/libcommon/source/pseudo_talloc.c index 7c452b3b..3407a59f 100644 --- a/firmware/libcommon/source/pseudo_talloc.c +++ b/firmware/libcommon/source/pseudo_talloc.c @@ -22,7 +22,9 @@ #include "utils.h" #include -#define NUM_RCTX_SMALL 10 +/* TODO: this number should dynamically scale. We need at least one per IN/IRQ endpoint, + * as well as at least 3 for every OUT endpoint. Plus some more depending on the application */ +#define NUM_RCTX_SMALL 20 #define RCTX_SIZE_SMALL 348 static uint8_t msgb_data[NUM_RCTX_SMALL][RCTX_SIZE_SMALL] __attribute__((aligned(sizeof(long))));