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
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
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
OpenXG
OpenXG-RAN
Commits
06dd13d3
Commit
06dd13d3
authored
May 20, 2024
by
Victor Souza
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
BAP layer init and BAP entity init (needs cleaning)
parent
070ae036
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
48 additions
and
21 deletions
+48
-21
executables/nr-softmodem.c
executables/nr-softmodem.c
+0
-8
openair2/F1AP/f1ap_du_interface_management.c
openair2/F1AP/f1ap_du_interface_management.c
+2
-0
openair2/GNB_APP/gnb_config.c
openair2/GNB_APP/gnb_config.c
+3
-0
openair2/LAYER2/BAP/bap_entity.c
openair2/LAYER2/BAP/bap_entity.c
+6
-8
openair2/LAYER2/BAP/bap_entity.h
openair2/LAYER2/BAP/bap_entity.h
+16
-1
openair2/LAYER2/BAP/bap_oai_api.c
openair2/LAYER2/BAP/bap_oai_api.c
+16
-3
openair2/LAYER2/BAP/bap_oai_api.h
openair2/LAYER2/BAP/bap_oai_api.h
+5
-1
No files found.
executables/nr-softmodem.c
View file @
06dd13d3
...
...
@@ -748,14 +748,6 @@ int main( int argc, char **argv ) {
// wait for F1 Setup Response before starting L1 for real
if
(
NODE_IS_DU
(
node_type
)
||
NODE_IS_MONOLITHIC
(
node_type
)
||
NODE_IS_DU_IAB
(
node_type
)){
wait_f1_setup_response
();
// [IAB] Initialize BAP Layer if BAPAddress is present
if
(
NODE_IS_DU_IAB
(
node_type
)){
LOG_I
(
GNB_APP
,
"Initializing BAP layer
\n
"
);
bool
is_du
=
true
;
nr_bap_layer_init
(
is_du
);
}
}
if
(
RC
.
nb_RU
>
0
)
...
...
openair2/F1AP/f1ap_du_interface_management.c
View file @
06dd13d3
...
...
@@ -36,6 +36,7 @@
#include "f1ap_du_interface_management.h"
#include "openair2/LAYER2/NR_MAC_gNB/mac_rrc_dl_handler.h"
#include "assertions.h"
#include "openair2/LAYER2/BAP/bap_oai_api.h"
#include "GNB_APP/gnb_paramdef.h"
...
...
@@ -387,6 +388,7 @@ int DU_handle_F1_SETUP_RESPONSE(instance_t instance, sctp_assoc_t assoc_id, uint
"ie->value.present != F1AP_F1SetupResponseIEs__value_PR_BAPAddress
\n
"
);
BIT_STRING_TO_NR_BAPADDRESS
(
&
ie
->
value
.
choice
.
BAPAddress
,
resp
.
bap_address
);
LOG_D
(
F1AP
,
"F1AP: F1Setup-Resp: BAPAddress %d
\n
"
,
resp
.
bap_address
);
init_bap_entity
(
resp
.
bap_address
,
true
);
break
;
case
F1AP_ProtocolIE_ID_id_GNB_CU_RRC_Version
:
...
...
openair2/GNB_APP/gnb_config.c
View file @
06dd13d3
...
...
@@ -1149,6 +1149,9 @@ static f1ap_setup_req_t *RC_read_F1Setup(bool is_iab_du,
req
->
cell
[
0
].
info
.
plmn
.
mnc
,
req
->
cell
[
0
].
info
.
plmn
.
mnc_digit_length
,
req
->
cell
[
0
].
info
.
nr_cellid
);
LOG_I
(
GNB_APP
,
"F1AP: Initializing BAP layer
\n
"
);
bool
is_du
=
true
;
nr_bap_layer_init
(
is_du
);
}
else
{
LOG_I
(
GNB_APP
,
"F1AP: gNB idx %d gNB_DU_id %ld, gNB_DU_name %s, TAC %d MCC/MNC/length %d/%d/%d cellID %ld
\n
"
,
...
...
openair2/LAYER2/BAP/bap_entity.c
View file @
06dd13d3
#include "bap_entity.h"
bap_entity_t
*
new_bap_entity
(
uint16_t
bap_address
){
bap_entity_t
*
new_bap_entity
(
uint16_t
bap_address
,
bool
is_du
){
bap_entity_t
*
ret
;
ret
=
calloc
(
1
,
sizeof
(
bap_entity_t
));
if
(
ret
==
NULL
)
{
LOG_E
(,
"%s:%d:%s: out of memory
\n
"
,
__FILE__
,
__LINE__
,
__FUNCTION__
);
// Change to BAP log
LOG_E
(
RLC
,
"%s:%d:%s: out of memory
\n
"
,
__FILE__
,
__LINE__
,
__FUNCTION__
);
exit
(
1
);
}
if
(
pthread_mutex_init
(
&
ret
->
lock
,
NULL
))
abort
();
ret
->
is_du
=
is_du
;
ret
->
bap_address
=
bap_address
;
return
(
bap_entity_t
*
)
ret
;
}
void
bap_add_entity
(
int
rnti
,
uint16_t
bap_address
)
{
}
openair2/LAYER2/BAP/bap_entity.h
View file @
06dd13d3
#include <stdint.h>
#include <pthread.h>
typedef
struct
{
uint16_t
bap_address
;
uint16_t
bap_path_id
;
}
bap_routing_id_t
;
typedef
struct
{
uint16_t
priorHop_bap_address
;
uint16_t
ingress_bhch_ID
;
uint16_t
nextHop_bap_address
;
uint16_t
egress_bhch_ID
;
}
bap_bhch_mapping_info_t
;
typedef
struct
bap_entity_t
{
pthread_mutex_t
lock
;
bool
is_du
;
// true if DU, false if MT
uint16_t
bap_address
;
bap_routing_id_t
defaultUL_bap_routing_id
;
uint16_t
befaultUL_bh_rlc_channel_id
;
...
...
@@ -16,4 +26,9 @@ typedef struct bap_entity_t{
BOTH
}
flow_control_feedback_type
;
}
bap_entity_t
;
\ No newline at end of file
// From BAPlayerBHRLCchannelMappingInfo
// Use mappingInformationIndex to navigate the list
bap_bhch_mapping_info_t
*
bhch_mapping_info_list
;
}
bap_entity_t
;
bap_entity_t
*
new_bap_entity
(
uint16_t
bap_address
,
bool
is_du
);
\ No newline at end of file
openair2/LAYER2/BAP/bap_oai_api.c
View file @
06dd13d3
/* from openair */
#include "rlc.h"
#include "LAYER2/nr_pdcp/nr_pdcp_oai_api.h"
/* from nr rlc module */
#include "openair2/LAYER2/nr_rlc/nr_rlc_asn1_utils.h"
...
...
@@ -19,12 +18,15 @@
#include "conversions.h"
#include "bap_oai_api.h"
extern
RAN_CONTEXT_t
RC
;
// Having trouble changing this to .h
#include "bap_entity.c"
#include <stdint.h>
extern
RAN_CONTEXT_t
RC
;
#include <executables/softmodem-common.h>
static
bap_entity_t
*
bap_entity
;
// Same as RLC?
static
void
deliver_bap_sdu
(
void
*
_ue
,
nr_rlc_entity_t
*
entity
,
char
*
buf
,
int
size
)
{
...
...
@@ -192,11 +194,13 @@ void nr_bap_layer_init(bool is_du)
if
(
pthread_mutex_lock
(
&
m
)
!=
0
)
abort
();
if
(
is_du
&&
inited_DU
)
{
// Change LOG to BAP
LOG_E
(
RLC
,
"%s:%d:%s: fatal, inited_du already 1
\n
"
,
__FILE__
,
__LINE__
,
__FUNCTION__
);
exit
(
1
);
}
if
(
!
is_du
&&
inited_MT
)
{
// Change LOG to BAP
LOG_E
(
RLC
,
"%s:%d:%s: fatal, inited_mt already 1
\n
"
,
__FILE__
,
__LINE__
,
__FUNCTION__
);
exit
(
1
);
}
...
...
@@ -208,3 +212,12 @@ void nr_bap_layer_init(bool is_du)
if
(
pthread_mutex_unlock
(
&
m
))
abort
();
}
void
init_bap_entity
(
uint16_t
bap_addr
,
bool
is_du
){
bap_entity
=
new_bap_entity
(
bap_addr
,
is_du
);
if
(
is_du
)
printf
(
"[BAP] BAP entity initialized as IAB-DU with BAPAddress = %d
\n
"
,
bap_entity
->
bap_address
);
else
printf
(
"[BAP] BAP entity initialized as IAB-MT with BAPAddress = %d
\n
"
,
bap_entity
->
bap_address
);
}
openair2/LAYER2/BAP/bap_oai_api.h
View file @
06dd13d3
void
nr_bap_layer_init
(
bool
is_du
);
\ No newline at end of file
#include <stdint.h>
void
bap_add_bhch
(
int
rnti
,
int
bhch_id
,
const
NR_BH_RLC_ChannelConfig_r16_t
*
rlc_bhchConfig
);
void
nr_bap_layer_init
(
bool
is_du
);
void
init_bap_entity
(
uint16_t
bap_addr
,
bool
is_du
);
\ No newline at end of file
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