Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
O
OpenXG-RAN
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
lizhongxiao
OpenXG-RAN
Commits
3fa3e6b1
Commit
3fa3e6b1
authored
Feb 12, 2018
by
shahab SHARIAT BAGHERI
Committed by
Robert Schmidt
Feb 13, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Monitoring App MAC status related parameters
parent
d741b951
Changes
9
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
333 additions
and
26 deletions
+333
-26
openair1/SCHED/phy_procedures_lte_eNb.c
openair1/SCHED/phy_procedures_lte_eNb.c
+2
-0
openair2/ENB_APP/CONTROL_MODULES/MAC/flexran_agent_mac.c
openair2/ENB_APP/CONTROL_MODULES/MAC/flexran_agent_mac.c
+93
-16
openair2/ENB_APP/MESSAGES/V2/stats_common.proto
openair2/ENB_APP/MESSAGES/V2/stats_common.proto
+29
-0
openair2/ENB_APP/MESSAGES/V2/stats_messages.proto
openair2/ENB_APP/MESSAGES/V2/stats_messages.proto
+2
-0
openair2/ENB_APP/flexran_agent_ran_api.c
openair2/ENB_APP/flexran_agent_ran_api.c
+131
-1
openair2/ENB_APP/flexran_agent_ran_api.h
openair2/ENB_APP/flexran_agent_ran_api.h
+53
-0
openair2/LAYER2/MAC/defs.h
openair2/LAYER2/MAC/defs.h
+11
-0
openair2/LAYER2/MAC/eNB_scheduler_dlsch.c
openair2/LAYER2/MAC/eNB_scheduler_dlsch.c
+11
-9
openair2/LAYER2/MAC/proto.h
openair2/LAYER2/MAC/proto.h
+1
-0
No files found.
openair1/SCHED/phy_procedures_lte_eNb.c
View file @
3fa3e6b1
...
...
@@ -53,6 +53,8 @@
extern
uint8_t
nfapi_mode
;
int
oai_nfapi_rach_ind
(
nfapi_rach_indication_t
*
rach_ind
);
int
harq_pid_updated
[
NUM_MAX_UE
][
8
];
int
harq_pid_round
[
NUM_MAX_UE
][
8
];
void
pmch_procedures
(
PHY_VARS_eNB
*
eNB
,
eNB_rxtx_proc_t
*
proc
,
PHY_VARS_RN
*
rn
,
relaying_type_t
r_type
)
{
...
...
openair2/ENB_APP/CONTROL_MODULES/MAC/flexran_agent_mac.c
View file @
3fa3e6b1
...
...
@@ -27,8 +27,6 @@
*/
#include "flexran_agent_mac.h"
#include "flexran_agent_extern.h"
#include "flexran_agent_common.h"
#include "flexran_agent_mac_internal.h"
#include "flexran_agent_net_comm.h"
#include "flexran_agent_timer.h"
...
...
@@ -61,8 +59,8 @@ int flexran_agent_mac_stats_reply(mid_t mod_id,
// Protocol__FlexHeader *header;
int
i
,
j
,
k
;
//
int cc_id = 0;
int
i
,
j
,
k
,
lcid
;
int
cc_id
=
0
;
int
enb_id
=
mod_id
;
/* Allocate memory for list of UE reports */
...
...
@@ -490,6 +488,85 @@ int flexran_agent_mac_stats_reply(mid_t mod_id,
}
if
(
report_config
->
ue_report_type
[
i
].
ue_report_flags
&
PROTOCOL__FLEX_UE_STATS_TYPE__FLUST_MON_APP
)
{
Protocol__FlexMonApp
*
monapp
;
monapp
=
malloc
(
sizeof
(
Protocol__FlexMonApp
));
if
(
monapp
==
NULL
)
goto
error
;
protocol__flex_mon_app__init
(
monapp
);
monapp
->
size_sdus_dl
=
flexran_get_size_dl_mac_sdus
(
mod_id
,
cc_id
);
monapp
->
has_size_sdus_dl
=
1
;
monapp
->
size_sdus_ul
=
flexran_get_size_ul_mac_sdus
(
mod_id
,
cc_id
);
monapp
->
has_size_sdus_ul
=
1
;
monapp
->
total_size_sdus_dl
=
flexran_get_total_size_dl_mac_sdus
(
mod_id
,
i
,
cc_id
);
monapp
->
has_total_size_sdus_dl
=
1
;
monapp
->
total_size_sdus_ul
=
flexran_get_total_size_ul_mac_sdus
(
mod_id
,
i
,
cc_id
);
monapp
->
has_total_size_sdus_ul
=
1
;
monapp
->
harq_round
=
flexran_get_harq_round
(
mod_id
,
cc_id
,
i
);
monapp
->
has_harq_round
=
1
;
monapp
->
dl_tbs
=
flexran_get_TBS_dl
(
mod_id
,
i
,
cc_id
);
monapp
->
has_dl_tbs
=
1
;
monapp
->
ul_tbs
=
flexran_get_TBS_ul
(
mod_id
,
i
,
cc_id
);
monapp
->
has_ul_tbs
=
1
;
monapp
->
prb_retx
=
flexran_get_num_prb_retx_per_ue
(
mod_id
,
i
,
cc_id
);
monapp
->
has_prb_retx
=
1
;
monapp
->
prb_tx
=
flexran_get_num_prb_dl_tx_per_ue
(
mod_id
,
i
,
cc_id
);
monapp
->
has_prb_tx
=
1
;
monapp
->
prb_rx
=
flexran_get_num_prb_ul_rx_per_ue
(
mod_id
,
i
,
cc_id
);
monapp
->
has_prb_rx
=
1
;
monapp
->
total_prb_tx
=
flexran_get_total_prb_dl_tx_per_ue
(
mod_id
,
i
,
cc_id
);
monapp
->
has_total_prb_tx
=
1
;
monapp
->
total_prb_rx
=
flexran_get_total_prb_ul_rx_per_ue
(
mod_id
,
i
,
cc_id
);
monapp
->
has_total_prb_rx
=
1
;
monapp
->
total_pdu_tx
=
flexran_get_total_num_pdu_dl
(
mod_id
,
i
,
cc_id
);
monapp
->
has_total_pdu_tx
=
1
;
monapp
->
total_pdu_rx
=
flexran_get_total_num_pdu_ul
(
mod_id
,
i
,
cc_id
);
monapp
->
has_total_pdu_rx
=
1
;
Protocol__FlexRecMacSdu
**
mac_sdus
;
mac_sdus
=
malloc
(
sizeof
(
Protocol__FlexRecMacSdu
)
*
flexran_get_num_mac_sdu_tx
(
mod_id
,
i
,
cc_id
));
if
(
mac_sdus
==
NULL
)
goto
error
;
monapp
->
n_rec_mac_sdu
=
flexran_get_num_mac_sdu_tx
(
mod_id
,
i
,
cc_id
);
for
(
j
=
0
;
j
<
monapp
->
n_rec_mac_sdu
;
j
++
){
mac_sdus
[
j
]
=
malloc
(
sizeof
(
Protocol__FlexRecMacSdu
));
protocol__flex_rec_mac_sdu__init
(
mac_sdus
[
j
]);
mac_sdus
[
j
]
->
lcid
=
flexran_get_mac_sdu_lcid_index
(
mod_id
,
i
,
cc_id
,
j
);
mac_sdus
[
j
]
->
has_lcid
=
1
;
mac_sdus
[
j
]
->
sdu_length
=
flexran_get_mac_sdu_size
(
mod_id
,
i
,
cc_id
,
mac_sdus
[
j
]
->
lcid
);
mac_sdus
[
j
]
->
has_sdu_length
=
1
;
}
monapp
->
rec_mac_sdu
=
mac_sdus
;
ue_report
[
i
]
->
mon_app
=
monapp
;
}
...
...
@@ -783,15 +860,16 @@ int flexran_agent_mac_sf_trigger(mid_t mod_id, const void *params, Protocol__Fle
sf_trigger_msg
->
n_dl_info
=
0
;
for
(
i
=
0
;
i
<
NUMBER_OF_UE_MAX
;
i
++
)
{
for
(
j
=
0
;
j
<
8
;
j
++
)
{
if
(
RC
.
mac
&&
RC
.
mac
[
mod_id
]
&&
RC
.
mac
[
mod_id
]
->
UE_list
.
eNB_UE_stats
[
UE_PCCID
(
mod_id
,
i
)][
i
].
harq_pid
==
1
)
{
available_harq
[
i
]
=
j
;
sf_trigger_msg
->
n_dl_info
++
;
break
;
for
(
i
=
0
;
i
<
NUMBER_OF_UE_MAX
;
i
++
)
{
for
(
j
=
0
;
j
<
8
;
j
++
)
{
if
(
harq_pid_updated
[
i
][
j
]
==
1
)
{
available_harq
[
i
]
=
j
;
sf_trigger_msg
->
n_dl_info
++
;
break
;
}
}
}
}
// LOG_I(FLEXRAN_AGENT, "Sending subframe trigger for frame %d and subframe %d\n", flexran_get_current_frame(mod_id), (flexran_get_current_subframe(mod_id) + 1) % 10);
...
...
@@ -828,14 +906,13 @@ int flexran_agent_mac_sf_trigger(mid_t mod_id, const void *params, Protocol__Fle
dl_info
[
i
]
->
harq_process_id
=
available_harq
[
UE_id
];
if
(
RC
.
mac
&&
RC
.
mac
[
mod_id
])
RC
.
mac
[
mod_id
]
->
UE_list
.
eNB_UE_stats
[
UE_PCCID
(
mod_id
,
i
)][
UE_id
].
harq_pid
=
0
;
harq_pid_updated
[
UE_id
][
available_harq
[
UE_id
]]
=
0
;
dl_info
[
i
]
->
has_harq_process_id
=
1
;
/* Fill in the status of the HARQ process (2 TBs)*/
dl_info
[
i
]
->
n_harq_status
=
2
;
dl_info
[
i
]
->
harq_status
=
malloc
(
sizeof
(
uint32_t
)
*
dl_info
[
i
]
->
n_harq_status
);
for
(
j
=
0
;
j
<
dl_info
[
i
]
->
n_harq_status
;
j
++
)
{
dl_info
[
i
]
->
harq_status
[
j
]
=
RC
.
mac
[
mod_id
]
->
UE_list
.
UE_sched_ctrl
[
i
].
round
[
UE_PCCID
(
mod_id
,
i
)][
j
];
dl_info
[
i
]
->
harq_status
[
j
]
=
harq_pid_round
[
UE_id
][
available_harq
[
UE_id
]
];
// TODO: This should be different per TB
}
// LOG_I(FLEXRAN_AGENT, "Sending subframe trigger for frame %d and subframe %d and harq %d (round %d)\n", flexran_get_current_frame(mod_id), (flexran_get_current_subframe(mod_id) + 1) % 10, dl_info[i]->harq_process_id, dl_info[i]->harq_status[0]);
...
...
@@ -1169,10 +1246,10 @@ void flexran_agent_init_mac_agent(mid_t mod_id) {
lfds700_ringbuffer_init_valid_on_current_logical_core
(
&
ringbuffer_state
[
mod_id
],
dl_mac_config_array
[
mod_id
],
num_elements
,
&
ps
[
mod_id
],
NULL
);
for
(
i
=
0
;
i
<
NUMBER_OF_UE_MAX
;
i
++
)
{
for
(
j
=
0
;
j
<
8
;
j
++
)
{
if
(
RC
.
mac
&&
RC
.
mac
[
mod_id
])
RC
.
mac
[
mod_id
]
->
UE_list
.
eNB_UE_stats
[
UE_PCCID
(
mod_id
,
i
)][
i
].
harq_pid
=
0
;
harq_pid_updated
[
i
][
j
]
=
0
;
}
}
}
/***********************************************
...
...
openair2/ENB_APP/MESSAGES/V2/stats_common.proto
View file @
3fa3e6b1
...
...
@@ -269,3 +269,32 @@ message flex_pdcp_stats {
optional
uint64
sfn
=
17
;
}
//
// Monitoring App
//
message
flex_mon_app
{
optional
uint32
size_sdus_dl
=
1
;
optional
uint32
size_sdus_ul
=
2
;
optional
uint32
total_size_sdus_dl
=
3
;
optional
uint32
total_size_sdus_ul
=
4
;
optional
uint32
harq_round
=
5
;
optional
uint32
dl_tbs
=
6
;
optional
uint32
ul_tbs
=
7
;
optional
uint32
prb_retx
=
8
;
optional
uint32
prb_tx
=
9
;
optional
uint32
prb_rx
=
10
;
optional
uint32
total_prb_tx
=
11
;
optional
uint32
total_prb_rx
=
12
;
optional
uint32
total_pdu_tx
=
13
;
optional
uint32
total_pdu_rx
=
14
;
repeated
flex_rec_mac_sdu
rec_mac_sdu
=
15
;
}
message
flex_rec_mac_sdu
{
optional
uint32
sdu_length
=
1
;
optional
uint32
lcid
=
2
;
}
openair2/ENB_APP/MESSAGES/V2/stats_messages.proto
View file @
3fa3e6b1
...
...
@@ -49,6 +49,7 @@ message flex_ue_stats_report {
optional
flex_ul_cqi_report
ul_cqi_report
=
9
;
optional
flex_rrc_measurements
rrc_measurements
=
10
;
optional
flex_pdcp_stats
pdcp_stats
=
11
;
optional
flex_mon_app
mon_app
=
12
;
}
//
...
...
@@ -85,6 +86,7 @@ enum flex_ue_stats_type {
FLUST_DL_CQI
=
16
;
FLUST_PBS
=
32
;
FLUST_UL_CQI
=
64
;
FLUST_MON_APP
=
128
;
FLUST_PDCP_STATS
=
1024
;
FLUST_RRC_MEASUREMENTS
=
65536
;
...
...
openair2/ENB_APP/flexran_agent_ran_api.c
View file @
3fa3e6b1
...
...
@@ -132,7 +132,7 @@ int8_t flexran_get_ue_phr(mid_t mod_id, mid_t ue_id)
uint8_t
flexran_get_ue_wcqi
(
mid_t
mod_id
,
mid_t
ue_id
)
{
if
(
!
phy_is_present
(
mod_id
,
0
))
return
0
;
return
RC
.
eNB
[
mod_id
][
0
]
->
UE_stats
[
ue_id
].
DL
_cqi
[
0
];
return
RC
.
mac
[
mod_id
]
->
UE_list
.
UE_sched_ctrl
[
ue_id
].
dl
_cqi
[
0
];
}
rlc_buffer_occupancy_t
flexran_get_tx_queue_size
(
mid_t
mod_id
,
mid_t
ue_id
,
logical_chan_id_t
channel_id
)
...
...
@@ -239,6 +239,124 @@ int flexran_get_MAC_CE_bitmap_TA(mid_t mod_id, mid_t ue_id, uint8_t cc_id)
}
}
uint32_t
flexran_get_num_mac_sdu_tx
(
mid_t
mod_id
,
mid_t
ue_id
,
int
cc_id
){
if
(
!
mac_is_present
(
mod_id
))
return
0
;
return
RC
.
mac
[
mod_id
]
->
UE_list
.
eNB_UE_stats
[
cc_id
][
ue_id
].
num_mac_sdu_tx
;
}
uint32_t
flexran_get_mac_sdu_size
(
mid_t
mod_id
,
mid_t
ue_id
,
int
cc_id
,
int
lcid
){
if
(
!
mac_is_present
(
mod_id
))
return
0
;
return
RC
.
mac
[
mod_id
]
->
UE_list
.
eNB_UE_stats
[
cc_id
][
ue_id
].
sdu_length_tx
[
lcid
];
}
unsigned
char
flexran_get_mac_sdu_lcid
(
mid_t
mod_id
,
mid_t
ue_id
,
int
cc_id
,
int
lcid
){
if
(
!
mac_is_present
(
mod_id
))
return
0
;
return
RC
.
mac
[
mod_id
]
->
UE_list
.
eNB_UE_stats
[
cc_id
][
ue_id
].
lcid_sdu
[
lcid
];
}
unsigned
char
flexran_get_mac_sdu_lcid_index
(
mid_t
mod_id
,
mid_t
ue_id
,
int
cc_id
,
int
index
){
if
(
!
mac_is_present
(
mod_id
))
return
0
;
return
RC
.
mac
[
mod_id
]
->
UE_list
.
eNB_UE_stats
[
cc_id
][
ue_id
].
lcid_sdu
[
index
];
}
uint32_t
flexran_get_total_size_dl_mac_sdus
(
mid_t
mod_id
,
mid_t
ue_id
,
int
cc_id
){
if
(
!
mac_is_present
(
mod_id
))
return
0
;
return
RC
.
mac
[
mod_id
]
->
UE_list
.
eNB_UE_stats
[
cc_id
][
ue_id
].
total_sdu_bytes
;
}
uint32_t
flexran_get_total_size_ul_mac_sdus
(
mid_t
mod_id
,
mid_t
ue_id
,
int
cc_id
){
if
(
!
mac_is_present
(
mod_id
))
return
0
;
return
RC
.
mac
[
mod_id
]
->
eNB_stats
[
cc_id
].
total_ulsch_bytes_rx
;
}
uint32_t
flexran_get_total_num_pdu_dl
(
mid_t
mod_id
,
mid_t
ue_id
,
int
cc_id
){
if
(
!
mac_is_present
(
mod_id
))
return
0
;
return
RC
.
mac
[
mod_id
]
->
UE_list
.
eNB_UE_stats
[
cc_id
][
ue_id
].
total_num_pdus
;
}
uint32_t
flexran_get_total_num_pdu_ul
(
mid_t
mod_id
,
mid_t
ue_id
,
int
cc_id
){
if
(
!
mac_is_present
(
mod_id
))
return
0
;
return
RC
.
mac
[
mod_id
]
->
UE_list
.
eNB_UE_stats
[
cc_id
][
ue_id
].
total_num_pdus_rx
;
}
/*Total RB used This should be modified later*/
uint32_t
flexran_get_total_prb_dl_tx_per_ue
(
mid_t
mod_id
,
mid_t
ue_id
,
int
cc_id
){
if
(
!
mac_is_present
(
mod_id
))
return
0
;
return
RC
.
mac
[
mod_id
]
->
UE_list
.
eNB_UE_stats
[
cc_id
][
ue_id
].
total_rbs_used
;
}
uint32_t
flexran_get_total_prb_ul_rx_per_ue
(
mid_t
mod_id
,
mid_t
ue_id
,
int
cc_id
){
if
(
!
mac_is_present
(
mod_id
))
return
0
;
return
RC
.
mac
[
mod_id
]
->
UE_list
.
eNB_UE_stats
[
cc_id
][
ue_id
].
total_rbs_used_rx
;
}
uint32_t
flexran_get_TBS_ul
(
mid_t
mod_id
,
mid_t
ue_id
,
int
cc_id
){
if
(
!
mac_is_present
(
mod_id
))
return
0
;
return
RC
.
mac
[
mod_id
]
->
UE_list
.
eNB_UE_stats
[
cc_id
][
ue_id
].
ulsch_TBS
;
}
uint32_t
flexran_get_TBS_dl
(
mid_t
mod_id
,
mid_t
ue_id
,
int
cc_id
){
if
(
!
mac_is_present
(
mod_id
))
return
0
;
return
RC
.
mac
[
mod_id
]
->
UE_list
.
eNB_UE_stats
[
cc_id
][
ue_id
].
TBS
;
}
uint16_t
flexran_get_num_prb_retx_per_ue
(
mid_t
mod_id
,
mid_t
ue_id
,
uint32_t
cc_id
)
{
if
(
!
mac_is_present
(
mod_id
))
return
0
;
return
RC
.
mac
[
mod_id
]
->
UE_list
.
eNB_UE_stats
[
cc_id
][
ue_id
].
rbs_used_retx
;
}
uint16_t
flexran_get_num_prb_dl_tx_per_ue
(
mid_t
mod_id
,
mid_t
ue_id
,
uint32_t
cc_id
){
if
(
!
mac_is_present
(
mod_id
))
return
0
;
return
RC
.
mac
[
mod_id
]
->
UE_list
.
eNB_UE_stats
[
cc_id
][
ue_id
].
rbs_used
;
}
uint16_t
flexran_get_num_prb_ul_rx_per_ue
(
mid_t
mod_id
,
mid_t
ue_id
,
uint32_t
cc_id
){
if
(
!
mac_is_present
(
mod_id
))
return
0
;
return
RC
.
mac
[
mod_id
]
->
UE_list
.
eNB_UE_stats
[
cc_id
][
ue_id
].
rbs_used_rx
;
}
uint32_t
flexran_get_size_dl_mac_sdus
(
mid_t
mod_id
,
uint32_t
cc_id
){
if
(
!
mac_is_present
(
mod_id
))
return
0
;
return
RC
.
mac
[
mod_id
]
->
eNB_stats
[
cc_id
].
dlsch_bytes_tx
;
}
uint32_t
flexran_get_size_ul_mac_sdus
(
mid_t
mod_id
,
uint32_t
cc_id
){
if
(
!
mac_is_present
(
mod_id
))
return
0
;
return
RC
.
mac
[
mod_id
]
->
eNB_stats
[
cc_id
].
ulsch_bytes_rx
;
}
int
flexran_get_active_CC
(
mid_t
mod_id
,
mid_t
ue_id
)
{
if
(
!
mac_is_present
(
mod_id
))
return
0
;
...
...
@@ -307,6 +425,9 @@ int flexran_get_harq(mid_t mod_id,
}
*pid = harq_pid;
*round = harq_round;*/
/* if (round > 0) { */
...
...
@@ -319,6 +440,15 @@ int flexran_get_harq(mid_t mod_id,
return
0
;
}
int
flexran_get_harq_round
(
mid_t
mod_id
,
uint8_t
cc_id
,
mid_t
ue_id
){
if
(
!
mac_is_present
(
mod_id
))
return
0
;
return
RC
.
mac
[
mod_id
]
->
UE_list
.
eNB_UE_stats
[
cc_id
][
ue_id
].
harq_round
;
}
int32_t
flexran_get_p0_pucch_dbm
(
mid_t
mod_id
,
mid_t
ue_id
,
uint8_t
cc_id
)
{
if
(
!
phy_is_present
(
mod_id
,
cc_id
))
return
0
;
...
...
openair2/ENB_APP/flexran_agent_ran_api.h
View file @
3fa3e6b1
...
...
@@ -87,6 +87,12 @@ int8_t flexran_get_ue_phr(mid_t mod_id, mid_t ue_id);
/* Get the UE wideband CQI */
uint8_t
flexran_get_ue_wcqi
(
mid_t
mod_id
,
mid_t
ue_id
);
/*Get downlink TBS*/
uint32_t
flexran_get_TBS_dl
(
mid_t
mod_id
,
mid_t
ue_id
,
int
cc_id
);
/*Get uplink TBS */
uint32_t
flexran_get_TBS_ul
(
mid_t
mod_id
,
mid_t
ue_id
,
int
cc_id
);
/* Get the transmission queue size for a UE with a channel_id logical channel id */
rlc_buffer_occupancy_t
flexran_get_tx_queue_size
(
mid_t
mod_id
,
mid_t
ue_id
,
logical_chan_id_t
channel_id
);
...
...
@@ -107,6 +113,51 @@ void flexran_update_TA(mid_t mod_id, mid_t ue_id, uint8_t cc_id); */
/* this function is broken */
int
flexran_get_MAC_CE_bitmap_TA
(
mid_t
mod_id
,
mid_t
ue_id
,
uint8_t
cc_id
);
/*Return the MAC sdu size got from logical channel lcid */
uint32_t
flexran_get_mac_sdu_size
(
mid_t
mod_id
,
mid_t
ue_id
,
int
cc_id
,
int
lcid
);
/*Return number of MAC SDUs obtained in MAC layer*/
uint32_t
flexran_get_num_mac_sdu_tx
(
mid_t
mod_id
,
mid_t
ue_id
,
int
cc_id
);
/*Get LCID MAC SDU*/
unsigned
char
flexran_get_mac_sdu_lcid
(
mid_t
mod_id
,
mid_t
ue_id
,
int
cc_id
,
int
lcid
);
/*Get mac sdu lcid index*/
unsigned
char
flexran_get_mac_sdu_lcid_index
(
mid_t
mod_id
,
mid_t
ue_id
,
int
cc_id
,
int
index
);
/*Get MAC size sdus length dl*/
uint32_t
flexran_get_size_dl_mac_sdus
(
mid_t
mod_id
,
uint32_t
cc_id
);
/*Get MAC size sdus length ul */
uint32_t
flexran_get_size_ul_mac_sdus
(
mid_t
mod_id
,
uint32_t
cc_id
);
/*Get total size DL MAC SDUS*/
uint32_t
flexran_get_total_size_dl_mac_sdus
(
mid_t
mod_id
,
mid_t
ue_id
,
int
cc_id
);
/*Get total size of UL mac SDUS*/
uint32_t
flexran_get_total_size_ul_mac_sdus
(
mid_t
mod_id
,
mid_t
ue_id
,
int
cc_id
);
/*Get total number of PDU DL*/
uint32_t
flexran_get_total_num_pdu_dl
(
mid_t
mod_id
,
mid_t
ue_id
,
int
cc_id
);
/*Get total number of PDU UL*/
uint32_t
flexran_get_total_num_pdu_ul
(
mid_t
mod_id
,
mid_t
ue_id
,
int
cc_id
);
/*Get total PRB dl TODO Should be changed*/
uint32_t
flexran_get_total_prb_dl_tx_per_ue
(
mid_t
mod_id
,
mid_t
ue_id
,
int
cc_id
);
/*Get total PRB ul TODO Should be changed*/
uint32_t
flexran_get_total_prb_ul_rx_per_ue
(
mid_t
mod_id
,
mid_t
ue_id
,
int
cc_id
);
/*Get number of prb for tx per UE DL*/
uint16_t
flexran_get_num_prb_dl_tx_per_ue
(
mid_t
mod_id
,
mid_t
ue_id
,
uint32_t
cc_id
);
/*Get number of prb for rx per UE UL*/
uint16_t
flexran_get_num_prb_ul_rx_per_ue
(
mid_t
mod_id
,
mid_t
ue_id
,
uint32_t
cc_id
);
/*Get number of prb for retx per UE*/
uint16_t
flexran_get_num_prb_retx_per_ue
(
mid_t
mod_id
,
mid_t
ue_id
,
uint32_t
cc_id
);
/* Get the number of active component carriers for a specific UE */
int
flexran_get_active_CC
(
mid_t
mod_id
,
mid_t
ue_id
);
...
...
@@ -198,6 +249,8 @@ int flexran_get_harq(mid_t mod_id, uint8_t cc_id, mid_t ue_id, frame_t frame,
sub_frame_t subframe, unsigned char *id, unsigned char *round,
uint8_t harq_flag); */
int
flexran_get_harq_round
(
mid_t
mod_id
,
uint8_t
cc_id
,
mid_t
ue_id
);
/* Uplink power control management*/
int32_t
flexran_get_p0_pucch_dbm
(
mid_t
mod_id
,
mid_t
ue_id
,
uint8_t
cc_id
);
...
...
openair2/LAYER2/MAC/defs.h
View file @
3fa3e6b1
...
...
@@ -562,6 +562,13 @@ typedef struct {
uint32_t
num_retransmission
;
/// instantaneous tx throughput for each TTI
// uint32_t tti_throughput[NB_RB_MAX];
// Number of received MAC SDU DL
uint32_t
num_mac_sdu_tx
;
// LCID related to SDU
unsigned
char
lcid_sdu
[
NB_RB_MAX
];
// Length of SDU Got from LC DL
uint32_t
sdu_length_tx
[
NB_RB_MAX
];
/// overall
//
...
...
@@ -648,6 +655,10 @@ typedef struct {
uint32_t
total_num_pdus_rx
;
/// num of error pdus
uint32_t
total_num_errors_rx
;
// Number of MAC SDU UL
uint32_t
num_mac_sdu_rx
;
// Length of SDU Got from LC UL
uint32_t
sdu_length_rx
[
NB_RB_MAX
];
}
eNB_UE_STATS
;
/*! \brief eNB template for UE context information */
...
...
openair2/LAYER2/MAC/eNB_scheduler_dlsch.c
View file @
3fa3e6b1
...
...
@@ -1025,6 +1025,8 @@ schedule_ue_spec(module_id_t module_idP,slice_id_t slice_idP,
module_idP
,
CC_id
,
sdu_lengths
[
0
]);
sdu_length_total
=
sdu_lengths
[
0
];
sdu_lcids
[
0
]
=
DCCH
;
UE_list
->
eNB_UE_stats
[
CC_id
][
UE_id
].
lcid_sdu
[
0
]
=
DCCH
;
UE_list
->
eNB_UE_stats
[
CC_id
][
UE_id
].
sdu_length_tx
[
DCCH
]
=
sdu_lengths
[
0
];
UE_list
->
eNB_UE_stats
[
CC_id
][
UE_id
].
num_pdu_tx
[
DCCH
]
+=
1
;
UE_list
->
eNB_UE_stats
[
CC_id
][
UE_id
].
num_bytes_tx
[
DCCH
]
+=
sdu_lengths
[
0
];
num_sdus
=
1
;
...
...
@@ -1068,8 +1070,9 @@ schedule_ue_spec(module_id_t module_idP,slice_id_t slice_idP,
sdu_lcids
[
num_sdus
]
=
DCCH1
;
sdu_length_total
+=
sdu_lengths
[
num_sdus
];
header_len_dcch
+=
2
;
UE_list
->
eNB_UE_stats
[
CC_id
][
UE_id
].
num_pdu_tx
[
DCCH1
]
+=
1
;
UE_list
->
eNB_UE_stats
[
CC_id
][
UE_id
].
lcid_sdu
[
num_sdus
]
=
DCCH1
;
UE_list
->
eNB_UE_stats
[
CC_id
][
UE_id
].
sdu_length_tx
[
DCCH1
]
=
sdu_lengths
[
num_sdus
];
UE_list
->
eNB_UE_stats
[
CC_id
][
UE_id
].
num_pdu_tx
[
DCCH1
]
+=
1
;
UE_list
->
eNB_UE_stats
[
CC_id
][
UE_id
].
num_bytes_tx
[
DCCH1
]
+=
sdu_lengths
[
num_sdus
];
num_sdus
++
;
#ifdef DEBUG_eNB_SCHEDULER
...
...
@@ -1139,12 +1142,10 @@ schedule_ue_spec(module_id_t module_idP,slice_id_t slice_idP,
module_idP
,
sdu_lengths
[
num_sdus
],
lcid
);
sdu_lcids
[
num_sdus
]
=
lcid
;
sdu_length_total
+=
sdu_lengths
[
num_sdus
];
UE_list
->
eNB_UE_stats
[
CC_id
][
UE_id
].
num_pdu_tx
[
lcid
]
+=
1
;
UE_list
->
eNB_UE_stats
[
CC_id
][
UE_id
].
num_bytes_tx
[
lcid
]
+=
sdu_lengths
[
num_sdus
];
UE_list
->
eNB_UE_stats
[
CC_id
][
UE_id
].
lcid_sdu
[
num_sdus
]
=
lcid
;
UE_list
->
eNB_UE_stats
[
CC_id
][
UE_id
].
sdu_length_tx
[
lcid
]
=
sdu_lengths
[
num_sdus
];
UE_list
->
eNB_UE_stats
[
CC_id
][
UE_id
].
num_pdu_tx
[
lcid
]
+=
1
;
UE_list
->
eNB_UE_stats
[
CC_id
][
UE_id
].
num_bytes_tx
[
lcid
]
+=
sdu_lengths
[
num_sdus
];
if
(
sdu_lengths
[
num_sdus
]
<
128
)
{
header_len_dtch
--
;
header_len_dtch_last
--
;
...
...
@@ -1344,7 +1345,8 @@ schedule_ue_spec(module_id_t module_idP,slice_id_t slice_idP,
eNB
->
eNB_stats
[
CC_id
].
dlsch_pdus_tx
+=
1
;
UE_list
->
eNB_UE_stats
[
CC_id
][
UE_id
].
rbs_used
=
nb_rb
;
UE_list
->
eNB_UE_stats
[
CC_id
][
UE_id
].
total_rbs_used
+=
nb_rb
;
UE_list
->
eNB_UE_stats
[
CC_id
][
UE_id
].
total_rbs_used
+=
nb_rb
;
UE_list
->
eNB_UE_stats
[
CC_id
][
UE_id
].
num_mac_sdu_tx
=
num_sdus
;
UE_list
->
eNB_UE_stats
[
CC_id
][
UE_id
].
dlsch_mcs1
=
eNB_UE_stats
->
dlsch_mcs1
;
UE_list
->
eNB_UE_stats
[
CC_id
][
UE_id
].
dlsch_mcs2
=
mcs
;
UE_list
->
eNB_UE_stats
[
CC_id
][
UE_id
].
TBS
=
TBS
;
...
...
openair2/LAYER2/MAC/proto.h
View file @
3fa3e6b1
...
...
@@ -29,6 +29,7 @@
#ifndef __LAYER2_MAC_PROTO_H__
#define __LAYER2_MAC_PROTO_H__
#include "flexran_agent_defs.h"
#include "LAYER2/MAC/defs.h"
/** \addtogroup _mac
...
...
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