Merge remote-tracking branch 'origin/fixes-tun' into integration_2020_wk44
This commit is contained in:
@@ -65,18 +65,6 @@
|
||||
#define MAX_NR_RRC_UE_CONTEXTS 64
|
||||
|
||||
#ifndef UE_EXPANSION
|
||||
// TODO:L2 FAPI simulator.
|
||||
// UESIM_EXPANSION is used to be same value of MAX_MOBILES_PER_ENB
|
||||
// in eNB and UE.
|
||||
// now , if we use --mu option in UE, compiling error will occur.
|
||||
// This problem will be fixed in the future.
|
||||
#ifdef UESIM_EXPANSION
|
||||
#define MAX_MOBILES_PER_ENB 256
|
||||
#define MAX_MOBILES_PER_ENB_NB_IoT 256
|
||||
#define MAX_MOBILES_PER_GNB 256
|
||||
#define MAX_eNB 2
|
||||
#define MAX_gNB 2
|
||||
#else
|
||||
#ifdef LARGE_SCALE
|
||||
#define MAX_MOBILES_PER_ENB 128
|
||||
#define MAX_MOBILES_PER_ENB_NB_IoT 128
|
||||
@@ -90,7 +78,6 @@
|
||||
#define MAX_eNB 2
|
||||
#define MAX_gNB 2
|
||||
#endif
|
||||
#endif
|
||||
#else
|
||||
#define MAX_MOBILES_PER_ENB 256
|
||||
#define MAX_MOBILES_PER_ENB_NB_IoT 256
|
||||
|
||||
@@ -996,17 +996,7 @@ pdcp_data_ind(
|
||||
* TODO: be sure of this
|
||||
*/
|
||||
if (NFAPI_MODE == NFAPI_UE_STUB_PNF ) {
|
||||
#ifdef UESIM_EXPANSION
|
||||
|
||||
if (UE_NAS_USE_TUN) {
|
||||
pdcpHead->inst = ctxt_pP->module_id;
|
||||
} else {
|
||||
pdcpHead->inst = 0;
|
||||
}
|
||||
|
||||
#else
|
||||
pdcpHead->inst = ctxt_pP->module_id;
|
||||
#endif
|
||||
} else { // nfapi_mode
|
||||
if (UE_NAS_USE_TUN) {
|
||||
pdcpHead->inst = ctxt_pP->module_id;
|
||||
@@ -2287,7 +2277,7 @@ uint64_t pdcp_module_init( uint64_t pdcp_optmask ) {
|
||||
nas_getparams();
|
||||
|
||||
if(UE_NAS_USE_TUN) {
|
||||
int num_if = (NFAPI_MODE == NFAPI_UE_STUB_PNF || IS_SOFTMODEM_SIML1 )?MAX_NUMBER_NETIF:1;
|
||||
int num_if = (NFAPI_MODE == NFAPI_UE_STUB_PNF || IS_SOFTMODEM_SIML1 )? MAX_MOBILES_PER_ENB : 1;
|
||||
netlink_init_tun("ue",num_if);
|
||||
if (IS_SOFTMODEM_NOS1)
|
||||
nas_config(1, 1, 2, "ue");
|
||||
|
||||
@@ -53,9 +53,6 @@ typedef rlc_op_status_t (*send_rlc_data_req_func_t)(const protocol_ctxt_t *cons
|
||||
typedef boolean_t (*pdcp_data_ind_func_t)( const protocol_ctxt_t *, const srb_flag_t,
|
||||
const MBMS_flag_t, const rb_id_t, const sdu_size_t,
|
||||
mem_block_t *,const uint32_t *const, const uint32_t *const);
|
||||
/* maximum number of tun interfaces that will be created to emulates UEs */
|
||||
/* UEs beyond that will be multiplexed on the same tun */
|
||||
#define MAX_NUMBER_NETIF 16
|
||||
|
||||
#define ENB_NAS_USE_TUN_W_MBMS_BIT (1<< 10)
|
||||
#define PDCP_USE_NETLINK_BIT (1<< 11)
|
||||
|
||||
@@ -86,12 +86,6 @@ extern struct msghdr nas_msg_rx;
|
||||
|
||||
|
||||
|
||||
#ifdef UESIM_EXPANSION
|
||||
extern uint16_t inst_pdcp_list[NUMBER_OF_UE_MAX];
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
# include "gtpv1u_eNB_task.h"
|
||||
# include "gtpv1u_eNB_defs.h"
|
||||
|
||||
@@ -503,11 +497,7 @@ int pdcp_fifo_read_input_sdus_fromnetlinksock (const protocol_ctxt_t *const ctx
|
||||
}
|
||||
} else { // ctxt.enb_flag => UE
|
||||
if (NFAPI_MODE == NFAPI_UE_STUB_PNF) {
|
||||
#ifdef UESIM_EXPANSION
|
||||
ctxt.module_id = inst_pdcp_list[pdcp_read_header_g.inst];
|
||||
#else
|
||||
ctxt.module_id = pdcp_read_header_g.inst;
|
||||
#endif
|
||||
} else {
|
||||
ctxt.module_id = 0;
|
||||
}
|
||||
|
||||
@@ -368,7 +368,7 @@ uint64_t pdcp_module_init(uint64_t _pdcp_optmask)
|
||||
nas_getparams();
|
||||
|
||||
if(UE_NAS_USE_TUN) {
|
||||
int num_if = (NFAPI_MODE == NFAPI_UE_STUB_PNF || IS_SOFTMODEM_SIML1 )?MAX_NUMBER_NETIF:1;
|
||||
int num_if = (NFAPI_MODE == NFAPI_UE_STUB_PNF || IS_SOFTMODEM_SIML1 )? MAX_MOBILES_PER_ENB : 1;
|
||||
netlink_init_tun("ue",num_if);
|
||||
//Add --nr-ip-over-lte option check for next line
|
||||
if (IS_SOFTMODEM_NOS1)
|
||||
|
||||
@@ -287,18 +287,6 @@ ue_ip_common_ip2wireless(
|
||||
printk("[UE_IP_DRV][%s] Dest %d.%d.%d.%d\n",__FUNCTION__, dst_addr[0],dst_addr[1],dst_addr[2],dst_addr[3]);
|
||||
}
|
||||
|
||||
// modify inst by IP address for the U-Plane of multiple UEs while L2 fapi simulator start
|
||||
#ifdef UESIM_EXPANSION
|
||||
|
||||
if ((src_addr[3] - 2)> instP) {
|
||||
pdcph.inst = src_addr[3] - 2;
|
||||
printk("[UE_IP_DRV] change INST from %d to %d\n",instP, pdcph.inst);
|
||||
instP = src_addr[3] - 2;
|
||||
priv_p=netdev_priv(ue_ip_dev[instP]);
|
||||
}
|
||||
|
||||
#endif
|
||||
// modify inst by IP address for the U-Plane of multiple UEs while L2 fapi simulator end
|
||||
//get Ipv4 address and pass to PCDP header
|
||||
printk("[UE_IP_DRV] source Id: 0x%08x\n",pdcph.sourceL2Id );
|
||||
printk("[UE_IP_DRV] destinationL2Id Id: 0x%08x\n",pdcph.destinationL2Id );
|
||||
|
||||
Reference in New Issue
Block a user