diff --git a/lib/include/srslte/upper/rlc_am.h b/lib/include/srslte/upper/rlc_am.h index afbd18544..cee0d5959 100644 --- a/lib/include/srslte/upper/rlc_am.h +++ b/lib/include/srslte/upper/rlc_am.h @@ -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(); diff --git a/lib/src/upper/rlc_am.cc b/lib/src/upper/rlc_am.cc index 96b231a09..05f35ad76 100644 --- a/lib/src/upper/rlc_am.cc +++ b/lib/src/upper/rlc_am.cc @@ -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; }