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
zzha zzha
OpenXG-RAN
Commits
b29fd449
Commit
b29fd449
authored
Nov 02, 2021
by
Melissa Elkadi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Changed ul_tti_req queueing mechanism:
Instead of resetting queue when full, take last item out.
parent
78253509
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
31 additions
and
11 deletions
+31
-11
openair2/NR_UE_PHY_INTERFACE/NR_IF_Module.c
openair2/NR_UE_PHY_INTERFACE/NR_IF_Module.c
+2
-11
openair2/PHY_INTERFACE/queue.c
openair2/PHY_INTERFACE/queue.c
+28
-0
openair2/PHY_INTERFACE/queue.h
openair2/PHY_INTERFACE/queue.h
+1
-0
No files found.
openair2/NR_UE_PHY_INTERFACE/NR_IF_Module.c
View file @
b29fd449
...
...
@@ -752,18 +752,9 @@ static void enqueue_nr_nfapi_msg(void *buffer, ssize_t len, nfapi_p7_message_hea
{
LOG_D
(
NR_MAC
,
"We added UL_TTI_REQ to queue for sfn slot %d %d
\n
"
,
ul_tti_request
->
SFN
,
ul_tti_request
->
Slot
);
if
(
!
put_queue
(
&
nr_wait_ul_tti_req_queue
,
ul_tti_request
))
{
reset_queue
(
&
nr_wait_ul_tti_req_queue
);
if
(
!
put_queue
(
&
nr_wait_ul_tti_req_queue
,
ul_tti_request
))
{
LOG_E
(
NR_PHY
,
"put_queue failed for nr_wait_ul_tti_req_queue.
\n
"
);
free
(
ul_tti_request
);
ul_tti_request
=
NULL
;
nfapi_nr_ul_tti_request_t
*
evicted_ul_tti_req
=
put_queue_replace
(
&
nr_wait_ul_tti_req_queue
,
ul_tti_request
);
free
(
evicted_ul_tti_req
);
}
}
}
break
;
}
...
...
openair2/PHY_INTERFACE/queue.c
View file @
b29fd449
...
...
@@ -25,6 +25,34 @@ void reset_queue(queue_t *q)
}
}
void
*
put_queue_replace
(
queue_t
*
q
,
void
*
item
)
{
assert
(
item
!=
NULL
);
if
(
pthread_mutex_lock
(
&
q
->
mutex
)
!=
0
)
{
LOG_ERROR
(
"put_queue: mutex_lock failed"
);
return
false
;
}
void
*
evicted
=
NULL
;
if
(
q
->
num_items
>=
MAX_QUEUE_SIZE
)
{
evicted
=
q
->
items
[
q
->
read_index
];
assert
(
evicted
!=
NULL
);
q
->
items
[
q
->
read_index
]
=
NULL
;
q
->
read_index
=
(
q
->
read_index
+
1
)
%
MAX_QUEUE_SIZE
;
q
->
num_items
--
;
}
assert
(
q
->
items
[
q
->
write_index
]
==
NULL
);
q
->
items
[
q
->
write_index
]
=
item
;
q
->
write_index
=
(
q
->
write_index
+
1
)
%
MAX_QUEUE_SIZE
;
q
->
num_items
++
;
pthread_mutex_unlock
(
&
q
->
mutex
);
return
evicted
;
}
bool
put_queue
(
queue_t
*
q
,
void
*
item
)
{
assert
(
item
!=
NULL
);
...
...
openair2/PHY_INTERFACE/queue.h
View file @
b29fd449
...
...
@@ -42,6 +42,7 @@ typedef struct queue_t
void
init_queue
(
queue_t
*
q
);
void
reset_queue
(
queue_t
*
q
);
void
*
put_queue_replace
(
queue_t
*
q
,
void
*
item
);
bool
put_queue
(
queue_t
*
q
,
void
*
item
);
void
*
get_queue
(
queue_t
*
q
);
...
...
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