fix bug in RLC AM where poll bit was never set if poll_byte and poll_pdu are zero

- In case both poll_pdu and poll_byte are zero a status PDU is requested
  from the other AM entity every N data PDUs
This commit is contained in:
Andre Puschmann 2017-10-26 09:02:30 +02:00
parent ac8cbcaaea
commit 7ba8c5b94a
2 changed files with 14 additions and 0 deletions

View file

@ -163,6 +163,8 @@ private:
static const int reordering_timeout_id = 1;
static const int poll_periodicity = 8; // After how many data PDUs a status PDU shall be requested
// Timer checks
bool status_prohibited();
bool poll_retx();

View file

@ -381,6 +381,18 @@ bool rlc_am::poll_required()
return true;
if(poll_retx())
return true;
if(tx_sdu_queue.size() == 0 && retx_queue.size() == 0)
return true;
/* According to 5.2.2.1 in 36.322 v13.3.0 a poll should be requested if
* the entire AM window is unacknowledged, i.e. no new PDU can be transmitted.
* However, it seems more appropiate to request more often if polling
* is disabled otherwise, e.g. every N PDUs.
*/
if (cfg.poll_pdu == 0 && cfg.poll_byte == 0 && vt_s % poll_periodicity == 0)
return true;
return false;
}