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
e7c626a7
Commit
e7c626a7
authored
Aug 29, 2023
by
francescomani
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
release RB entities
parent
18892963
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
53 additions
and
2 deletions
+53
-2
openair2/LAYER2/nr_pdcp/nr_pdcp_entity.c
openair2/LAYER2/nr_pdcp/nr_pdcp_entity.c
+16
-0
openair2/LAYER2/nr_pdcp/nr_pdcp_entity.h
openair2/LAYER2/nr_pdcp/nr_pdcp_entity.h
+1
-0
openair2/LAYER2/nr_pdcp/nr_pdcp_oai_api.c
openair2/LAYER2/nr_pdcp/nr_pdcp_oai_api.c
+25
-0
openair2/LAYER2/nr_pdcp/nr_pdcp_oai_api.h
openair2/LAYER2/nr_pdcp/nr_pdcp_oai_api.h
+2
-0
openair2/RRC/NR_UE/rrc_UE.c
openair2/RRC/NR_UE/rrc_UE.c
+9
-2
No files found.
openair2/LAYER2/nr_pdcp/nr_pdcp_entity.c
View file @
e7c626a7
...
...
@@ -369,6 +369,21 @@ void nr_pdcp_entity_set_time(struct nr_pdcp_entity_t *entity, uint64_t now)
check_t_reordering
(
entity
);
}
void
nr_pdcp_entity_release
(
nr_pdcp_entity_t
*
entity
)
{
// deliver the PDCP SDUs stored in the receiving PDCP entity to upper layers
while
(
entity
->
rx_list
!=
NULL
)
{
nr_pdcp_sdu_t
*
cur
=
entity
->
rx_list
;
entity
->
deliver_sdu
(
entity
->
deliver_sdu_data
,
entity
,
cur
->
buffer
,
cur
->
size
);
entity
->
rx_list
=
cur
->
next
;
entity
->
rx_size
-=
cur
->
size
;
entity
->
stats
.
txsdu_pkts
++
;
entity
->
stats
.
txsdu_bytes
+=
cur
->
size
;
nr_pdcp_free_sdu
(
cur
);
}
}
void
nr_pdcp_entity_delete
(
nr_pdcp_entity_t
*
entity
)
{
nr_pdcp_sdu_t
*
cur
=
entity
->
rx_list
;
...
...
@@ -428,6 +443,7 @@ nr_pdcp_entity_t *new_nr_pdcp_entity(
ret
->
set_time
=
nr_pdcp_entity_set_time
;
ret
->
delete_entity
=
nr_pdcp_entity_delete
;
ret
->
release_entity
=
nr_pdcp_entity_release
;
ret
->
get_stats
=
nr_pdcp_entity_get_stats
;
ret
->
deliver_sdu
=
deliver_sdu
;
...
...
openair2/LAYER2/nr_pdcp/nr_pdcp_entity.h
View file @
e7c626a7
...
...
@@ -76,6 +76,7 @@ typedef struct nr_pdcp_entity_t {
int
(
*
process_sdu
)(
struct
nr_pdcp_entity_t
*
entity
,
char
*
buffer
,
int
size
,
int
sdu_id
,
char
*
pdu_buffer
,
int
pdu_max_size
);
void
(
*
delete_entity
)(
struct
nr_pdcp_entity_t
*
entity
);
void
(
*
release_entity
)(
struct
nr_pdcp_entity_t
*
entity
);
void
(
*
get_stats
)(
struct
nr_pdcp_entity_t
*
entity
,
nr_pdcp_statistics_t
*
out
);
/* set_security: pass -1 to integrity_algorithm / ciphering_algorithm
...
...
openair2/LAYER2/nr_pdcp/nr_pdcp_oai_api.c
View file @
e7c626a7
...
...
@@ -1080,6 +1080,31 @@ void nr_pdcp_reconfigure_drb(ue_id_t ue_id, int drb_id, long t_Reordering)
nr_pdcp_manager_unlock
(
nr_pdcp_ue_manager
);
}
void
nr_release_srb
(
ue_id_t
ue_id
,
int
srb_id
)
{
nr_pdcp_manager_lock
(
nr_pdcp_ue_manager
);
nr_pdcp_ue_t
*
ue
=
nr_pdcp_manager_get_ue
(
nr_pdcp_ue_manager
,
ue_id
);
if
(
ue
->
srb
[
srb_id
-
1
]
!=
NULL
)
ue
->
srb
[
srb_id
-
1
]
->
delete_entity
(
ue
->
srb
[
srb_id
-
1
]);
else
LOG_E
(
PDCP
,
"Attempting to release SRB%d but it is not configured
\n
"
,
srb_id
);
nr_pdcp_manager_unlock
(
nr_pdcp_ue_manager
);
}
void
nr_release_drb
(
ue_id_t
ue_id
,
int
drb_id
)
{
nr_pdcp_manager_lock
(
nr_pdcp_ue_manager
);
nr_pdcp_ue_t
*
ue
=
nr_pdcp_manager_get_ue
(
nr_pdcp_ue_manager
,
ue_id
);
nr_pdcp_entity_t
*
drb
=
ue
->
drb
[
drb_id
-
1
];
if
(
drb
)
{
drb
->
release_entity
(
drb
);
drb
->
delete_entity
(
drb
);
}
else
LOG_E
(
PDCP
,
"Attempting to release DRB%d but it is not configured
\n
"
,
drb_id
);
nr_pdcp_manager_unlock
(
nr_pdcp_ue_manager
);
}
void
nr_pdcp_reestablishment
(
ue_id_t
ue_id
)
{
// TODO implement this on a per RB basis following TS 38.323 Sec 5.1.2
...
...
openair2/LAYER2/nr_pdcp/nr_pdcp_oai_api.h
View file @
e7c626a7
...
...
@@ -68,6 +68,8 @@ void nr_pdcp_reestablishment(ue_id_t ue_id);
void
nr_pdcp_reconfigure_srb
(
ue_id_t
ue_id
,
int
srb_id
,
long
t_Reordering
);
void
nr_pdcp_reconfigure_drb
(
ue_id_t
ue_id
,
int
drb_id
,
long
t_Reordering
);
void
nr_release_srb
(
ue_id_t
ue_id
,
int
srb_id
);
void
nr_release_drb
(
ue_id_t
ue_id
,
int
drb_id
);
void
add_srb
(
int
is_gnb
,
ue_id_t
rntiMaybeUEid
,
...
...
openair2/RRC/NR_UE/rrc_UE.c
View file @
e7c626a7
...
...
@@ -1459,7 +1459,8 @@ void nr_rrc_ue_generate_RRCSetupRequest(module_id_t module_id, const uint8_t gNB
xer_fprint
(
stdout
,
&
asn_DEF_NR_RadioBearerConfig
,
(
const
void
*
)
radioBearerConfig
);
NR_UE_RRC_INST_t
*
ue_rrc
=
&
NR_UE_rrc_inst
[
ctxt_pP
->
module_id
];
AssertFatal
(
radioBearerConfig
->
srb3_ToRelease
==
NULL
,
"Release of SRB3 not yet implemented
\n
"
);
if
(
radioBearerConfig
->
srb3_ToRelease
)
nr_release_srb
(
ctxt_pP
->
rntiMaybeUEid
,
3
);
uint8_t
kRRCenc
[
16
]
=
{
0
};
uint8_t
kRRCint
[
16
]
=
{
0
};
...
...
@@ -1509,7 +1510,13 @@ void nr_rrc_ue_generate_RRCSetupRequest(module_id_t module_id, const uint8_t gNB
}
}
AssertFatal
(
radioBearerConfig
->
drb_ToReleaseList
==
NULL
,
"RB entity release not implemented yet
\n
"
);
if
(
radioBearerConfig
->
drb_ToReleaseList
)
{
for
(
int
cnt
=
0
;
cnt
<
radioBearerConfig
->
drb_ToReleaseList
->
list
.
count
;
cnt
++
)
{
NR_DRB_Identity_t
*
DRB_id
=
radioBearerConfig
->
drb_ToReleaseList
->
list
.
array
[
cnt
];
if
(
DRB_id
)
nr_release_drb
(
ctxt_pP
->
rntiMaybeUEid
,
*
DRB_id
);
}
}
// Establish DRBs if present
if
(
radioBearerConfig
->
drb_ToAddModList
!=
NULL
)
{
...
...
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