Updating PDCP module for proxy

Adding ue id parameter to pdcp_init
Updating tun interface functions for proxy
This commit is contained in:
Deokseong "David" Kim
2021-01-12 14:45:52 -08:00
committed by Michael Cook
parent 355e5919de
commit b220ed29c4
10 changed files with 62 additions and 29 deletions
+1 -1
View File
@@ -488,7 +488,7 @@ void init_pdcp(void) {
pdcp_initmask = pdcp_initmask | ENB_NAS_USE_TUN_W_MBMS_BIT;
pdcp_module_init(pdcp_initmask);
pdcp_module_init(pdcp_initmask, 0);
if (NODE_IS_CU(RC.rrc[0]->node_type)) {
pdcp_set_rlc_data_req_func((send_rlc_data_req_func_t)proto_agent_send_rlc_data_req);
+2 -1
View File
@@ -117,6 +117,7 @@
{"T" , CONFIG_HLP_TDD, PARAMFLAG_BOOL, iptr:&tddflag, defintval:0, TYPE_INT, 0}, \
{"A", CONFIG_HLP_TADV, 0, iptr:&(timingadv), defintval:0, TYPE_INT, 0}, \
{"ue-idx-standalone", NULL, 0, u16ptr:&ue_idx_standalone, defuintval:0xFFFF, TYPE_UINT16, 0}, \
{"node-number", NULL, 0, u16ptr:&node_number, defuintval:2, TYPE_UINT16, 0}, \
}
/*-----------------------------------------------------------------------------------------------------------------------------*/
@@ -207,7 +208,7 @@ extern int stop_L1L2(module_id_t enb_id);
extern int restart_L1L2(module_id_t enb_id);
extern void init_UE_stub_single_thread(int nb_inst, int eMBMS_active, int uecap_xer_in, char *emul_iface);
extern void init_UE_standalone_thread(void);
extern void init_UE_standalone_thread(int ue_idx);
extern PHY_VARS_UE *init_ue_vars(LTE_DL_FRAME_PARMS *frame_parms, uint8_t UE_id, uint8_t abstraction_flag);
+3 -3
View File
@@ -426,11 +426,11 @@ void init_UE_stub_single_thread(int nb_inst,
}
}
void init_UE_standalone_thread()
void init_UE_standalone_thread(int ue_idx)
{
const char *standalone_addr = "127.0.0.1"; // these two lines go into init
int standalone_tx_port = 3211;
int standalone_rx_port = 3212;
int standalone_tx_port = 3211 + ue_idx*2;
int standalone_rx_port = 3212 + ue_idx*2;
ue_init_standalone_socket(standalone_addr, standalone_tx_port, standalone_rx_port);
pthread_t thread;
+15 -5
View File
@@ -86,7 +86,7 @@
#include "lte-softmodem.h"
extern int ue_id_g ;
/* temporary compilation wokaround (UE/eNB split */
uint16_t sf_ahead;
@@ -280,6 +280,7 @@ void exit_function(const char *file, const char *function, const int line, const
extern int16_t dlsch_demod_shift;
uint16_t ue_idx_standalone = 0xFFFF;
uint16_t node_number;
static void get_options(void) {
int CC_id=0;
int tddflag=0;
@@ -526,7 +527,7 @@ int restart_L1L2(module_id_t enb_id) {
return 0;
}
void init_pdcp(void) {
void init_pdcp(int ue_id) {
uint32_t pdcp_initmask = (!IS_SOFTMODEM_NOS1) ? LINK_ENB_PDCP_TO_GTPV1U_BIT : (LINK_ENB_PDCP_TO_GTPV1U_BIT | PDCP_USE_NETLINK_BIT | LINK_ENB_PDCP_TO_IP_DRIVER_BIT);
// Do we need to include standalone mode here? - Andrew
if (IS_SOFTMODEM_BASICSIM || IS_SOFTMODEM_RFSIM || (nfapi_getmode()==NFAPI_UE_STUB_PNF)) {
@@ -536,7 +537,7 @@ void init_pdcp(void) {
if (IS_SOFTMODEM_NOKRNMOD)
pdcp_initmask = pdcp_initmask | UE_NAS_USE_TUN_BIT;
pdcp_module_init(pdcp_initmask);
pdcp_module_init(pdcp_initmask, ue_id);
pdcp_set_rlc_data_req_func((send_rlc_data_req_func_t) rlc_data_req);
pdcp_set_pdcp_data_ind_func((pdcp_data_ind_func_t) pdcp_data_ind);
}
@@ -623,7 +624,16 @@ int main( int argc, char **argv ) {
MSC_INIT(MSC_E_UTRAN, THREAD_MAX+TASK_MAX);
init_opt();
init_pdcp();
ue_id_g = (node_number == 0)? 0 : node_number-2 ;//ue_id_g = 0, 1, ...,
if( node_number == 0 )
{
init_pdcp(0);
}
else
{
init_pdcp(node_number-1);
}
//TTN for D2D
printf ("RRC control socket\n");
rrc_control_socket_init();
@@ -746,7 +756,7 @@ int main( int argc, char **argv ) {
abort();
}
init_UE_stub_single_thread(NB_UE_INST,eMBMS_active,uecap_xer_in,emul_iface);
init_UE_standalone_thread();
init_UE_standalone_thread(ue_id_g);
} else {
init_UE(NB_UE_INST,eMBMS_active,uecap_xer_in,0,get_softmodem_params()->phy_test,UE_scan,UE_scan_carrier,mode,(int)rx_gain[0][0],tx_max_power[0],
frame_parms[0]);