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
c1da605f
Commit
c1da605f
authored
Mar 14, 2017
by
fnabet
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
RLC AM code cleaning
parent
cf9727c4
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
21 deletions
+12
-21
openair2/LAYER2/RLC/AM_v9.3.0/rlc_am_retransmit.c
openair2/LAYER2/RLC/AM_v9.3.0/rlc_am_retransmit.c
+0
-7
openair2/LAYER2/RLC/AM_v9.3.0/rlc_am_rx_list.c
openair2/LAYER2/RLC/AM_v9.3.0/rlc_am_rx_list.c
+12
-14
No files found.
openair2/LAYER2/RLC/AM_v9.3.0/rlc_am_retransmit.c
View file @
c1da605f
...
...
@@ -314,13 +314,6 @@ mem_block_t* rlc_am_retransmit_get_am_segment(
retx_so_start
=
pdu_mngt
->
hole_so_start
[
pdu_mngt
->
retx_hole_index
];
retx_so_stop
=
pdu_mngt
->
hole_so_stop
[
pdu_mngt
->
retx_hole_index
];
/*
if (!(retx_so_start <= retx_so_stop) && (retx_so_stop - retx_so_start + 1 <= pdu_mngt->payload_size))
{
AssertFatal(0);
}
*/
AssertFatal
((
retx_so_start
<=
retx_so_stop
)
&&
(
retx_so_stop
-
retx_so_start
+
1
<=
pdu_mngt
->
payload_size
),
"RLC AM Tx PDU Segment Data SO Error: retx_so_start=%d retx_so_stop=%d OriginalPDUDataLength=%d sn=%d LcId=%d!
\n
"
,
retx_so_start
,
retx_so_stop
,
pdu_mngt
->
payload_size
,
sn
,
rlc_pP
->
channel_id
);
...
...
openair2/LAYER2/RLC/AM_v9.3.0/rlc_am_rx_list.c
View file @
c1da605f
...
...
@@ -284,10 +284,9 @@ rlc_am_rx_pdu_status_t rlc_am_rx_list_handle_pdu_segment(
rlc_am_pdu_info_t
*
pdu_rx_info_p
=
&
((
rlc_am_rx_pdu_management_t
*
)(
tb_pP
->
data
))
->
pdu_info
;
rlc_am_pdu_info_t
*
pdu_info_cursor_p
=
NULL
;
rlc_am_pdu_info_t
*
pdu_info_previous_cursor_p
=
NULL
;
mem_block_t
*
cursor_p
=
NULL
;
mem_block_t
*
cursor_p
=
rlc_pP
->
receiver_buffer
.
head
;
mem_block_t
*
previous_cursor_p
=
NULL
;
mem_block_t
*
next_cursor_p
=
NULL
;
cursor_p
=
rlc_pP
->
receiver_buffer
.
head
;
boolean_t
prev_segment_found
=
FALSE
;
boolean_t
next_segment_found
=
FALSE
;
uint16_t
so_start
=
0
;
...
...
@@ -298,8 +297,9 @@ rlc_am_rx_pdu_status_t rlc_am_rx_list_handle_pdu_segment(
/*****************************************************/
// 1) Find previous cursor to the PDU to insert
/*****************************************************/
pdu_info_cursor_p
=
&
((
rlc_am_rx_pdu_management_t
*
)(
cursor_p
->
data
))
->
pdu_info
;
while
(
cursor_p
!=
NULL
)
{
AssertFatal
(
cursor_p
!=
NULL
,
"AM Rx PDU Error, received buffer empty LcID=%d
\n
"
,
rlc_pP
->
channel_id
);
do
{
pdu_info_cursor_p
=
&
((
rlc_am_rx_pdu_management_t
*
)(
cursor_p
->
data
))
->
pdu_info
;
// Stop if Cursor SN >= Received SN
...
...
@@ -310,7 +310,7 @@ rlc_am_rx_pdu_status_t rlc_am_rx_list_handle_pdu_segment(
previous_cursor_p
=
cursor_p
;
pdu_info_previous_cursor_p
=
pdu_info_cursor_p
;
cursor_p
=
cursor_p
->
next
;
}
}
while
(
cursor_p
!=
NULL
);
/*****************************************************/
// 2) Store the received Segment
...
...
@@ -536,9 +536,8 @@ rlc_am_rx_pdu_status_t rlc_am_rx_list_handle_pdu(
{
rlc_am_pdu_info_t
*
pdu_rx_info_p
=
&
((
rlc_am_rx_pdu_management_t
*
)(
tb_pP
->
data
))
->
pdu_info
;
rlc_am_pdu_info_t
*
pdu_info_cursor_p
=
NULL
;
mem_block_t
*
cursor_p
=
NULL
;
mem_block_t
*
cursor_p
=
rlc_pP
->
receiver_buffer
.
head
;
mem_block_t
*
previous_cursor_p
=
NULL
;
cursor_p
=
rlc_pP
->
receiver_buffer
.
head
;
rlc_am_rx_pdu_status_t
pdu_status
=
RLC_AM_DATA_PDU_STATUS_OK
;
// it is assumed this pdu is in rx window
...
...
@@ -546,9 +545,9 @@ rlc_am_rx_pdu_status_t rlc_am_rx_list_handle_pdu(
/*****************************************************/
// 1) Find previous cursor to the PDU to insert
/*****************************************************/
previous_cursor_p
=
cursor_p
;
pdu_info_cursor_p
=
&
((
rlc_am_rx_pdu_management_t
*
)(
cursor_p
->
data
))
->
pdu_info
;
while
(
cursor_p
!=
NULL
)
{
AssertFatal
(
cursor_p
!=
NULL
,
"AM Rx PDU Error, received buffer empty LcID=%d
\n
"
,
rlc_pP
->
channel_id
)
;
do
{
pdu_info_cursor_p
=
&
((
rlc_am_rx_pdu_management_t
*
)(
cursor_p
->
data
))
->
pdu_info
;
// Stop if Cursor SN >= Received SN
...
...
@@ -558,16 +557,15 @@ rlc_am_rx_pdu_status_t rlc_am_rx_list_handle_pdu(
previous_cursor_p
=
cursor_p
;
cursor_p
=
cursor_p
->
next
;
}
}
while
(
cursor_p
!=
NULL
);
/*****************************************************/
// 2) Insert PDU by removing byte duplicate if required
/*****************************************************/
// First case : cursor_p is NULL, it means the SN is received for the first time
// First case : cursor_p is NULL
or SN are different
, it means the SN is received for the first time
// Insert PDU after previous_cursor_p
if
((
cursor_p
==
NULL
)
||
(
pdu_info_cursor_p
->
sn
!=
pdu_rx_info_p
->
sn
))
{
rlc_usn_t
sn_prev
=
((
rlc_am_rx_pdu_management_t
*
)(
previous_cursor_p
->
data
))
->
pdu_info
.
sn
;
if
(
RLC_AM_DIFF_SN
(
sn_prev
,
rlc_pP
->
vr_r
)
<
RLC_AM_DIFF_SN
(
pdu_rx_info_p
->
sn
,
rlc_pP
->
vr_r
))
{
if
(
previous_cursor_p
!=
NULL
)
{
LOG_D
(
RLC
,
PROTOCOL_RLC_AM_CTXT_FMT
"[PROCESS RX PDU SN=%d] PDU INSERTED AFTER PDU SN=%d
\n
"
,
PROTOCOL_RLC_AM_CTXT_ARGS
(
ctxt_pP
,
rlc_pP
),
pdu_rx_info_p
->
sn
,
((
rlc_am_rx_pdu_management_t
*
)(
previous_cursor_p
->
data
))
->
pdu_info
.
sn
);
...
...
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