Skip to content

Commit

Permalink
Add RNTI share type: greedy
Browse files Browse the repository at this point in the history
* [model] besides logging the used RNTI shared, also log the nof RNTI in the current DCI data
  • Loading branch information
bastian-src committed Jul 29, 2024
1 parent b218c07 commit 595f70d
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/logic/downloader.rs
Original file line number Diff line number Diff line change
Expand Up @@ -488,7 +488,9 @@ fn try_to_extract_last_rtt(buffer: &[u8]) -> Option<u64> {
}

fn determine_rnti_fair_share_type_by_path(path: &str) -> u8 {
if path.contains("fair1") {
if path.contains("fair2") {
2
} else if path.contains("fair1") {
1
} else {
0
Expand Down
6 changes: 6 additions & 0 deletions src/logic/model_handler.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ pub const STANDARD_BIT_PER_PRB: u64 = 500; /* Chosen from historical data */

pub const RNTI_SHARE_TYPE_ALL: u8 = 0;
pub const RNTI_SHARE_TYPE_DL_OCCURENCES: u8 = 1;
pub const RNTI_SHARE_TYPE_GREEDY: u8 = 2;
// pub const RNTI_SHARE_TYPE_UNFAIR: u8 = 0; // Don't share idle PRBs
// pub const RNTI_SHARE_TYPE_ACTIVE: u8 = 0; // Share idle PRBs among "active" RNTIs

Expand Down Expand Up @@ -89,6 +90,7 @@ pub struct MetricBasis {
pub nof_dci: u64,
pub p_cell: u64,
pub nof_rnti_shared: u64,
pub nof_rnti_in_dci: u64,
pub rnti_share_type: u8,
pub p_alloc: u64,
pub p_alloc_no_tbs: u64,
Expand Down Expand Up @@ -528,6 +530,9 @@ fn calculate_pbe_cc_capacity(
print_debug(&format!("DEBUG [model] RNTI Fair Share Type 1: {} -> {} | {}", nof_all_rnti, nof_filtered, nof_occurenes_threshould));
nof_filtered
}
RNTI_SHARE_TYPE_GREEDY => {
1
}
// Default: RNTI_SHARE_TYPE_ALL
_ => {
used_rnti_share_type = RNTI_SHARE_TYPE_ALL;
Expand Down Expand Up @@ -595,6 +600,7 @@ fn calculate_pbe_cc_capacity(
nof_dci,
p_cell,
nof_rnti_shared,
nof_rnti_in_dci: nof_rnti,
rnti_share_type: used_rnti_share_type,
p_alloc,
p_alloc_no_tbs,
Expand Down

0 comments on commit 595f70d

Please sign in to comment.