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
wangjie
OpenXG-RAN
Commits
5406a453
Commit
5406a453
authored
Jun 02, 2021
by
luis_pereira87
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Release RNTI of LTE PHY when RA does not succeed
parent
9068db43
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
43 additions
and
11 deletions
+43
-11
openair1/PHY/LTE_TRANSPORT/dci_tools.c
openair1/PHY/LTE_TRANSPORT/dci_tools.c
+17
-8
openair1/PHY/LTE_TRANSPORT/transport_common.h
openair1/PHY/LTE_TRANSPORT/transport_common.h
+2
-1
openair2/LAYER2/MAC/eNB_scheduler_ulsch.c
openair2/LAYER2/MAC/eNB_scheduler_ulsch.c
+19
-0
openair2/LAYER2/MAC/mac.h
openair2/LAYER2/MAC/mac.h
+2
-0
openair2/RRC/LTE/rrc_eNB.c
openair2/RRC/LTE/rrc_eNB.c
+3
-2
No files found.
openair1/PHY/LTE_TRANSPORT/dci_tools.c
View file @
5406a453
...
...
@@ -61,12 +61,17 @@ int find_dlsch(uint16_t rnti, PHY_VARS_eNB *eNB,find_type_t type) {
if
(
eNB
->
dlsch
[
i
][
0
]
==
NULL
)
continue
;
LOG_D
(
PHY
,
"searching for rnti %x : UE index %d=> harq_mask %x, rnti %x, first_free_index %d
\n
"
,
rnti
,
i
,
eNB
->
dlsch
[
i
][
0
]
->
harq_mask
,
eNB
->
dlsch
[
i
][
0
]
->
rnti
,
first_free_index
);
if
(
type
==
SEARCH_EXIST_RA
)
{
if
(
eNB
->
dlsch
[
i
][
0
]
->
rnti
==
rnti
)
return
i
;
}
else
{
if
((
eNB
->
dlsch
[
i
][
0
]
->
harq_mask
>
0
)
&&
(
eNB
->
dlsch
[
i
][
0
]
->
rnti
==
rnti
))
return
i
;
else
if
((
eNB
->
dlsch
[
i
][
0
]
->
harq_mask
==
0
)
&&
(
first_free_index
==-
1
))
first_free_index
=
i
;
}
if
(
type
==
SEARCH_EXIST
)
}
if
(
type
==
SEARCH_EXIST_RA
||
type
==
SEARCH_EXIST
)
return
-
1
;
if
(
first_free_index
!=
-
1
)
...
...
@@ -83,12 +88,16 @@ int find_ulsch(uint16_t rnti, PHY_VARS_eNB *eNB,find_type_t type) {
for
(
int
i
=
0
;
i
<
NUMBER_OF_ULSCH_MAX
;
i
++
)
{
if
(
eNB
->
ulsch
[
i
]
==
NULL
)
continue
;
if
(
type
==
SEARCH_EXIST_RA
)
{
if
(
eNB
->
ulsch
[
i
]
->
rnti
==
rnti
)
return
i
;
}
else
{
if
((
eNB
->
ulsch
[
i
]
->
harq_mask
>
0
)
&&
(
eNB
->
ulsch
[
i
]
->
rnti
==
rnti
))
return
i
;
else
if
((
eNB
->
ulsch
[
i
]
->
harq_mask
==
0
)
&&
(
first_free_index
==-
1
))
first_free_index
=
i
;
}
}
if
(
type
==
SEARCH_EXIST
)
if
(
type
==
SEARCH_EXIST
_RA
||
type
==
SEARCH_EXIST
)
return
-
1
;
if
(
first_free_index
!=
-
1
)
...
...
openair1/PHY/LTE_TRANSPORT/transport_common.h
View file @
5406a453
...
...
@@ -93,7 +93,8 @@
#define PMI_2A_R1_1j 2
typedef
enum
{
SEARCH_EXIST
=
0
,
SEARCH_EXIST_OR_FREE
SEARCH_EXIST_OR_FREE
,
SEARCH_EXIST_RA
}
find_type_t
;
typedef
enum
{
...
...
openair2/LAYER2/MAC/eNB_scheduler_ulsch.c
View file @
5406a453
...
...
@@ -314,6 +314,11 @@ rx_sdu(const module_id_t enb_mod_idP,
}
if
(
no_sig
||
sduP
==
NULL
)
{
// we've got an error on Msg3
if
(
no_sig
)
{
LOG_W
(
MAC
,
"No signal in Msg3
\n
"
);
}
LOG_D
(
MAC
,
"[eNB %d] CC_id %d, RA %d ULSCH in error in round %d/%d
\n
"
,
enb_mod_idP
,
CC_idP
,
...
...
@@ -322,6 +327,20 @@ rx_sdu(const module_id_t enb_mod_idP,
(
int
)
mac
->
common_channels
[
CC_idP
].
radioResourceConfigCommon
->
rach_ConfigCommon
.
maxHARQ_Msg3Tx
);
if
(
ra
->
msg3_round
>=
mac
->
common_channels
[
CC_idP
].
radioResourceConfigCommon
->
rach_ConfigCommon
.
maxHARQ_Msg3Tx
-
1
)
{
// Release RNTI of LTE PHY when RA does not succeed
UE_free_list_t
*
free_list
=
NULL
;
pthread_mutex_lock
(
&
lock_ue_freelist
);
free_list
=
&
mac
->
UE_free_list
;
free_list
->
UE_free_ctrl
[
free_list
->
tail_freelist
].
rnti
=
current_rnti
;
free_list
->
UE_free_ctrl
[
free_list
->
tail_freelist
].
removeContextFlg
=
1
;
free_list
->
UE_free_ctrl
[
free_list
->
tail_freelist
].
raFlag
=
1
;
free_list
->
num_UEs
++
;
mac
->
UE_release_req
.
ue_release_request_body
.
ue_release_request_TLVs_list
[
mac
->
UE_release_req
.
ue_release_request_body
.
number_of_TLVs
].
rnti
=
current_rnti
;
mac
->
UE_release_req
.
ue_release_request_body
.
number_of_TLVs
++
;
free_list
->
tail_freelist
=
(
free_list
->
tail_freelist
+
1
)
%
(
NUMBER_OF_UE_MAX
+
1
);
pthread_mutex_unlock
(
&
lock_ue_freelist
);
cancel_ra_proc
(
enb_mod_idP
,
CC_idP
,
frameP
,
current_rnti
);
nfapi_hi_dci0_request_t
*
hi_dci0_req
=
NULL
;
uint8_t
sf_ahead_dl
=
ul_subframe2_k_phich
(
&
mac
->
common_channels
[
CC_idP
],
subframeP
);
...
...
openair2/LAYER2/MAC/mac.h
View file @
5406a453
...
...
@@ -1192,6 +1192,8 @@ typedef struct {
rnti_t
rnti
;
///remove UE context flag
boolean_t
removeContextFlg
;
///remove RA flag
boolean_t
raFlag
;
}
UE_free_ctrl_t
;
/*! \brief REMOVE UE list used by eNB to order UEs/CC for deleting*/
typedef
struct
{
...
...
openair2/RRC/LTE/rrc_eNB.c
View file @
5406a453
...
...
@@ -997,6 +997,7 @@ void put_UE_in_freelist(module_id_t mod_id, rnti_t rnti, boolean_t removeFlag) {
free_list
=
&
eNB_MAC
->
UE_free_list
;
free_list
->
UE_free_ctrl
[
free_list
->
tail_freelist
].
rnti
=
rnti
;
free_list
->
UE_free_ctrl
[
free_list
->
tail_freelist
].
removeContextFlg
=
removeFlag
;
free_list
->
UE_free_ctrl
[
free_list
->
tail_freelist
].
raFlag
=
0
;
free_list
->
num_UEs
++
;
eNB_MAC
->
UE_release_req
.
ue_release_request_body
.
ue_release_request_TLVs_list
[
eNB_MAC
->
UE_release_req
.
ue_release_request_body
.
number_of_TLVs
].
rnti
=
rnti
;
eNB_MAC
->
UE_release_req
.
ue_release_request_body
.
number_of_TLVs
++
;
...
...
@@ -1046,12 +1047,12 @@ void release_UE_in_freeList(module_id_t mod_id) {
eNB_PHY
=
RC
.
eNB
[
mod_id
][
CC_id
];
int
id
;
// clean ULSCH entries for rnti
id
=
find_ulsch
(
rnti
,
eNB_PHY
,
SEARCH_EXIST
);
id
=
find_ulsch
(
rnti
,
eNB_PHY
,
eNB_MAC
->
UE_free_list
.
UE_free_ctrl
[
ue_num
].
raFlag
?
SEARCH_EXIST_RA
:
SEARCH_EXIST
);
if
(
id
>=
0
)
clean_eNb_ulsch
(
eNB_PHY
->
ulsch
[
id
]);
// clean DLSCH entries for rnti
id
=
find_dlsch
(
rnti
,
eNB_PHY
,
SEARCH_EXIST
);
id
=
find_dlsch
(
rnti
,
eNB_PHY
,
eNB_MAC
->
UE_free_list
.
UE_free_ctrl
[
ue_num
].
raFlag
?
SEARCH_EXIST_RA
:
SEARCH_EXIST
);
if
(
id
>=
0
)
clean_eNb_dlsch
(
eNB_PHY
->
dlsch
[
id
][
0
]);
...
...
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