Increase packet memory buffer (#161)

This commit is contained in:
Sukchan Lee 2019-03-22 16:59:37 +09:00
parent ddaea685b3
commit c964d1df3c
2 changed files with 36 additions and 8 deletions

View File

@ -7,8 +7,8 @@
#include "core_debug.h"
#include "core_pool.h"
#define MAX_NUM_OF_CLBUF 256
#define MAX_NUM_OF_PKBUF 256
#define MAX_NUM_OF_CLBUF (8192 + 4096 + 2048 + 1024 + 512 + 128)
#define MAX_NUM_OF_PKBUF (8192 + 4096 + 2048 + 1024 + 512 + 128)
pool_declare(clbuf_pool, clbuf_t, MAX_NUM_OF_CLBUF);
pool_declare(pkbuf_pool, pkbuf_t, MAX_NUM_OF_PKBUF);
@ -23,12 +23,12 @@ pool_declare(pkbuf_pool, pkbuf_t, MAX_NUM_OF_PKBUF);
#define SIZEOF_CLUSTER_2048 CORE_ALIGN(2048+MAX_SIZEOF_HEADROOM, BOUNDARY)
#define SIZEOF_CLUSTER_8192 CORE_ALIGN(8192+MAX_SIZEOF_HEADROOM, BOUNDARY)
#define MAX_NUM_OF_CLUSTER_128 256
#define MAX_NUM_OF_CLUSTER_256 256
#define MAX_NUM_OF_CLUSTER_512 256
#define MAX_NUM_OF_CLUSTER_1024 256
#define MAX_NUM_OF_CLUSTER_2048 256
#define MAX_NUM_OF_CLUSTER_8192 256
#define MAX_NUM_OF_CLUSTER_128 8192
#define MAX_NUM_OF_CLUSTER_256 4096
#define MAX_NUM_OF_CLUSTER_512 2048
#define MAX_NUM_OF_CLUSTER_1024 1024
#define MAX_NUM_OF_CLUSTER_2048 512
#define MAX_NUM_OF_CLUSTER_8192 128
typedef c_uint8_t cluster_128_t[SIZEOF_CLUSTER_128];
typedef c_uint8_t cluster_256_t[SIZEOF_CLUSTER_256];

View File

@ -165,6 +165,33 @@ static void s1ap_message_test6(abts_case *tc, void *data)
pkbuf_free(s1apbuf);
}
static void s1ap_message_test7(abts_case *tc, void *data)
{
/* InitialUE(Service Request) */
char *payload =
"000c402d000005000800020071001a00 0504c706b410004300060013f1890001"
"006440080013f189400bb75000864001 40006440080013f189400bb750004340"
"060013f18900014300060013f1890001 006440080013f189400db09000864001"
"30000000000000000000000000000000 00000000000000000000000000000000";
s1ap_message_t message;
pkbuf_t *pkbuf;
int result;
char hexbuf[MAX_SDU_LEN];
pkbuf = pkbuf_alloc(0, MAX_SDU_LEN);
ABTS_PTR_NOTNULL(tc, pkbuf);
pkbuf->len = 8192;
memcpy(pkbuf->payload,
CORE_HEX(payload, strlen(payload), hexbuf), 128);
result = s1ap_decode_pdu(&message, pkbuf);
ABTS_INT_EQUAL(tc, 0, result);
s1ap_free_pdu(&message);
pkbuf_free(pkbuf);
}
abts_suite *test_s1ap_message(abts_suite *suite)
{
suite = ADD_SUITE(suite)
@ -175,6 +202,7 @@ abts_suite *test_s1ap_message(abts_suite *suite)
abts_run_test(suite, s1ap_message_test4, NULL);
abts_run_test(suite, s1ap_message_test5, NULL);
abts_run_test(suite, s1ap_message_test6, NULL);
abts_run_test(suite, s1ap_message_test7, NULL);
return suite;
}