Commit 1143d80e authored by Robert Schmidt's avatar Robert Schmidt

Start PDCP task

parent b2e91ff3
...@@ -1006,13 +1006,15 @@ void pdcp_update_stats(const protocol_ctxt_t* const ctxt_pP){ ...@@ -1006,13 +1006,15 @@ void pdcp_update_stats(const protocol_ctxt_t* const ctxt_pP){
#if defined(ENABLE_ITTI) #if defined(ENABLE_ITTI)
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
void void *
pdcp_task(void *arg) pdcp_task(void *arg)
{ {
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
MessageDef *msg_p; MessageDef *msg_p;
int result; int result;
instance_t instance; instance_t instance;
/* mark in context whether it is an UE or eNodeB */
ctxt.enb_flag = *(int *)arg;
LOG_I(PDCP, "Starting PDCP task\n"); LOG_I(PDCP, "Starting PDCP task\n");
itti_mark_task_ready(TASK_PDCP); itti_mark_task_ready(TASK_PDCP);
......
...@@ -366,14 +366,14 @@ boolean_t pdcp_remove_UE( ...@@ -366,14 +366,14 @@ boolean_t pdcp_remove_UE(
*/ */
//void rrc_pdcp_config_release ( const protocol_ctxt_t* const ctxt_pP, rb_id_t); //void rrc_pdcp_config_release ( const protocol_ctxt_t* const ctxt_pP, rb_id_t);
/*! \fn void pdcp_task(void *args) /*! \fn void *pdcp_task(void *args)
* \brief Runs PDCP task to let it handle incoming/outgoing SDUs * \brief Runs PDCP task to let it handle incoming/outgoing SDUs
* \param[in] args initial args * \param[in] args initial args
* \return none * \return none
* \note None * \note None
* @ingroup _pdcp * @ingroup _pdcp
*/ */
void pdcp_task(void *args); void *pdcp_task(void *args);
int pdcp_module_init (void); int pdcp_module_init (void);
void pdcp_module_cleanup (void); void pdcp_module_cleanup (void);
void pdcp_layer_init (void); void pdcp_layer_init (void);
......
...@@ -40,6 +40,7 @@ ...@@ -40,6 +40,7 @@
# include "f1ap_cu_task.h" # include "f1ap_cu_task.h"
# include "f1ap_du_task.h" # include "f1ap_du_task.h"
# include "enb_app.h" # include "enb_app.h"
# include "pdcp.h"
extern RAN_CONTEXT_t RC; extern RAN_CONTEXT_t RC;
extern int emulate_rf; extern int emulate_rf;
...@@ -85,10 +86,9 @@ int create_tasks(uint32_t enb_nb) ...@@ -85,10 +86,9 @@ int create_tasks(uint32_t enb_nb)
if (enb_nb > 0) { if (enb_nb > 0) {
rc = itti_create_task(TASK_CU_F1, F1AP_CU_task, NULL); rc = itti_create_task(TASK_CU_F1, F1AP_CU_task, NULL);
AssertFatal(rc >= 0, "Create task for CU F1AP failed\n"); AssertFatal(rc >= 0, "Create task for CU F1AP failed\n");
//RS/BK: Fix me! int is_enb = 1;
rc = itti_create_task (TASK_L2L1, l2l1_task, NULL); rc = itti_create_task (TASK_PDCP, pdcp_task, &is_enb);
AssertFatal(rc >= 0, "Create task for L2L1 failed\n"); AssertFatal(rc >= 0, "Create task for PDCP failed\n");
} }
/* fall through */ /* fall through */
case ngran_eNB: case ngran_eNB:
......
...@@ -39,6 +39,7 @@ ...@@ -39,6 +39,7 @@
# include "RRC/LTE/rrc_defs.h" # include "RRC/LTE/rrc_defs.h"
# endif # endif
# include "enb_app.h" # include "enb_app.h"
# include "pdcp.h"
int create_tasks_ue(uint32_t ue_nb) int create_tasks_ue(uint32_t ue_nb)
{ {
...@@ -49,6 +50,11 @@ int create_tasks_ue(uint32_t ue_nb) ...@@ -49,6 +50,11 @@ int create_tasks_ue(uint32_t ue_nb)
LOG_E(PDCP, "Create task for L2L1 failed\n"); LOG_E(PDCP, "Create task for L2L1 failed\n");
return -1; return -1;
} }
int is_enb = 0;
if (itti_create_task (TASK_PDCP, pdcp_task, &is_enb) < 0) {
LOG_E(PDCP, "Create task for PDCP failed\n");
return -1;
}
# if defined(ENABLE_USE_MME) # if defined(ENABLE_USE_MME)
# if defined(NAS_BUILT_IN_UE) # if defined(NAS_BUILT_IN_UE)
...@@ -77,4 +83,4 @@ int create_tasks_ue(uint32_t ue_nb) ...@@ -77,4 +83,4 @@ int create_tasks_ue(uint32_t ue_nb)
return 0; return 0;
} }
#endif #endif
\ No newline at end of file
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment