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
008ed09d
Commit
008ed09d
authored
May 30, 2018
by
Tien-Thinh Nguyen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
differentiate between UE-eNB and UE-UE traffic
parent
d2a8368c
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
95 additions
and
30 deletions
+95
-30
openair2/LAYER2/PDCP_v10.1.0/pdcp.c
openair2/LAYER2/PDCP_v10.1.0/pdcp.c
+14
-3
openair2/LAYER2/PDCP_v10.1.0/pdcp_fifo.c
openair2/LAYER2/PDCP_v10.1.0/pdcp_fifo.c
+81
-27
No files found.
openair2/LAYER2/PDCP_v10.1.0/pdcp.c
View file @
008ed09d
...
...
@@ -789,7 +789,18 @@ pdcp_data_ind(
* for the UE compiled in noS1 mode, we need 0
* TODO: be sure of this
*/
((
pdcp_data_ind_header_t
*
)
new_sdu_p
->
data
)
->
inst
=
1
;
#ifdef Rel14
//TTN (29/05/18) should check value of INST since 0 is for OIP0 (UE-UE), 1 is for OIP1 (UE-eNB) [even with S1 mode]
//if traffic from other UE
if
((((
pdcp_data_ind_header_t
*
)
new_sdu_p
->
data
)
->
sourceL2Id
>
0
)
&&
(((
pdcp_data_ind_header_t
*
)
new_sdu_p
->
data
)
->
destinationL2Id
>
0
)){
((
pdcp_data_ind_header_t
*
)
new_sdu_p
->
data
)
->
inst
=
0
;
}
else
#endif
{
//traffic from eNB
((
pdcp_data_ind_header_t
*
)
new_sdu_p
->
data
)
->
inst
=
1
;
}
#endif
}
else
{
((
pdcp_data_ind_header_t
*
)
new_sdu_p
->
data
)
->
rb_id
=
rb_id
+
(
ctxt_pP
->
module_id
*
maxDRB
);
...
...
@@ -797,8 +808,8 @@ pdcp_data_ind(
((
pdcp_data_ind_header_t
*
)
new_sdu_p
->
data
)
->
inst
=
ctxt_pP
->
module_id
;
#ifdef DEBUG_PDCP_FIFO_FLUSH_SDU
static
uint32_t
pdcp_inst
=
0
;
((
pdcp_data_ind_header_t
*
)
new_sdu_p
->
data
)
->
inst
=
pdcp_inst
++
;
//
static uint32_t pdcp_inst = 0;
// ((pdcp_data_ind_header_t*) new_sdu_p->data)->inst = pdcp_inst++; //TTN again should verify the value of INST (incoming packets)
LOG_D
(
PDCP
,
"inst=%d size=%d
\n
"
,
((
pdcp_data_ind_header_t
*
)
new_sdu_p
->
data
)
->
inst
,
((
pdcp_data_ind_header_t
*
)
new_sdu_p
->
data
)
->
data_size
);
#endif
...
...
openair2/LAYER2/PDCP_v10.1.0/pdcp_fifo.c
View file @
008ed09d
...
...
@@ -168,9 +168,20 @@ int pdcp_fifo_flush_sdus(const protocol_ctxt_t* const ctxt_pP)
((
pdcp_data_ind_header_t
*
)
sdu_p
->
data
)
->
inst
,
((
pdcp_data_ind_header_t
*
)
sdu_p
->
data
)
->
data_size
);
#else
((
pdcp_data_ind_header_t
*
)(
sdu_p
->
data
))
->
inst
=
0
;
//
((pdcp_data_ind_header_t *)(sdu_p->data))->inst = 0;
#endif
#ifdef Rel14
//TTN (29/05/18) OIP1 for UE-eNB, OIP0 for UE-UE (incoming packets)
//traffic from other UE
if
((
((
pdcp_data_ind_header_t
*
)(
sdu_p
->
data
))
->
sourceL2Id
>
0
)
&&
(
((
pdcp_data_ind_header_t
*
)(
sdu_p
->
data
))
->
destinationL2Id
>
0
)){
((
pdcp_data_ind_header_t
*
)(
sdu_p
->
data
))
->
inst
=
0
;
}
else
#endif
{
//traffic from eNB
((
pdcp_data_ind_header_t
*
)(
sdu_p
->
data
))
->
inst
=
1
;
}
#if defined(LINK_ENB_PDCP_TO_GTPV1U)
if
(
ctxt_pP
->
enb_flag
)
{
...
...
@@ -458,7 +469,11 @@ int pdcp_fifo_read_input_sdus (const protocol_ctxt_t* const ctxt_pP)
pdcp_data_req
(
&
ctxt
,
SRB_FLAG_NO
,
rab_id
,
RLC_MUI_UNDEFINED
,
RLC_SDU_CONFIRM_NO
,
len
,
nl_rx_buf
,
PDCP_TRANSMISSION_MODE_DATA
);
PDCP_TRANSMISSION_MODE_DATA
#ifdef Rel14
,
NULL
,
NULL
#endif
);
}
else
{
MSC_LOG_RX_DISCARDED_MESSAGE
(
(
ctxt_pP
->
enb_flag
==
ENB_FLAG_YES
)
?
MSC_PDCP_ENB
:
MSC_PDCP_UE
,
...
...
@@ -827,6 +842,7 @@ int pdcp_fifo_read_input_sdus (const protocol_ctxt_t* const ctxt_pP)
DEFAULT_RAB_ID
,
pc5s_header
->
data_size
);
pdcp_data_req
(
&
ctxt
,
SRB_FLAG_NO
,
...
...
@@ -848,7 +864,7 @@ int pdcp_fifo_read_input_sdus (const protocol_ctxt_t* const ctxt_pP)
}
}
#endif
#endif
/*end PC5S*/
while
((
len
>
0
)
&&
(
rlc_data_req_flag
!=
0
))
{
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME
(
VCD_SIGNAL_DUMPER_FUNCTIONS_PDCP_FIFO_READ
,
1
);
...
...
@@ -1077,20 +1093,39 @@ int pdcp_fifo_read_input_sdus (const protocol_ctxt_t* const ctxt_pP)
rab_id
,
pdcp_read_header_g
.
data_size
);
pdcp_data_req
(
&
ctxt
,
SRB_FLAG_NO
,
rab_id
,
RLC_MUI_UNDEFINED
,
RLC_SDU_CONFIRM_NO
,
pdcp_read_header_g
.
data_size
,
(
unsigned
char
*
)
NLMSG_DATA
(
nas_nlh_rx
),
PDCP_TRANSMISSION_MODE_DATA
//TTN - for traffic from OIP1 (to eNB), sourceL2/DestL2 should be set to NULL
if
(
pdcp_read_header_g
.
inst
==
0
){
//INST == 0 (OIP0)
pdcp_data_req
(
&
ctxt
,
SRB_FLAG_NO
,
rab_id
,
RLC_MUI_UNDEFINED
,
RLC_SDU_CONFIRM_NO
,
pdcp_read_header_g
.
data_size
,
(
unsigned
char
*
)
NLMSG_DATA
(
nas_nlh_rx
),
PDCP_TRANSMISSION_MODE_DATA
#ifdef Rel14
,
&
pdcp_read_header_g
.
sourceL2Id
,
&
pdcp_read_header_g
.
destinationL2Id
,
&
pdcp_read_header_g
.
sourceL2Id
,
&
pdcp_read_header_g
.
destinationL2Id
#endif
);
);
}
else
{
//INST == 1 (OIP1)
pdcp_data_req
(
&
ctxt
,
SRB_FLAG_NO
,
rab_id
,
RLC_MUI_UNDEFINED
,
RLC_SDU_CONFIRM_NO
,
pdcp_read_header_g
.
data_size
,
(
unsigned
char
*
)
NLMSG_DATA
(
nas_nlh_rx
),
PDCP_TRANSMISSION_MODE_DATA
#ifdef Rel14
,
NULL
,
NULL
#endif
);
}
}
else
{
MSC_LOG_RX_DISCARDED_MESSAGE
(
(
ctxt_pP
->
enb_flag
==
ENB_FLAG_YES
)
?
MSC_PDCP_ENB
:
MSC_PDCP_UE
,
...
...
@@ -1135,20 +1170,39 @@ int pdcp_fifo_read_input_sdus (const protocol_ctxt_t* const ctxt_pP)
DEFAULT_RAB_ID
,
pdcp_read_header_g
.
data_size
);
pdcp_data_req
(
&
ctxt
,
SRB_FLAG_NO
,
DEFAULT_RAB_ID
,
RLC_MUI_UNDEFINED
,
RLC_SDU_CONFIRM_NO
,
pdcp_read_header_g
.
data_size
,
(
unsigned
char
*
)
NLMSG_DATA
(
nas_nlh_rx
),
PDCP_TRANSMISSION_MODE_DATA
//TTN - for traffic from OIP1 (to eNB), sourceL2/DestL2 should be set to NULL
if
(
pdcp_read_header_g
.
inst
==
0
){
//INST == 0 (OIP0)
pdcp_data_req
(
&
ctxt
,
SRB_FLAG_NO
,
DEFAULT_RAB_ID
,
RLC_MUI_UNDEFINED
,
RLC_SDU_CONFIRM_NO
,
pdcp_read_header_g
.
data_size
,
(
unsigned
char
*
)
NLMSG_DATA
(
nas_nlh_rx
),
PDCP_TRANSMISSION_MODE_DATA
#ifdef Rel14
,
&
pdcp_read_header_g
.
sourceL2Id
,
&
pdcp_read_header_g
.
destinationL2Id
,
&
pdcp_read_header_g
.
sourceL2Id
,
&
pdcp_read_header_g
.
destinationL2Id
#endif
);
);
}
else
{
//INST == 1 (OIP1)
pdcp_data_req
(
&
ctxt
,
SRB_FLAG_NO
,
DEFAULT_RAB_ID
,
RLC_MUI_UNDEFINED
,
RLC_SDU_CONFIRM_NO
,
pdcp_read_header_g
.
data_size
,
(
unsigned
char
*
)
NLMSG_DATA
(
nas_nlh_rx
),
PDCP_TRANSMISSION_MODE_DATA
#ifdef Rel14
,
NULL
,
NULL
#endif
);
}
}
}
...
...
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