Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
U
UERANSIM
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Libraries
UERANSIM
Commits
c5e608ff
Commit
c5e608ff
authored
Dec 30, 2021
by
aligungr
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Performance improvements
parent
effde35f
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
19 additions
and
34 deletions
+19
-34
src/ue/nts.hpp
src/ue/nts.hpp
+0
-2
src/ue/rls/ctl_layer.cpp
src/ue/rls/ctl_layer.cpp
+15
-13
src/ue/rls/ctl_layer.hpp
src/ue/rls/ctl_layer.hpp
+3
-3
src/ue/rls/task.cpp
src/ue/rls/task.cpp
+1
-16
No files found.
src/ue/nts.hpp
View file @
c5e608ff
...
...
@@ -160,8 +160,6 @@ struct NmUeRlsToRls : NtsMessage
enum
PR
{
RECEIVE_RLS_MESSAGE
,
DOWNLINK_DATA
,
DOWNLINK_RRC
,
RADIO_LINK_FAILURE
,
TRANSMISSION_FAILURE
,
}
present
;
...
...
src/ue/rls/ctl_layer.cpp
View file @
c5e608ff
#include "ctl_layer.hpp"
#include <ue/l3/task.hpp>
#include <ue/rls/task.hpp>
static
constexpr
const
size_t
MAX_PDU_COUNT
=
128
;
static
constexpr
const
int
MAX_PDU_TTL
=
3000
;
...
...
@@ -7,14 +10,13 @@ namespace nr::ue
{
RlsCtlLayer
::
RlsCtlLayer
(
TaskBase
*
base
,
RlsSharedContext
*
shCtx
)
:
m_
shCtx
{
shCtx
},
m_servingCell
{},
m_mainTask
{},
m_udpTask
{},
m_pduMap
{},
m_pendingAck
{}
:
m_
base
{
base
},
m_shCtx
{
shCtx
},
m_servingCell
{},
m_udpTask
{},
m_pduMap
{},
m_pendingAck
{}
{
m_logger
=
base
->
logBase
->
makeUniqueLogger
(
base
->
config
->
getLoggerPrefix
()
+
"rls-ctl"
);
}
void
RlsCtlLayer
::
onStart
(
NtsTask
*
mainTask
,
RlsUdpTask
*
udpTask
)
void
RlsCtlLayer
::
onStart
(
RlsUdpTask
*
udpTask
)
{
m_mainTask
=
mainTask
;
m_udpTask
=
udpTask
;
}
...
...
@@ -45,18 +47,18 @@ void RlsCtlLayer::handleRlsMessage(int cellId, rls::RlsMessage &msg)
return
;
}
auto
w
=
std
::
make_unique
<
NmUeRlsTo
Rls
>
(
NmUeRlsToRls
::
DOWNLINK_DATA
);
auto
w
=
std
::
make_unique
<
NmUeRlsTo
Nas
>
(
NmUeRlsToNas
::
DATA_PDU_DELIVERY
);
w
->
psi
=
static_cast
<
int
>
(
m
.
payload
);
w
->
data
=
std
::
move
(
m
.
pdu
);
m_
main
Task
->
push
(
std
::
move
(
w
));
w
->
pdu
=
std
::
move
(
m
.
pdu
);
m_
base
->
l3
Task
->
push
(
std
::
move
(
w
));
}
else
if
(
m
.
pduType
==
rls
::
EPduType
::
RRC
)
{
auto
w
=
std
::
make_unique
<
NmUeRlsToR
ls
>
(
NmUeRlsToRls
::
DOWNLINK_RRC
);
auto
w
=
std
::
make_unique
<
NmUeRlsToR
rc
>
(
NmUeRlsToRrc
::
DOWNLINK_RRC_DELIVERY
);
w
->
cellId
=
cellId
;
w
->
rrcC
hannel
=
static_cast
<
rrc
::
RrcChannel
>
(
m
.
payload
);
w
->
data
=
std
::
move
(
m
.
pdu
);
m_
main
Task
->
push
(
std
::
move
(
w
));
w
->
c
hannel
=
static_cast
<
rrc
::
RrcChannel
>
(
m
.
payload
);
w
->
pdu
=
std
::
move
(
m
.
pdu
);
m_
base
->
l3
Task
->
push
(
std
::
move
(
w
));
}
else
{
...
...
@@ -79,7 +81,7 @@ void RlsCtlLayer::handleUplinkRrcDelivery(int cellId, uint32_t pduId, rrc::RrcCh
auto
w
=
std
::
make_unique
<
NmUeRlsToRls
>
(
NmUeRlsToRls
::
RADIO_LINK_FAILURE
);
w
->
rlfCause
=
rls
::
ERlfCause
::
PDU_ID_EXISTS
;
m_
main
Task
->
push
(
std
::
move
(
w
));
m_
base
->
rls
Task
->
push
(
std
::
move
(
w
));
return
;
}
...
...
@@ -89,7 +91,7 @@ void RlsCtlLayer::handleUplinkRrcDelivery(int cellId, uint32_t pduId, rrc::RrcCh
auto
w
=
std
::
make_unique
<
NmUeRlsToRls
>
(
NmUeRlsToRls
::
RADIO_LINK_FAILURE
);
w
->
rlfCause
=
rls
::
ERlfCause
::
PDU_ID_FULL
;
m_
main
Task
->
push
(
std
::
move
(
w
));
m_
base
->
rls
Task
->
push
(
std
::
move
(
w
));
return
;
}
...
...
@@ -144,7 +146,7 @@ void RlsCtlLayer::onAckControlTimerExpired()
{
auto
w
=
std
::
make_unique
<
NmUeRlsToRls
>
(
NmUeRlsToRls
::
TRANSMISSION_FAILURE
);
w
->
pduList
=
std
::
move
(
transmissionFailures
);
m_
main
Task
->
push
(
std
::
move
(
w
));
m_
base
->
rls
Task
->
push
(
std
::
move
(
w
));
}
}
...
...
src/ue/rls/ctl_layer.hpp
View file @
c5e608ff
...
...
@@ -16,10 +16,10 @@ namespace nr::ue
class
RlsCtlLayer
{
private:
TaskBase
*
m_base
;
std
::
unique_ptr
<
Logger
>
m_logger
;
RlsSharedContext
*
m_shCtx
;
int
m_servingCell
;
NtsTask
*
m_mainTask
;
RlsUdpTask
*
m_udpTask
;
std
::
unordered_map
<
uint32_t
,
rls
::
PduInfo
>
m_pduMap
;
std
::
unordered_map
<
int
,
std
::
vector
<
uint32_t
>>
m_pendingAck
;
...
...
@@ -29,7 +29,7 @@ class RlsCtlLayer
~
RlsCtlLayer
()
=
default
;
public:
void
onStart
(
NtsTask
*
mainTask
,
RlsUdpTask
*
udpTask
);
void
onStart
(
RlsUdpTask
*
udpTask
);
void
onQuit
();
void
onAckControlTimerExpired
();
void
onAckSendTimerExpired
();
...
...
@@ -39,4 +39,4 @@ class RlsCtlLayer
void
handleRlsMessage
(
int
cellId
,
rls
::
RlsMessage
&
msg
);
};
}
\ No newline at end of file
}
// namespace nr::ue
\ No newline at end of file
src/ue/rls/task.cpp
View file @
c5e608ff
...
...
@@ -35,7 +35,7 @@ UeRlsTask::UeRlsTask(TaskBase *base) : m_base{base}
void
UeRlsTask
::
onStart
()
{
m_udpTask
->
start
();
m_ctlLayer
->
onStart
(
this
,
m_udpTask
);
m_ctlLayer
->
onStart
(
m_udpTask
);
setTimer
(
TIMER_ID_ACK_CONTROL
,
TIMER_PERIOD_ACK_CONTROL
);
setTimer
(
TIMER_ID_ACK_SEND
,
TIMER_PERIOD_ACK_SEND
);
...
...
@@ -73,21 +73,6 @@ void UeRlsTask::onLoop()
m_ctlLayer
->
handleRlsMessage
(
w
.
cellId
,
*
w
.
msg
);
break
;
}
case
NmUeRlsToRls
:
:
DOWNLINK_DATA
:
{
auto
m
=
std
::
make_unique
<
NmUeRlsToNas
>
(
NmUeRlsToNas
::
DATA_PDU_DELIVERY
);
m
->
psi
=
w
.
psi
;
m
->
pdu
=
std
::
move
(
w
.
data
);
m_base
->
l3Task
->
push
(
std
::
move
(
m
));
break
;
}
case
NmUeRlsToRls
:
:
DOWNLINK_RRC
:
{
auto
m
=
std
::
make_unique
<
NmUeRlsToRrc
>
(
NmUeRlsToRrc
::
DOWNLINK_RRC_DELIVERY
);
m
->
cellId
=
w
.
cellId
;
m
->
channel
=
w
.
rrcChannel
;
m
->
pdu
=
std
::
move
(
w
.
data
);
m_base
->
l3Task
->
push
(
std
::
move
(
m
));
break
;
}
case
NmUeRlsToRls
:
:
RADIO_LINK_FAILURE
:
{
auto
m
=
std
::
make_unique
<
NmUeRlsToRrc
>
(
NmUeRlsToRrc
::
RADIO_LINK_FAILURE
);
m
->
rlfCause
=
w
.
rlfCause
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment