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
09c3eb9b
Commit
09c3eb9b
authored
May 23, 2023
by
mir
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added printf for RLC sojourn time
parent
af66e9f4
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
45 additions
and
21 deletions
+45
-21
openair2/LAYER2/nr_pdcp/nr_pdcp_oai_api.c
openair2/LAYER2/nr_pdcp/nr_pdcp_oai_api.c
+2
-0
openair2/LAYER2/nr_rlc/nr_rlc_entity_um.c
openair2/LAYER2/nr_rlc/nr_rlc_entity_um.c
+7
-3
openair2/RRC/NR/cucp_cuup_direct.c
openair2/RRC/NR/cucp_cuup_direct.c
+33
-16
openair2/RRC/NR/rrc_gNB_NGAP.c
openair2/RRC/NR/rrc_gNB_NGAP.c
+2
-2
targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band78.fr1.106PRB.usrpb210.conf
...ENERIC-NR-5GC/CONF/gnb.sa.band78.fr1.106PRB.usrpb210.conf
+1
-0
No files found.
openair2/LAYER2/nr_pdcp/nr_pdcp_oai_api.c
View file @
09c3eb9b
...
...
@@ -940,6 +940,8 @@ void nr_pdcp_add_drbs(eNB_flag_t enb_flag,
{
if
(
drb2add_list
!=
NULL
)
{
for
(
int
i
=
0
;
i
<
drb2add_list
->
list
.
count
;
i
++
)
{
// assert(drb2add_list->list.count == rlc_bearer2add_list->list.count );
add_drb
(
enb_flag
,
rntiMaybeUEid
,
reestablish_ue_id
,
drb2add_list
->
list
.
array
[
i
],
rlc_bearer2add_list
->
list
.
array
[
i
]
->
rlc_Config
,
security_modeP
&
0x0f
,
(
security_modeP
>>
4
)
&
0x0f
,
kUPenc
,
kUPint
);
}
}
else
...
...
openair2/LAYER2/nr_rlc/nr_rlc_entity_um.c
View file @
09c3eb9b
...
...
@@ -23,6 +23,7 @@
#include <stdlib.h>
#include <string.h>
#include <stdio.h>
#include "nr_rlc_pdu.h"
...
...
@@ -543,8 +544,11 @@ static int generate_tx_pdu(nr_rlc_entity_um_t *entity, char *buffer, int size)
uint64_t
time_now
=
time_average_now
();
uint64_t
waited_time
=
time_now
-
sdu
->
sdu
->
time_of_arrival
;
/* set time_of_arrival to 0 so as to update stats only once */
sdu
->
sdu
->
time_of_arrival
=
0
;
//
sdu->sdu->time_of_arrival = 0;
time_average_add
(
entity
->
common
.
txsdu_avg_time_to_tx
,
time_now
,
waited_time
);
double
av
=
time_average_get_average
(
entity
->
common
.
txsdu_avg_time_to_tx
,
time_average_now
()
);
printf
(
"Average time in the RLC SDU %lf us
\n
"
,
av
);
}
nr_rlc_free_sdu_segment
(
sdu
);
...
...
@@ -613,8 +617,8 @@ void nr_rlc_entity_um_recv_sdu(nr_rlc_entity_t *_entity,
entity
->
common
.
bstatus
.
tx_size
+=
compute_pdu_header_size
(
entity
,
sdu
)
+
sdu
->
size
;
if
(
entity
->
common
.
avg_time_is_on
)
sdu
->
sdu
->
time_of_arrival
=
time_average_now
();
//
if (entity->common.avg_time_is_on)
sdu
->
sdu
->
time_of_arrival
=
time_average_now
();
}
/*************************************************************************/
...
...
openair2/RRC/NR/cucp_cuup_direct.c
View file @
09c3eb9b
...
...
@@ -100,8 +100,9 @@ void CU_update_UP_DL_tunnel(e1ap_bearer_setup_req_t *const req, instance_t insta
}
}
static
int
drb_config_gtpu_create
(
const
protocol_ctxt_t
*
const
ctxt_p
,
rrc_gNB_ue_context_t
*
ue_context_p
,
static
int
drb_config_gtpu_create
(
const
protocol_ctxt_t
*
const
ctxt_p
,
rrc_gNB_ue_context_t
*
ue_context_p
,
e1ap_bearer_setup_req_t
*
const
req
,
NR_DRB_ToAddModList_t
*
DRB_configList
,
instance_t
instance
)
...
...
@@ -110,6 +111,7 @@ static int drb_config_gtpu_create(const protocol_ctxt_t *const ctxt_p,
gtpv1u_gnb_create_tunnel_resp_t
create_tunnel_resp
=
{
0
};
gNB_RRC_UE_t
*
UE
=
&
ue_context_p
->
ue_context
;
LOG_W
(
NR_RRC
,
"recreate existing tunnels, while adding new ones
\n
"
);
printf
(
"UE->nb_of_pdusessions %d
\n
"
,
UE
->
nb_of_pdusessions
);
for
(
int
i
=
0
;
i
<
UE
->
nb_of_pdusessions
;
i
++
)
{
rrc_pdu_session_param_t
*
pdu
=
UE
->
pduSession
+
i
;
create_tunnel_req
.
pdusession_id
[
i
]
=
pdu
->
param
.
pdusession_id
;
...
...
@@ -158,31 +160,46 @@ static int drb_config_gtpu_create(const protocol_ctxt_t *const ctxt_p,
(
UE
->
integrity_algorithm
<<
4
)
|
UE
->
ciphering_algorithm
,
kUPenc
,
kUPint
,
get_softmodem_params
()
->
sa
?
UE
->
masterCellGroup
->
rlc_BearerToAddModList
:
NULL
);
rlc_bearer2add_list
);
return
ret
;
}
static
void
cucp_cuup_bearer_context_setup_direct
(
e1ap_bearer_setup_req_t
*
const
req
,
instance_t
instance
,
uint8_t
xid
)
static
NR_SRB_ToAddModList_t
**
generateSRB2_confList
(
gNB_RRC_UE_t
*
ue
,
NR_SRB_ToAddModList_t
*
SRB_configList
,
uint8_t
xid
)
{
NR_SRB_ToAddModList_t
**
SRB_configList2
=
NULL
;
SRB_configList2
=
&
ue
->
SRB_configList2
[
xid
];
if
(
*
SRB_configList2
==
NULL
)
{
*
SRB_configList2
=
CALLOC
(
1
,
sizeof
(
**
SRB_configList2
));
NR_SRB_ToAddMod_t
*
SRB2_config
=
CALLOC
(
1
,
sizeof
(
*
SRB2_config
));
SRB2_config
->
srb_Identity
=
2
;
asn1cSeqAdd
(
&
(
*
SRB_configList2
)
->
list
,
SRB2_config
);
asn1cSeqAdd
(
&
SRB_configList
->
list
,
SRB2_config
);
}
return
SRB_configList2
;
}
static
void
cucp_cuup_bearer_context_setup_direct
(
e1ap_bearer_setup_req_t
*
const
req
,
instance_t
instance
,
uint8_t
xid
)
{
rrc_gNB_ue_context_t
*
ue_context_p
=
rrc_gNB_get_ue_context_by_rnti
(
RC
.
nrrrc
[
instance
],
req
->
rnti
);
gNB_RRC_UE_t
*
UE
=
&
ue_context_p
->
ue_context
;
protocol_ctxt_t
ctxt
=
{
0
};
PROTOCOL_CTXT_SET_BY_MODULE_ID
(
&
ctxt
,
0
,
GNB_FLAG_YES
,
UE
->
rnti
,
0
,
0
,
0
);
// mir
if
(
UE
->
DRB_configList
!=
NULL
&&
get_softmodem_params
()
->
sa
){
assert
(
UE
->
DRB_configList
->
list
.
count
==
UE
->
masterCellGroup
->
rlc_BearerToAddModList
->
list
.
count
);
}
fill_DRB_configList
(
&
ctxt
,
ue_context_p
,
xid
);
e1ap_bearer_setup_resp_t
resp
=
{
0
};
resp
.
numPDUSessions
=
req
->
numPDUSessions
;
for
(
int
i
=
0
;
i
<
resp
.
numPDUSessions
;
++
i
)
{
resp
.
pduSession
[
i
].
numDRBSetup
=
req
->
pduSession
[
i
].
numDRB2Setup
;
for
(
int
j
=
0
;
j
<
req
->
pduSession
[
i
].
numDRB2Setup
;
j
++
)
{
DRB_nGRAN_to_setup_t
*
req_drb
=
req
->
pduSession
[
i
].
DRBnGRanList
+
j
;
DRB_nGRAN_setup_t
*
resp_drb
=
resp
.
pduSession
[
i
].
DRBnGRanList
+
j
;
resp_drb
->
id
=
req_drb
->
id
;
resp_drb
->
numQosFlowSetup
=
req_drb
->
numQosFlow2Setup
;
for
(
int
k
=
0
;
k
<
resp_drb
->
numQosFlowSetup
;
k
++
)
resp_drb
->
qosFlows
[
k
].
id
=
req_drb
->
qosFlows
[
k
].
id
;
}
// mir
if
(
UE
->
DRB_configList
!=
NULL
&&
get_softmodem_params
()
->
sa
){
assert
(
UE
->
DRB_configList
->
list
.
count
==
UE
->
masterCellGroup
->
rlc_BearerToAddModList
->
list
.
count
);
}
gNB_RRC_INST
*
rrc
=
RC
.
nrrrc
[
ctxt
.
module_id
];
...
...
openair2/RRC/NR/rrc_gNB_NGAP.c
View file @
09c3eb9b
...
...
@@ -731,7 +731,7 @@ void rrc_gNB_process_NGAP_PDUSESSION_SETUP_REQ(MessageDef *msg_p, instance_t ins
{
protocol_ctxt_t
ctxt
=
{
0
};
ngap_pdusession_setup_req_t
*
msg
=
&
NGAP_PDUSESSION_SETUP_REQ
(
msg_p
);
ngap_pdusession_setup_req_t
*
msg
=
&
NGAP_PDUSESSION_SETUP_REQ
(
msg_p
);
rrc_gNB_ue_context_t
*
ue_context_p
=
rrc_gNB_get_ue_context
(
RC
.
nrrrc
[
instance
],
msg
->
gNB_ue_ngap_id
);
gNB_RRC_UE_t
*
UE
=
&
ue_context_p
->
ue_context
;
PROTOCOL_CTXT_SET_BY_MODULE_ID
(
&
ctxt
,
0
,
GNB_FLAG_YES
,
UE
->
rnti
,
0
,
0
,
0
);
...
...
@@ -777,7 +777,7 @@ void rrc_gNB_process_NGAP_PDUSESSION_SETUP_REQ(MessageDef *msg_p, instance_t ins
pdu
->
confidentialityProtectionIndication
=
rrc
->
security
.
do_drb_ciphering
?
E1AP_ConfidentialityProtectionIndication_required
:
E1AP_ConfidentialityProtectionIndication_not_needed
;
pdu
->
teId
=
session
->
gtp_teid
;
memcpy
(
&
pdu
->
tlAddress
,
session
->
upf_addr
.
buffer
,
4
);
// Fixme: dirty IPv4 target
pdu
->
numDRB2Setup
=
1
;
// One DRB per PDU Session. TODO: Remove hardcoding
pdu
->
numDRB2Setup
=
2
;
// One DRB per PDU Session. TODO: Remove hardcoding
for
(
int
j
=
0
;
j
<
pdu
->
numDRB2Setup
;
j
++
)
{
DRB_nGRAN_to_setup_t
*
drb
=
pdu
->
DRBnGRanList
+
j
;
...
...
targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band78.fr1.106PRB.usrpb210.conf
View file @
09c3eb9b
...
...
@@ -14,6 +14,7 @@ gNBs =
plmn_list
= ({
mcc
=
001
;
mnc
=
01
;
mnc_length
=
2
;
snssaiList
= ({
sst
=
1
; }) });
nr_cellid
=
12345678
L
;
min_rxtxtime
=
6
;
//////////
Physical
parameters
:
...
...
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