Commit 40141270 authored by Remi Hardy's avatar Remi Hardy

Integration 2020 wk47

MR939 : Nr rlc am bugfix w44 
- bugfix

MR948 : nr: rlc: hotfix - forgot to store frame and subfram  
- minor bugfix

MR942 : Feature/make s1 mme port configurable 
- This patch adds an optional "port" option to set another sctp port than 36412 

MR959 : minor: remove a CPPCHECK error for NR RLC
- remove a CPPCHECK error (not a real error) for NR RLC
parents 8f03a80a d9c0a13f
......@@ -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";
}
......
......@@ -84,6 +84,12 @@ nullPointer:common/utils/T/tracer/multi.c:265
arrayIndexOutOfBounds:openair2/LAYER2/rlc_v2/tests/test.c:401
//
//-----------------------------------------------------------------------------
// this file is used for testing the NR RLC implementation, this error is
// not a problem, the programmer has to know what she does when writing
// the tests
arrayIndexOutOfBounds:openair2/LAYER2/nr_rlc/tests/test.c:451
//
//-----------------------------------------------------------------------------
// cppcheck does not understand the different lengths of arrays
arrayIndexOutOfBounds:openair1/SIMULATION/TOOLS/random_channel.c:705
arrayIndexOutOfBounds:openair1/SIMULATION/TOOLS/random_channel.c:706
......
......@@ -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 */
......
......@@ -1285,7 +1285,7 @@ static int missing_size(nr_rlc_entity_am_t *entity, missing_data_t *m,
missing_data_t m_nack;
/* be careful to limit a range to 255 SNs, that is: cut if needed */
sn_count = m->sn_end - m->sn_start;
sn_count = m->sn_end - m->sn_start + 1;
if (sn_count < 0)
sn_count += entity->sn_modulus;
......
......@@ -917,6 +917,9 @@ rlc_op_status_t rrc_rlc_remove_ue (const protocol_ctxt_t* const x)
void nr_rlc_tick(int frame, int subframe)
{
if (frame != nr_rlc_current_time_last_frame ||
subframe != nr_rlc_current_time_last_subframe)
subframe != nr_rlc_current_time_last_subframe) {
nr_rlc_current_time_last_frame = frame;
nr_rlc_current_time_last_subframe = subframe;
nr_rlc_current_time++;
}
}
#!/bin/sh
test_count=13
test_count=14
for i in `seq $test_count`
do
......
/*
* am test (SN field size 18):
* test status reporting with missing packet
* at time 1, UE receives an SDU of 50 bytes
* at time 2, UE receives an SDU of 50 bytes
* at time 3, UE receives an SDU of 50 bytes
* at time 4, UE receives an SDU of 50 bytes
* transmission fails for first SDU, okay for the others
* then some time with transmission failing
* then at time 49, UE receives an SDU, transmission okay
* then at time 50, transmission failing again (we had a bug triggered by this)
* finally at time 55, transmission okay again to clear buffers
*/
TIME, 1,
GNB_AM, 100000, 100000, 45, 35, 0, -1, -1, 8, 18,
UE_AM, 100000, 100000, 45, 35, 0, -1, -1, 8, 18,
GNB_RECV_FAILS, 1,
GNB_PDU_SIZE, 80,
UE_PDU_SIZE, 80,
UE_SDU, 0, 50,
TIME, 2,
GNB_RECV_FAILS, 0,
UE_SDU, 1, 50,
TIME, 3,
GNB_BUFFER_STATUS,
UE_SDU, 2, 50,
TIME, 4,
GNB_BUFFER_STATUS,
UE_SDU, 3, 50,
TIME, 5,
GNB_BUFFER_STATUS,
GNB_RECV_FAILS, 1,
TIME, 6,
GNB_BUFFER_STATUS,
UE_BUFFER_STATUS,
TIME, 49,
GNB_RECV_FAILS, 0,
UE_SDU, 4, 50,
TIME, 50,
GNB_RECV_FAILS, 1,
GNB_BUFFER_STATUS,
UE_BUFFER_STATUS,
TIME, 55,
GNB_RECV_FAILS, 0,
TIME, -1
......@@ -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