Commit 63f45a02 authored by aligungr's avatar aligungr

Performance improvements

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