Commit 63f45a02 authored by aligungr's avatar aligungr

Performance improvements

parent 7831c0d8
......@@ -94,4 +94,9 @@ void NasLayer::performCycle()
m_mm->performMmCycle();
}
void NasLayer::handleRrcConnectionRelease()
{
m_mm->handleRrcConnectionRelease();
}
} // namespace nr::ue
\ No newline at end of file
......@@ -36,6 +36,9 @@ class NasLayer
private:
void performCycle();
void handleSapMessage(std::unique_ptr<NtsMessage> msg);
public:
void handleRrcConnectionRelease();
};
} // namespace nr::ue
\ No newline at end of file
......@@ -272,9 +272,7 @@ void NasMm::localReleaseConnection(bool treatBarred)
if (m_cmState != ECmState::CM_IDLE)
m_logger->info("Performing local release of NAS connection");
auto w = std::make_unique<NmUeNasToRrc>(NmUeNasToRrc::LOCAL_RELEASE_CONNECTION);
w->treatBarred = treatBarred;
m_base->l3Task->push(std::move(w));
m_base->l3Task->rrc().performLocalRelease(treatBarred);
}
void NasMm::handlePaging(const std::vector<GutiMobileIdentity> &tmsiIds)
......
......@@ -31,10 +31,6 @@ void NasMm::handleRrcEvent(const NmUeRrcToNas &msg)
receiveNasMessage(*nasMessage);
break;
}
case NmUeRrcToNas::RRC_CONNECTION_RELEASE: {
handleRrcConnectionRelease();
break;
}
case NmUeRrcToNas::RADIO_LINK_FAILURE: {
handleRadioLinkFailure();
break;
......
......@@ -63,7 +63,6 @@ struct NmUeRrcToNas : NtsMessage
NAS_NOTIFY,
NAS_DELIVERY,
RRC_CONNECTION_SETUP,
RRC_CONNECTION_RELEASE,
RRC_ESTABLISHMENT_FAILURE,
RADIO_LINK_FAILURE,
PAGING,
......@@ -89,7 +88,6 @@ struct NmUeNasToRrc : NtsMessage
{
enum PR
{
LOCAL_RELEASE_CONNECTION,
UPLINK_NAS_DELIVERY,
} present;
......@@ -97,9 +95,6 @@ struct NmUeNasToRrc : NtsMessage
uint32_t pduId{};
OctetString nasPdu;
// LOCAL_RELEASE_CONNECTION
bool treatBarred{};
explicit NmUeNasToRrc(PR present) : NtsMessage(NtsMessageType::UE_NAS_TO_RRC), present(present)
{
}
......
......@@ -11,6 +11,7 @@
#include <lib/rrc/encode.hpp>
#include <ue/l3/task.hpp>
#include <ue/nts.hpp>
#include <ue/rls/task.hpp>
#include <utils/random.hpp>
#include <asn/rrc/ASN_RRC_RRCSetup-IEs.h>
......@@ -147,7 +148,8 @@ void UeRrcLayer::receiveRrcRelease(const ASN_RRC_RRCRelease &msg)
{
m_logger->debug("RRC Release received");
m_state = ERrcState::RRC_IDLE;
m_base->l3Task->push(std::make_unique<NmUeRrcToNas>(NmUeRrcToNas::RRC_CONNECTION_RELEASE));
m_base->l3Task->nas().handleRrcConnectionRelease();
}
void UeRrcLayer::handleEstablishmentFailure()
......@@ -155,4 +157,14 @@ void UeRrcLayer::handleEstablishmentFailure()
m_base->l3Task->push(std::make_unique<NmUeRrcToNas>(NmUeRrcToNas::RRC_ESTABLISHMENT_FAILURE));
}
void UeRrcLayer::performLocalRelease(bool treatBarred)
{
// TODO: handle treat barred
(void)treatBarred;
switchState(ERrcState::RRC_IDLE);
m_base->rlsTask->push(std::make_unique<NmUeRrcToRls>(NmUeRrcToRls::RESET_STI));
m_base->l3Task->nas().handleRrcConnectionRelease();
}
} // namespace nr::ue
......@@ -127,6 +127,9 @@ class UeRrcLayer
public:
/* Access Control */
EUacResult performUac(std::bitset<16> identities, int category, int establishmentCause);
/* Connection Control */
void performLocalRelease(bool treatBarred);
};
} // namespace nr::ue
\ No newline at end of file
......@@ -43,15 +43,6 @@ void UeRrcLayer::handleNasSapMessage(NmUeNasToRrc &msg)
deliverUplinkNas(msg.pduId, std::move(msg.nasPdu));
break;
}
case NmUeNasToRrc::LOCAL_RELEASE_CONNECTION: {
// TODO: handle treat barred
(void)msg.treatBarred;
switchState(ERrcState::RRC_IDLE);
m_base->rlsTask->push(std::make_unique<NmUeRrcToRls>(NmUeRrcToRls::RESET_STI));
m_base->l3Task->push(std::make_unique<NmUeRrcToNas>(NmUeRrcToNas::RRC_CONNECTION_RELEASE));
break;
}
}
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment