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
c58ddc0d
Commit
c58ddc0d
authored
Apr 25, 2018
by
Tien-Thinh Nguyen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
temporary fix to support multiple flows
parent
b11ba62b
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
29 additions
and
16 deletions
+29
-16
openair2/LAYER2/MAC/config.c
openair2/LAYER2/MAC/config.c
+5
-5
openair2/LAYER2/MAC/ue_procedures.c
openair2/LAYER2/MAC/ue_procedures.c
+24
-11
No files found.
openair2/LAYER2/MAC/config.c
View file @
c58ddc0d
...
@@ -1403,7 +1403,7 @@ rrc_mac_config_req_ue(
...
@@ -1403,7 +1403,7 @@ rrc_mac_config_req_ue(
}
}
for
(
k
=
0
;
k
<
MAX_NUM_LCID_DATA
;
k
++
)
{
for
(
k
=
0
;
k
<
MAX_NUM_LCID_DATA
;
k
++
)
{
LOG_
D
(
MAC
,
"[UE %d] logical channel %d channel id %d, groupL2Id %d
\n
"
,
Mod_idP
,
k
,
UE_mac_inst
[
Mod_idP
].
sl_info
[
k
].
LCID
,
UE_mac_inst
[
Mod_idP
].
sl_info
[
k
].
groupL2Id
);
LOG_
I
(
MAC
,
"[UE %d] logical channel %d channel id %d, groupL2Id %d
\n
"
,
Mod_idP
,
k
,
UE_mac_inst
[
Mod_idP
].
sl_info
[
k
].
LCID
,
UE_mac_inst
[
Mod_idP
].
sl_info
[
k
].
groupL2Id
);
}
}
}
}
if
(
destinationL2Id
){
if
(
destinationL2Id
){
...
@@ -1422,7 +1422,7 @@ rrc_mac_config_req_ue(
...
@@ -1422,7 +1422,7 @@ rrc_mac_config_req_ue(
}
}
for
(
k
=
0
;
k
<
MAX_NUM_LCID_DATA
;
k
++
)
{
for
(
k
=
0
;
k
<
MAX_NUM_LCID_DATA
;
k
++
)
{
LOG_
D
(
MAC
,
"[UE %d] logical channel %d channel id %d, destinationL2Id %d
\n
"
,
Mod_idP
,
k
,
UE_mac_inst
[
Mod_idP
].
sl_info
[
k
].
LCID
,
UE_mac_inst
[
Mod_idP
].
sl_info
[
k
].
destinationL2Id
);
LOG_
I
(
MAC
,
"[UE %d] logical channel %d channel id %d, destinationL2Id %d
\n
"
,
Mod_idP
,
k
,
UE_mac_inst
[
Mod_idP
].
sl_info
[
k
].
LCID
,
UE_mac_inst
[
Mod_idP
].
sl_info
[
k
].
destinationL2Id
);
}
}
}
}
}
else
if
((
logicalChannelIdentity
>=
MAX_NUM_LCID_DATA
)
&&
(
logicalChannelIdentity
<
MAX_NUM_LCID
))
{
}
else
if
((
logicalChannelIdentity
>=
MAX_NUM_LCID_DATA
)
&&
(
logicalChannelIdentity
<
MAX_NUM_LCID
))
{
...
@@ -1442,7 +1442,7 @@ rrc_mac_config_req_ue(
...
@@ -1442,7 +1442,7 @@ rrc_mac_config_req_ue(
}
}
for
(
k
=
MAX_NUM_LCID_DATA
;
k
<
MAX_NUM_LCID
;
k
++
)
{
for
(
k
=
MAX_NUM_LCID_DATA
;
k
<
MAX_NUM_LCID
;
k
++
)
{
LOG_
D
(
MAC
,
"[UE %d] logical channel %d channel id %d, destinationL2Id %d
\n
"
,
Mod_idP
,
k
,
UE_mac_inst
[
Mod_idP
].
sl_info
[
k
].
LCID
,
UE_mac_inst
[
Mod_idP
].
sl_info
[
k
].
destinationL2Id
);
LOG_
I
(
MAC
,
"[UE %d] logical channel %d channel id %d, destinationL2Id %d
\n
"
,
Mod_idP
,
k
,
UE_mac_inst
[
Mod_idP
].
sl_info
[
k
].
LCID
,
UE_mac_inst
[
Mod_idP
].
sl_info
[
k
].
destinationL2Id
);
}
}
}
}
...
@@ -1464,7 +1464,7 @@ rrc_mac_config_req_ue(
...
@@ -1464,7 +1464,7 @@ rrc_mac_config_req_ue(
}
}
for
(
k
=
0
;
k
<
MAX_NUM_LCID_DATA
;
k
++
)
{
for
(
k
=
0
;
k
<
MAX_NUM_LCID_DATA
;
k
++
)
{
LOG_
D
(
MAC
,
"[UE %d] channel id %d, destinationL2Id %d, groupL2Id %d
\n
"
,
Mod_idP
,
UE_mac_inst
[
Mod_idP
].
sl_info
[
k
].
LCID
,
UE_mac_inst
[
Mod_idP
].
sl_info
[
k
].
destinationL2Id
,
UE_mac_inst
[
Mod_idP
].
sl_info
[
k
].
groupL2Id
);
LOG_
I
(
MAC
,
"[UE %d] channel id %d, destinationL2Id %d, groupL2Id %d
\n
"
,
Mod_idP
,
UE_mac_inst
[
Mod_idP
].
sl_info
[
k
].
LCID
,
UE_mac_inst
[
Mod_idP
].
sl_info
[
k
].
destinationL2Id
,
UE_mac_inst
[
Mod_idP
].
sl_info
[
k
].
groupL2Id
);
}
}
}
else
if
((
logicalChannelIdentity
>=
MAX_NUM_LCID_DATA
)
&&
(
logicalChannelIdentity
<
MAX_NUM_LCID
))
{
}
else
if
((
logicalChannelIdentity
>=
MAX_NUM_LCID_DATA
)
&&
(
logicalChannelIdentity
<
MAX_NUM_LCID
))
{
//remove RBID for PCS5
//remove RBID for PCS5
...
@@ -1481,7 +1481,7 @@ rrc_mac_config_req_ue(
...
@@ -1481,7 +1481,7 @@ rrc_mac_config_req_ue(
}
}
for
(
k
=
MAX_NUM_LCID_DATA
;
k
<
MAX_NUM_LCID
;
k
++
)
{
for
(
k
=
MAX_NUM_LCID_DATA
;
k
<
MAX_NUM_LCID
;
k
++
)
{
LOG_
D
(
MAC
,
"[UE %d] channel id %d, destinationL2Id %d, groupL2Id %d
\n
"
,
Mod_idP
,
UE_mac_inst
[
Mod_idP
].
sl_info
[
k
].
LCID
,
UE_mac_inst
[
Mod_idP
].
sl_info
[
k
].
destinationL2Id
,
UE_mac_inst
[
Mod_idP
].
sl_info
[
k
].
groupL2Id
);
LOG_
I
(
MAC
,
"[UE %d] channel id %d, destinationL2Id %d, groupL2Id %d
\n
"
,
Mod_idP
,
UE_mac_inst
[
Mod_idP
].
sl_info
[
k
].
LCID
,
UE_mac_inst
[
Mod_idP
].
sl_info
[
k
].
destinationL2Id
,
UE_mac_inst
[
Mod_idP
].
sl_info
[
k
].
groupL2Id
);
}
}
}
}
...
...
openair2/LAYER2/MAC/ue_procedures.c
View file @
c58ddc0d
...
@@ -789,20 +789,33 @@ void ue_send_sl_sdu(module_id_t module_idP,
...
@@ -789,20 +789,33 @@ void ue_send_sl_sdu(module_id_t module_idP,
}
}
}
}
if
((
longh
->
LCID
>=
MAX_NUM_LCID_DATA
)
&&
(
j
>=
MAX_NUM_LCID_DATA
)){
if
((
longh
->
LCID
>=
MAX_NUM_LCID_DATA
)
&&
(
j
>=
MAX_NUM_LCID_DATA
)){
if
(
UE_mac_inst
[
module_idP
].
sl_info
[
j
].
sourceL2Id
==
destinationL2Id
)
{
//PC5-S (receive message after transmitting, e.g, security-command...)
if
((
UE_mac_inst
[
module_idP
].
sl_info
[
j
].
sourceL2Id
==
destinationL2Id
)
&&
(
UE_mac_inst
[
module_idP
].
sl_info
[
j
].
destinationL2Id
==
sourceL2Id
))
{
lcid
=
UE_mac_inst
[
module_idP
].
sl_info
[
j
].
LCID
;
lcid
=
UE_mac_inst
[
module_idP
].
sl_info
[
j
].
LCID
;
break
;
break
;
}
}
}
}
}
}
int
k
=
0
;
if
(
j
==
MAX_NUM_LCID
)
{
for
(
k
=
MAX_NUM_LCID_DATA
;
k
<
MAX_NUM_LCID
;
k
++
){
//PC5-S (default RX)
if
((
UE_mac_inst
[
module_idP
].
sl_info
[
k
].
sourceL2Id
==
destinationL2Id
)
&&
(
UE_mac_inst
[
module_idP
].
sl_info
[
k
].
destinationL2Id
==
0
))
{
lcid
=
UE_mac_inst
[
module_idP
].
sl_info
[
k
].
LCID
;
break
;
}
}
}
//match the destinationL2Id with UE L2Id or groupL2ID
//match the destinationL2Id with UE L2Id or groupL2ID
if
(
!
(((
destinationL2Id
==
UE_mac_inst
[
module_idP
].
sourceL2Id
)
&&
(
j
<
MAX_NUM_LCID
))
|
((
destinationL2Id
==
UE_mac_inst
[
module_idP
].
sourceL2Id
)
&&
(
longh
->
LCID
>=
MAX_NUM_LCID_DATA
))
|
(
i
<
MAX_NUM_LCID
))){
if
(
!
(((
destinationL2Id
==
UE_mac_inst
[
module_idP
].
sourceL2Id
)
&&
(
j
<
MAX_NUM_LCID
))
|
((
destinationL2Id
==
UE_mac_inst
[
module_idP
].
sourceL2Id
)
&&
(
k
<
MAX_NUM_LCID
))
|
((
destinationL2Id
==
UE_mac_inst
[
module_idP
].
sourceL2Id
)
&&
(
longh
->
LCID
>=
MAX_NUM_LCID_DATA
))
|
(
i
<
MAX_NUM_LCID
))){
LOG_D
(
MAC
,
"[Destination Id is neither matched with Source Id nor with Group Id, drop the packet!!!
\n
"
);
LOG_D
(
MAC
,
"[Destination Id is neither matched with Source Id nor with Group Id, drop the packet!!!
\n
"
);
return
;
return
;
}
}
LOG_
D
(
MAC
,
"DestinationL2Id: 0x%08x, sl_rbid %d, longh->LCID %d
\n
"
,
destinationL2Id
,
lcid
,
longh
->
LCID
);
LOG_
I
(
MAC
,
"DestinationL2Id: 0x%08x, sl_rbid %d, longh->LCID %d
\n
"
,
destinationL2Id
,
lcid
,
longh
->
LCID
);
if
(
longh
->
F
==
1
)
{
if
(
longh
->
F
==
1
)
{
...
@@ -2865,36 +2878,36 @@ SLSCH_t *ue_get_slsch(module_id_t module_idP,int CC_id,frame_t frameP,sub_frame_
...
@@ -2865,36 +2878,36 @@ SLSCH_t *ue_get_slsch(module_id_t module_idP,int CC_id,frame_t frameP,sub_frame_
*/
*/
for
(
i
=
0
;
i
<
MAX_NUM_LCID
;
i
++
){
for
(
i
=
0
;
i
<
MAX_NUM_LCID
;
i
++
){
if
(
ue
->
sl_info
[
i
].
LCID
>
0
)
{
if
(
ue
->
sl_info
[
i
].
LCID
>
0
)
{
for
(
int
j
=
0
;
j
<
ue
->
numCommFlows
;
j
++
){
//
for (int j = 0; j < ue->numCommFlows; j++){
if
((
ue
->
sourceL2Id
>
0
)
&&
(
ue
->
sl_info
[
j
].
destinationL2Id
>
0
)
){
if
((
ue
->
sourceL2Id
>
0
)
&&
(
ue
->
sl_info
[
i
].
destinationL2Id
>
0
)
){
rlc_status
=
mac_rlc_status_ind
(
module_idP
,
0x1234
,
0
,
frameP
,
subframeP
,
ENB_FLAG_NO
,
MBMS_FLAG_NO
,
rlc_status
=
mac_rlc_status_ind
(
module_idP
,
0x1234
,
0
,
frameP
,
subframeP
,
ENB_FLAG_NO
,
MBMS_FLAG_NO
,
ue
->
sl_info
[
i
].
LCID
,
0xFFFF
,
ue
->
sourceL2Id
,
ue
->
sl_info
[
j
].
destinationL2Id
);
ue
->
sl_info
[
i
].
LCID
,
0xFFFF
,
ue
->
sourceL2Id
,
ue
->
sl_info
[
i
].
destinationL2Id
);
if
(
rlc_status
.
bytes_in_buffer
>
2
){
if
(
rlc_status
.
bytes_in_buffer
>
2
){
LOG_I
(
MAC
,
"SFN.SF %d.%d: Scheduling for %d bytes in Sidelink buffer
\n
"
,
frameP
,
subframeP
,
rlc_status
.
bytes_in_buffer
);
LOG_I
(
MAC
,
"SFN.SF %d.%d: Scheduling for %d bytes in Sidelink buffer
\n
"
,
frameP
,
subframeP
,
rlc_status
.
bytes_in_buffer
);
// Fill in group id for off-network communications
// Fill in group id for off-network communications
ue
->
sltx_active
=
1
;
ue
->
sltx_active
=
1
;
//store LCID, destinationL2Id
//store LCID, destinationL2Id
ue
->
slsch_lcid
=
ue
->
sl_info
[
i
].
LCID
;
ue
->
slsch_lcid
=
ue
->
sl_info
[
i
].
LCID
;
ue
->
destinationL2Id
=
ue
->
sl_info
[
j
].
destinationL2Id
;
ue
->
destinationL2Id
=
ue
->
sl_info
[
i
].
destinationL2Id
;
break
;
break
;
}
}
}
}
if
((
ue
->
sourceL2Id
>
0
)
&&
(
ue
->
sl_info
[
j
].
groupL2Id
>
0
)
){
if
((
ue
->
sourceL2Id
>
0
)
&&
(
ue
->
sl_info
[
i
].
groupL2Id
>
0
)
){
rlc_status
=
mac_rlc_status_ind
(
module_idP
,
0x1234
,
0
,
frameP
,
subframeP
,
ENB_FLAG_NO
,
MBMS_FLAG_NO
,
rlc_status
=
mac_rlc_status_ind
(
module_idP
,
0x1234
,
0
,
frameP
,
subframeP
,
ENB_FLAG_NO
,
MBMS_FLAG_NO
,
ue
->
sl_info
[
i
].
LCID
,
0xFFFF
,
ue
->
sourceL2Id
,
ue
->
sl_info
[
j
].
groupL2Id
);
ue
->
sl_info
[
i
].
LCID
,
0xFFFF
,
ue
->
sourceL2Id
,
ue
->
sl_info
[
i
].
groupL2Id
);
if
(
rlc_status
.
bytes_in_buffer
>
2
){
if
(
rlc_status
.
bytes_in_buffer
>
2
){
LOG_I
(
MAC
,
"SFN.SF %d.%d: Scheduling for %d bytes in Sidelink buffer
\n
"
,
frameP
,
subframeP
,
rlc_status
.
bytes_in_buffer
);
LOG_I
(
MAC
,
"SFN.SF %d.%d: Scheduling for %d bytes in Sidelink buffer
\n
"
,
frameP
,
subframeP
,
rlc_status
.
bytes_in_buffer
);
// Fill in group id for off-network communications
// Fill in group id for off-network communications
ue
->
sltx_active
=
1
;
ue
->
sltx_active
=
1
;
//store LCID, destinationL2Id
//store LCID, destinationL2Id
ue
->
slsch_lcid
=
ue
->
sl_info
[
i
].
LCID
;
ue
->
slsch_lcid
=
ue
->
sl_info
[
i
].
LCID
;
ue
->
destinationL2Id
=
ue
->
sl_info
[
j
].
groupL2Id
;
ue
->
destinationL2Id
=
ue
->
sl_info
[
i
].
groupL2Id
;
break
;
break
;
}
}
}
}
}
//
}
}
}
if
(
ue
->
sltx_active
==
1
)
break
;
if
(
ue
->
sltx_active
==
1
)
break
;
}
}
...
...
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