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
alex037yang
OpenXG-RAN
Commits
dac2388e
Commit
dac2388e
authored
Apr 04, 2021
by
hardy
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/fix-nr-rlc-range-nack' into integration_2021_wk14_a
parents
02504ef7
9d1c24d4
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
49 additions
and
17 deletions
+49
-17
openair2/LAYER2/nr_rlc/nr_rlc_entity_am.c
openair2/LAYER2/nr_rlc/nr_rlc_entity_am.c
+29
-16
openair2/LAYER2/nr_rlc/tests/run_tests.sh
openair2/LAYER2/nr_rlc/tests/run_tests.sh
+1
-1
openair2/LAYER2/nr_rlc/tests/test15.h
openair2/LAYER2/nr_rlc/tests/test15.h
+19
-0
openair2/LAYER2/nr_rlc/tests/test15.txt.gz
openair2/LAYER2/nr_rlc/tests/test15.txt.gz
+0
-0
No files found.
openair2/LAYER2/nr_rlc/nr_rlc_entity_am.c
View file @
dac2388e
...
...
@@ -650,7 +650,7 @@ control:
control_decoder
=
decoder
;
control_e1
=
e1
;
while
(
control_e1
)
{
n
r_rlc_pdu_decoder_get_bits
(
&
control_decoder
,
entity
->
sn_field_length
);
R
(
control_decoder
);
/* NACK_SN */
n
ack_sn
=
nr_rlc_pdu_decoder_get_bits
(
&
control_decoder
,
entity
->
sn_field_length
);
R
(
control_decoder
);
control_e1
=
nr_rlc_pdu_decoder_get_bits
(
&
control_decoder
,
1
);
R
(
control_decoder
);
control_e2
=
nr_rlc_pdu_decoder_get_bits
(
&
control_decoder
,
1
);
R
(
control_decoder
);
control_e3
=
nr_rlc_pdu_decoder_get_bits
(
&
control_decoder
,
1
);
R
(
control_decoder
);
...
...
@@ -660,17 +660,36 @@ control:
}
else
{
nr_rlc_pdu_decoder_get_bits
(
&
control_decoder
,
1
);
R
(
control_decoder
);
}
/* check range and so_start/so_end consistency */
if
(
control_e2
)
{
nr_rlc_pdu_decoder_get_bits
(
&
control_decoder
,
16
);
R
(
control_decoder
);
/* SOstart */
nr_rlc_pdu_decoder_get_bits
(
&
control_decoder
,
16
);
R
(
control_decoder
);
/* SOend */
so_start
=
nr_rlc_pdu_decoder_get_bits
(
&
control_decoder
,
16
);
R
(
control_decoder
);
so_end
=
nr_rlc_pdu_decoder_get_bits
(
&
control_decoder
,
16
);
R
(
control_decoder
);
}
else
{
so_start
=
0
;
so_end
=
0xffff
;
}
if
(
control_e3
)
{
nr_rlc_pdu_decoder_get_bits
(
&
control_decoder
,
8
);
R
(
control_decoder
);
/* NACK range */
range
=
nr_rlc_pdu_decoder_get_bits
(
&
control_decoder
,
8
);
R
(
control_decoder
);
}
else
{
range
=
1
;
}
if
(
range
<
1
)
{
LOG_E
(
RLC
,
"%s:%d:%s: error, bad 'range' in RLC NACK (sn %d)
\n
"
,
__FILE__
,
__LINE__
,
__FUNCTION__
,
nack_sn
);
goto
err
;
}
/* so_start can be > so_end if more than one range; they don't refer
* to the same PDU then
*/
if
(
range
==
1
&&
so_end
<
so_start
)
{
LOG_E
(
RLC
,
"%s:%d:%s: error, bad so start/end (sn %d)
\n
"
,
__FILE__
,
__LINE__
,
__FUNCTION__
,
nack_sn
);
goto
err
;
}
}
/* 38.322 5.3.3.3 says to stop t_poll_retransmit if a ACK or NACK is
* received for the SN 'poll_sn'
* received for the SN 'poll_sn'
- check ACK case (NACK done below)
*/
if
(
sn_compare_tx
(
entity
,
entity
->
poll_sn
,
ack_sn
)
<
0
)
entity
->
t_poll_retransmit_start
=
0
;
...
...
@@ -697,28 +716,22 @@ control:
if
(
e2
)
{
so_start
=
nr_rlc_pdu_decoder_get_bits
(
&
decoder
,
16
);
R
(
decoder
);
so_end
=
nr_rlc_pdu_decoder_get_bits
(
&
decoder
,
16
);
R
(
decoder
);
if
(
so_end
<
so_start
)
{
LOG_W
(
RLC
,
"%s:%d:%s: warning, bad so start/end, NACK the whole PDU (sn %d)
\n
"
,
__FILE__
,
__LINE__
,
__FUNCTION__
,
nack_sn
);
so_start
=
0
;
so_end
=
-
1
;
}
/* special value 0xffff indicates 'all bytes to the end' */
if
(
so_end
==
0xffff
)
so_end
=
-
1
;
}
else
{
so_start
=
0
;
so_end
=
-
1
;
so_end
=
0xffff
;
}
if
(
e3
)
{
range
=
nr_rlc_pdu_decoder_get_bits
(
&
decoder
,
8
);
R
(
decoder
);
}
else
{
range
=
1
;
}
/* special value 0xffff indicates 'all bytes to the end' */
if
(
so_end
==
0xffff
)
so_end
=
-
1
;
process_received_nack
(
entity
,
nack_sn
,
so_start
,
so_end
,
range
,
sn_set
);
/* 38.322 5.3.3.3 says to stop t_poll_retransmit if a ACK or NACK is
* received for the SN 'poll_sn'
* received for the SN 'poll_sn'
- check NACK case (ACK done above)
*/
if
(
sn_compare_tx
(
entity
,
nack_sn
,
entity
->
poll_sn
)
<=
0
&&
sn_compare_tx
(
entity
,
entity
->
poll_sn
,
(
nack_sn
+
range
)
%
entity
->
sn_modulus
)
<
0
)
...
...
openair2/LAYER2/nr_rlc/tests/run_tests.sh
View file @
dac2388e
#!/bin/sh
test_count
=
1
4
test_count
=
1
5
for
i
in
`
seq
$test_count
`
do
...
...
openair2/LAYER2/nr_rlc/tests/test15.h
0 → 100644
View file @
dac2388e
/*
* am test (SN field size 18):
* test "range" in NACK, generate a case where so_start > so_end
* (so so_start and so_end are not from the same PDU)
*/
TIME
,
1
,
GNB_AM
,
100000
,
100000
,
45
,
35
,
0
,
-
1
,
-
1
,
8
,
18
,
UE_AM
,
100000
,
100000
,
45
,
35
,
0
,
-
1
,
-
1
,
8
,
18
,
GNB_PDU_SIZE
,
40
,
UE_PDU_SIZE
,
80
,
GNB_SDU
,
0
,
50
,
GNB_SDU
,
1
,
50
,
GNB_SDU
,
2
,
50
,
TIME
,
2
,
UE_RECV_FAILS
,
1
,
TIME
,
4
,
UE_RECV_FAILS
,
0
,
TIME
,
-
1
openair2/LAYER2/nr_rlc/tests/test15.txt.gz
0 → 100644
View file @
dac2388e
File added
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