use non-blocking PDCP write in GW

master
Andre Puschmann 6 years ago
parent b8438e9cc3
commit 4da8bf26f8

@ -68,7 +68,7 @@ private:
uint16_t rnti; uint16_t rnti;
srsenb::rlc_interface_pdcp *rlc; srsenb::rlc_interface_pdcp *rlc;
// rlc_interface_pdcp // rlc_interface_pdcp
void write_sdu(uint32_t lcid, srslte::byte_buffer_t *sdu); void write_sdu(uint32_t lcid, srslte::byte_buffer_t *sdu, bool blocking);
bool rb_is_um(uint32_t lcid); bool rb_is_um(uint32_t lcid);
}; };

@ -154,9 +154,8 @@ void pdcp::user_interface_gtpu::write_pdu(uint32_t lcid, srslte::byte_buffer_t *
gtpu->write_pdu(rnti, lcid, pdu); gtpu->write_pdu(rnti, lcid, pdu);
} }
void pdcp::user_interface_rlc::write_sdu(uint32_t lcid, srslte::byte_buffer_t* sdu) void pdcp::user_interface_rlc::write_sdu(uint32_t lcid, srslte::byte_buffer_t* sdu, bool blocking)
{ {
rlc->write_sdu(rnti, lcid, sdu); rlc->write_sdu(rnti, lcid, sdu);
} }

@ -190,7 +190,7 @@ void rlc::write_sdu(uint16_t rnti, uint32_t lcid, srslte::byte_buffer_t* sdu)
pthread_rwlock_rdlock(&rwlock); pthread_rwlock_rdlock(&rwlock);
if (users.count(rnti)) { if (users.count(rnti)) {
if(rnti != SRSLTE_MRNTI){ if(rnti != SRSLTE_MRNTI){
users[rnti].rlc->write_sdu_nb(lcid, sdu); users[rnti].rlc->write_sdu(lcid, sdu, false);
tx_queue = users[rnti].rlc->get_total_buffer_state(lcid); tx_queue = users[rnti].rlc->get_total_buffer_state(lcid);
}else { }else {
users[rnti].rlc->write_sdu_mch(lcid, sdu); users[rnti].rlc->write_sdu_mch(lcid, sdu);

@ -364,8 +364,7 @@ void gw::run_thread()
if (pdcp->is_drb_enabled(cfg.lcid)) { if (pdcp->is_drb_enabled(cfg.lcid)) {
pdu->set_timestamp(); pdu->set_timestamp();
ul_tput_bytes += pdu->N_bytes; ul_tput_bytes += pdu->N_bytes;
pdcp->write_sdu(cfg.lcid, pdu); pdcp->write_sdu(cfg.lcid, pdu, false);
do { do {
pdu = pool_allocate; pdu = pool_allocate;
if (!pdu) { if (!pdu) {

Loading…
Cancel
Save