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
253fffe7
Commit
253fffe7
authored
Jan 16, 2025
by
Robert Schmidt
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
F1AP IDs: refactor common code
parent
10e07bc6
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
10 deletions
+10
-10
openair2/F1AP/f1ap_ids.c
openair2/F1AP/f1ap_ids.c
+10
-10
No files found.
openair2/F1AP/f1ap_ids.c
View file @
253fffe7
...
@@ -29,6 +29,14 @@
...
@@ -29,6 +29,14 @@
#include "common/utils/assertions.h"
#include "common/utils/assertions.h"
static
f1_ue_data_t
*
get_hashtable_data
(
hash_table_t
*
ht
,
uint64_t
ue_id
)
{
void
*
data
=
NULL
;
hashtable_rc_t
ret
=
hashtable_get
(
ht
,
ue_id
,
&
data
);
AssertFatal
(
ret
==
HASH_TABLE_OK
&&
data
!=
NULL
,
"element for ue_id %ld not found
\n
"
,
ue_id
);
return
data
;
}
/* we have separate versions for CU and DU, as both CU&DU might coexist in the
/* we have separate versions for CU and DU, as both CU&DU might coexist in the
* same process */
* same process */
static
hash_table_t
*
cu2du_ue_mapping
;
static
hash_table_t
*
cu2du_ue_mapping
;
...
@@ -74,11 +82,7 @@ f1_ue_data_t cu_get_f1_ue_data(uint32_t ue_id)
...
@@ -74,11 +82,7 @@ f1_ue_data_t cu_get_f1_ue_data(uint32_t ue_id)
{
{
pthread_mutex_lock
(
&
cu2du_mutex
);
pthread_mutex_lock
(
&
cu2du_mutex
);
DevAssert
(
cu2du_ue_mapping
!=
NULL
);
DevAssert
(
cu2du_ue_mapping
!=
NULL
);
uint64_t
key
=
ue_id
;
f1_ue_data_t
ued
=
*
get_hashtable_data
(
cu2du_ue_mapping
,
ue_id
);
void
*
data
=
NULL
;
hashtable_rc_t
ret
=
hashtable_get
(
cu2du_ue_mapping
,
key
,
&
data
);
AssertFatal
(
ret
==
HASH_TABLE_OK
&&
data
!=
NULL
,
"element for ue_id %d not found
\n
"
,
ue_id
);
f1_ue_data_t
ued
=
*
(
f1_ue_data_t
*
)
data
;
pthread_mutex_unlock
(
&
cu2du_mutex
);
pthread_mutex_unlock
(
&
cu2du_mutex
);
return
ued
;
return
ued
;
}
}
...
@@ -137,11 +141,7 @@ f1_ue_data_t du_get_f1_ue_data(uint32_t ue_id)
...
@@ -137,11 +141,7 @@ f1_ue_data_t du_get_f1_ue_data(uint32_t ue_id)
{
{
pthread_mutex_lock
(
&
du2cu_mutex
);
pthread_mutex_lock
(
&
du2cu_mutex
);
DevAssert
(
du2cu_ue_mapping
!=
NULL
);
DevAssert
(
du2cu_ue_mapping
!=
NULL
);
uint64_t
key
=
ue_id
;
f1_ue_data_t
ued
=
*
get_hashtable_data
(
du2cu_ue_mapping
,
ue_id
);
void
*
data
=
NULL
;
hashtable_rc_t
ret
=
hashtable_get
(
du2cu_ue_mapping
,
key
,
&
data
);
AssertFatal
(
ret
==
HASH_TABLE_OK
&&
data
!=
NULL
,
"element for ue_id %d not found
\n
"
,
ue_id
);
f1_ue_data_t
ued
=
*
(
f1_ue_data_t
*
)
data
;
pthread_mutex_unlock
(
&
du2cu_mutex
);
pthread_mutex_unlock
(
&
du2cu_mutex
);
return
ued
;
return
ued
;
}
}
...
...
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