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
a0f25ad1
Commit
a0f25ad1
authored
Aug 11, 2022
by
Angelo Athanassopoulos
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Multiple DRBs - RRC - Transfer of generateDRB func from rrc_gNB.c to rrc_gNB_drbs.c
parent
625a15b8
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
92 additions
and
82 deletions
+92
-82
openair2/RRC/NR/rrc_gNB.c
openair2/RRC/NR/rrc_gNB.c
+0
-80
openair2/RRC/NR/rrc_gNB_drbs.c
openair2/RRC/NR/rrc_gNB_drbs.c
+80
-1
openair2/RRC/NR/rrc_gNB_drbs.h
openair2/RRC/NR/rrc_gNB_drbs.h
+12
-1
No files found.
openair2/RRC/NR/rrc_gNB.c
View file @
a0f25ad1
...
@@ -756,86 +756,6 @@ rrc_gNB_generate_defaultRRCReconfiguration(
...
@@ -756,86 +756,6 @@ rrc_gNB_generate_defaultRRCReconfiguration(
}
}
}
}
NR_DRB_ToAddMod_t
*
generateDRB
(
const
pdu_session_param_t
*
pduSession
,
long
drb_id
,
bool
enable_sdap
,
int
do_drb_integrity
,
int
do_drb_ciphering
)
{
NR_DRB_ToAddMod_t
*
DRB_config
=
NULL
;
NR_SDAP_Config_t
*
SDAP_config
=
NULL
;
DRB_config
=
CALLOC
(
1
,
sizeof
(
*
DRB_config
));
DRB_config
->
drb_Identity
=
drb_id
;
DRB_config
->
cnAssociation
=
CALLOC
(
1
,
sizeof
(
*
DRB_config
->
cnAssociation
));
DRB_config
->
cnAssociation
->
present
=
NR_DRB_ToAddMod__cnAssociation_PR_sdap_Config
;
/* SDAP Configuration */
SDAP_config
=
CALLOC
(
1
,
sizeof
(
NR_SDAP_Config_t
));
memset
(
SDAP_config
,
0
,
sizeof
(
NR_SDAP_Config_t
));
SDAP_config
->
mappedQoS_FlowsToAdd
=
calloc
(
1
,
sizeof
(
struct
NR_SDAP_Config__mappedQoS_FlowsToAdd
));
memset
(
SDAP_config
->
mappedQoS_FlowsToAdd
,
0
,
sizeof
(
struct
NR_SDAP_Config__mappedQoS_FlowsToAdd
));
SDAP_config
->
pdu_Session
=
pduSession
->
param
.
pdusession_id
;
if
(
enable_sdap
)
{
SDAP_config
->
sdap_HeaderDL
=
NR_SDAP_Config__sdap_HeaderDL_present
;
SDAP_config
->
sdap_HeaderUL
=
NR_SDAP_Config__sdap_HeaderUL_present
;
}
else
{
SDAP_config
->
sdap_HeaderDL
=
NR_SDAP_Config__sdap_HeaderDL_absent
;
SDAP_config
->
sdap_HeaderUL
=
NR_SDAP_Config__sdap_HeaderUL_absent
;
}
SDAP_config
->
defaultDRB
=
true
;
for
(
int
qos_flow_index
=
0
;
qos_flow_index
<
pduSession
->
param
.
nb_qos
;
qos_flow_index
++
)
{
NR_QFI_t
*
qfi
=
calloc
(
1
,
sizeof
(
NR_QFI_t
));
*
qfi
=
pduSession
->
param
.
qos
[
qos_flow_index
].
qfi
;
ASN_SEQUENCE_ADD
(
&
SDAP_config
->
mappedQoS_FlowsToAdd
->
list
,
qfi
);
}
SDAP_config
->
mappedQoS_FlowsToRelease
=
NULL
;
DRB_config
->
cnAssociation
->
choice
.
sdap_Config
=
SDAP_config
;
/* PDCP Configuration */
DRB_config
->
reestablishPDCP
=
NULL
;
DRB_config
->
recoverPDCP
=
NULL
;
DRB_config
->
pdcp_Config
=
calloc
(
1
,
sizeof
(
*
DRB_config
->
pdcp_Config
));
DRB_config
->
pdcp_Config
->
drb
=
calloc
(
1
,
sizeof
(
*
DRB_config
->
pdcp_Config
->
drb
));
DRB_config
->
pdcp_Config
->
drb
->
discardTimer
=
calloc
(
1
,
sizeof
(
*
DRB_config
->
pdcp_Config
->
drb
->
discardTimer
));
*
DRB_config
->
pdcp_Config
->
drb
->
discardTimer
=
NR_PDCP_Config__drb__discardTimer_infinity
;
DRB_config
->
pdcp_Config
->
drb
->
pdcp_SN_SizeUL
=
calloc
(
1
,
sizeof
(
*
DRB_config
->
pdcp_Config
->
drb
->
pdcp_SN_SizeUL
));
*
DRB_config
->
pdcp_Config
->
drb
->
pdcp_SN_SizeUL
=
NR_PDCP_Config__drb__pdcp_SN_SizeUL_len18bits
;
DRB_config
->
pdcp_Config
->
drb
->
pdcp_SN_SizeDL
=
calloc
(
1
,
sizeof
(
*
DRB_config
->
pdcp_Config
->
drb
->
pdcp_SN_SizeDL
));
*
DRB_config
->
pdcp_Config
->
drb
->
pdcp_SN_SizeDL
=
NR_PDCP_Config__drb__pdcp_SN_SizeDL_len18bits
;
DRB_config
->
pdcp_Config
->
drb
->
headerCompression
.
present
=
NR_PDCP_Config__drb__headerCompression_PR_notUsed
;
DRB_config
->
pdcp_Config
->
drb
->
headerCompression
.
choice
.
notUsed
=
0
;
DRB_config
->
pdcp_Config
->
drb
->
integrityProtection
=
NULL
;
DRB_config
->
pdcp_Config
->
drb
->
statusReportRequired
=
NULL
;
DRB_config
->
pdcp_Config
->
drb
->
outOfOrderDelivery
=
NULL
;
DRB_config
->
pdcp_Config
->
moreThanOneRLC
=
NULL
;
DRB_config
->
pdcp_Config
->
t_Reordering
=
calloc
(
1
,
sizeof
(
*
DRB_config
->
pdcp_Config
->
t_Reordering
));
*
DRB_config
->
pdcp_Config
->
t_Reordering
=
NR_PDCP_Config__t_Reordering_ms0
;
DRB_config
->
pdcp_Config
->
ext1
=
NULL
;
if
(
do_drb_integrity
)
{
DRB_config
->
pdcp_Config
->
drb
->
integrityProtection
=
calloc
(
1
,
sizeof
(
*
DRB_config
->
pdcp_Config
->
drb
->
integrityProtection
));
*
DRB_config
->
pdcp_Config
->
drb
->
integrityProtection
=
NR_PDCP_Config__drb__integrityProtection_enabled
;
}
if
(
!
do_drb_ciphering
)
{
DRB_config
->
pdcp_Config
->
ext1
=
calloc
(
1
,
sizeof
(
*
DRB_config
->
pdcp_Config
->
ext1
));
DRB_config
->
pdcp_Config
->
ext1
->
cipheringDisabled
=
calloc
(
1
,
sizeof
(
*
DRB_config
->
pdcp_Config
->
ext1
->
cipheringDisabled
));
*
DRB_config
->
pdcp_Config
->
ext1
->
cipheringDisabled
=
NR_PDCP_Config__ext1__cipheringDisabled_true
;
}
return
DRB_config
;
}
//-----------------------------------------------------------------------------
//-----------------------------------------------------------------------------
void
void
rrc_gNB_generate_dedicatedRRCReconfiguration
(
rrc_gNB_generate_dedicatedRRCReconfiguration
(
...
...
openair2/RRC/NR/rrc_gNB_drbs.c
View file @
a0f25ad1
...
@@ -20,3 +20,82 @@
...
@@ -20,3 +20,82 @@
*/
*/
#include "rrc_gNB_drbs.h"
#include "rrc_gNB_drbs.h"
NR_DRB_ToAddMod_t
*
generateDRB
(
const
pdu_session_param_t
*
pduSession
,
long
drb_id
,
bool
enable_sdap
,
int
do_drb_integrity
,
int
do_drb_ciphering
)
{
NR_DRB_ToAddMod_t
*
DRB_config
=
NULL
;
NR_SDAP_Config_t
*
SDAP_config
=
NULL
;
DRB_config
=
CALLOC
(
1
,
sizeof
(
*
DRB_config
));
DRB_config
->
drb_Identity
=
drb_id
;
DRB_config
->
cnAssociation
=
CALLOC
(
1
,
sizeof
(
*
DRB_config
->
cnAssociation
));
DRB_config
->
cnAssociation
->
present
=
NR_DRB_ToAddMod__cnAssociation_PR_sdap_Config
;
/* SDAP Configuration */
SDAP_config
=
CALLOC
(
1
,
sizeof
(
NR_SDAP_Config_t
));
memset
(
SDAP_config
,
0
,
sizeof
(
NR_SDAP_Config_t
));
SDAP_config
->
mappedQoS_FlowsToAdd
=
calloc
(
1
,
sizeof
(
struct
NR_SDAP_Config__mappedQoS_FlowsToAdd
));
memset
(
SDAP_config
->
mappedQoS_FlowsToAdd
,
0
,
sizeof
(
struct
NR_SDAP_Config__mappedQoS_FlowsToAdd
));
SDAP_config
->
pdu_Session
=
pduSession
->
param
.
pdusession_id
;
if
(
enable_sdap
)
{
SDAP_config
->
sdap_HeaderDL
=
NR_SDAP_Config__sdap_HeaderDL_present
;
SDAP_config
->
sdap_HeaderUL
=
NR_SDAP_Config__sdap_HeaderUL_present
;
}
else
{
SDAP_config
->
sdap_HeaderDL
=
NR_SDAP_Config__sdap_HeaderDL_absent
;
SDAP_config
->
sdap_HeaderUL
=
NR_SDAP_Config__sdap_HeaderUL_absent
;
}
SDAP_config
->
defaultDRB
=
true
;
for
(
int
qos_flow_index
=
0
;
qos_flow_index
<
pduSession
->
param
.
nb_qos
;
qos_flow_index
++
)
{
NR_QFI_t
*
qfi
=
calloc
(
1
,
sizeof
(
NR_QFI_t
));
*
qfi
=
pduSession
->
param
.
qos
[
qos_flow_index
].
qfi
;
ASN_SEQUENCE_ADD
(
&
SDAP_config
->
mappedQoS_FlowsToAdd
->
list
,
qfi
);
}
SDAP_config
->
mappedQoS_FlowsToRelease
=
NULL
;
DRB_config
->
cnAssociation
->
choice
.
sdap_Config
=
SDAP_config
;
/* PDCP Configuration */
DRB_config
->
reestablishPDCP
=
NULL
;
DRB_config
->
recoverPDCP
=
NULL
;
DRB_config
->
pdcp_Config
=
calloc
(
1
,
sizeof
(
*
DRB_config
->
pdcp_Config
));
DRB_config
->
pdcp_Config
->
drb
=
calloc
(
1
,
sizeof
(
*
DRB_config
->
pdcp_Config
->
drb
));
DRB_config
->
pdcp_Config
->
drb
->
discardTimer
=
calloc
(
1
,
sizeof
(
*
DRB_config
->
pdcp_Config
->
drb
->
discardTimer
));
*
DRB_config
->
pdcp_Config
->
drb
->
discardTimer
=
NR_PDCP_Config__drb__discardTimer_infinity
;
DRB_config
->
pdcp_Config
->
drb
->
pdcp_SN_SizeUL
=
calloc
(
1
,
sizeof
(
*
DRB_config
->
pdcp_Config
->
drb
->
pdcp_SN_SizeUL
));
*
DRB_config
->
pdcp_Config
->
drb
->
pdcp_SN_SizeUL
=
NR_PDCP_Config__drb__pdcp_SN_SizeUL_len18bits
;
DRB_config
->
pdcp_Config
->
drb
->
pdcp_SN_SizeDL
=
calloc
(
1
,
sizeof
(
*
DRB_config
->
pdcp_Config
->
drb
->
pdcp_SN_SizeDL
));
*
DRB_config
->
pdcp_Config
->
drb
->
pdcp_SN_SizeDL
=
NR_PDCP_Config__drb__pdcp_SN_SizeDL_len18bits
;
DRB_config
->
pdcp_Config
->
drb
->
headerCompression
.
present
=
NR_PDCP_Config__drb__headerCompression_PR_notUsed
;
DRB_config
->
pdcp_Config
->
drb
->
headerCompression
.
choice
.
notUsed
=
0
;
DRB_config
->
pdcp_Config
->
drb
->
integrityProtection
=
NULL
;
DRB_config
->
pdcp_Config
->
drb
->
statusReportRequired
=
NULL
;
DRB_config
->
pdcp_Config
->
drb
->
outOfOrderDelivery
=
NULL
;
DRB_config
->
pdcp_Config
->
moreThanOneRLC
=
NULL
;
DRB_config
->
pdcp_Config
->
t_Reordering
=
calloc
(
1
,
sizeof
(
*
DRB_config
->
pdcp_Config
->
t_Reordering
));
*
DRB_config
->
pdcp_Config
->
t_Reordering
=
NR_PDCP_Config__t_Reordering_ms0
;
DRB_config
->
pdcp_Config
->
ext1
=
NULL
;
if
(
do_drb_integrity
)
{
DRB_config
->
pdcp_Config
->
drb
->
integrityProtection
=
calloc
(
1
,
sizeof
(
*
DRB_config
->
pdcp_Config
->
drb
->
integrityProtection
));
*
DRB_config
->
pdcp_Config
->
drb
->
integrityProtection
=
NR_PDCP_Config__drb__integrityProtection_enabled
;
}
if
(
!
do_drb_ciphering
)
{
DRB_config
->
pdcp_Config
->
ext1
=
calloc
(
1
,
sizeof
(
*
DRB_config
->
pdcp_Config
->
ext1
));
DRB_config
->
pdcp_Config
->
ext1
->
cipheringDisabled
=
calloc
(
1
,
sizeof
(
*
DRB_config
->
pdcp_Config
->
ext1
->
cipheringDisabled
));
*
DRB_config
->
pdcp_Config
->
ext1
->
cipheringDisabled
=
NR_PDCP_Config__ext1__cipheringDisabled_true
;
}
return
DRB_config
;
}
\ No newline at end of file
openair2/RRC/NR/rrc_gNB_drbs.h
View file @
a0f25ad1
...
@@ -19,6 +19,17 @@
...
@@ -19,6 +19,17 @@
* contact@openairinterface.org
* contact@openairinterface.org
*/
*/
#ifndef _RRC_GNB_DRBS_H_
#define _RRC_GNB_DRBS_H_
#include "nr_rrc_defs.h"
#include "nr_rrc_defs.h"
#include "NR_SDAP-Config.h"
#include "NR_SDAP-Config.h"
#include "NR_DRB-ToAddMod.h"
#include "NR_DRB-ToAddMod.h"
NR_DRB_ToAddMod_t
*
generateDRB
(
const
pdu_session_param_t
*
pduSession
,
long
drb_id
,
bool
enable_sdap
,
int
do_drb_integrity
,
int
do_drb_ciphering
);
#endif
\ 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