Commit e5c563fe authored by aligungr's avatar aligungr

Performance improvements

parent 33fd7fe9
...@@ -51,20 +51,6 @@ void UeAppTask::onLoop() ...@@ -51,20 +51,6 @@ void UeAppTask::onLoop()
switch (msg->msgType) switch (msg->msgType)
{ {
case NtsMessageType::UE_TUN_TO_APP: {
auto &w = dynamic_cast<NmUeTunToApp &>(*msg);
switch (w.present)
{
case NmUeTunToApp::DATA_PDU_DELIVERY: {
auto m = std::make_unique<NmUeAppToNas>(NmUeAppToNas::UPLINK_DATA_DELIVERY);
m->psi = w.psi;
m->data = std::move(w.data);
m_base->nasTask->push(std::move(m));
break;
}
}
break;
}
case NtsMessageType::UE_NAS_TO_APP: { case NtsMessageType::UE_NAS_TO_APP: {
auto &w = dynamic_cast<NmUeNasToApp &>(*msg); auto &w = dynamic_cast<NmUeNasToApp &>(*msg);
switch (w.present) switch (w.present)
......
...@@ -80,11 +80,11 @@ void NasTask::onLoop() ...@@ -80,11 +80,11 @@ void NasTask::onLoop()
} }
break; break;
} }
case NtsMessageType::UE_APP_TO_NAS: { case NtsMessageType::UE_TUN_TO_APP: {
auto &w = dynamic_cast<NmUeAppToNas &>(*msg); auto &w = dynamic_cast<NmUeTunToApp &>(*msg);
switch (w.present) switch (w.present)
{ {
case NmUeAppToNas::UPLINK_DATA_DELIVERY: { case NmUeTunToApp::DATA_PDU_DELIVERY: {
sm->handleUplinkDataRequest(w.psi, std::move(w.data)); sm->handleUplinkDataRequest(w.psi, std::move(w.data));
break; break;
} }
......
...@@ -205,22 +205,6 @@ struct NmUeNasToApp : NtsMessage ...@@ -205,22 +205,6 @@ struct NmUeNasToApp : NtsMessage
} }
}; };
struct NmUeAppToNas : NtsMessage
{
enum PR
{
UPLINK_DATA_DELIVERY,
} present;
// UPLINK_DATA_DELIVERY
int psi{};
OctetString data;
explicit NmUeAppToNas(PR present) : NtsMessage(NtsMessageType::UE_APP_TO_NAS), present(present)
{
}
};
struct NmUeNasToRls : NtsMessage struct NmUeNasToRls : NtsMessage
{ {
enum PR enum PR
......
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
#include <cstring> #include <cstring>
#include <unistd.h> #include <unistd.h>
#include <ue/app/task.hpp> #include <ue/nas/task.hpp>
#include <ue/nts.hpp> #include <ue/nts.hpp>
#include <utils/libc_error.hpp> #include <utils/libc_error.hpp>
#include <utils/scoped_thread.hpp> #include <utils/scoped_thread.hpp>
...@@ -74,7 +74,7 @@ void TunTask::onStart() ...@@ -74,7 +74,7 @@ void TunTask::onStart()
{ {
auto *receiverArgs = new ReceiverArgs(); auto *receiverArgs = new ReceiverArgs();
receiverArgs->fd = m_fd; receiverArgs->fd = m_fd;
receiverArgs->targetTask = m_base->appTask; receiverArgs->targetTask = m_base->nasTask;
receiverArgs->psi = m_psi; receiverArgs->psi = m_psi;
m_receiver = m_receiver =
new ScopedThread([](void *args) { ReceiverThread(reinterpret_cast<ReceiverArgs *>(args)); }, receiverArgs); new ScopedThread([](void *args) { ReceiverThread(reinterpret_cast<ReceiverArgs *>(args)); }, receiverArgs);
......
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