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
canghaiwuhen
OpenXG-RAN
Commits
ff8d9a81
Commit
ff8d9a81
authored
Feb 07, 2018
by
Tien-Thinh Nguyen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
separation of SLRB establishment PC5-U/PC5-S
parent
97c2aff9
Changes
4
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
262 additions
and
38 deletions
+262
-38
openair2/LAYER2/MAC/config.c
openair2/LAYER2/MAC/config.c
+10
-0
openair2/LAYER2/MAC/defs.h
openair2/LAYER2/MAC/defs.h
+1
-0
openair2/LAYER2/MAC/ue_procedures.c
openair2/LAYER2/MAC/ue_procedures.c
+28
-15
openair2/RRC/LITE/rrc_UE.c
openair2/RRC/LITE/rrc_UE.c
+223
-23
No files found.
openair2/LAYER2/MAC/config.c
View file @
ff8d9a81
...
...
@@ -1391,6 +1391,16 @@ rrc_mac_config_req_ue(
if
((
i
==
MAX_NUM_DEST
)
&&
(
j
>
0
))
UE_mac_inst
[
Mod_idP
].
destinationList
[
j
-
1
]
=
*
destinationL2Id
;
UE_mac_inst
[
Mod_idP
].
numCommFlows
++
;
}
//store list of LCIDs for SL
if
(
logicalChannelIdentity
>
0
){
int
j
=
0
;
int
i
=
0
;
for
(
i
=
0
;
i
<
MAX_NUM_LCID
;
i
++
)
{
if
((
UE_mac_inst
[
Mod_idP
].
SL_LCID
[
i
]
==
0
)
&&
(
j
==
0
))
j
=
i
+
1
;
if
(
UE_mac_inst
[
Mod_idP
].
SL_LCID
[
i
]
==
logicalChannelIdentity
)
break
;
//LCID already exists!
}
if
((
i
==
MAX_NUM_LCID
)
&&
(
j
>
0
))
UE_mac_inst
[
Mod_idP
].
SL_LCID
[
j
-
1
]
=
logicalChannelIdentity
;
}
break
;
case
CONFIG_ACTION_REMOVE
:
//TODO
...
...
openair2/LAYER2/MAC/defs.h
View file @
ff8d9a81
...
...
@@ -1345,6 +1345,7 @@ typedef struct {
//List of destinations
uint32_t
destinationList
[
MAX_NUM_DEST
];
uint8_t
numCommFlows
;
uint32_t
SL_LCID
[
MAX_NUM_LCID
];
#endif
/// pointer to TDD Configuration (NULL for FDD)
...
...
openair2/LAYER2/MAC/ue_procedures.c
View file @
ff8d9a81
...
...
@@ -770,10 +770,21 @@ void ue_send_sl_sdu(module_id_t module_idP,
destinationL2Id
=
(
longh
->
DST07
<<
16
)
|
(
longh
->
DST815
<<
8
)
|
(
longh
->
DST1623
);
LOG_I
(
MAC
,
"[DestinationL2Id: 0x%08x]
\n
"
,
destinationL2Id
);
//match the destinationL2Id with UE L2Id or groupL2ID
if
(
!
((
destinationL2Id
==
UE_mac_inst
[
module_idP
].
sourceL2Id
)
|
(
destinationL2Id
==
UE_mac_inst
[
module_idP
].
groupL2Id
))){
/*
if (!((destinationL2Id == UE_mac_inst[module_idP].sourceL2Id) | (destinationL2Id == UE_mac_inst[module_idP].groupL2Id))){
LOG_I( MAC, "[Destination Id is neither matched with Source Id nor with Group Id, drop the packet!!! \n");
return;
}
*/
//in case of 1-n communication, verify that UE belongs to that group
int
i
=
0
;
for
(
i
=
0
;
i
<
MAX_NUM_DEST
;
i
++
)
if
(
UE_mac_inst
[
module_idP
].
destinationList
[
i
]
==
destinationL2Id
)
break
;
//match the destinationL2Id with UE L2Id or groupL2ID
if
(
!
((
destinationL2Id
==
UE_mac_inst
[
module_idP
].
sourceL2Id
)
|
(
i
<
MAX_NUM_DEST
))){
LOG_I
(
MAC
,
"[Destination Id is neither matched with Source Id nor with Group Id, drop the packet!!!
\n
"
);
return
;
}
if
(
longh
->
F
==
1
)
{
rlc_sdu_len
=
((
longh
->
L_MSB
<<
8
)
&
0x7F00
)
|
(
longh
->
L_LSB
&
0xFF
);
...
...
@@ -2787,7 +2798,7 @@ SLSCH_t *ue_get_slsch(module_id_t module_idP,int CC_id,frame_t frameP,sub_frame_
UE_MAC_INST
*
ue
=
&
UE_mac_inst
[
module_idP
];
int
rvtab
[
4
]
=
{
0
,
2
,
3
,
1
};
int
sdu_length
;
uint8_t
sl_lcids
[
2
]
=
{
3
,
10
};
//list of lcids for SL - hardcoded
//
uint8_t sl_lcids[2] = {3, 10}; //list of lcids for SL - hardcoded
int
i
=
0
;
// Note: this is hard-coded for now for the default SL configuration (4 SF PSCCH, 36 SF PSSCH)
...
...
@@ -2797,22 +2808,24 @@ SLSCH_t *ue_get_slsch(module_id_t module_idP,int CC_id,frame_t frameP,sub_frame_
if
((
absSF
%
40
)
==
0
)
{
// fill PSCCH data later in first subframe of SL period
ue
->
sltx_active
=
0
;
for
(
i
=
0
;
i
<
2
;
i
++
){
for
(
i
=
0
;
i
<
MAX_NUM_LCID
;
i
++
){
if
(
ue
->
SL_LCID
[
i
]
>
0
)
{
for
(
int
j
=
0
;
j
<
ue
->
numCommFlows
;
j
++
){
if
((
ue
->
sourceL2Id
>
0
)
&&
(
ue
->
destinationList
[
j
]
>
0
)
){
rlc_status
=
mac_rlc_status_ind
(
module_idP
,
0x1234
,
0
,
frameP
,
subframeP
,
ENB_FLAG_NO
,
MBMS_FLAG_NO
,
sl_lcids
[
i
],
0xFFFF
,
ue
->
sourceL2Id
,
ue
->
destinationList
[
j
]);
ue
->
SL_LCID
[
i
],
0xFFFF
,
ue
->
sourceL2Id
,
ue
->
destinationList
[
j
]);
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
);
// Fill in group id for off-network communications
ue
->
sltx_active
=
1
;
//store LCID, destinationL2Id
ue
->
slsch_lcid
=
sl_lcids
[
i
];
ue
->
slsch_lcid
=
ue
->
SL_LCID
[
i
];
ue
->
destinationL2Id
=
ue
->
destinationList
[
j
];
break
;
}
}
}
}
if
(
ue
->
sltx_active
==
1
)
break
;
}
}
// we're not in the SCCH period
...
...
openair2/RRC/LITE/rrc_UE.c
View file @
ff8d9a81
This diff is collapsed.
Click to expand it.
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