Starting to add timers to the NR PDCP.

This commit is contained in:
Pedro Alvarez 2019-09-30 12:52:00 +01:00 committed by Andre Puschmann
parent 4a1b8a5952
commit ff15ed5018
4 changed files with 17 additions and 10 deletions

View File

@ -90,7 +90,8 @@ public:
uint32_t COUNT(uint32_t hfn, uint32_t sn);
protected:
srslte::log* log = nullptr;
srslte::log* log = nullptr;
srslte::timers* timers = nullptr;
bool active = false;
uint32_t lcid = 0;

View File

@ -44,6 +44,7 @@ public:
void init(srsue::rlc_interface_pdcp* rlc_,
srsue::rrc_interface_pdcp* rrc_,
srsue::gw_interface_pdcp* gw_,
srslte::timers* timers_,
srslte::log* log_,
uint32_t lcid_,
pdcp_config_t cfg_);

View File

@ -32,6 +32,7 @@ pdcp_entity_nr::~pdcp_entity_nr() {}
void pdcp_entity_nr::init(srsue::rlc_interface_pdcp* rlc_,
srsue::rrc_interface_pdcp* rrc_,
srsue::gw_interface_pdcp* gw_,
srslte::timers* timers_,
srslte::log* log_,
uint32_t lcid_,
pdcp_config_t cfg_)
@ -39,6 +40,7 @@ void pdcp_entity_nr::init(srsue::rlc_interface_pdcp* rlc_,
rlc = rlc_;
rrc = rrc_;
gw = gw_;
timers = timers_;
log = log_;
lcid = lcid_;
cfg = cfg_;

View File

@ -146,8 +146,9 @@ int test_tx(uint32_t n_packets,
rlc_dummy rlc(log);
rrc_dummy rrc(log);
gw_dummy gw(log);
srslte::timers timers(64);
pdcp.init(&rlc, &rrc, &gw, log, 0, cfg);
pdcp.init(&rlc, &rrc, &gw, &timers, log, 0, cfg);
pdcp.config_security(
k_enc, k_int, k_enc, k_int, srslte::CIPHERING_ALGORITHM_ID_128_EEA2, srslte::INTEGRITY_ALGORITHM_ID_128_EIA2);
pdcp.enable_integrity();
@ -269,21 +270,23 @@ int test_rx_in_sequence(uint64_t n_packets, uint8_t pdcp_sn_len, srslte::byte_bu
srslte::pdcp_config_t cfg_rx = {
1, srslte::PDCP_RB_IS_DRB, srslte::SECURITY_DIRECTION_DOWNLINK, srslte::SECURITY_DIRECTION_UPLINK, pdcp_sn_len};
rlc_dummy rlc_tx(log);
rrc_dummy rrc_tx(log);
gw_dummy gw_tx(log);
rlc_dummy rlc_tx(log);
rrc_dummy rrc_tx(log);
gw_dummy gw_tx(log);
srslte::timers timers_tx(64);
rlc_dummy rlc_rx(log);
rrc_dummy rrc_rx(log);
gw_dummy gw_rx(log);
rlc_dummy rlc_rx(log);
rrc_dummy rrc_rx(log);
gw_dummy gw_rx(log);
srslte::timers timers_rx(64);
pdcp_tx.init(&rlc_tx, &rrc_tx, &gw_tx, log, 0, cfg_tx);
pdcp_tx.init(&rlc_tx, &rrc_tx, &gw_tx, &timers_tx, log, 0, cfg_tx);
pdcp_tx.config_security(
k_enc, k_int, k_enc, k_int, srslte::CIPHERING_ALGORITHM_ID_128_EEA2, srslte::INTEGRITY_ALGORITHM_ID_128_EIA2);
pdcp_tx.enable_integrity();
pdcp_tx.enable_encryption();
pdcp_rx.init(&rlc_rx, &rrc_rx, &gw_rx, log, 0, cfg_rx);
pdcp_rx.init(&rlc_rx, &rrc_rx, &gw_rx, &timers_rx, log, 0, cfg_rx);
pdcp_rx.config_security(
k_enc, k_int, k_enc, k_int, srslte::CIPHERING_ALGORITHM_ID_128_EEA2, srslte::INTEGRITY_ALGORITHM_ID_128_EIA2);
pdcp_rx.enable_integrity();