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
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
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
OpenXG-RAN
Commits
00b0dc1e
Commit
00b0dc1e
authored
2 years ago
by
Marwan Hammouda
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add RLC updates for AM
parent
d0ca8602
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
62 additions
and
36 deletions
+62
-36
openair2/LAYER2/nr_pdcp/nr_pdcp_entity.c
openair2/LAYER2/nr_pdcp/nr_pdcp_entity.c
+2
-2
openair2/LAYER2/nr_pdcp/nr_pdcp_oai_api.c
openair2/LAYER2/nr_pdcp/nr_pdcp_oai_api.c
+7
-4
openair2/LAYER2/nr_rlc/nr_rlc_entity.c
openair2/LAYER2/nr_rlc/nr_rlc_entity.c
+5
-4
openair2/LAYER2/nr_rlc/nr_rlc_entity_am.c
openair2/LAYER2/nr_rlc/nr_rlc_entity_am.c
+14
-5
openair2/LAYER2/nr_rlc/nr_rlc_entity_um.c
openair2/LAYER2/nr_rlc/nr_rlc_entity_um.c
+1
-1
openair2/LAYER2/nr_rlc/nr_rlc_oai_api.c
openair2/LAYER2/nr_rlc/nr_rlc_oai_api.c
+31
-19
openair2/RRC/NR/MESSAGES/asn1_msg.c
openair2/RRC/NR/MESSAGES/asn1_msg.c
+2
-1
No files found.
openair2/LAYER2/nr_pdcp/nr_pdcp_entity.c
View file @
00b0dc1e
...
...
@@ -126,7 +126,7 @@ static void nr_pdcp_entity_recv_pdu(nr_pdcp_entity_t *entity,
if
(
rcvd_count
<
entity
->
rx_deliv
||
nr_pdcp_sdu_in_list
(
entity
->
rx_list
,
rcvd_count
))
{
LOG_W
(
PDCP
,
"discard NR PDU rcvd_count=%d, entity->rx_deliv %d,sdu_in_list %d
\n
"
,
rcvd_count
,
entity
->
rx_deliv
,
nr_pdcp_sdu_in_list
(
entity
->
rx_list
,
rcvd_count
));
//LOG_I
(PDCP, "discard NR PDU rcvd_count=%d, entity->rx_deliv %d,sdu_in_list %d\n", rcvd_count,entity->rx_deliv,nr_pdcp_sdu_in_list(entity->rx_list,rcvd_count));
entity
->
stats
.
rxpdu_dd_pkts
++
;
entity
->
stats
.
rxpdu_dd_bytes
+=
size
;
...
...
@@ -320,7 +320,7 @@ static void nr_pdcp_entity_set_security(nr_pdcp_entity_t *entity,
static
void
check_t_reordering
(
nr_pdcp_entity_t
*
entity
)
{
uint32_t
count
;
//LOG_I(PDCP,"Came to %s in %s and t_reordering is %d\n",__FUNCTION__, __FILE__,entity->t_reordering);
/* if t_reordering is set to "infinity" (seen as -1) then do nothing */
if
(
entity
->
t_reordering
==
-
1
)
return
;
...
...
This diff is collapsed.
Click to expand it.
openair2/LAYER2/nr_pdcp/nr_pdcp_oai_api.c
View file @
00b0dc1e
...
...
@@ -766,9 +766,11 @@ static void add_srb(int is_gnb, ue_id_t rntiMaybeUEid, struct NR_SRB_ToAddMod *s
int
srb_id
=
s
->
srb_Identity
;
if
(
s
->
pdcp_Config
==
NULL
||
s
->
pdcp_Config
->
t_Reordering
==
NULL
)
{
t_Reordering
=
3000
;
//
//t_Reordering = decode_t_reordering(get_softmodem_params()->ntn_trd) + get_softmodem_params()->ntn_trd_offset; // #NTN
t_Reordering
=
decode_t_reordering
(
get_softmodem_params
()
->
ntn_trd
)
+
get_softmodem_params
()
->
ntn_trd_offset
;
// #NTN
LOG_I
(
PDCP
,
"Inside %s , case NULL and t_Reordering is %d ---->
\n
"
,
__FUNCTION__
,
t_Reordering
);
}
else
{
t_Reordering
=
decode_t_reordering
(
*
s
->
pdcp_Config
->
t_Reordering
);
//t_Reordering = decode_t_reordering(*s->pdcp_Config->t_Reordering);
t_Reordering
=
decode_t_reordering
(
get_softmodem_params
()
->
ntn_trd
)
+
get_softmodem_params
()
->
ntn_trd_offset
;
//t_Reordering = t_Reordering + get_softmodem_params()->ntn_trd_offset; // #NTN
}
...
...
@@ -808,8 +810,9 @@ void add_drb_am(int is_gnb, ue_id_t rntiMaybeUEid, struct NR_DRB_ToAddMod *s, in
/* if pdcp_Config->t_Reordering is not present, it means infinity (-1) */
int
t_reordering
=
-
1
;
if
(
s
->
pdcp_Config
->
t_Reordering
!=
NULL
)
{
t_reordering
=
decode_t_reordering
(
*
s
->
pdcp_Config
->
t_Reordering
);
printf
(
"
\n\n\n\n
Came to line 954 add_drb_am and t_reordering is %d
\n\n\n\n
"
,
t_reordering
);
//t_reordering = decode_t_reordering(*s->pdcp_Config->t_Reordering);
t_reordering
=
decode_t_reordering
(
get_softmodem_params
()
->
ntn_trd
)
+
get_softmodem_params
()
->
ntn_trd_offset
;
//printf("\n\n\n\n Came to line 954 add_drb_am and t_reordering is %d\n\n\n\n", t_reordering);
}
if
(
s
->
pdcp_Config
->
drb
!=
NULL
...
...
This diff is collapsed.
Click to expand it.
openair2/LAYER2/nr_rlc/nr_rlc_entity.c
View file @
00b0dc1e
...
...
@@ -22,7 +22,7 @@
#include "nr_rlc_entity.h"
#include <stdlib.h>
#include "asn1_utils.h"
#include "nr_rlc_entity_am.h"
#include "nr_rlc_entity_um.h"
#include "nr_rlc_entity_tm.h"
...
...
@@ -30,7 +30,7 @@
#include "LOG/log.h"
#include "common/utils/time_stat.h"
#include <executables/softmodem-common.h>
static
void
nr_rlc_entity_get_stats
(
nr_rlc_entity_t
*
entity
,
nr_rlc_statistics_t
*
out
)
...
...
@@ -77,7 +77,8 @@ nr_rlc_entity_t *new_nr_rlc_entity_am(
ret
->
rx_maxsize
=
rx_maxsize
;
ret
->
t_poll_retransmit
=
t_poll_retransmit
;
ret
->
t_reassembly
=
t_reassembly
;
//ret->t_reassembly = t_reassembly;
ret
->
t_reassembly
=
decode_t_reassembly
(
get_softmodem_params
()
->
ntn_trs
)
+
get_softmodem_params
()
->
ntn_trs_offset
;
ret
->
t_status_prohibit
=
t_status_prohibit
;
ret
->
poll_pdu
=
poll_pdu
;
ret
->
poll_byte
=
poll_byte
;
...
...
@@ -116,7 +117,7 @@ nr_rlc_entity_t *new_nr_rlc_entity_am(
* initial_size of 1024 is arbitrary
*/
ret
->
common
.
txsdu_avg_time_to_tx
=
time_average_new
(
100
*
1000
,
1024
);
//LOG_I(RLC,"%s in %s is called with t_reassembly = %d\n",__FUNCTION__,__FILE__,ret->t_reassembly);
return
(
nr_rlc_entity_t
*
)
ret
;
}
...
...
This diff is collapsed.
Click to expand it.
openair2/LAYER2/nr_rlc/nr_rlc_entity_am.c
View file @
00b0dc1e
...
...
@@ -175,7 +175,10 @@ static int sdu_has_missing_bytes(nr_rlc_entity_am_t *entity, int sn)
while
(
l
!=
NULL
&&
l
->
sn
==
sn
)
{
if
(
l
->
so
>
last_byte
+
1
)
return
1
;
{
LOG_I
(
RLC
,
"missing byte detected
\n
"
);
return
1
;
}
new_last_byte
=
l
->
so
+
l
->
size
-
1
;
if
(
new_last_byte
>
last_byte
)
last_byte
=
new_last_byte
;
...
...
@@ -187,6 +190,7 @@ static int sdu_has_missing_bytes(nr_rlc_entity_am_t *entity, int sn)
static
void
reassemble_and_deliver
(
nr_rlc_entity_am_t
*
entity
,
int
sn
)
{
//LOG_I(RLC,"Came inside %s in %s\n",__FUNCTION__, __FILE__);
nr_rlc_pdu_t
*
pdu
;
char
sdu
[
NR_SDU_MAX
];
int
so
=
0
;
...
...
@@ -464,6 +468,7 @@ process_wait_list_head:
+
cur_wait_list
->
size
;
/* and go process the next pdu, still for the current nack */
cur_wait_list
=
prev_wait_list
->
next
;
//LOG_I(RLC, "cur_wait_list->sdu->retx_count %d, and Buffer Size %d\n", cur_wait_list->sdu->retx_count, entity->common.bstatus.retx_size);
goto
process_next_pdu
;
}
...
...
@@ -685,7 +690,7 @@ void nr_rlc_entity_am_recv_pdu(nr_rlc_entity_t *_entity,
int
data_size
;
int
is_first
;
int
is_last
;
//LOG_I(RLC,"I am inside nr_rlc_entity_am_recv_pdu\n");
entity
->
common
.
stats
.
rxpdu_pkts
++
;
entity
->
common
.
stats
.
rxpdu_bytes
+=
size
;
...
...
@@ -1467,6 +1472,10 @@ static int generate_retx_pdu(nr_rlc_entity_am_t *entity, char *buffer,
int
pdu_size
;
int
p
;
static
int
retx_ctr
=
0
;
retx_ctr
++
;
//LOG_I(RLC,"%s in %s is called %d times\n",__FUNCTION__,__FILE__, retx_ctr);
sdu
=
entity
->
retransmit_list
;
pdu_header_size
=
compute_pdu_header_size
(
entity
,
sdu
);
...
...
@@ -1815,7 +1824,7 @@ static void check_t_poll_retransmit(nr_rlc_entity_am_t *entity)
static
void
check_t_reassembly
(
nr_rlc_entity_am_t
*
entity
)
{
int
sn
;
//LOG_I(RLC,"Came to %s in %s and t_reassembly is %d and current is %ld\n and start is %ld",__FUNCTION__, __FILE__,entity->t_reassembly,entity->t_current,entity->t_reassembly_start);
/* is t_reassembly running and if yes has it expired? */
if
(
entity
->
t_reassembly_start
==
0
||
entity
->
t_current
<=
entity
->
t_reassembly_start
+
entity
->
t_reassembly
)
...
...
@@ -1824,8 +1833,8 @@ static void check_t_reassembly(nr_rlc_entity_am_t *entity)
/* stop timer */
entity
->
t_reassembly_start
=
0
;
LOG_D
(
RLC
,
"%s:%d:%s: t_reassembly expire
d
\n
"
,
__FILE__
,
__LINE__
,
__FUNCTION__
);
//LOG_I(RLC, "%s:%d:%s: t_reassembly expired, t_reassembly = %
d\n",
__FILE__
,
__LINE__
,
__FUNCTION__
,
entity
->
t_reassembly
);
/* update RX_Highest_Status */
sn
=
entity
->
rx_next_status_trigger
;
...
...
This diff is collapsed.
Click to expand it.
openair2/LAYER2/nr_rlc/nr_rlc_entity_um.c
View file @
00b0dc1e
...
...
@@ -606,7 +606,7 @@ void nr_rlc_entity_um_recv_sdu(nr_rlc_entity_t *_entity,
static
void
check_t_reassembly
(
nr_rlc_entity_um_t
*
entity
)
{
nr_rlc_pdu_t
*
cur
;
//LOG_I(RLC,"Came to %s in %s and t_reassembly is %d\n",__FUNCTION__, __FILE__,entity->t_reassembly);
/* is t_reassembly running and if yes has it expired? */
if
(
entity
->
t_reassembly_start
==
0
||
entity
->
t_current
<=
entity
->
t_reassembly_start
+
entity
->
t_reassembly
)
...
...
This diff is collapsed.
Click to expand it.
openair2/LAYER2/nr_rlc/nr_rlc_oai_api.c
View file @
00b0dc1e
...
...
@@ -612,7 +612,11 @@ void nr_rlc_add_srb(int rnti, int srb_id, const NR_RLC_BearerConfig_t *rlc_Beare
case
NR_RLC_Config_PR_am
:
{
struct
NR_RLC_Config__am
*
am
;
am
=
r
->
choice
.
am
;
t_reassembly
=
decode_t_reassembly
(
am
->
dl_AM_RLC
.
t_Reassembly
);
//t_reassembly = decode_t_reassembly(am->dl_AM_RLC.t_Reassembly);
//t_reassembly = decode_t_reassembly(am->dl_AM_RLC.t_Reassembly) + get_softmodem_params()->ntn_trs_offset ;
//t_reassembly = decode_t_reassembly(get_softmodem_params()->ntn_trs) + get_softmodem_params()->ntn_trs_offset;
t_reassembly
=
get_softmodem_params
()
->
ntn_trs
+
get_softmodem_params
()
->
ntn_trs_offset
;
//LOG_I(RLC,"Inside %s in %s and t_reassembly is %d\n",__FUNCTION__, __FILE__,t_reassembly);
t_status_prohibit
=
decode_t_status_prohibit
(
am
->
dl_AM_RLC
.
t_StatusProhibit
);
t_poll_retransmit
=
decode_t_poll_retransmit
(
am
->
ul_AM_RLC
.
t_PollRetransmit
);
poll_pdu
=
decode_poll_pdu
(
am
->
ul_AM_RLC
.
pollPDU
);
...
...
@@ -644,7 +648,9 @@ void nr_rlc_add_srb(int rnti, int srb_id, const NR_RLC_BearerConfig_t *rlc_Beare
}
else
{
/* hack: hardcode values for NR */
t_poll_retransmit
=
4000
;
t_reassembly
=
35
;
//t_reassembly = 35;
t_reassembly
=
get_softmodem_params
()
->
ntn_trs
+
get_softmodem_params
()
->
ntn_trs_offset
;
//LOG_I(RLC,"Inside %s in %s and t_reassembly is %d\n",__FUNCTION__, __FILE__,t_reassembly);
t_status_prohibit
=
0
;
poll_pdu
=
-
1
;
poll_byte
=
-
1
;
...
...
@@ -695,7 +701,10 @@ static void add_drb_am(int rnti, int drb_id, const NR_RLC_BearerConfig_t *rlc_Be
case
NR_RLC_Config_PR_am
:
{
struct
NR_RLC_Config__am
*
am
;
am
=
r
->
choice
.
am
;
t_reassembly
=
decode_t_reassembly
(
am
->
dl_AM_RLC
.
t_Reassembly
);
//t_reassembly = decode_t_reassembly(am->dl_AM_RLC.t_Reassembly);
//t_reassembly = decode_t_reassembly(am->dl_AM_RLC.t_Reassembly) + get_softmodem_params()->ntn_trs_offset;
t_reassembly
=
decode_t_reassembly
(
get_softmodem_params
()
->
ntn_trs
)
+
get_softmodem_params
()
->
ntn_trs_offset
;
//LOG_I(RLC,"Inside %s in %s and t_reassembly is %d\n",__FUNCTION__, __FILE__,t_reassembly);
t_status_prohibit
=
decode_t_status_prohibit
(
am
->
dl_AM_RLC
.
t_StatusProhibit
);
t_poll_retransmit
=
decode_t_poll_retransmit
(
am
->
ul_AM_RLC
.
t_PollRetransmit
);
poll_pdu
=
decode_poll_pdu
(
am
->
ul_AM_RLC
.
pollPDU
);
...
...
@@ -725,15 +734,16 @@ static void add_drb_am(int rnti, int drb_id, const NR_RLC_BearerConfig_t *rlc_Be
if
(
ue
->
drb
[
drb_id
-
1
]
!=
NULL
)
{
LOG_E
(
RLC
,
"%s:%d:%s: DRB %d already exists for UE with RNTI %04x, do nothing
\n
"
,
__FILE__
,
__LINE__
,
__FUNCTION__
,
drb_id
,
rnti
);
}
else
{
nr_rlc_entity_t
*
nr_rlc_am
=
new_nr_rlc_entity_am
(
RLC_RX_MAXSIZE
,
RLC_TX_MAXSIZE
,
deliver_sdu
,
ue
,
successful_delivery
,
ue
,
max_retx_reached
,
ue
,
t_poll_retransmit
,
t_reassembly
,
t_status_prohibit
,
poll_pdu
,
poll_byte
,
max_retx_threshold
,
sn_field_length
);
t_reassembly
=
get_softmodem_params
()
->
ntn_trs
+
get_softmodem_params
()
->
ntn_trs_offset
;
nr_rlc_am
=
new_nr_rlc_entity_am
(
RLC_RX_MAXSIZE
,
RLC_TX_MAXSIZE
,
deliver_sdu
,
ue
,
successful_delivery
,
ue
,
max_retx_reached
,
ue
,
t_poll_retransmit
,
t_reassembly
,
t_status_prohibit
,
poll_pdu
,
poll_byte
,
max_retx_threshold
,
sn_field_length
);
nr_rlc_ue_add_drb_rlc_entity
(
ue
,
drb_id
,
nr_rlc_am
);
LOG_I
(
RLC
,
"%s:%d:%s: added drb %d to UE with RNTI 0x%x
\n
"
,
__FILE__
,
__LINE__
,
__FUNCTION__
,
drb_id
,
rnti
);
...
...
@@ -768,9 +778,10 @@ static void add_drb_um(int rnti, int drb_id, const NR_RLC_BearerConfig_t *rlc_Be
um
=
r
->
choice
.
um_Bi_Directional
;
// FOLLOWING TO BE USED WHEN HARQ IS DISABLED
{
t_reassembly
=
decode_t_reassembly
(
um
->
dl_UM_RLC
.
t_Reassembly
);
// THIS WILL COLLECT THE VALUE FROM ENUM CORRESPONDING
//
t_reassembly = decode_t_reassembly(um->dl_UM_RLC.t_Reassembly); // THIS WILL COLLECT THE VALUE FROM ENUM CORRESPONDING
// TO THE INDEX PROVIDED FROM CLP
t_reassembly
=
t_reassembly
+
get_softmodem_params
()
->
ntn_trs_offset
;
// THIS WILL ADD THE OFFSET VALUE PROVIDED FROM CLP
t_reassembly
=
get_softmodem_params
()
->
ntn_trs
+
get_softmodem_params
()
->
ntn_trs_offset
;
// THIS WILL ADD THE OFFSET VALUE PROVIDED FROM CLP
//LOG_I(RLC,"Inside %s in %s and t_reassembly is %d\n",__FUNCTION__, __FILE__,t_reassembly);
}
// FOLLOWING TO BE USED WHEN HARQ IS ENABLED DO AS 7.2.2.1 FROM 38.821
...
...
@@ -811,11 +822,12 @@ static void add_drb_um(int rnti, int drb_id, const NR_RLC_BearerConfig_t *rlc_Be
if
(
ue
->
drb
[
drb_id
-
1
]
!=
NULL
)
{
LOG_E
(
RLC
,
"DEBUG add_drb_um %s:%d:%s: warning DRB %d already exist for ue %d, do nothing
\n
"
,
__FILE__
,
__LINE__
,
__FUNCTION__
,
drb_id
,
rnti
);
}
else
{
nr_rlc_entity_t
*
nr_rlc_um
=
new_nr_rlc_entity_um
(
RLC_RX_MAXSIZE
,
RLC_TX_MAXSIZE
,
deliver_sdu
,
ue
,
t_reassembly
,
sn_field_length
);
t_reassembly
=
get_softmodem_params
()
->
ntn_trs
+
get_softmodem_params
()
->
ntn_trs_offset
;
nr_rlc_um
=
new_nr_rlc_entity_um
(
RLC_RX_MAXSIZE
,
RLC_TX_MAXSIZE
,
deliver_sdu
,
ue
,
t_reassembly
,
sn_field_length
);
nr_rlc_ue_add_drb_rlc_entity
(
ue
,
drb_id
,
nr_rlc_um
);
LOG_D
(
RLC
,
"%s:%d:%s: added drb %d to UE with RNTI 0x%x
\n
"
,
__FILE__
,
__LINE__
,
__FUNCTION__
,
drb_id
,
rnti
);
...
...
This diff is collapsed.
Click to expand it.
openair2/RRC/NR/MESSAGES/asn1_msg.c
View file @
00b0dc1e
...
...
@@ -366,7 +366,8 @@ static void nr_drb_config(struct NR_RLC_Config *rlc_Config, NR_RLC_Config_PR rlc
rlc_Config
->
choice
.
am
->
ul_AM_RLC
.
maxRetxThreshold
=
NR_UL_AM_RLC__maxRetxThreshold_t32
;
rlc_Config
->
choice
.
am
->
dl_AM_RLC
.
sn_FieldLength
=
calloc
(
1
,
sizeof
(
*
rlc_Config
->
choice
.
am
->
dl_AM_RLC
.
sn_FieldLength
));
*
rlc_Config
->
choice
.
am
->
dl_AM_RLC
.
sn_FieldLength
=
NR_SN_FieldLengthAM_size18
;
rlc_Config
->
choice
.
am
->
dl_AM_RLC
.
t_Reassembly
=
NR_T_Reassembly_ms15
;
//rlc_Config->choice.am->dl_AM_RLC.t_Reassembly = NR_T_Reassembly_ms15;
rlc_Config
->
choice
.
am
->
dl_AM_RLC
.
t_Reassembly
=
get_softmodem_params
()
->
ntn_trs
;
rlc_Config
->
choice
.
am
->
dl_AM_RLC
.
t_StatusProhibit
=
NR_T_StatusProhibit_ms2400
;
break
;
default:
...
...
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