Commit 202cd3b8 authored by Cedric Roux's avatar Cedric Roux

nr: pdcp: accept "infinity" for t-reordering

"infinity" is -1 in the code.
parent fa3e0787
......@@ -217,6 +217,10 @@ static void check_t_reordering(nr_pdcp_entity_t *entity)
{
uint32_t count;
/* if t_reordering is set to "infinity" (seen as -1) then do nothing */
if (entity->t_reordering == -1)
return;
if (entity->t_reordering_start == 0
|| entity->t_current <= entity->t_reordering_start + entity->t_reordering)
return;
......
......@@ -55,8 +55,8 @@ typedef struct nr_pdcp_entity_t {
int rb_id;
int sn_size; /* SN size, in bits */
int t_reordering; /* unit: ms */
int discard_timer; /* unit: ms */
int t_reordering; /* unit: ms, -1 for infinity */
int discard_timer; /* unit: ms, -1 for infinity */
int sn_max; /* (2^SN_size) - 1 */
int window_size; /* 2^(SN_size - 1) */
......
......@@ -610,11 +610,17 @@ static void add_drb_am(int is_gnb, int rnti, struct NR_DRB_ToAddMod *s,
nr_pdcp_ue_t *ue;
int drb_id = s->drb_Identity;
int t_reordering = decode_t_reordering(*s->pdcp_Config->t_Reordering);
int t_reordering;
int sn_size_ul = decode_sn_size_ul(*s->pdcp_Config->drb->pdcp_SN_SizeUL);
int sn_size_dl = decode_sn_size_dl(*s->pdcp_Config->drb->pdcp_SN_SizeDL);
int discard_timer = decode_discard_timer(*s->pdcp_Config->drb->discardTimer);
/* if pdcp_Config->t_Reordering is not present, it means infinity (-1) */
if (s->pdcp_Config->t_Reordering != NULL)
t_reordering = decode_t_reordering(*s->pdcp_Config->t_Reordering);
else
t_reordering = -1;
/* TODO(?): accept different UL and DL SN sizes? */
if (sn_size_ul != sn_size_dl) {
LOG_E(PDCP, "%s:%d:%s: fatal, bad SN sizes, must be same. ul=%d, dl=%d\n",
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment