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
26d99fae
Commit
26d99fae
authored
8 years ago
by
fnabet
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add changes for Tx Status PDU report
parent
b77694e8
Changes
5
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
417 additions
and
28 deletions
+417
-28
openair2/LAYER2/RLC/AM_v9.3.0/rlc_am.c
openair2/LAYER2/RLC/AM_v9.3.0/rlc_am.c
+12
-10
openair2/LAYER2/RLC/AM_v9.3.0/rlc_am_constants.h
openair2/LAYER2/RLC/AM_v9.3.0/rlc_am_constants.h
+17
-0
openair2/LAYER2/RLC/AM_v9.3.0/rlc_am_status_report.c
openair2/LAYER2/RLC/AM_v9.3.0/rlc_am_status_report.c
+350
-0
openair2/LAYER2/RLC/AM_v9.3.0/rlc_am_timer_reordering.c
openair2/LAYER2/RLC/AM_v9.3.0/rlc_am_timer_reordering.c
+36
-18
openair2/LAYER2/RLC/AM_v9.3.0/rlc_am_timer_status_prohibit.c
openair2/LAYER2/RLC/AM_v9.3.0/rlc_am_timer_status_prohibit.c
+2
-0
No files found.
openair2/LAYER2/RLC/AM_v9.3.0/rlc_am.c
View file @
26d99fae
...
@@ -323,7 +323,8 @@ rlc_am_get_pdus (
...
@@ -323,7 +323,8 @@ rlc_am_get_pdus (
case
RLC_DATA_TRANSFER_READY_STATE
:
case
RLC_DATA_TRANSFER_READY_STATE
:
// TRY TO SEND CONTROL PDU FIRST
// TRY TO SEND CONTROL PDU FIRST
if
((
rlc_pP
->
nb_bytes_requested_by_mac
>
2
)
&&
(
rlc_pP
->
status_requested
))
{
if
((
rlc_pP
->
nb_bytes_requested_by_mac
>=
2
)
&&
((
rlc_pP
->
status_requested
)
&&
!
(
rlc_pP
->
status_requested
&
RLC_AM_STATUS_NO_TX_MASK
)))
{
// When STATUS reporting has been triggered, the receiving side of an AM RLC entity shall:
// When STATUS reporting has been triggered, the receiving side of an AM RLC entity shall:
// - if t-StatusProhibit is not running:
// - if t-StatusProhibit is not running:
// - at the first transmission opportunity indicated by lower layer, construct a STATUS PDU and deliver it to lower layer;
// - at the first transmission opportunity indicated by lower layer, construct a STATUS PDU and deliver it to lower layer;
...
@@ -334,22 +335,23 @@ rlc_am_get_pdus (
...
@@ -334,22 +335,23 @@ rlc_am_get_pdus (
//
//
// When a STATUS PDU has been delivered to lower layer, the receiving side of an AM RLC entity shall:
// When a STATUS PDU has been delivered to lower layer, the receiving side of an AM RLC entity shall:
// - start t-StatusProhibit.
// - start t-StatusProhibit.
if
(
rlc_pP
->
t_status_prohibit
.
running
==
0
)
{
rlc_am_send_status_pdu
(
ctxt_pP
,
rlc_pP
);
rlc_am_send_status_pdu
(
ctxt_pP
,
rlc_pP
);
mem_block_t
*
pdu
=
list_remove_head
(
&
rlc_pP
->
control_pdu_list
);
mem_block_t
*
pdu
=
list_remove_head
(
&
rlc_pP
->
control_pdu_list
);
if
(
pdu
)
{
if
(
pdu
)
{
list_add_tail_eurecom
(
pdu
,
&
rlc_pP
->
pdus_to_mac_layer
);
list_add_tail_eurecom
(
pdu
,
&
rlc_pP
->
pdus_to_mac_layer
);
rlc_pP
->
status_requested
=
0
;
RLC_AM_CLEAR_ALL_STATUS
(
rlc_pP
->
status_requested
)
;
rlc_pP
->
status_buffer_occupancy
=
0
;
rlc_pP
->
status_buffer_occupancy
=
0
;
rlc_am_start_timer_status_prohibit
(
ctxt_pP
,
rlc_pP
);
rlc_am_start_timer_status_prohibit
(
ctxt_pP
,
rlc_pP
);
RLC_AM_SET_STATUS
(
rlc_pP
->
status_requested
,
RLC_AM_STATUS_PROHIBIT
);
return
;
return
;
}
}
}
else
{
LOG_D
(
RLC
,
PROTOCOL_RLC_AM_CTXT_FMT
" DELAYED SENT STATUS PDU BECAUSE T-STATUS-PROHIBIT RUNNING (TIME-OUT %u)
\n
"
,
PROTOCOL_RLC_AM_CTXT_ARGS
(
ctxt_pP
,
rlc_pP
),
rlc_pP
->
t_status_prohibit
.
ms_time_out
);
}
}
else
{
LOG_D
(
RLC
,
PROTOCOL_RLC_AM_CTXT_FMT
" DELAYED SENT STATUS PDU (Available MAC Data %u)(T-PROHIBIT %u) (DELAY FLAG %u)
\n
"
,
PROTOCOL_RLC_AM_CTXT_ARGS
(
ctxt_pP
,
rlc_pP
),
rlc_pP
->
nb_bytes_requested_by_mac
,
rlc_pP
->
t_status_prohibit
.
ms_time_out
,(
rlc_pP
->
status_requested
&
RLC_AM_STATUS_TRIGGERED_DELAYED
));
}
}
/*while ((rlc_pP->nb_bytes_requested_by_mac > 0) && (stay_on_this_list)) {
/*while ((rlc_pP->nb_bytes_requested_by_mac > 0) && (stay_on_this_list)) {
...
...
This diff is collapsed.
Click to expand it.
openair2/LAYER2/RLC/AM_v9.3.0/rlc_am_constants.h
View file @
26d99fae
...
@@ -72,6 +72,22 @@
...
@@ -72,6 +72,22 @@
# define RLC_AM_MAX_HOLES_REPORT_PER_PDU 16
# define RLC_AM_MAX_HOLES_REPORT_PER_PDU 16
/** @} */
/** @} */
/* Common to Data and Status PDU */
#define RLC_AM_SN_BITS 10
#define RLC_AM_PDU_D_C_BITS 1
#define RLC_AM_PDU_E_BITS 1
/* STATUS PDU */
#define RLC_AM_STATUS_PDU_CPT_STATUS 0
#define RLC_AM_STATUS_PDU_CPT_OFFSET 4
#define RLC_AM_STATUS_PDU_CPT_LENGTH 3
#define RLC_AM_STATUS_PDU_ACK_SN_OFFSET 2
#define RLC_AM_STATUS_PDU_SO_LENGTH 15
#define RLC_AM_STATUS_PDU_SO_END_ALL_BYTES 0x7FFF
/* MACRO DEFINITIONS */
/* MACRO DEFINITIONS */
#define RLC_AM_NEXT_SN(sn) (((sn)+1) & ((RLC_AM_SN_MODULO)-1))
#define RLC_AM_NEXT_SN(sn) (((sn)+1) & ((RLC_AM_SN_MODULO)-1))
...
@@ -93,6 +109,7 @@
...
@@ -93,6 +109,7 @@
#define RLC_AM_STATUS_TRIGGERED_T_REORDERING 0x02
/* Status Report is triggered by Timer Reordering Expiry */
#define RLC_AM_STATUS_TRIGGERED_T_REORDERING 0x02
/* Status Report is triggered by Timer Reordering Expiry */
#define RLC_AM_STATUS_TRIGGERED_DELAYED 0x10
/* Status is delayed until SN(receivedPoll) < VR(MS) */
#define RLC_AM_STATUS_TRIGGERED_DELAYED 0x10
/* Status is delayed until SN(receivedPoll) < VR(MS) */
#define RLC_AM_STATUS_PROHIBIT 0x20
/* TimerStatusProhibit still running */
#define RLC_AM_STATUS_PROHIBIT 0x20
/* TimerStatusProhibit still running */
#define RLC_AM_STATUS_NO_TX_MASK (RLC_AM_STATUS_PROHIBIT | RLC_AM_STATUS_TRIGGERED_DELAYED)
/* Status triggered (bit 5-7) will be concatenated with Poll triggered (bit 0-4) for RLCdec. RLC_AM_STATUS_TRIGGERED_DELAYED is not recorded. */
/* Status triggered (bit 5-7) will be concatenated with Poll triggered (bit 0-4) for RLCdec. RLC_AM_STATUS_TRIGGERED_DELAYED is not recorded. */
#define RLC_AM_SET_STATUS(x,event) (RLC_SET_EVENT(x,event))
#define RLC_AM_SET_STATUS(x,event) (RLC_SET_EVENT(x,event))
...
...
This diff is collapsed.
Click to expand it.
openair2/LAYER2/RLC/AM_v9.3.0/rlc_am_status_report.c
View file @
26d99fae
This diff is collapsed.
Click to expand it.
openair2/LAYER2/RLC/AM_v9.3.0/rlc_am_timer_reordering.c
View file @
26d99fae
...
@@ -70,6 +70,8 @@ rlc_am_check_timer_reordering(
...
@@ -70,6 +70,8 @@ rlc_am_check_timer_reordering(
PROTOCOL_RLC_AM_MSC_ARGS
(
ctxt_pP
,
rlc_pP
));
PROTOCOL_RLC_AM_MSC_ARGS
(
ctxt_pP
,
rlc_pP
));
#endif
#endif
AssertFatal
(
rlc_pP
->
vr_x
!=
RLC_SN_UNDEFINED
,
"RLC AM TReordering Expiry vrX not defined LcId=%d
\n
"
,
rlc_pP
->
channel_id
);
rlc_pP
->
t_reordering
.
running
=
0
;
rlc_pP
->
t_reordering
.
running
=
0
;
rlc_pP
->
t_reordering
.
timed_out
=
1
;
rlc_pP
->
t_reordering
.
timed_out
=
1
;
rlc_pP
->
stat_timer_reordering_timed_out
+=
1
;
rlc_pP
->
stat_timer_reordering_timed_out
+=
1
;
...
@@ -77,38 +79,54 @@ rlc_am_check_timer_reordering(
...
@@ -77,38 +79,54 @@ rlc_am_check_timer_reordering(
rlc_am_pdu_info_t
*
pdu_info
;
rlc_am_pdu_info_t
*
pdu_info
;
mem_block_t
*
cursor
;
mem_block_t
*
cursor
;
cursor
=
rlc_pP
->
receiver_buffer
.
head
;
cursor
=
rlc_pP
->
receiver_buffer
.
head
;
rlc_usn_t
vr_ms_new
=
rlc_pP
->
vr_x
;
AssertFatal
(
cursor
!=
NULL
,
"RLC AM TReordering Expiry Rx PDU list empty LcId=%d
\n
"
,
rlc_pP
->
channel_id
);
if
(
cursor
)
{
while
((
cursor
!=
NULL
)
&&
(
vr_ms_new
!=
rlc_pP
->
vr_h
))
{
do
{
pdu_info
=
&
((
rlc_am_rx_pdu_management_t
*
)(
cursor
->
data
))
->
pdu_info
;
pdu_info
=
&
((
rlc_am_rx_pdu_management_t
*
)(
cursor
->
data
))
->
pdu_info
;
// NOT VERY SURE ABOUT THAT, THINK ABOUT IT
rlc_pP
->
vr_ms
=
(
pdu_info
->
sn
+
1
)
&
RLC_AM_SN_MASK
;
if
(
rlc_am_sn_gte_vr_x
(
ctxt_pP
,
rlc_pP
,
pdu_info
->
sn
))
{
// First find an element with SN greater or equal than vrX
if
(
RLC_AM_DIFF_SN
(
pdu_info
->
sn
,
rlc_pP
->
vr_r
)
>=
RLC_AM_DIFF_SN
(
rlc_pP
->
vr_x
,
rlc_pP
->
vr_r
))
{
if
(((
rlc_am_rx_pdu_management_t
*
)(
cursor
->
data
))
->
all_segments_received
==
0
)
{
if
(((
rlc_am_rx_pdu_management_t
*
)(
cursor
->
data
))
->
all_segments_received
==
0
)
{
rlc_pP
->
vr_ms
=
pdu_info
->
sn
;
// Stop at first found discontinuity
// vr_ms_new holds SN following the latest in sequence fully received PDU >= old vrX
break
;
break
;
}
}
else
{
vr_ms_new
=
RLC_AM_NEXT_SN
(
vr_ms_new
);
}
}
}
cursor
=
cursor
->
next
;
cursor
=
cursor
->
next
;
}
while
(
cursor
!=
NULL
);
}
/* Update vr_ms */
rlc_pP
->
vr_ms
=
vr_ms_new
;
LOG_D
(
RLC
,
PROTOCOL_RLC_AM_CTXT_FMT
"[T-REORDERING] TIME-OUT UPDATED VR(MS) %04d
\n
"
,
LOG_D
(
RLC
,
PROTOCOL_RLC_AM_CTXT_FMT
"[T-REORDERING] TIME-OUT UPDATED VR(MS) %04d
\n
"
,
PROTOCOL_RLC_AM_CTXT_ARGS
(
ctxt_pP
,
rlc_pP
),
PROTOCOL_RLC_AM_CTXT_ARGS
(
ctxt_pP
,
rlc_pP
),
rlc_pP
->
vr_ms
);
rlc_pP
->
vr_ms
);
}
if
(
rlc_am_sn_gt_vr_ms
(
ctxt_pP
,
rlc_pP
,
rlc_pP
->
vr_h
))
{
/* if new vrMS is lower than vrH, update vrX and restart timerReordering */
if
(
rlc_pP
->
vr_ms
!=
rlc_pP
->
vr_h
)
{
rlc_pP
->
vr_x
=
rlc_pP
->
vr_h
;
rlc_pP
->
vr_x
=
rlc_pP
->
vr_h
;
rlc_pP
->
t_reordering
.
ms_time_out
=
PROTOCOL_CTXT_TIME_MILLI_SECONDS
(
ctxt_pP
)
+
rlc_pP
->
t_reordering
.
ms_duration
;
rlc_pP
->
t_reordering
.
ms_time_out
=
PROTOCOL_CTXT_TIME_MILLI_SECONDS
(
ctxt_pP
)
+
rlc_pP
->
t_reordering
.
ms_duration
;
LOG_D
(
RLC
,
PROTOCOL_RLC_AM_CTXT_FMT
"[T-REORDERING] TIME-OUT, RESTARTED T-REORDERING, UPDATED VR(X) to VR(R) %04d
\n
"
,
LOG_D
(
RLC
,
PROTOCOL_RLC_AM_CTXT_FMT
"[T-REORDERING] TIME-OUT, RESTARTED T-REORDERING, UPDATED VR(X) to VR(R) %04d
\n
"
,
PROTOCOL_RLC_AM_CTXT_ARGS
(
ctxt_pP
,
rlc_pP
),
PROTOCOL_RLC_AM_CTXT_ARGS
(
ctxt_pP
,
rlc_pP
),
rlc_pP
->
vr_x
);
rlc_pP
->
vr_x
);
}
}
rlc_pP
->
status_requested
=
1
;
/* Trigger a STATUS report */
RLC_AM_SET_STATUS
(
rlc_pP
->
status_requested
,
RLC_AM_STATUS_TRIGGERED_T_REORDERING
);
// Clear Delay flag if it was setup as it is useless due to Status PDU to be sent for TReordering expiry
RLC_AM_CLEAR_STATUS
(
rlc_pP
->
status_requested
,
RLC_AM_STATUS_TRIGGERED_DELAYED
);
rlc_pP
->
sn_status_triggered_delayed
=
RLC_SN_UNDEFINED
;
}
}
}
}
}
}
...
...
This diff is collapsed.
Click to expand it.
openair2/LAYER2/RLC/AM_v9.3.0/rlc_am_timer_status_prohibit.c
View file @
26d99fae
...
@@ -70,6 +70,8 @@ rlc_am_check_timer_status_prohibit(
...
@@ -70,6 +70,8 @@ rlc_am_check_timer_status_prohibit(
PROTOCOL_RLC_AM_CTXT_ARGS
(
ctxt_pP
,
rlc_pP
));
PROTOCOL_RLC_AM_CTXT_ARGS
(
ctxt_pP
,
rlc_pP
));
//#warning TO DO rlc_am_check_timer_status_prohibit
//#warning TO DO rlc_am_check_timer_status_prohibit
rlc_am_stop_and_reset_timer_status_prohibit
(
ctxt_pP
,
rlc_pP
);
rlc_am_stop_and_reset_timer_status_prohibit
(
ctxt_pP
,
rlc_pP
);
/* Clear StatusProhibit flag */
RLC_AM_CLEAR_STATUS
(
rlc_pP
->
status_requested
,
RLC_AM_STATUS_PROHIBIT
);
//rlc_pP->t_status_prohibit.frame_time_out = ctxt_pP->frame + rlc_pP->t_status_prohibit.time_out;
//rlc_pP->t_status_prohibit.frame_time_out = ctxt_pP->frame + rlc_pP->t_status_prohibit.time_out;
}
}
}
}
...
...
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