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
常顺宇
OpenXG-RAN
Commits
7106aa92
Commit
7106aa92
authored
Apr 16, 2018
by
Tien-Thinh Nguyen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix errors related to multiple flows
parent
b60f1122
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
89 additions
and
45 deletions
+89
-45
openair2/LAYER2/MAC/config.c
openair2/LAYER2/MAC/config.c
+58
-39
openair2/LAYER2/MAC/defs.h
openair2/LAYER2/MAC/defs.h
+2
-0
openair2/LAYER2/MAC/ue_procedures.c
openair2/LAYER2/MAC/ue_procedures.c
+25
-2
openair2/LAYER2/PDCP_v10.1.0/pdcp_fifo.c
openair2/LAYER2/PDCP_v10.1.0/pdcp_fifo.c
+1
-1
openair2/RRC/LITE/rrc_UE.c
openair2/RRC/LITE/rrc_UE.c
+3
-3
No files found.
openair2/LAYER2/MAC/config.c
View file @
7106aa92
...
...
@@ -1391,17 +1391,18 @@ rrc_mac_config_req_ue(
LOG_I
(
MAC
,
"[UE %d] Configure group L2Id 0x%08x
\n
"
,
Mod_idP
,
*
groupL2Id
);
j
=
0
;
k
=
0
;
for
(
k
=
0
;
k
<
MAX_NUM_LCID_DATA
;
k
++
)
{
for
(
k
=
0
;
k
<
MAX_NUM_LCID_DATA
;
k
++
)
{
if
((
UE_mac_inst
[
Mod_idP
].
sl_info
[
k
].
LCID
==
0
)
&&
(
j
==
0
))
j
=
k
+
1
;
if
((
UE_mac_inst
[
Mod_idP
].
sl_info
[
k
].
LCID
==
logicalChannelIdentity
)
&&
(
UE_mac_inst
[
Mod_idP
].
sl_info
[
k
].
groupL2Id
==
*
groupL2Id
))
break
;
//(LCID, G) already exists!
}
if
((
k
==
MAX_NUM_LCID_DATA
)
&&
(
j
>
0
))
{
UE_mac_inst
[
Mod_idP
].
sl_info
[
j
-
1
].
LCID
=
logicalChannelIdentity
;
UE_mac_inst
[
Mod_idP
].
sl_info
[
j
-
1
].
groupL2Id
=
*
groupL2Id
;
UE_mac_inst
[
Mod_idP
].
sl_info
[
j
-
1
].
sourceL2Id
=
*
sourceL2Id
;
UE_mac_inst
[
Mod_idP
].
numCommFlows
++
;
}
for
(
k
=
0
;
k
<
MAX_NUM_LCID_DATA
;
k
++
)
{
for
(
k
=
0
;
k
<
MAX_NUM_LCID_DATA
;
k
++
)
{
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
);
}
}
...
...
@@ -1409,39 +1410,42 @@ rrc_mac_config_req_ue(
LOG_I
(
MAC
,
"[UE %d] Configure destination L2Id 0x%08x
\n
"
,
Mod_idP
,
*
destinationL2Id
);
j
=
0
;
k
=
0
;
for
(
k
=
0
;
k
<
MAX_NUM_LCID_DATA
;
k
++
)
{
for
(
k
=
0
;
k
<
MAX_NUM_LCID_DATA
;
k
++
)
{
if
((
UE_mac_inst
[
Mod_idP
].
sl_info
[
k
].
LCID
==
0
)
&&
(
j
==
0
))
j
=
k
+
1
;
if
((
UE_mac_inst
[
Mod_idP
].
sl_info
[
k
].
LCID
==
logicalChannelIdentity
)
&&
(
UE_mac_inst
[
Mod_idP
].
sl_info
[
k
].
destinationL2Id
==
*
destinationL2Id
))
break
;
//(LCID, D) already exists!
}
if
((
k
==
MAX_NUM_LCID_DATA
)
&&
(
j
>
0
))
{
UE_mac_inst
[
Mod_idP
].
sl_info
[
j
-
1
].
LCID
=
logicalChannelIdentity
;
UE_mac_inst
[
Mod_idP
].
sl_info
[
j
-
1
].
destinationL2Id
=
*
destinationL2Id
;
UE_mac_inst
[
Mod_idP
].
sl_info
[
j
-
1
].
sourceL2Id
=
*
sourceL2Id
;
UE_mac_inst
[
Mod_idP
].
numCommFlows
++
;
}
for
(
k
=
0
;
k
<
MAX_NUM_LCID_DATA
;
k
++
)
{
for
(
k
=
0
;
k
<
MAX_NUM_LCID_DATA
;
k
++
)
{
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
))
{
if
(
destinationL2Id
){
//
if (destinationL2Id){
LOG_I
(
MAC
,
"[UE %d] Configure destination L2Id 0x%08x for PC5S
\n
"
,
Mod_idP
,
*
destinationL2Id
);
j
=
0
;
k
=
0
;
for
(
k
=
MAX_NUM_LCID_DATA
;
k
<
MAX_NUM_LCID
;
k
++
)
{
if
((
UE_mac_inst
[
Mod_idP
].
sl_info
[
k
].
LCID
==
0
)
&&
(
j
==
0
))
j
=
k
+
1
;
if
((
UE_mac_inst
[
Mod_idP
].
sl_info
[
k
].
LCID
==
logicalChannelIdentity
)
&&
(
UE_mac_inst
[
Mod_idP
].
sl_info
[
k
].
destinationL2Id
==
*
destinationL2Id
))
break
;
//(LCID, D) already exists!
if
((
UE_mac_inst
[
Mod_idP
].
sl_info
[
k
].
LCID
==
logicalChannelIdentity
))
break
;
//&& (UE_mac_inst[Mod_idP].sl_info[k].destinationL2Id == *destinationL2Id)) break; //(LCID, D) already exists!
}
if
((
k
==
MAX_NUM_LCID
)
&&
(
j
>
0
))
{
UE_mac_inst
[
Mod_idP
].
sl_info
[
j
-
1
].
LCID
=
logicalChannelIdentity
;
UE_mac_inst
[
Mod_idP
].
sl_info
[
j
-
1
].
destinationL2Id
=
*
destinationL2Id
;
if
(
destinationL2Id
)
UE_mac_inst
[
Mod_idP
].
sl_info
[
j
-
1
].
destinationL2Id
=
*
destinationL2Id
;
UE_mac_inst
[
Mod_idP
].
sl_info
[
j
-
1
].
sourceL2Id
=
*
sourceL2Id
;
UE_mac_inst
[
Mod_idP
].
numCommFlows
++
;
}
for
(
k
=
MAX_NUM_LCID_DATA
;
k
<
MAX_NUM_LCID
;
k
++
)
{
for
(
k
=
MAX_NUM_LCID_DATA
;
k
<
MAX_NUM_LCID
;
k
++
)
{
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
);
}
}
//
}
}
...
...
@@ -1466,6 +1470,21 @@ rrc_mac_config_req_ue(
}
}
else
if
((
logicalChannelIdentity
>=
MAX_NUM_LCID_DATA
)
&&
(
logicalChannelIdentity
<
MAX_NUM_LCID
))
{
//Todo - remove RBID for PCS5
LOG_I
(
MAC
,
"[UE %d] Remove (logicalChannelIdentity %d)
\n
"
,
Mod_idP
,
logicalChannelIdentity
);
k
=
0
;
for
(
k
=
MAX_NUM_LCID_DATA
;
k
<
MAX_NUM_LCID
;
k
++
)
{
if
(
UE_mac_inst
[
Mod_idP
].
sl_info
[
k
].
LCID
==
logicalChannelIdentity
)
{
UE_mac_inst
[
Mod_idP
].
sl_info
[
k
].
LCID
=
0
;
UE_mac_inst
[
Mod_idP
].
sl_info
[
k
].
destinationL2Id
=
0
;
UE_mac_inst
[
Mod_idP
].
sl_info
[
k
].
groupL2Id
=
0
;
UE_mac_inst
[
Mod_idP
].
numCommFlows
--
;
break
;
}
}
for
(
k
=
MAX_NUM_LCID_DATA
;
k
<
MAX_NUM_LCID
;
k
++
)
{
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
);
}
}
break
;
...
...
openair2/LAYER2/MAC/defs.h
View file @
7106aa92
...
...
@@ -1297,6 +1297,8 @@ typedef struct {
}
UE_SCHEDULING_INFO
;
typedef
struct
{
//SL source L2Id
uint32_t
sourceL2Id
;
//SL groupL2Id
uint32_t
groupL2Id
;
//SL destinationL2Id
...
...
openair2/LAYER2/MAC/ue_procedures.c
View file @
7106aa92
...
...
@@ -755,6 +755,7 @@ void ue_send_sl_sdu(module_id_t module_idP,
int
rlc_sdu_len
;
char
*
rlc_sdu
;
int
lcid
;
uint32_t
destinationL2Id
=
0x00000000
;
uint32_t
sourceL2Id
=
0x00000000
;
...
...
@@ -766,18 +767,40 @@ void ue_send_sl_sdu(module_id_t module_idP,
// extract header
SLSCH_SUBHEADER_24_Bit_DST_LONG
*
longh
=
(
SLSCH_SUBHEADER_24_Bit_DST_LONG
*
)
sdu
;
AssertFatal
(
longh
->
E
==
0
,
"E is non-zero
\n
"
);
AssertFatal
(((
longh
->
LCID
==
3
)
|
(
longh
->
LCID
==
10
)
|
(
longh
->
LCID
==
4
)),
"LCID is %d (not 3, 4 or 10)
\n
"
,
longh
->
LCID
);
//
AssertFatal(((longh->LCID==3)|(longh->LCID==10)|(longh->LCID==4)),"LCID is %d (not 3, 4 or 10)\n",longh->LCID);
//filter incoming packet based on destination address
destinationL2Id
=
(
longh
->
DST07
<<
16
)
|
(
longh
->
DST815
<<
8
)
|
(
longh
->
DST1623
);
sourceL2Id
=
(
longh
->
SRC07
<<
16
)
|
(
longh
->
SRC815
<<
8
)
|
(
longh
->
SRC1623
);
LOG_D
(
MAC
,
"[DestinationL2Id: 0x%08x]
\n
"
,
destinationL2Id
);
//in case of 1-n communication, verify that UE belongs to that group
int
i
=
0
;
int
j
=
0
;
for
(
i
=
0
;
i
<
MAX_NUM_LCID
;
i
++
)
if
(
UE_mac_inst
[
module_idP
].
sl_info
[
i
].
groupL2Id
==
destinationL2Id
)
break
;
if
(
UE_mac_inst
[
module_idP
].
sl_info
[
i
].
groupL2Id
==
destinationL2Id
)
{
lcid
=
UE_mac_inst
[
module_idP
].
sl_info
[
i
].
LCID
;
break
;
}
for
(
j
=
0
;
j
<
MAX_NUM_LCID
;
j
++
){
if
((
longh
->
LCID
<
MAX_NUM_LCID_DATA
)
&&
(
j
<
MAX_NUM_LCID_DATA
)){
if
(
UE_mac_inst
[
module_idP
].
sl_info
[
j
].
destinationL2Id
==
sourceL2Id
)
{
lcid
=
UE_mac_inst
[
module_idP
].
sl_info
[
j
].
LCID
;
break
;
}
}
if
((
longh
->
LCID
>=
MAX_NUM_LCID_DATA
)
&&
(
j
>=
MAX_NUM_LCID_DATA
)){
if
(
UE_mac_inst
[
module_idP
].
sl_info
[
j
].
sourceL2Id
==
destinationL2Id
)
{
lcid
=
UE_mac_inst
[
module_idP
].
sl_info
[
j
].
LCID
;
break
;
}
}
// if (UE_mac_inst[module_idP].sl_info[i].groupL2Id == destinationL2Id) break;
}
/*
int j = 0;
for (j=0; j< MAX_NUM_LCID; j++)
if (UE_mac_inst[module_idP].sl_info[j].destinationL2Id == sourceL2Id) break;
*/
//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
))){
...
...
openair2/LAYER2/PDCP_v10.1.0/pdcp_fifo.c
View file @
7106aa92
...
...
@@ -209,7 +209,7 @@ int pdcp_fifo_flush_sdus(const protocol_ctxt_t* const ctxt_pP)
char
send_buf
[
BUFSIZE
];
int
rb_id
=
((
pdcp_data_ind_header_t
*
)(
sdu_p
->
data
))
->
rb_id
;
if
(
rb_id
==
10
)
{
//hardcoded for PC5-Signaling
if
(
rb_id
>=
MAX_NUM_LCID_DATA
)
{
//hardcoded for PC5-Signaling
//if ((rb_id == 28) | (rb_id == 29) | (rb_id == 30))
#ifdef PDCP_DEBUG
...
...
openair2/RRC/LITE/rrc_UE.c
View file @
7106aa92
...
...
@@ -5831,10 +5831,9 @@ void *rrc_control_socket_thread_fct(void *arg)
UE_rrc_inst
[
module_id
].
sourceL2Id
=
sourceL2Id
;
i
=
0
;
j
=
0
;
//get available rbid for this communication and store (LCID, D)
if
(
destinationL2Id
>
0
){
for
(
i
=
0
;
i
<
MAX_NUM_LCID_DATA
;
i
++
)
{
if
(
destinationL2Id
>
0
){
for
(
i
=
0
;
i
<
MAX_NUM_LCID_DATA
;
i
++
)
{
if
((
UE_rrc_inst
[
module_id
].
sl_info
[
i
].
LCID
==
0
)
&&
(
j
==
0
))
j
=
i
+
1
;
if
(
UE_rrc_inst
[
module_id
].
sl_info
[
i
].
destinationL2Id
==
destinationL2Id
)
{
direct_comm_rbid
=
UE_rrc_inst
[
module_id
].
sl_info
[
i
].
LCID
;
...
...
@@ -6123,6 +6122,7 @@ void *rrc_control_socket_thread_fct(void *arg)
UE_rrc_inst
[
module_id
].
sl_info
[
j
-
1
].
LCID
=
(
j
-
1
);
pc5s_rbid
=
UE_rrc_inst
[
module_id
].
sl_info
[
j
-
1
].
LCID
;
UE_rrc_inst
[
module_id
].
sl_info
[
j
-
1
].
destinationL2Id
=
destinationL2Id
;
UE_rrc_inst
[
module_id
].
sl_info
[
j
-
1
].
sourceL2Id
=
sourceL2Id
;
LOG_I
(
RRC
,
"[PC5EstablishReq] establish rbid %d for destinationL2Id Id: 0x%08x
\n
"
,
pc5s_rbid
,
UE_rrc_inst
[
module_id
].
sl_info
[
j
-
1
].
destinationL2Id
);
}
}
...
...
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