Commit a6126a39 authored by Robert Schmidt's avatar Robert Schmidt

Remove MAX_NUMBER_NETIF and use num UE

parent 8c5976e2
......@@ -2277,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)
......
......@@ -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)
......
......@@ -263,7 +263,6 @@ int esm_ebr_context_create(
strcpy(broadcast, ipv4_addr);
}
uint8_t if_num = ueid % MAX_NUMBER_NETIF + 1;
res = sprintf(command_line,
"ip address add %s/%d broadcast %s dev %s%d && "
"ip link set %s%d up && "
......@@ -271,12 +270,12 @@ int esm_ebr_context_create(
"ip rule add to %s/32 table %d && "
"ip route add default dev %s%d table %d",
ipv4_addr, netmask, broadcast,
UE_NAS_USE_TUN ? "oaitun_ue" : "oip", if_num,
UE_NAS_USE_TUN ? "oaitun_ue" : "oip", if_num,
UE_NAS_USE_TUN ? "oaitun_ue" : "oip", ueid + 1,
UE_NAS_USE_TUN ? "oaitun_ue" : "oip", ueid + 1,
ipv4_addr, ueid + 10000,
ipv4_addr, ueid + 10000,
UE_NAS_USE_TUN ? "oaitun_ue" : "oip",
if_num, ueid + 10000);
ueid + 1, ueid + 10000);
if ( res<0 ) {
LOG_TRACE(WARNING, "ESM-PROC - Failed to system command string");
......
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