Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
O
OpenXG-RAN
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Michael Black
OpenXG-RAN
Commits
44d40219
Commit
44d40219
authored
Mar 04, 2021
by
Fang-WANG
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
modify fro comments, no warning now
parent
4d685a00
Changes
13
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
176 additions
and
138 deletions
+176
-138
openair2/GNB_APP/gnb_app.c
openair2/GNB_APP/gnb_app.c
+2
-2
openair2/GNB_APP/gnb_config.c
openair2/GNB_APP/gnb_config.c
+2
-1
openair2/LAYER2/NR_MAC_UE/main_ue_nr.c
openair2/LAYER2/NR_MAC_UE/main_ue_nr.c
+2
-1
openair2/LAYER2/nr_pdcp/nr_pdcp.h
openair2/LAYER2/nr_pdcp/nr_pdcp.h
+31
-0
openair2/LAYER2/nr_pdcp/nr_pdcp_entity.h
openair2/LAYER2/nr_pdcp/nr_pdcp_entity.h
+2
-2
openair2/LAYER2/nr_pdcp/nr_pdcp_entity_drb_am.c
openair2/LAYER2/nr_pdcp/nr_pdcp_entity_drb_am.c
+2
-2
openair2/LAYER2/nr_pdcp/nr_pdcp_entity_drb_am.h
openair2/LAYER2/nr_pdcp/nr_pdcp_entity_drb_am.h
+1
-1
openair2/LAYER2/nr_pdcp/nr_pdcp_entity_srb.c
openair2/LAYER2/nr_pdcp/nr_pdcp_entity_srb.c
+2
-2
openair2/LAYER2/nr_pdcp/nr_pdcp_entity_srb.h
openair2/LAYER2/nr_pdcp/nr_pdcp_entity_srb.h
+1
-1
openair2/LAYER2/nr_pdcp/nr_pdcp_oai_api.c
openair2/LAYER2/nr_pdcp/nr_pdcp_oai_api.c
+81
-82
openair2/LAYER2/nr_rlc/nr_rlc_oai_api.c
openair2/LAYER2/nr_rlc/nr_rlc_oai_api.c
+40
-34
targets/PROJECTS/GENERIC-NR-5GC/CONF/cu_gnb.conf
targets/PROJECTS/GENERIC-NR-5GC/CONF/cu_gnb.conf
+4
-4
targets/PROJECTS/GENERIC-NR-5GC/CONF/du_gnb.conf
targets/PROJECTS/GENERIC-NR-5GC/CONF/du_gnb.conf
+6
-6
No files found.
openair2/GNB_APP/gnb_app.c
View file @
44d40219
...
@@ -49,7 +49,7 @@ extern unsigned char NB_gNB_INST;
...
@@ -49,7 +49,7 @@ extern unsigned char NB_gNB_INST;
extern
RAN_CONTEXT_t
RC
;
extern
RAN_CONTEXT_t
RC
;
#define GNB_REGISTER_RETRY_DELAY 10
#define GNB_REGISTER_RETRY_DELAY 10
#if 0
/*------------------------------------------------------------------------------*/
/*------------------------------------------------------------------------------*/
static void configure_nr_rrc(uint32_t gnb_id)
static void configure_nr_rrc(uint32_t gnb_id)
{
{
...
@@ -68,7 +68,7 @@ static void configure_nr_rrc(uint32_t gnb_id)
...
@@ -68,7 +68,7 @@ static void configure_nr_rrc(uint32_t gnb_id)
}
}
else AssertFatal(0,"NRRRC context for gNB %d not allocated\n",gnb_id);
else AssertFatal(0,"NRRRC context for gNB %d not allocated\n",gnb_id);
}
}
#endif
/*------------------------------------------------------------------------------*/
/*------------------------------------------------------------------------------*/
...
...
openair2/GNB_APP/gnb_config.c
View file @
44d40219
...
@@ -77,6 +77,7 @@
...
@@ -77,6 +77,7 @@
#include "NR_EUTRA-MBSFN-SubframeConfig.h"
#include "NR_EUTRA-MBSFN-SubframeConfig.h"
#include "RRC/NR/MESSAGES/asn1_msg.h"
#include "RRC/NR/MESSAGES/asn1_msg.h"
#include "openair2/LAYER2/nr_pdcp/nr_pdcp.h"
extern
uint16_t
sf_ahead
;
extern
uint16_t
sf_ahead
;
int
macrlc_has_f1
=
0
;
int
macrlc_has_f1
=
0
;
...
@@ -531,7 +532,7 @@ void RCconfig_NRRRC(MessageDef *msg_p, uint32_t i, gNB_RRC_INST *rrc) {
...
@@ -531,7 +532,7 @@ void RCconfig_NRRRC(MessageDef *msg_p, uint32_t i, gNB_RRC_INST *rrc) {
int
num_gnbs
=
0
;
int
num_gnbs
=
0
;
char
aprefix
[
MAX_OPTNAME_SIZE
*
2
+
8
];
char
aprefix
[
MAX_OPTNAME_SIZE
*
2
+
8
];
int32_t
gnb_id
=
0
;
int32_t
gnb_id
=
0
;
int
k
;
paramdef_t
GNBSParams
[]
=
GNBSPARAMS_DESC
;
paramdef_t
GNBSParams
[]
=
GNBSPARAMS_DESC
;
////////// Identification parameters
////////// Identification parameters
paramdef_t
GNBParams
[]
=
GNBPARAMS_DESC
;
paramdef_t
GNBParams
[]
=
GNBPARAMS_DESC
;
...
...
openair2/LAYER2/NR_MAC_UE/main_ue_nr.c
View file @
44d40219
...
@@ -39,6 +39,7 @@
...
@@ -39,6 +39,7 @@
#include "PHY/defs_UE.h"
#include "PHY/defs_UE.h"
#include "openair2/LAYER2/nr_pdcp/nr_pdcp_entity.h"
#include "openair2/LAYER2/nr_pdcp/nr_pdcp_entity.h"
#include "executables/softmodem-common.h"
#include "executables/softmodem-common.h"
#include "openair2/LAYER2/nr_pdcp/nr_pdcp.h"
static
NR_UE_MAC_INST_t
*
nr_ue_mac_inst
;
static
NR_UE_MAC_INST_t
*
nr_ue_mac_inst
;
...
@@ -56,7 +57,7 @@ NR_UE_MAC_INST_t * nr_l2_init_ue(NR_UE_RRC_INST_t* rrc_inst)
...
@@ -56,7 +57,7 @@ NR_UE_MAC_INST_t * nr_l2_init_ue(NR_UE_RRC_INST_t* rrc_inst)
// if (IS_SOFTMODEM_NOS1){
// if (IS_SOFTMODEM_NOS1){
if
(
1
)
{
if
(
1
)
{
AssertFatal
(
rlc_module_init
(
0
)
==
0
,
"%s: Could not initialize RLC layer
\n
"
,
__FUNCTION__
);
AssertFatal
(
rlc_module_init
(
0
)
==
0
,
"%s: Could not initialize RLC layer
\n
"
,
__FUNCTION__
);
pdcp_layer_init
();
nr_pdcp_layer_init_ue
();
nr_DRB_preconfiguration
(
nr_ue_mac_inst
->
crnti
);
nr_DRB_preconfiguration
(
nr_ue_mac_inst
->
crnti
);
}
}
...
...
openair2/LAYER2/nr_pdcp/nr_pdcp.h
0 → 100644
View file @
44d40219
/*
* Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The OpenAirInterface Software Alliance licenses this file to You under
* the OAI Public License, Version 1.1 (the "License"); you may not use this file
* except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.openairinterface.org/?page_id=698
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*-------------------------------------------------------------------------------
* For more information about the OpenAirInterface (OAI) Software Alliance:
* contact@openairinterface.org
*/
#include <stdint.h>
#ifndef _NR_PDCP_H_
#define _NR_PDCP_H_
void
pdcp_layer_init_for_CU
(
void
);
void
nr_pdcp_layer_init_ue
(
void
);
void
nr_DRB_preconfiguration
(
uint16_t
crnti
);
#endif
/* _NR_PDCP_H_ */
openair2/LAYER2/nr_pdcp/nr_pdcp_entity.h
View file @
44d40219
...
@@ -27,14 +27,14 @@
...
@@ -27,14 +27,14 @@
typedef
struct
nr_pdcp_entity_t
{
typedef
struct
nr_pdcp_entity_t
{
/* functions provided by the PDCP module */
/* functions provided by the PDCP module */
void
(
*
recv_pdu
)(
protocol_ctxt_t
*
ctxt_pP
,
struct
nr_pdcp_entity_t
*
entity
,
char
*
buffer
,
int
size
);
void
(
*
recv_pdu
)(
struct
nr_pdcp_entity_t
*
entity
,
char
*
buffer
,
int
size
);
void
(
*
recv_sdu
)(
struct
nr_pdcp_entity_t
*
entity
,
char
*
buffer
,
int
size
,
void
(
*
recv_sdu
)(
struct
nr_pdcp_entity_t
*
entity
,
char
*
buffer
,
int
size
,
int
sdu_id
);
int
sdu_id
);
void
(
*
delete
)(
struct
nr_pdcp_entity_t
*
entity
);
void
(
*
delete
)(
struct
nr_pdcp_entity_t
*
entity
);
void
(
*
set_integrity_key
)(
struct
nr_pdcp_entity_t
*
entity
,
char
*
key
);
void
(
*
set_integrity_key
)(
struct
nr_pdcp_entity_t
*
entity
,
char
*
key
);
/* callbacks provided to the PDCP module */
/* callbacks provided to the PDCP module */
void
(
*
deliver_sdu
)(
protocol_ctxt_t
*
ctxt_pP
,
void
*
deliver_sdu_data
,
struct
nr_pdcp_entity_t
*
entity
,
void
(
*
deliver_sdu
)(
void
*
deliver_sdu_data
,
struct
nr_pdcp_entity_t
*
entity
,
char
*
buf
,
int
size
);
char
*
buf
,
int
size
);
void
*
deliver_sdu_data
;
void
*
deliver_sdu_data
;
void
(
*
deliver_pdu
)(
void
*
deliver_pdu_data
,
struct
nr_pdcp_entity_t
*
entity
,
void
(
*
deliver_pdu
)(
void
*
deliver_pdu_data
,
struct
nr_pdcp_entity_t
*
entity
,
...
...
openair2/LAYER2/nr_pdcp/nr_pdcp_entity_drb_am.c
View file @
44d40219
...
@@ -26,13 +26,13 @@
...
@@ -26,13 +26,13 @@
#include <string.h>
#include <string.h>
#include "common/utils/LOG/log.h"
#include "common/utils/LOG/log.h"
void
nr_pdcp_entity_drb_am_recv_pdu
(
protocol_ctxt_t
*
ctxt_pP
,
nr_pdcp_entity_t
*
_entity
,
char
*
buffer
,
int
size
)
void
nr_pdcp_entity_drb_am_recv_pdu
(
nr_pdcp_entity_t
*
_entity
,
char
*
buffer
,
int
size
)
{
{
nr_pdcp_entity_drb_am_t
*
entity
=
(
nr_pdcp_entity_drb_am_t
*
)
_entity
;
nr_pdcp_entity_drb_am_t
*
entity
=
(
nr_pdcp_entity_drb_am_t
*
)
_entity
;
if
(
size
<
3
)
abort
();
if
(
size
<
3
)
abort
();
if
(
!
(
buffer
[
0
]
&
0x80
))
{
printf
(
"%s:%d:%s: fatal
\n
"
,
__FILE__
,
__LINE__
,
__FUNCTION__
);
exit
(
1
);
}
if
(
!
(
buffer
[
0
]
&
0x80
))
{
printf
(
"%s:%d:%s: fatal
\n
"
,
__FILE__
,
__LINE__
,
__FUNCTION__
);
exit
(
1
);
}
entity
->
common
.
deliver_sdu
(
ctxt_pP
,
entity
->
common
.
deliver_sdu_data
,
entity
->
common
.
deliver_sdu
(
entity
->
common
.
deliver_sdu_data
,
(
nr_pdcp_entity_t
*
)
entity
,
buffer
+
3
,
size
-
3
);
(
nr_pdcp_entity_t
*
)
entity
,
buffer
+
3
,
size
-
3
);
}
}
...
...
openair2/LAYER2/nr_pdcp/nr_pdcp_entity_drb_am.h
View file @
44d40219
...
@@ -33,7 +33,7 @@ typedef struct {
...
@@ -33,7 +33,7 @@ typedef struct {
int
discard_timer
;
/* unit: ms, -1 means infinity */
int
discard_timer
;
/* unit: ms, -1 means infinity */
}
nr_pdcp_entity_drb_am_t
;
}
nr_pdcp_entity_drb_am_t
;
void
nr_pdcp_entity_drb_am_recv_pdu
(
protocol_ctxt_t
*
ctxt_pP
,
nr_pdcp_entity_t
*
entity
,
char
*
buffer
,
int
size
);
void
nr_pdcp_entity_drb_am_recv_pdu
(
nr_pdcp_entity_t
*
entity
,
char
*
buffer
,
int
size
);
void
nr_pdcp_entity_drb_am_recv_sdu
(
nr_pdcp_entity_t
*
entity
,
char
*
buffer
,
int
size
,
void
nr_pdcp_entity_drb_am_recv_sdu
(
nr_pdcp_entity_t
*
entity
,
char
*
buffer
,
int
size
,
int
sdu_id
);
int
sdu_id
);
void
nr_pdcp_entity_drb_am_set_integrity_key
(
nr_pdcp_entity_t
*
entity
,
char
*
key
);
void
nr_pdcp_entity_drb_am_set_integrity_key
(
nr_pdcp_entity_t
*
entity
,
char
*
key
);
...
...
openair2/LAYER2/nr_pdcp/nr_pdcp_entity_srb.c
View file @
44d40219
...
@@ -25,12 +25,12 @@
...
@@ -25,12 +25,12 @@
#include <stdlib.h>
#include <stdlib.h>
#include <string.h>
#include <string.h>
void
nr_pdcp_entity_srb_recv_pdu
(
protocol_ctxt_t
*
ctxt_pP
,
nr_pdcp_entity_t
*
_entity
,
char
*
buffer
,
int
size
)
void
nr_pdcp_entity_srb_recv_pdu
(
nr_pdcp_entity_t
*
_entity
,
char
*
buffer
,
int
size
)
{
{
nr_pdcp_entity_srb_t
*
entity
=
(
nr_pdcp_entity_srb_t
*
)
_entity
;
nr_pdcp_entity_srb_t
*
entity
=
(
nr_pdcp_entity_srb_t
*
)
_entity
;
if
(
size
<
2
)
abort
();
if
(
size
<
2
)
abort
();
entity
->
common
.
deliver_sdu
(
ctxt_pP
,
entity
->
common
.
deliver_sdu_data
,
entity
->
common
.
deliver_sdu
(
entity
->
common
.
deliver_sdu_data
,
(
nr_pdcp_entity_t
*
)
entity
,
buffer
+
2
,
size
-
6
);
(
nr_pdcp_entity_t
*
)
entity
,
buffer
+
2
,
size
-
6
);
}
}
...
...
openair2/LAYER2/nr_pdcp/nr_pdcp_entity_srb.h
View file @
44d40219
...
@@ -29,7 +29,7 @@ typedef struct {
...
@@ -29,7 +29,7 @@ typedef struct {
int
srb_id
;
int
srb_id
;
}
nr_pdcp_entity_srb_t
;
}
nr_pdcp_entity_srb_t
;
void
nr_pdcp_entity_srb_recv_pdu
(
protocol_ctxt_t
*
ctxt_pP
,
nr_pdcp_entity_t
*
_entity
,
char
*
buffer
,
int
size
);
void
nr_pdcp_entity_srb_recv_pdu
(
nr_pdcp_entity_t
*
_entity
,
char
*
buffer
,
int
size
);
void
nr_pdcp_entity_srb_recv_sdu
(
nr_pdcp_entity_t
*
_entity
,
char
*
buffer
,
int
size
,
int
sdu_id
);
void
nr_pdcp_entity_srb_recv_sdu
(
nr_pdcp_entity_t
*
_entity
,
char
*
buffer
,
int
size
,
int
sdu_id
);
void
nr_pdcp_entity_srb_set_integrity_key
(
nr_pdcp_entity_t
*
_entity
,
char
*
key
);
void
nr_pdcp_entity_srb_set_integrity_key
(
nr_pdcp_entity_t
*
_entity
,
char
*
key
);
void
nr_pdcp_entity_srb_delete
(
nr_pdcp_entity_t
*
_entity
);
void
nr_pdcp_entity_srb_delete
(
nr_pdcp_entity_t
*
_entity
);
...
...
openair2/LAYER2/nr_pdcp/nr_pdcp_oai_api.c
View file @
44d40219
This diff is collapsed.
Click to expand it.
openair2/LAYER2/nr_rlc/nr_rlc_oai_api.c
View file @
44d40219
...
@@ -447,7 +447,7 @@ static void deliver_sdu(void *_ue, nr_rlc_entity_t *entity, char *buf, int size)
...
@@ -447,7 +447,7 @@ static void deliver_sdu(void *_ue, nr_rlc_entity_t *entity, char *buf, int size)
exit
(
1
);
exit
(
1
);
rb_found:
rb_found:
LOG_D
(
RLC
,
"%s:%d:%s: delivering SDU (rnti %d is_srb %d rb_id %d) size %d
\n
"
,
LOG_D
(
RLC
,
"%s:%d:%s: delivering SDU (rnti %d is_srb %d rb_id %d) size %d"
,
__FILE__
,
__LINE__
,
__FUNCTION__
,
ue
->
rnti
,
is_srb
,
rb_id
,
size
);
__FILE__
,
__LINE__
,
__FUNCTION__
,
ue
->
rnti
,
is_srb
,
rb_id
,
size
);
memblock
=
get_free_mem_block
(
size
,
__func__
);
memblock
=
get_free_mem_block
(
size
,
__func__
);
...
@@ -637,7 +637,7 @@ rb_found:
...
@@ -637,7 +637,7 @@ rb_found:
#endif
#endif
}
}
static
void
add_srb
_am
(
int
rnti
,
struct
NR_SRB_ToAddMod
*
s
,
NR_RLC_BearerConfig_t
*
rlc_BearerConfig
)
static
void
add_srb
(
int
rnti
,
struct
NR_SRB_ToAddMod
*
s
,
NR_RLC_BearerConfig_t
*
rlc_BearerConfig
)
{
{
nr_rlc_entity_t
*
nr_rlc_am
;
nr_rlc_entity_t
*
nr_rlc_am
;
nr_rlc_ue_t
*
ue
;
nr_rlc_ue_t
*
ue
;
...
@@ -645,6 +645,7 @@ static void add_srb_am(int rnti, struct NR_SRB_ToAddMod *s, NR_RLC_BearerConfig_
...
@@ -645,6 +645,7 @@ static void add_srb_am(int rnti, struct NR_SRB_ToAddMod *s, NR_RLC_BearerConfig_
struct
NR_RLC_Config
*
r
=
rlc_BearerConfig
->
rlc_Config
;
struct
NR_RLC_Config
*
r
=
rlc_BearerConfig
->
rlc_Config
;
struct
NR_LogicalChannelConfig
*
l
=
rlc_BearerConfig
->
mac_LogicalChannelConfig
;
struct
NR_LogicalChannelConfig
*
l
=
rlc_BearerConfig
->
mac_LogicalChannelConfig
;
int
srb_id
=
s
->
srb_Identity
;
int
srb_id
=
s
->
srb_Identity
;
int
channel_id
=
rlc_BearerConfig
->
logicalChannelIdentity
;
int
logical_channel_group
;
int
logical_channel_group
;
int
t_status_prohibit
;
int
t_status_prohibit
;
...
@@ -655,12 +656,18 @@ static void add_srb_am(int rnti, struct NR_SRB_ToAddMod *s, NR_RLC_BearerConfig_
...
@@ -655,12 +656,18 @@ static void add_srb_am(int rnti, struct NR_SRB_ToAddMod *s, NR_RLC_BearerConfig_
int
t_reassembly
;
int
t_reassembly
;
int
sn_field_length
;
int
sn_field_length
;
if
(
srb_id
>
3
)
{
if
(
srb_id
!=
1
&&
srb_id
!=
2
)
{
LOG_E
(
RLC
,
"%s:%d:%s: fatal, bad srb id %d
\n
"
,
LOG_E
(
RLC
,
"%s:%d:%s: fatal, bad srb id %d
\n
"
,
__FILE__
,
__LINE__
,
__FUNCTION__
,
srb_id
);
__FILE__
,
__LINE__
,
__FUNCTION__
,
srb_id
);
exit
(
1
);
exit
(
1
);
}
}
if
(
channel_id
!=
srb_id
)
{
LOG_E
(
RLC
,
"%s:%d:%s: todo, remove this limitation
\n
"
,
__FILE__
,
__LINE__
,
__FUNCTION__
);
exit
(
1
);
}
logical_channel_group
=
*
l
->
ul_SpecificParameters
->
logicalChannelGroup
;
logical_channel_group
=
*
l
->
ul_SpecificParameters
->
logicalChannelGroup
;
/* TODO: accept other values? */
/* TODO: accept other values? */
...
@@ -694,7 +701,7 @@ static void add_srb_am(int rnti, struct NR_SRB_ToAddMod *s, NR_RLC_BearerConfig_
...
@@ -694,7 +701,7 @@ static void add_srb_am(int rnti, struct NR_SRB_ToAddMod *s, NR_RLC_BearerConfig_
nr_rlc_manager_lock
(
nr_rlc_ue_manager
);
nr_rlc_manager_lock
(
nr_rlc_ue_manager
);
ue
=
nr_rlc_manager_get_ue
(
nr_rlc_ue_manager
,
rnti
);
ue
=
nr_rlc_manager_get_ue
(
nr_rlc_ue_manager
,
rnti
);
if
(
ue
->
srb
[
srb_id
-
1
]
!=
NULL
)
{
if
(
ue
->
srb
[
srb_id
-
1
]
!=
NULL
)
{
LOG_W
(
RLC
,
"%s:%d:%s: SRB %d already exists for UE with RNTI
%d
, do nothing
\n
"
,
__FILE__
,
__LINE__
,
__FUNCTION__
,
srb_id
,
rnti
);
LOG_W
(
RLC
,
"%s:%d:%s: SRB %d already exists for UE with RNTI
0x%x
, do nothing
\n
"
,
__FILE__
,
__LINE__
,
__FUNCTION__
,
srb_id
,
rnti
);
}
else
{
}
else
{
nr_rlc_am
=
new_nr_rlc_entity_am
(
100000
,
nr_rlc_am
=
new_nr_rlc_entity_am
(
100000
,
100000
,
100000
,
...
@@ -707,26 +714,11 @@ static void add_srb_am(int rnti, struct NR_SRB_ToAddMod *s, NR_RLC_BearerConfig_
...
@@ -707,26 +714,11 @@ static void add_srb_am(int rnti, struct NR_SRB_ToAddMod *s, NR_RLC_BearerConfig_
sn_field_length
);
sn_field_length
);
nr_rlc_ue_add_srb_rlc_entity
(
ue
,
srb_id
,
nr_rlc_am
);
nr_rlc_ue_add_srb_rlc_entity
(
ue
,
srb_id
,
nr_rlc_am
);
LOG_
D
(
RLC
,
"%s:%d:%s: added srb %d to UE with RNTI
%x
\n
"
,
__FILE__
,
__LINE__
,
__FUNCTION__
,
srb_id
,
rnti
);
LOG_
I
(
RLC
,
"%s:%d:%s: added srb %d to UE with RNTI 0x
%x
\n
"
,
__FILE__
,
__LINE__
,
__FUNCTION__
,
srb_id
,
rnti
);
}
}
nr_rlc_manager_unlock
(
nr_rlc_ue_manager
);
nr_rlc_manager_unlock
(
nr_rlc_ue_manager
);
}
}
static
void
add_srb
(
int
rnti
,
struct
NR_SRB_ToAddMod
*
s
,
struct
NR_RLC_BearerConfig
*
rlc_BearerConfig
)
{
switch
(
rlc_BearerConfig
->
rlc_Config
->
present
)
{
case
NR_RLC_Config_PR_am
:
add_srb_am
(
rnti
,
s
,
rlc_BearerConfig
);
break
;
/*Missing case for RLC TM corresponding to SRB0 */
default:
LOG_E
(
RLC
,
"%s:%d:%s: fatal: unhandled SRB type
\n
"
,
__FILE__
,
__LINE__
,
__FUNCTION__
);
exit
(
1
);
}
LOG_I
(
RLC
,
"%s:%s:%d: added SRB to UE with RNTI %x
\n
"
,
__FILE__
,
__FUNCTION__
,
__LINE__
,
rnti
);
}
static
void
add_drb_am
(
int
rnti
,
struct
NR_DRB_ToAddMod
*
s
,
NR_RLC_BearerConfig_t
*
rlc_BearerConfig
)
static
void
add_drb_am
(
int
rnti
,
struct
NR_DRB_ToAddMod
*
s
,
NR_RLC_BearerConfig_t
*
rlc_BearerConfig
)
{
{
nr_rlc_entity_t
*
nr_rlc_am
;
nr_rlc_entity_t
*
nr_rlc_am
;
...
@@ -793,8 +785,8 @@ static void add_drb_am(int rnti, struct NR_DRB_ToAddMod *s, NR_RLC_BearerConfig_
...
@@ -793,8 +785,8 @@ static void add_drb_am(int rnti, struct NR_DRB_ToAddMod *s, NR_RLC_BearerConfig_
if
(
ue
->
drb
[
drb_id
-
1
]
!=
NULL
)
{
if
(
ue
->
drb
[
drb_id
-
1
]
!=
NULL
)
{
LOG_W
(
RLC
,
"%s:%d:%s: DRB %d already exists for UE with RNTI %d, do nothing
\n
"
,
__FILE__
,
__LINE__
,
__FUNCTION__
,
drb_id
,
rnti
);
LOG_W
(
RLC
,
"%s:%d:%s: DRB %d already exists for UE with RNTI %d, do nothing
\n
"
,
__FILE__
,
__LINE__
,
__FUNCTION__
,
drb_id
,
rnti
);
}
else
{
}
else
{
nr_rlc_am
=
new_nr_rlc_entity_am
(
100000
,
nr_rlc_am
=
new_nr_rlc_entity_am
(
100000
00
,
100000
,
100000
00
,
deliver_sdu
,
ue
,
deliver_sdu
,
ue
,
successful_delivery
,
ue
,
successful_delivery
,
ue
,
max_retx_reached
,
ue
,
max_retx_reached
,
ue
,
...
@@ -804,7 +796,7 @@ static void add_drb_am(int rnti, struct NR_DRB_ToAddMod *s, NR_RLC_BearerConfig_
...
@@ -804,7 +796,7 @@ static void add_drb_am(int rnti, struct NR_DRB_ToAddMod *s, NR_RLC_BearerConfig_
sn_field_length
);
sn_field_length
);
nr_rlc_ue_add_drb_rlc_entity
(
ue
,
drb_id
,
nr_rlc_am
);
nr_rlc_ue_add_drb_rlc_entity
(
ue
,
drb_id
,
nr_rlc_am
);
LOG_D
(
RLC
,
"%s:%d:%s: added drb %d to UE with RNTI %x
\n
"
,
__FILE__
,
__LINE__
,
__FUNCTION__
,
drb_id
,
rnti
);
LOG_D
(
RLC
,
"%s:%d:%s: added drb %d to UE with RNTI
0x
%x
\n
"
,
__FILE__
,
__LINE__
,
__FUNCTION__
,
drb_id
,
rnti
);
}
}
nr_rlc_manager_unlock
(
nr_rlc_ue_manager
);
nr_rlc_manager_unlock
(
nr_rlc_ue_manager
);
}
}
...
@@ -865,14 +857,14 @@ static void add_drb_um(int rnti, struct NR_DRB_ToAddMod *s, NR_RLC_BearerConfig_
...
@@ -865,14 +857,14 @@ static void add_drb_um(int rnti, struct NR_DRB_ToAddMod *s, NR_RLC_BearerConfig_
if
(
ue
->
drb
[
drb_id
-
1
]
!=
NULL
)
{
if
(
ue
->
drb
[
drb_id
-
1
]
!=
NULL
)
{
LOG_W
(
RLC
,
"DEBUG add_drb_um %s:%d:%s: warning DRB %d already exist for ue %d, do nothing
\n
"
,
__FILE__
,
__LINE__
,
__FUNCTION__
,
drb_id
,
rnti
);
LOG_W
(
RLC
,
"DEBUG add_drb_um %s:%d:%s: warning DRB %d already exist for ue %d, do nothing
\n
"
,
__FILE__
,
__LINE__
,
__FUNCTION__
,
drb_id
,
rnti
);
}
else
{
}
else
{
nr_rlc_um
=
new_nr_rlc_entity_um
(
1000000
,
nr_rlc_um
=
new_nr_rlc_entity_um
(
1000000
00
,
1000000
,
1000000
00
,
deliver_sdu
,
ue
,
deliver_sdu
,
ue
,
t_reassembly
,
t_reassembly
,
sn_field_length
);
sn_field_length
);
nr_rlc_ue_add_drb_rlc_entity
(
ue
,
drb_id
,
nr_rlc_um
);
nr_rlc_ue_add_drb_rlc_entity
(
ue
,
drb_id
,
nr_rlc_um
);
LOG_D
(
RLC
,
"%s:%d:%s: added drb %d to UE with RNTI %x
\n
"
,
__FILE__
,
__LINE__
,
__FUNCTION__
,
drb_id
,
rnti
);
LOG_D
(
RLC
,
"%s:%d:%s: added drb %d to UE with RNTI
0x
%x
\n
"
,
__FILE__
,
__LINE__
,
__FUNCTION__
,
drb_id
,
rnti
);
}
}
nr_rlc_manager_unlock
(
nr_rlc_ue_manager
);
nr_rlc_manager_unlock
(
nr_rlc_ue_manager
);
}
}
...
@@ -891,7 +883,7 @@ static void add_drb(int rnti, struct NR_DRB_ToAddMod *s, struct NR_RLC_BearerCon
...
@@ -891,7 +883,7 @@ static void add_drb(int rnti, struct NR_DRB_ToAddMod *s, struct NR_RLC_BearerCon
__FILE__
,
__LINE__
,
__FUNCTION__
);
__FILE__
,
__LINE__
,
__FUNCTION__
);
exit
(
1
);
exit
(
1
);
}
}
LOG_I
(
RLC
,
"%s:%s:%d: added DRB to UE with RNTI %x
\n
"
,
__FILE__
,
__FUNCTION__
,
__LINE__
,
rnti
);
LOG_I
(
RLC
,
"%s:%s:%d: added DRB to UE with RNTI
0x
%x
\n
"
,
__FILE__
,
__FUNCTION__
,
__LINE__
,
rnti
);
}
}
/* Dummy function due to dependency from LTE libraries */
/* Dummy function due to dependency from LTE libraries */
...
@@ -911,11 +903,10 @@ rlc_op_status_t nr_rrc_rlc_config_asn1_req (const protocol_ctxt_t * const ctxt
...
@@ -911,11 +903,10 @@ rlc_op_status_t nr_rrc_rlc_config_asn1_req (const protocol_ctxt_t * const ctxt
const
NR_DRB_ToAddModList_t
*
const
drb2add_listP
,
const
NR_DRB_ToAddModList_t
*
const
drb2add_listP
,
const
NR_DRB_ToReleaseList_t
*
const
drb2release_listP
,
const
NR_DRB_ToReleaseList_t
*
const
drb2release_listP
,
const
LTE_PMCH_InfoList_r9_t
*
const
pmch_InfoList_r9_pP
,
const
LTE_PMCH_InfoList_r9_t
*
const
pmch_InfoList_r9_pP
,
struct
NR_CellGroupConfig__rlc_BearerToAddModList
*
rlc_srb_bearer2add_list
,
struct
NR_CellGroupConfig__rlc_BearerToAddModList
*
rlc_bearer2add_list
)
struct
NR_CellGroupConfig__rlc_BearerToAddModList
*
rlc_drb_bearer2add_list
)
{
{
int
rnti
=
ctxt_pP
->
rnti
;
int
rnti
=
ctxt_pP
->
rnti
;
int
i
;
int
i
,
j
;
if
(
/*ctxt_pP->enb_flag != 1 ||*/
ctxt_pP
->
module_id
!=
0
/*||
if
(
/*ctxt_pP->enb_flag != 1 ||*/
ctxt_pP
->
module_id
!=
0
/*||
ctxt_pP->instance != 0 || ctxt_pP->eNB_index != 0 ||
ctxt_pP->instance != 0 || ctxt_pP->eNB_index != 0 ||
...
@@ -938,15 +929,30 @@ rlc_op_status_t nr_rrc_rlc_config_asn1_req (const protocol_ctxt_t * const ctxt
...
@@ -938,15 +929,30 @@ rlc_op_status_t nr_rrc_rlc_config_asn1_req (const protocol_ctxt_t * const ctxt
if
(
srb2add_listP
!=
NULL
)
{
if
(
srb2add_listP
!=
NULL
)
{
for
(
i
=
0
;
i
<
srb2add_listP
->
list
.
count
;
i
++
)
{
for
(
i
=
0
;
i
<
srb2add_listP
->
list
.
count
;
i
++
)
{
if
(
rlc_srb_bearer2add_list
!=
NULL
)
for
(
j
=
0
;
j
<
rlc_bearer2add_list
->
list
.
count
;
j
++
){
add_srb
(
rnti
,
srb2add_listP
->
list
.
array
[
i
],
rlc_srb_bearer2add_list
->
list
.
array
[
i
]);
if
(
rlc_bearer2add_list
->
list
.
array
[
j
]
->
servedRadioBearer
!=
NULL
){
if
(
rlc_bearer2add_list
->
list
.
array
[
j
]
->
servedRadioBearer
->
present
==
NR_RLC_BearerConfig__servedRadioBearer_PR_srb_Identity
){
if
(
srb2add_listP
->
list
.
array
[
i
]
->
srb_Identity
==
rlc_bearer2add_list
->
list
.
array
[
j
]
->
servedRadioBearer
->
choice
.
srb_Identity
){
add_srb
(
rnti
,
srb2add_listP
->
list
.
array
[
i
],
rlc_bearer2add_list
->
list
.
array
[
j
]);
}
}
}
}
}
}
}
}
if
(
drb2add_listP
!=
NULL
)
{
if
(
drb2add_listP
!=
NULL
)
{
for
(
i
=
0
;
i
<
drb2add_listP
->
list
.
count
;
i
++
)
{
for
(
i
=
0
;
i
<
drb2add_listP
->
list
.
count
;
i
++
)
{
if
(
rlc_drb_bearer2add_list
!=
NULL
)
for
(
j
=
0
;
j
<
rlc_bearer2add_list
->
list
.
count
;
j
++
){
add_drb
(
rnti
,
drb2add_listP
->
list
.
array
[
i
],
rlc_drb_bearer2add_list
->
list
.
array
[
i
]);
if
(
rlc_bearer2add_list
->
list
.
array
[
j
]
->
servedRadioBearer
!=
NULL
){
if
(
rlc_bearer2add_list
->
list
.
array
[
j
]
->
servedRadioBearer
->
present
==
NR_RLC_BearerConfig__servedRadioBearer_PR_drb_Identity
){
if
(
drb2add_listP
->
list
.
array
[
i
]
->
drb_Identity
==
rlc_bearer2add_list
->
list
.
array
[
j
]
->
servedRadioBearer
->
choice
.
drb_Identity
){
add_drb
(
rnti
,
drb2add_listP
->
list
.
array
[
i
],
rlc_bearer2add_list
->
list
.
array
[
j
]);
}
}
}
}
}
}
}
}
...
...
targets/PROJECTS/GENERIC-NR-5GC/CONF/cu_gnb.conf
View file @
44d40219
...
@@ -25,10 +25,10 @@ gNBs =
...
@@ -25,10 +25,10 @@ gNBs =
local_s_if_name
=
"lo"
;
local_s_if_name
=
"lo"
;
remote_s_address
=
"127.0.0.3"
;
remote_s_address
=
"127.0.0.3"
;
local_s_address
=
"127.0.0.4"
;
local_s_address
=
"127.0.0.4"
;
local_s_portc
=
38472
;
#
501;
local_s_portc
=
501
;
remote_s_portc
=
5
7113
;
#5
00;
remote_s_portc
=
500
;
local_s_portd
=
2152
;
#
601;
local_s_portd
=
601
;
remote_s_portd
=
2152
;
#
600;
remote_s_portd
=
600
;
//////////
Physical
parameters
:
//////////
Physical
parameters
:
...
...
targets/PROJECTS/GENERIC-NR-5GC/CONF/du_gnb.conf
View file @
44d40219
...
@@ -230,12 +230,12 @@ MACRLCs = (
...
@@ -230,12 +230,12 @@ MACRLCs = (
tr_s_preference
=
"local_L1"
;
tr_s_preference
=
"local_L1"
;
tr_n_preference
=
"f1"
;
tr_n_preference
=
"f1"
;
local_n_if_name
=
"lo"
;
local_n_if_name
=
"lo"
;
remote_n_address
=
"127.0.0.4"
;
#"127.0.0.4"; "192.168.12.75";
remote_n_address
=
"127.0.0.4"
;
local_n_address
=
"127.0.0.3"
;
#"127.0.0.3"; "192.168.12.188";
local_n_address
=
"127.0.0.3"
;
local_n_portc
=
5
7113
;
#500
local_n_portc
=
5
00
;
remote_n_portc
=
38472
;
#
501;
remote_n_portc
=
501
;
local_n_portd
=
2152
;
#
600;
local_n_portd
=
600
;
remote_n_portd
=
2152
;
#
601;
remote_n_portd
=
601
;
}
}
);
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment