Commit e948d18d authored by hardy's avatar hardy

Merge remote-tracking branch 'origin/feature/make-s1-mme-port-configurable'...

Merge remote-tracking branch 'origin/feature/make-s1-mme-port-configurable' into integration_2020_wk47
parents 7d9ce6ae f96ea194
......@@ -181,6 +181,7 @@ eNBs = (
{
ipv4 = "CI_MME_IP_ADDR";
ipv6 = "192:168:30::17";
port = 36412 ;
active = "yes";
preference = "ipv4";
}
......
......@@ -181,6 +181,7 @@ eNBs = (
{
ipv4 = "CI_MME_IP_ADDR";
ipv6 = "192:168:30::17";
port = 36412 ;
active = "yes";
preference = "ipv4";
}
......
......@@ -181,6 +181,7 @@ eNBs = (
{
ipv4 = "CI_MME_IP_ADDR";
ipv6 = "192:168:30::17";
port = 36412 ;
active = "yes";
preference = "ipv4";
}
......
......@@ -175,6 +175,7 @@ eNBs =
////////// MME parameters:
mme_ip_address = ( { ipv4 = "CI_MME_IP_ADDR";
ipv6 = "192:168:30::17";
port = 36412 ;
active = "yes";
preference = "ipv4";
}
......
......@@ -356,6 +356,7 @@ eNBs =
////////// MME parameters:
mme_ip_address = ( { ipv4 = "CI_MME_IP_ADDR";
ipv6 = "192:168:30::17";
port = 36412 ;
active = "yes";
preference = "ipv4";
}
......
......@@ -177,6 +177,7 @@ eNBs =
////////// MME parameters:
mme_ip_address = ( { ipv4 = "CI_MME_IP_ADDR";
ipv6 = "192:168:30::17";
port = 36412 ;
active = "yes";
preference = "ipv4";
}
......
......@@ -178,6 +178,7 @@ eNBs =
////////// MME parameters:
mme_ip_address = ( { ipv4 = "CI_MME_IP_ADDR";
ipv6 = "192:168:30::17";
port = 36412 ;
active = "yes";
preference = "ipv4";
}
......
......@@ -136,6 +136,7 @@ eNBs =
////////// MME parameters:
mme_ip_address = ( { ipv4 = "CI_MME_IP_ADDR";
ipv6 = "192:168:30::17";
port = 36412 ;
active = "yes";
preference = "ipv4";
}
......
......@@ -136,6 +136,7 @@ eNBs =
////////// MME parameters:
mme_ip_address = ( { ipv4 = "CI_MME_IP_ADDR";
ipv6 = "192:168:30::17";
port = 36412 ;
active = "yes";
preference = "ipv4";
}
......
......@@ -136,6 +136,7 @@ eNBs =
////////// MME parameters:
mme_ip_address = ( { ipv4 = "CI_MME_IP_ADDR";
ipv6 = "192:168:30::17";
port = 36412 ;
active = "yes";
preference = "ipv4";
}
......
......@@ -136,6 +136,7 @@ eNBs =
////////// MME parameters:
mme_ip_address = ( { ipv4 = "CI_MME_IP_ADDR";
ipv6 = "192:168:30::17";
port = 36412 ;
active = "yes";
preference = "ipv4";
}
......
......@@ -173,6 +173,7 @@ eNBs =
////////// MME parameters:
mme_ip_address = ( { ipv4 = "CI_MME_IP_ADDR";
ipv6 = "192:168:30::17";
port = 36412 ;
active = "yes";
preference = "ipv4";
}
......
......@@ -176,6 +176,7 @@ eNBs =
////////// MME parameters:
mme_ip_address = ( { ipv4 = "CI_MME_IP_ADDR";
ipv6 = "192:168:30::17";
port = 36412 ;
active = "yes";
preference = "ipv4";
}
......
......@@ -176,6 +176,7 @@ eNBs =
////////// MME parameters:
mme_ip_address = ( { ipv4 = "CI_MME_IP_ADDR";
ipv6 = "192:168:30::17";
port = 36412 ;
active = "yes";
preference = "ipv4";
}
......
......@@ -181,6 +181,7 @@ eNBs =
////////// MME parameters:
mme_ip_address = ( { ipv4 = "CI_MME_IP_ADDR";
ipv6 = "192:168:30::17";
port = 36412 ;
active = "yes";
preference = "ipv4";
}
......
......@@ -183,6 +183,7 @@ eNBs =
////////// MME parameters:
mme_ip_address = ( { ipv4 = "CI_MME_IP_ADDR";
ipv6 = "192:168:30::17";
port = 36412 ;
active = "yes";
preference = "ipv4";
}
......
......@@ -176,6 +176,7 @@ eNBs =
////////// MME parameters:
mme_ip_address = ( { ipv4 = "CI_MME_IP_ADDR";
ipv6 = "192:168:30::17";
port = 36412 ;
active = "yes";
preference = "ipv4";
}
......
......@@ -175,6 +175,7 @@ eNBs =
////////// MME parameters:
mme_ip_address = ( { ipv4 = "CI_MME_IP_ADDR";
ipv6 = "192:168:30::17";
port = 36412 ;
active = "yes";
preference = "ipv4";
}
......
......@@ -204,6 +204,7 @@ gNBs =
////////// MME parameters:
mme_ip_address = ( { ipv4 = "192.168.12.26";
ipv6 = "192:168:30::17";
port = 36412 ;
active = "yes";
preference = "ipv4";
}
......
......@@ -201,6 +201,7 @@ gNBs =
////////// MME parameters:
mme_ip_address = ( { ipv4 = "CI_MME_IP_ADDR";
ipv6 = "192:168:30::17";
port = 36412 ;
active = "yes";
preference = "ipv4";
}
......
......@@ -173,6 +173,7 @@ eNBs =
////////// MME parameters:
mme_ip_address = ( { ipv4 = "CI_MME_IP_ADDR";
ipv6 = "192:168:30::17";
port = 36412 ;
active = "yes";
preference = "ipv4";
}
......
......@@ -174,6 +174,7 @@ eNBs =
////////// MME parameters:
mme_ip_address = ( { ipv4 = "CI_MME_IP_ADDR";
ipv6 = "192:168:30::17";
port = 36412 ;
active = "yes";
preference = "ipv4";
}
......
......@@ -174,6 +174,7 @@ eNBs =
////////// MME parameters:
mme_ip_address = ( { ipv4 = "CI_MME_IP_ADDR";
ipv6 = "192:168:30::17";
port = 36412 ;
active = "yes";
preference = "ipv4";
}
......
......@@ -136,6 +136,7 @@ eNBs =
////////// MME parameters:
mme_ip_address = ( { ipv4 = "CI_MME_IP_ADDR";
ipv6 = "192:168:30::17";
port = 36412 ;
active = "yes";
preference = "ipv4";
}
......
......@@ -141,6 +141,7 @@ eNBs =
////////// MME parameters:
mme_ip_address = ( { ipv4 = "CI_MME_IP_ADDR";
ipv6 = "192:168:30::17";
port = 36412 ;
active = "yes";
preference = "ipv4";
}
......
......@@ -139,6 +139,7 @@ eNBs =
////////// MME parameters:
mme_ip_address = ( { ipv4 = "CI_MME_IP_ADDR";
ipv6 = "192:168:30::17";
port = 36412 ;
active = "yes";
preference = "ipv4";
}
......
......@@ -139,6 +139,7 @@ eNBs =
////////// MME parameters:
mme_ip_address = ( { ipv4 = "CI_MME_IP_ADDR";
ipv6 = "192:168:30::17";
port = 36412 ;
active = "yes";
preference = "ipv4";
}
......
......@@ -139,6 +139,7 @@ eNBs =
////////// MME parameters:
mme_ip_address = ( { ipv4 = "CI_MME_IP_ADDR";
ipv6 = "192:168:30::17";
port = 36412 ;
active = "yes";
preference = "ipv4";
}
......
......@@ -176,6 +176,7 @@ eNBs =
////////// MME parameters:
mme_ip_address = ( { ipv4 = "CI_MME_IP_ADDR";
ipv6 = "192:168:30::17";
port = 36412 ;
active = "yes";
preference = "ipv4";
}
......
......@@ -176,6 +176,7 @@ eNBs =
////////// MME parameters:
mme_ip_address = ( { ipv4 = "CI_MME_IP_ADDR";
ipv6 = "192:168:30::17";
port = 36412 ;
active = "yes";
preference = "ipv4";
}
......
......@@ -176,6 +176,7 @@ eNBs =
////////// MME parameters:
mme_ip_address = ( { ipv4 = "CI_MME_IP_ADDR";
ipv6 = "192:168:30::17";
port = 36412 ;
active = "yes";
preference = "ipv4";
}
......
......@@ -144,6 +144,7 @@ eNBs =
////////// MME parameters:
mme_ip_address = ( { ipv4 = "192.168.15.130";
ipv6 = "192:168:30::17";
port = 36412 ;
active = "yes";
preference = "ipv4";
}
......
......@@ -144,6 +144,7 @@ eNBs =
////////// MME parameters:
mme_ip_address = ( { ipv4 = "127.0.0.3";
ipv6 = "192:168:30::17";
port = 36412 ;
active = "yes";
preference = "ipv4";
}
......
......@@ -174,6 +174,7 @@ eNBs =
////////// MME parameters:
mme_ip_address = ( { ipv4 = "CI_MME_IP_ADDR";
ipv6 = "192:168:30::17";
port = 36412 ;
active = "yes";
preference = "ipv4";
}
......
......@@ -42,12 +42,12 @@ KERNEL_MAJOR=$(uname -r | cut -d '.' -f2)
#check if we run inside a container
IS_CONTAINER=`egrep -c "docker|podman|kubepods" /proc/self/cgroup || true`
#sudo is not needed inside a container
if [ $IS_CONTAINER -eq 0 ]
#sudo is not needed when we are root
if [ "$UID" = 0 ]
then
SUDO='sudo -S -E'
else
SUDO=''
else
SUDO='sudo -S -E'
fi
###############################
......@@ -251,18 +251,13 @@ install_protobuf_from_source(){
#wget https://github.com/google/protobuf/releases/download/v2.6.1/protobuf-2.6.1.tar.gz
#tar -xzvf protobuf-2.6.1.tar.gz --owner $USER --group $USER --no-same-owner
#cd protobuf-2.6.1/
if [ $IS_CONTAINER -eq 0 ]
then
rm -rf /tmp/protobuf-cpp-3.3.0.tar.gz* /tmp/protobuf-3.3.0
wget --tries=3 --retry-connrefused https://github.com/google/protobuf/releases/download/v3.3.0/protobuf-cpp-3.3.0.tar.gz
tar -xzvf protobuf-cpp-3.3.0.tar.gz --owner $USER --group $(groups | cut -d" " -f1) --no-same-owner
tar -xzvf protobuf-cpp-3.3.0.tar.gz --owner $(id -u) --group $(id -g) --no-same-owner
cd protobuf-3.3.0/
./configure
echo "Compiling protobuf"
make -j`nproc`
$SUDO make install
$SUDO ldconfig
else
export LD_LIBRARY_PATH=/usr/local/lib #protoc needs to know where toclook for shared libs
rm -rf /tmp/protobuf
......@@ -270,11 +265,12 @@ install_protobuf_from_source(){
cd /tmp/protobuf
git submodule update --init --recursive
./autogen.sh
./configure
make -j`nproc`
make install
ldconfig
fi
./configure
echo "Compiling protobuf"
make -j`nproc`
$SUDO make install
$SUDO ldconfig
) >& $protobuf_install_log
}
......
......@@ -386,6 +386,7 @@ typedef struct s1ap_register_enb_req_s {
uint8_t nb_mme;
/* List of MME to connect to */
net_ip_address_t mme_ip_address[S1AP_MAX_NB_MME_IP_ADDRESS];
uint16_t mme_port[S1AP_MAX_NB_MME_IP_ADDRESS];
uint8_t broadcast_plmn_num[S1AP_MAX_NB_MME_IP_ADDRESS];
uint8_t broadcast_plmn_index[S1AP_MAX_NB_MME_IP_ADDRESS][PLMN_LIST_MAX_SIZE];
......
......@@ -2511,6 +2511,9 @@ int RCconfig_S1(
S1AP_REGISTER_ENB_REQ(msg_p).broadcast_plmn_num[l] = 0;
}
/* set S1-mme port (sctp) */
S1AP_REGISTER_ENB_REQ(msg_p).mme_port[l] = *S1ParamList.paramarray[l][ENB_MME_PORT_IDX].u16ptr;
AssertFatal(S1AP_REGISTER_ENB_REQ(msg_p).broadcast_plmn_num[l] <= S1AP_REGISTER_ENB_REQ(msg_p).num_plmn,
"List of broadcast PLMN to be sent to MME can not be longer than actual "
"PLMN list (max %d, but is %d)\n",
......
......@@ -34,6 +34,7 @@
#define ENB_PARAMDEF_H_
#include "common/config/config_paramdesc.h"
#include "RRC_paramsvalues.h"
#include "s1ap_eNB_default_values.h"
#define ENB_CONFIG_STRING_CC_NODE_FUNCTION "node_function"
#define ENB_CONFIG_STRING_CC_NODE_TIMING "node_timing"
......@@ -910,6 +911,7 @@ typedef struct srb1_params_s {
#define ENB_CONFIG_STRING_MME_IPV4_ADDRESS "ipv4"
#define ENB_CONFIG_STRING_MME_IPV6_ADDRESS "ipv6"
#define ENB_CONFIG_STRING_MME_PORT "port"
#define ENB_CONFIG_STRING_MME_IP_ADDRESS_ACTIVE "active"
#define ENB_CONFIG_STRING_MME_IP_ADDRESS_PREFERENCE "preference"
#define ENB_CONFIG_STRING_MME_BROADCAST_PLMN_INDEX "broadcast_plmn_index"
......@@ -924,14 +926,20 @@ typedef struct srb1_params_s {
{ENB_CONFIG_STRING_MME_IPV6_ADDRESS, NULL, 0, uptr:NULL, defstrval:NULL, TYPE_STRING, 0}, \
{ENB_CONFIG_STRING_MME_IP_ADDRESS_ACTIVE, NULL, 0, uptr:NULL, defstrval:NULL, TYPE_STRING, 0}, \
{ENB_CONFIG_STRING_MME_IP_ADDRESS_PREFERENCE, NULL, 0, uptr:NULL, defstrval:NULL, TYPE_STRING, 0}, \
{ENB_CONFIG_STRING_MME_BROADCAST_PLMN_INDEX, NULL, 0, uptr:NULL, defintarrayval:NULL, TYPE_UINTARRAY, 6} \
{ENB_CONFIG_STRING_MME_BROADCAST_PLMN_INDEX, NULL, 0, uptr:NULL, defintarrayval:NULL, TYPE_UINTARRAY, 6}, \
{ENB_CONFIG_STRING_MME_PORT, NULL, 0, u16ptr:NULL, defuintval:S1AP_PORT_NUMBER, TYPE_UINT16, 0}, \
}
#define ENB_MME_IPV4_ADDRESS_IDX 0
#define ENB_MME_IPV6_ADDRESS_IDX 1
#define ENB_MME_IP_ADDRESS_ACTIVE_IDX 2
#define ENB_MME_IP_ADDRESS_PREFERENCE_IDX 3
#define ENB_MME_BROADCAST_PLMN_INDEX 4
#define ENB_MME_PORT_IDX 5
/*---------------------------------------------------------------------------------------------------------------------------------------*/
/* X2 configuration parameters section name */
......
......@@ -89,6 +89,7 @@ uint32_t s1ap_generate_eNB_id(void) {
static void s1ap_eNB_register_mme(s1ap_eNB_instance_t *instance_p,
net_ip_address_t *mme_ip_address,
uint16_t mme_port,
net_ip_address_t *local_ip_addr,
uint16_t in_streams,
uint16_t out_streams,
......@@ -102,7 +103,7 @@ static void s1ap_eNB_register_mme(s1ap_eNB_instance_t *instance_p,
DevAssert(mme_ip_address != NULL);
message_p = itti_alloc_new_message(TASK_S1AP, SCTP_NEW_ASSOCIATION_REQ);
sctp_new_association_req_p = &message_p->ittiMsg.sctp_new_association_req;
sctp_new_association_req_p->port = S1AP_PORT_NUMBER;
sctp_new_association_req_p->port = mme_port;
sctp_new_association_req_p->ppid = S1AP_SCTP_PPID;
sctp_new_association_req_p->in_streams = in_streams;
sctp_new_association_req_p->out_streams = out_streams;
......@@ -221,6 +222,7 @@ void s1ap_eNB_handle_register_eNB(instance_t instance, s1ap_register_enb_req_t *
/* Trying to connect to provided list of MME ip address */
for (index = 0; index < s1ap_register_eNB->nb_mme; index++) {
net_ip_address_t *mme_ip = &s1ap_register_eNB->mme_ip_address[index];
uint16_t mme_port = s1ap_register_eNB->mme_port[index];
struct s1ap_eNB_mme_data_s *mme = NULL;
RB_FOREACH(mme, s1ap_mme_map, &new_instance->s1ap_mme_head) {
/* Compare whether IPv4 and IPv6 information is already present, in which
......@@ -235,6 +237,7 @@ void s1ap_eNB_handle_register_eNB(instance_t instance, s1ap_register_enb_req_t *
continue;
s1ap_eNB_register_mme(new_instance,
mme_ip,
mme_port,
&s1ap_register_eNB->enb_ip_address,
s1ap_register_eNB->sctp_in_streams,
s1ap_register_eNB->sctp_out_streams,
......
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