summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicolas Schodet2011-02-07 15:14:42 +0100
committerNicolas Schodet2011-02-21 17:03:09 +0100
commit0d70e03aa2ec155ce5e5dcdd97aea8ce754753b9 (patch)
tree999519ab0ab836466adddcfca2452ba35a9af665
parent1a8b7ee259f312d44ef73950c47c847cdcb0da38 (diff)
cesar/hal/hle: reduce mailbox budget, refs #1552
-rw-r--r--cesar/hal/hle/src/ipmbox.c2
-rw-r--r--cesar/hal/hle/test/src/hal_hle_ipmbox.c18
2 files changed, 10 insertions, 10 deletions
diff --git a/cesar/hal/hle/src/ipmbox.c b/cesar/hal/hle/src/ipmbox.c
index 8357d842fa..bcf6a1354b 100644
--- a/cesar/hal/hle/src/ipmbox.c
+++ b/cesar/hal/hle/src/ipmbox.c
@@ -26,7 +26,7 @@
/** RX budget. Number of words which can be handled in one execution.
* Warning: this works if all messages have the same size because input
* mailbox will be cut without analysis. */
-#define MAILBOX_RX_BUDGET 256
+#define MAILBOX_RX_BUDGET 128
/** Global context variable */
static ipmbox_t context;
diff --git a/cesar/hal/hle/test/src/hal_hle_ipmbox.c b/cesar/hal/hle/test/src/hal_hle_ipmbox.c
index bdb9cef79d..77f71f14f9 100644
--- a/cesar/hal/hle/test/src/hal_hle_ipmbox.c
+++ b/cesar/hal/hle/test/src/hal_hle_ipmbox.c
@@ -208,11 +208,11 @@ test_ipmbox_budget (void)
/* A small message which should not trigger budget. */
test_begin (test, "small")
{
- uint expect[] = { 200, 12, 0 };
+ uint expect[] = { 100, 12, 0 };
expectp = expect;
- for (i = 12; i < 200 + 12; i++)
+ for (i = 12; i < 100 + 12; i++)
A2L_ring[i] = i;
- utest_A2L_tail += 200 * 4;
+ utest_A2L_tail += 100 * 4;
dsr_posted = false;
mailbox_rx_dsr (14, 0, (uint) ctx);
test_fail_unless (*expectp == 0);
@@ -221,11 +221,11 @@ test_ipmbox_budget (void)
/* A medium message which should not trigger budget. */
test_begin (test, "medium")
{
- uint expect[] = { 256, 212, 0 };
+ uint expect[] = { 128, 112, 0 };
expectp = expect;
- for (i = 212; i < 256 + 212; i++)
+ for (i = 112; i < 128 + 112; i++)
A2L_ring[i] = i;
- utest_A2L_tail += 256 * 4;
+ utest_A2L_tail += 128 * 4;
dsr_posted = false;
mailbox_rx_dsr (14, 0, (uint) ctx);
test_fail_unless (*expectp == 0);
@@ -234,11 +234,11 @@ test_ipmbox_budget (void)
/* A large message to trigger budget. */
test_begin (test, "large")
{
- uint expect[] = { 256, 468, 256, 724, 0 };
+ uint expect[] = { 128, 240, 128, 368, 0 };
expectp = expect;
- for (i = 468; i < 512 + 468; i++)
+ for (i = 240; i < 256 + 240; i++)
A2L_ring[i] = i;
- utest_A2L_tail += 512 * 4;
+ utest_A2L_tail += 256 * 4;
dsr_posted = false;
mailbox_rx_dsr (14, 0, (uint) ctx);
test_fail_unless (dsr_posted);