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
1a96de45
Commit
1a96de45
authored
Oct 14, 2020
by
Andrew Burger
Committed by
Michael Cook
Oct 14, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Set scheduler priorty to 1
To match emane. Checked with: ``` ps ax -o pid,class,priority,comm |grep RR ```
parent
645bcc5e
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
69 additions
and
3 deletions
+69
-3
openair2/PHY_INTERFACE/phy_stub_UE.c
openair2/PHY_INTERFACE/phy_stub_UE.c
+48
-1
openair2/PHY_INTERFACE/queue.c
openair2/PHY_INTERFACE/queue.c
+18
-0
openair2/PHY_INTERFACE/queue.h
openair2/PHY_INTERFACE/queue.h
+1
-0
targets/RT/USER/lte-ue.c
targets/RT/USER/lte-ue.c
+2
-2
No files found.
openair2/PHY_INTERFACE/phy_stub_UE.c
View file @
1a96de45
...
...
@@ -928,12 +928,59 @@ void hi_dci0_req_UE_MAC(int sfn,
}
}
// TODO: Find a way to drop more un-wanted dl_config_reqs & tx_reqs
// In the current state we let alot of unecessary packets through
// during the ra-rnti/pi-rnti/si-rnti in the startup state before a c-rnti is assigned
// Right now we are just accepting all dl_config_req and tx_reqs
// when the c-rnti is 0 - Andrew
static
bool
is_my_dl_config_req
(
nfapi_dl_config_request_t
*
req
)
{
bool
is_my_rnti
=
true
;
const
rnti_t
my_rnti
=
UE_mac_inst
[
0
].
crnti
;
// 0 for standalone pnf mode. TODO: Make this more clear - Andrew
for
(
int
i
=
0
;
i
<
req
->
dl_config_request_body
.
number_pdu
;
i
++
)
{
nfapi_dl_config_request_pdu_t
*
pdu
=
&
req
->
dl_config_request_body
.
dl_config_pdu_list
[
i
];
const
int
pdu_type
=
pdu
->
pdu_type
;
if
(
pdu_type
==
NFAPI_DL_CONFIG_DCI_DL_PDU_TYPE
)
{
const
rnti_t
dci_rnti
=
pdu
->
dci_dl_pdu
.
dci_dl_pdu_rel8
.
rnti
;
const
int
rnti_type
=
pdu
->
dci_dl_pdu
.
dci_dl_pdu_rel8
.
rnti_type
;
if
(
rnti_type
==
1
&&
dci_rnti
!=
my_rnti
)
{
is_my_rnti
=
false
;
LOG_I
(
MAC
,
"RNTI is not mine for pdu_type: %d my_rnti: 0x%x dci_rnti: 0x%x
\n
"
,
pdu_type
,
my_rnti
,
dci_rnti
);
}
else
{
is_my_rnti
=
true
;
break
;
}
}
}
return
is_my_rnti
;
}
// The following set of memcpy functions should be getting called as callback
// functions from pnf_p7_subframe_ind.
int
memcpy_dl_config_req
(
L1_rxtx_proc_t
*
proc
,
nfapi_pnf_p7_config_t
*
pnf_p7
,
nfapi_dl_config_request_t
*
req
)
{
if
(
!
is_my_dl_config_req
(
req
))
{
// TODO: Add in some kind of log or check to identify that what is being removed from the queue is correct. - Andrew
// Need to remove corresponding tx_req (comes before dl_config_req always)
void
*
p
=
unqueue
(
&
tx_req_pdu_queue
);
if
(
p
)
{
free
(
p
);
}
return
0
;
}
nfapi_dl_config_request_t
*
p
=
malloc
(
sizeof
(
nfapi_dl_config_request_t
));
// UE_mac_inst[Mod_id].p->header = req->header;
...
...
@@ -966,7 +1013,7 @@ int memcpy_dl_config_req(L1_rxtx_proc_t *proc,
static
bool
is_my_ul_config_req
(
nfapi_ul_config_request_t
*
req
)
{
bool
is_my_rnti
=
false
;
const
rnti_t
rnti
=
UE_mac_inst
[
0
].
crnti
;
// 0 for standalone pnf mode - Andrew
const
rnti_t
rnti
=
UE_mac_inst
[
0
].
crnti
;
// 0 for standalone pnf mode
. TODO: Make this more clear
- Andrew
for
(
int
i
=
0
;
i
<
req
->
ul_config_request_body
.
number_of_pdus
;
i
++
)
{
nfapi_ul_config_request_pdu_t
*
pdu
=
&
req
->
ul_config_request_body
.
ul_config_pdu_list
[
i
];
...
...
openair2/PHY_INTERFACE/queue.c
View file @
1a96de45
...
...
@@ -46,3 +46,21 @@ void *get_queue(queue_t *q) {
pthread_mutex_unlock
(
&
q
->
mutex
);
return
item
;
}
void
*
unqueue
(
queue_t
*
q
)
{
void
*
item
=
NULL
;
if
(
pthread_mutex_lock
(
&
q
->
mutex
)
!=
0
)
{
LOG_E
(
PHY
,
"remove_from_back_of_queue mutex_lock failed
\n
"
);
return
NULL
;
}
if
(
q
->
num_items
>
0
)
{
q
->
write_index
=
(
q
->
write_index
+
MAX_QUEUE_SIZE
-
1
)
%
MAX_QUEUE_SIZE
;
item
=
q
->
items
[
q
->
write_index
];
q
->
num_items
--
;
}
pthread_mutex_unlock
(
&
q
->
mutex
);
return
item
;
}
openair2/PHY_INTERFACE/queue.h
View file @
1a96de45
...
...
@@ -43,3 +43,4 @@ typedef struct queue_t {
void
init_queue
(
queue_t
*
q
);
bool
put_queue
(
queue_t
*
q
,
void
*
item
);
void
*
get_queue
(
queue_t
*
q
);
void
*
unqueue
(
queue_t
*
q
);
targets/RT/USER/lte-ue.c
View file @
1a96de45
...
...
@@ -1230,7 +1230,7 @@ static void *UE_phy_stub_standalone_pnf_task(void *arg)
{
UE_mac_inst
[
ue_Mod_id
].
UE_mode
[
0
]
=
PRACH
;
}
LOG_
I
(
MAC
,
"UE_mode: %d
\n
"
,
UE_mac_inst
[
ue_Mod_id
].
UE_mode
[
0
]);
LOG_
D
(
MAC
,
"UE_mode: %d
\n
"
,
UE_mac_inst
[
ue_Mod_id
].
UE_mode
[
0
]);
if
(
UE_mac_inst
[
ue_Mod_id
].
UE_mode
[
0
]
==
PRACH
)
{
//&& ue_Mod_id == next_Mod_id) {
next_ra_frame
++
;
...
...
@@ -1246,7 +1246,7 @@ static void *UE_phy_stub_standalone_pnf_task(void *arg)
{
LOG_I
(
MAC
,
"preamble_received_tar_power: %d
\n
"
,
prach_resources
->
ra_PREAMBLE_RECEIVED_TARGET_POWER
);
UE_mac_inst
[
ue_Mod_id
].
ra_frame
=
NFAPI_SFNSF2SFN
(
sfn_sf
);
// Is this why RACH comes in late to proxy? - Andrew
UE_mac_inst
[
ue_Mod_id
].
ra_frame
=
NFAPI_SFNSF2SFN
(
sfn_sf
);
LOG_D
(
MAC
,
"UE_phy_stub_thread_rxn_txnp4 before RACH, Mod_id: %d frame %d subframe %d
\n
"
,
ue_Mod_id
,
NFAPI_SFNSF2SFN
(
sfn_sf
),
NFAPI_SFNSF2SF
(
sfn_sf
));
fill_rach_indication_UE_MAC
(
ue_Mod_id
,
NFAPI_SFNSF2SFN
(
sfn_sf
),
NFAPI_SFNSF2SF
(
sfn_sf
),
UL_INFO
,
prach_resources
->
ra_PreambleIndex
,
prach_resources
->
ra_RNTI
);
sent_any
=
true
;
...
...
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