Starting to notify RLC upon PDCP discard (NR)

master
Pedro Alvarez 5 years ago committed by Andre Puschmann
parent 9870c73366
commit 7ccc7d1d20

@ -96,10 +96,12 @@ private:
void pass_to_upper_layers(unique_byte_buffer_t pdu); void pass_to_upper_layers(unique_byte_buffer_t pdu);
// Reodering callback (t-Reordering) // Reodering callback (t-Reordering)
class reordering_callback; class reordering_callback;
std::unique_ptr<reordering_callback> reordering_fnc; std::unique_ptr<reordering_callback> reordering_fnc;
// Discard callback (discardTimer)
class discard_callback;
// COUNT overflow protection // COUNT overflow protection
bool tx_overflow = false; bool tx_overflow = false;
bool rx_overflow = false; bool rx_overflow = false;
@ -119,6 +121,22 @@ private:
pdcp_entity_nr* parent; pdcp_entity_nr* parent;
}; };
// Discard callback (discardTimer)
class pdcp_entity_nr::discard_callback
{
public:
discard_callback(pdcp_entity_nr* parent_, uint32_t sn_)
{
parent = parent_;
discard_sn = sn_;
};
void operator()(uint32_t timer_id);
private:
pdcp_entity_nr* parent;
uint32_t sn;
};
/* /*
* Helpers * Helpers
*/ */

@ -307,9 +307,6 @@ void pdcp_entity_nr::append_mac(const unique_byte_buffer_t& sdu, uint8_t* mac)
sdu->N_bytes += 4; sdu->N_bytes += 4;
} }
/*
* Reordering Helpers
*/
// Deliver all consecutivly associated COUNTs. // Deliver all consecutivly associated COUNTs.
// Update RX_NEXT after submitting to higher layers // Update RX_NEXT after submitting to higher layers
void pdcp_entity_nr::deliver_all_consecutive_counts() void pdcp_entity_nr::deliver_all_consecutive_counts()
@ -336,6 +333,9 @@ void pdcp_entity_nr::deliver_all_consecutive_counts()
} }
} }
/*
* Reordering Timer Callback
*/
void pdcp_entity_nr::reordering_callback::operator()(uint32_t timer_id) void pdcp_entity_nr::reordering_callback::operator()(uint32_t timer_id)
{ {
parent->log->debug("Reordering timer expired\n"); parent->log->debug("Reordering timer expired\n");
@ -357,4 +357,17 @@ void pdcp_entity_nr::reordering_callback::operator()(uint32_t timer_id)
} }
return; return;
} }
/*
* Discard Timer Callback
*/
void pdcp_entity_nr::discard_callback::operator()(uint32_t timer_id)
{
parent->log->debug("Discard timer expired for PDU with SN = %d\n", discard_sn);
// Notify the RLC of the discard. It's the RLC to actually discard, if no segment was transmitted yet.
parent->rlc->discard_sdu(discard_sn);
return;
}
} // namespace srslte } // namespace srslte

Loading…
Cancel
Save