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
6919f290
Commit
6919f290
authored
Jul 07, 2023
by
Robert Schmidt
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/Bugfix_SDAP_delete_entity' into integration_2023_w27
parents
be8a4012
7a2790ba
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
74 additions
and
7 deletions
+74
-7
openair2/SDAP/nr_sdap/nr_sdap_entity.c
openair2/SDAP/nr_sdap/nr_sdap_entity.c
+56
-5
openair2/SDAP/nr_sdap/nr_sdap_entity.h
openair2/SDAP/nr_sdap/nr_sdap_entity.h
+18
-2
No files found.
openair2/SDAP/nr_sdap/nr_sdap_entity.c
View file @
6919f290
...
...
@@ -468,23 +468,74 @@ nr_sdap_entity_t *nr_sdap_get_entity(ue_id_t ue_id, int pdusession_id)
return
NULL
;
}
void
delete_nr_sdap_entity
(
ue_id_t
ue
_id
)
bool
nr_sdap_delete_entity
(
ue_id_t
ue_id
,
int
pdusession
_id
)
{
nr_sdap_entity_t
*
entityPtr
,
*
entityPrev
=
NULL
;
entityPtr
=
sdap_info
.
sdap_entity_llist
;
nr_sdap_entity_t
*
entityPtr
=
sdap_info
.
sdap_entity_llist
;
nr_sdap_entity_t
*
entityPrev
=
NULL
;
bool
ret
=
false
;
int
upperBound
=
0
;
if
(
entityPtr
->
ue_id
==
ue_id
)
{
if
(
entityPtr
==
NULL
&&
(
pdusession_id
)
*
(
pdusession_id
-
NGAP_MAX_PDU_SESSION
)
>
0
)
{
LOG_W
(
SDAP
,
"SDAP entities not established or Invalid range of pdusession_id [0, 256].
\n
"
);
return
ret
;
}
LOG_D
(
SDAP
,
"Deleting SDAP entity for UE %lx and PDU Session id %d
\n
"
,
ue_id
,
entityPtr
->
pdusession_id
);
if
(
entityPtr
->
ue_id
==
ue_id
&&
entityPtr
->
pdusession_id
==
pdusession_id
)
{
sdap_info
.
sdap_entity_llist
=
sdap_info
.
sdap_entity_llist
->
next_entity
;
free
(
entityPtr
);
LOG_D
(
SDAP
,
"Successfully deleted Entity.
\n
"
);
ret
=
true
;
}
else
{
while
(
entityPtr
->
ue_id
!=
ue_id
&&
entityPtr
->
next_entity
!=
NULL
)
{
while
((
entityPtr
->
ue_id
!=
ue_id
||
entityPtr
->
pdusession_id
!=
pdusession_id
)
&&
entityPtr
->
next_entity
!=
NULL
&&
upperBound
<
SDAP_MAX_NUM_OF_ENTITIES
)
{
entityPrev
=
entityPtr
;
entityPtr
=
entityPtr
->
next_entity
;
upperBound
++
;
}
if
(
entityPtr
->
ue_id
==
ue_id
&&
entityPtr
->
pdusession_id
==
pdusession_id
)
{
entityPrev
->
next_entity
=
entityPtr
->
next_entity
;
free
(
entityPtr
);
LOG_D
(
SDAP
,
"Successfully deleted Entity.
\n
"
);
ret
=
true
;
}
}
LOG_W
(
SDAP
,
"Entity does not exist or it was not found.
\n
"
);
return
ret
;
}
bool
nr_sdap_delete_ue_entities
(
ue_id_t
ue_id
)
{
nr_sdap_entity_t
*
entityPtr
=
sdap_info
.
sdap_entity_llist
;
nr_sdap_entity_t
*
entityPrev
=
NULL
;
int
upperBound
=
0
;
bool
ret
=
false
;
if
(
entityPtr
==
NULL
&&
(
ue_id
)
*
(
ue_id
-
SDAP_MAX_UE_ID
)
>
0
)
{
LOG_W
(
SDAP
,
"SDAP entities not established or Invalid range of ue_id [0, 65536]
\n
"
);
return
ret
;
}
/* Handle scenario where ue_id matches the head of the list */
while
(
entityPtr
!=
NULL
&&
entityPtr
->
ue_id
==
ue_id
&&
upperBound
<
NGAP_MAX_DRBS_PER_UE
)
{
sdap_info
.
sdap_entity_llist
=
entityPtr
->
next_entity
;
free
(
entityPtr
);
entityPtr
=
sdap_info
.
sdap_entity_llist
;
ret
=
true
;
}
while
(
entityPtr
!=
NULL
&&
upperBound
<
SDAP_MAX_NUM_OF_ENTITIES
)
{
if
(
entityPtr
->
ue_id
!=
ue_id
)
{
entityPrev
=
entityPtr
;
entityPtr
=
entityPtr
->
next_entity
;
}
else
{
entityPrev
->
next_entity
=
entityPtr
->
next_entity
;
free
(
entityPtr
);
entityPtr
=
entityPrev
->
next_entity
;
LOG_D
(
SDAP
,
"Successfully deleted Entity.
\n
"
);
ret
=
true
;
}
}
return
ret
;
}
openair2/SDAP/nr_sdap/nr_sdap_entity.h
View file @
6919f290
...
...
@@ -44,6 +44,8 @@
#define SDAP_CTRL_PDU_MAP_DEF_DRB (0)
#define SDAP_CTRL_PDU_MAP_RULE_DRB (1)
#define SDAP_MAX_PDU (9000)
#define SDAP_MAX_NUM_OF_ENTITIES (NGAP_MAX_DRBS_PER_UE * MAX_MOBILES_PER_ENB)
#define SDAP_MAX_UE_ID (65536)
/*
* The values of QoS Flow ID (QFI) and Reflective QoS Indication,
...
...
@@ -167,7 +169,21 @@ nr_sdap_entity_t *new_nr_sdap_entity(int is_gnb, bool has_sdap_rx, bool has_sdap
/* Entity Handling Related Functions */
nr_sdap_entity_t
*
nr_sdap_get_entity
(
ue_id_t
ue_id
,
int
pdusession_id
);
/* Entity Handling Related Functions */
void
delete_nr_sdap_entity
(
ue_id_t
ue_id
);
/**
* @brief Function to delete a single SDAP Entity based on the ue_id and pdusession_id.
* @note 1. SDAP entities may have the same ue_id.
* @note 2. SDAP entities may have the same pdusession_id, but not with the same ue_id.
* @note 3. The combination of ue_id and pdusession_id, is unique for each SDAP entity.
* @param[in] ue_id Unique identifier for the User Equipment. ID Range [0, 65536].
* @param[in] pdusession_id Unique identifier for the Packet Data Unit Session. ID Range [0, 256].
* @return True, if successfully deleted entity, false otherwise.
*/
bool
nr_sdap_delete_entity
(
ue_id_t
ue_id
,
int
pdusession_id
);
/**
* @brief Function to delete all SDAP Entities based on the ue_id.
* @param[in] ue_id Unique identifier for the User Equipment. ID Range [0, 65536].
* @return True, it deleted at least one entity, false otherwise.
*/
bool
nr_sdap_delete_ue_entities
(
ue_id_t
ue_id
);
#endif
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