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
lizhongxiao
OpenXG-RAN
Commits
5b35523c
Unverified
Commit
5b35523c
authored
Apr 05, 2023
by
Angelo Athanassopoulos
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
NR RRC - RRCReestablishment - Apply clang format
parent
3cf3a42b
Changes
4
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
112 additions
and
83 deletions
+112
-83
openair2/RRC/NR/nr_rrc_defs.h
openair2/RRC/NR/nr_rrc_defs.h
+1
-1
openair2/RRC/NR/rrc_gNB.c
openair2/RRC/NR/rrc_gNB.c
+79
-53
openair2/RRC/NR/rrc_gNB_radio_bearers.c
openair2/RRC/NR/rrc_gNB_radio_bearers.c
+21
-23
openair2/RRC/NR/rrc_gNB_radio_bearers.h
openair2/RRC/NR/rrc_gNB_radio_bearers.h
+11
-6
No files found.
openair2/RRC/NR/nr_rrc_defs.h
View file @
5b35523c
...
...
@@ -295,7 +295,7 @@ typedef struct drb_s {
int
pdcp_SN_SizeDL
;
int
t_Reordering
;
int
integrityProtection
;
struct
headerCompression_s
{
struct
headerCompression_s
{
int
NotUsed
;
int
present
;
}
headerCompression
;
...
...
openair2/RRC/NR/rrc_gNB.c
View file @
5b35523c
This diff is collapsed.
Click to expand it.
openair2/RRC/NR/rrc_gNB_radio_bearers.c
View file @
5b35523c
...
...
@@ -47,19 +47,19 @@ void generateDRB(gNB_RRC_UE_t *ue,
int
qos_flow_index
;
if
(
ue
->
established_drbs
[
drb_id
-
1
].
status
==
DRB_INACTIVE
)
{
/* DRB Management */
ue
->
established_drbs
[
drb_id
-
1
].
drb_id
=
drb_id
;
ue
->
established_drbs
[
drb_id
-
1
].
drb_id
=
drb_id
;
ue
->
established_drbs
[
drb_id
-
1
].
reestablishPDCP
=
-
1
;
ue
->
established_drbs
[
drb_id
-
1
].
recoverPDCP
=
-
1
;
ue
->
established_drbs
[
drb_id
-
1
].
recoverPDCP
=
-
1
;
for
(
i
=
0
;
i
<
NGAP_MAX_DRBS_PER_UE
;
i
++
)
{
if
((
ue
->
established_drbs
[
drb_id
-
1
].
cnAssociation
.
sdap_config
.
pdusession_id
==
0
||
ue
->
established_drbs
[
drb_id
-
1
].
cnAssociation
.
sdap_config
.
pdusession_id
==
pduSession
->
param
.
pdusession_id
)
&&
ue
->
established_drbs
[
drb_id
-
1
].
defaultDRBid
==
0
)
{
if
((
ue
->
established_drbs
[
drb_id
-
1
].
cnAssociation
.
sdap_config
.
pdusession_id
==
0
||
ue
->
established_drbs
[
drb_id
-
1
].
cnAssociation
.
sdap_config
.
pdusession_id
==
pduSession
->
param
.
pdusession_id
)
&&
ue
->
established_drbs
[
drb_id
-
1
].
defaultDRBid
==
0
)
{
ue
->
established_drbs
[
drb_id
-
1
].
cnAssociation
.
sdap_config
.
defaultDRB
=
true
;
ue
->
established_drbs
[
drb_id
-
1
].
defaultDRBid
=
drb_id
;
}
}
/* SDAP Configuration */
ue
->
established_drbs
[
drb_id
-
1
].
cnAssociation
.
present
=
NR_DRB_ToAddMod__cnAssociation_PR_sdap_Config
;
ue
->
established_drbs
[
drb_id
-
1
].
cnAssociation
.
present
=
NR_DRB_ToAddMod__cnAssociation_PR_sdap_Config
;
ue
->
established_drbs
[
drb_id
-
1
].
cnAssociation
.
sdap_config
.
pdusession_id
=
pduSession
->
param
.
pdusession_id
;
if
(
enable_sdap
)
{
ue
->
established_drbs
[
drb_id
-
1
].
cnAssociation
.
sdap_config
.
sdap_HeaderDL
=
NR_SDAP_Config__sdap_HeaderDL_present
;
...
...
@@ -68,19 +68,19 @@ void generateDRB(gNB_RRC_UE_t *ue,
ue
->
established_drbs
[
drb_id
-
1
].
cnAssociation
.
sdap_config
.
sdap_HeaderDL
=
NR_SDAP_Config__sdap_HeaderDL_absent
;
ue
->
established_drbs
[
drb_id
-
1
].
cnAssociation
.
sdap_config
.
sdap_HeaderUL
=
NR_SDAP_Config__sdap_HeaderUL_absent
;
}
for
(
qos_flow_index
=
0
;
qos_flow_index
<
pduSession
->
param
.
nb_qos
;
qos_flow_index
++
)
{
ue
->
established_drbs
[
drb_id
-
1
].
cnAssociation
.
sdap_config
.
mappedQoS_FlowsToAdd
[
qos_flow_index
]
=
pduSession
->
param
.
qos
[
qos_flow_index
].
qfi
;
if
(
pduSession
->
param
.
qos
[
qos_flow_index
].
fiveQI
>
5
)
for
(
qos_flow_index
=
0
;
qos_flow_index
<
pduSession
->
param
.
nb_qos
;
qos_flow_index
++
)
{
ue
->
established_drbs
[
drb_id
-
1
].
cnAssociation
.
sdap_config
.
mappedQoS_FlowsToAdd
[
qos_flow_index
]
=
pduSession
->
param
.
qos
[
qos_flow_index
].
qfi
;
if
(
pduSession
->
param
.
qos
[
qos_flow_index
].
fiveQI
>
5
)
ue
->
established_drbs
[
drb_id
-
1
].
status
=
DRB_ACTIVE_NONGBR
;
else
ue
->
established_drbs
[
drb_id
-
1
].
status
=
DRB_ACTIVE
;
}
/* PDCP Configuration */
ue
->
established_drbs
[
drb_id
-
1
].
pdcp_config
.
discardTimer
=
NR_PDCP_Config__drb__discardTimer_infinity
;
ue
->
established_drbs
[
drb_id
-
1
].
pdcp_config
.
pdcp_SN_SizeDL
=
NR_PDCP_Config__drb__pdcp_SN_SizeDL_len18bits
;
ue
->
established_drbs
[
drb_id
-
1
].
pdcp_config
.
pdcp_SN_SizeUL
=
NR_PDCP_Config__drb__pdcp_SN_SizeUL_len18bits
;
ue
->
established_drbs
[
drb_id
-
1
].
pdcp_config
.
t_Reordering
=
NR_PDCP_Config__t_Reordering_ms100
;
ue
->
established_drbs
[
drb_id
-
1
].
pdcp_config
.
discardTimer
=
NR_PDCP_Config__drb__discardTimer_infinity
;
ue
->
established_drbs
[
drb_id
-
1
].
pdcp_config
.
pdcp_SN_SizeDL
=
NR_PDCP_Config__drb__pdcp_SN_SizeDL_len18bits
;
ue
->
established_drbs
[
drb_id
-
1
].
pdcp_config
.
pdcp_SN_SizeUL
=
NR_PDCP_Config__drb__pdcp_SN_SizeUL_len18bits
;
ue
->
established_drbs
[
drb_id
-
1
].
pdcp_config
.
t_Reordering
=
NR_PDCP_Config__t_Reordering_ms100
;
ue
->
established_drbs
[
drb_id
-
1
].
pdcp_config
.
headerCompression
.
present
=
NR_PDCP_Config__drb__headerCompression_PR_notUsed
;
ue
->
established_drbs
[
drb_id
-
1
].
pdcp_config
.
headerCompression
.
NotUsed
=
0
;
if
(
do_drb_integrity
)
...
...
@@ -91,7 +91,6 @@ void generateDRB(gNB_RRC_UE_t *ue,
ue
->
established_drbs
[
drb_id
-
1
].
pdcp_config
.
ext1
.
cipheringDisabled
=
1
;
else
ue
->
established_drbs
[
drb_id
-
1
].
pdcp_config
.
ext1
.
cipheringDisabled
=
NR_PDCP_Config__ext1__cipheringDisabled_true
;
}
}
...
...
@@ -106,17 +105,16 @@ NR_DRB_ToAddMod_t *generateDRB_ASN1(drb_t drb_asn1)
asn1cCalloc
(
pdcpConfig
->
drb
,
drb
);
DRB_config
->
drb_Identity
=
drb_asn1
.
drb_id
;
association
->
present
=
drb_asn1
.
cnAssociation
.
present
;
association
->
present
=
drb_asn1
.
cnAssociation
.
present
;
/* SDAP Configuration */
SDAP_config
->
pdu_Session
=
drb_asn1
.
cnAssociation
.
sdap_config
.
pdusession_id
;
SDAP_config
->
pdu_Session
=
drb_asn1
.
cnAssociation
.
sdap_config
.
pdusession_id
;
SDAP_config
->
sdap_HeaderDL
=
drb_asn1
.
cnAssociation
.
sdap_config
.
sdap_HeaderDL
;
SDAP_config
->
sdap_HeaderUL
=
drb_asn1
.
cnAssociation
.
sdap_config
.
sdap_HeaderUL
;
SDAP_config
->
defaultDRB
=
drb_asn1
.
cnAssociation
.
sdap_config
.
defaultDRB
;
for
(
int
qos_flow_index
=
0
;
qos_flow_index
<
QOSFLOW_MAX_VALUE
;
qos_flow_index
++
)
{
if
(
drb_asn1
.
cnAssociation
.
sdap_config
.
mappedQoS_FlowsToAdd
[
qos_flow_index
]
!=
0
)
{
SDAP_config
->
defaultDRB
=
drb_asn1
.
cnAssociation
.
sdap_config
.
defaultDRB
;
for
(
int
qos_flow_index
=
0
;
qos_flow_index
<
QOSFLOW_MAX_VALUE
;
qos_flow_index
++
)
{
if
(
drb_asn1
.
cnAssociation
.
sdap_config
.
mappedQoS_FlowsToAdd
[
qos_flow_index
]
!=
0
)
{
asn1cSequenceAdd
(
sdapFlows
->
list
,
NR_QFI_t
,
qfi
);
*
qfi
=
drb_asn1
.
cnAssociation
.
sdap_config
.
mappedQoS_FlowsToAdd
[
qos_flow_index
];
}
...
...
@@ -130,7 +128,7 @@ NR_DRB_ToAddMod_t *generateDRB_ASN1(drb_t drb_asn1)
asn1cCallocOne
(
drb
->
pdcp_SN_SizeDL
,
drb_asn1
.
pdcp_config
.
pdcp_SN_SizeDL
);
asn1cCallocOne
(
pdcpConfig
->
t_Reordering
,
drb_asn1
.
pdcp_config
.
t_Reordering
);
drb
->
headerCompression
.
present
=
drb_asn1
.
pdcp_config
.
headerCompression
.
present
;
drb
->
headerCompression
.
present
=
drb_asn1
.
pdcp_config
.
headerCompression
.
present
;
drb
->
headerCompression
.
choice
.
notUsed
=
drb_asn1
.
pdcp_config
.
headerCompression
.
NotUsed
;
if
(
!
drb_asn1
.
pdcp_config
.
integrityProtection
)
{
...
...
openair2/RRC/NR/rrc_gNB_radio_bearers.h
View file @
5b35523c
...
...
@@ -35,19 +35,24 @@
#define GBR_FLOW (1)
#define NONGBR_FLOW (0)
/// @brief Generates an ASN1 DRB-ToAddMod, from the established_drbs in gNB_RRC_UE_t.
/// @param drb_t drb_asn1
/// @brief Generates an ASN1 DRB-ToAddMod, from the established_drbs in gNB_RRC_UE_t.
/// @param drb_t drb_asn1
/// @return Returns the ASN1 DRB-ToAddMod structs.
NR_DRB_ToAddMod_t
*
generateDRB_ASN1
(
drb_t
drb_asn1
);
/// @brief Creates and stores a DRB in the gNB_RRC_UE_t struct, it doesn't create the actual entity,
/// @brief Creates and stores a DRB in the gNB_RRC_UE_t struct, it doesn't create the actual entity,
/// to create the actual entity use the generateDRB_ASN1.
/// @param ue The gNB_RRC_UE_t struct that holds information for the UEs
/// @param drb_id The Data Radio Bearer Identity to be created for the established DRB.
/// @param pduSession The PDU Session that the DRB is created for.
/// @param enable_sdap If true the SDAP header will be added to the packet, else it will not add or search for SDAP header.
/// @param do_drb_integrity
/// @param do_drb_ciphering
void
generateDRB
(
gNB_RRC_UE_t
*
ue
,
uint8_t
drb_id
,
rrc_pdu_session_param_t
*
pduSession
,
bool
enable_sdap
,
int
do_drb_integrity
,
int
do_drb_ciphering
);
/// @param do_drb_integrity
/// @param do_drb_ciphering
void
generateDRB
(
gNB_RRC_UE_t
*
ue
,
uint8_t
drb_id
,
rrc_pdu_session_param_t
*
pduSession
,
bool
enable_sdap
,
int
do_drb_integrity
,
int
do_drb_ciphering
);
uint8_t
next_available_drb
(
gNB_RRC_UE_t
*
ue
,
rrc_pdu_session_param_t
*
pdusession
,
bool
is_gbr
);
bool
drb_is_active
(
gNB_RRC_UE_t
*
ue
,
uint8_t
drb_id
);
...
...
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