Move dl_tbf_preemptive_retransmission field from BTS to PCU

Change-Id: I3ab32fcafe83f3ecb116a5b8a05f58f3fddc5451
This commit is contained in:
Pau Espin 2021-01-14 12:56:58 +01:00
parent a281495008
commit 05f9f59a67
6 changed files with 6 additions and 12 deletions

View File

@ -253,7 +253,6 @@ static void bts_init(struct gprs_rlcmac_bts *bts, BTS* bts_obj)
bts->app_info = NULL;
bts->bts = bts_obj;
bts->dl_tbf_preemptive_retransmission = true;
bts->T_defs_bts = T_defs_bts;
osmo_tdefs_reset(bts->T_defs_bts);

View File

@ -106,7 +106,6 @@ struct gprs_rlcmac_bts {
uint8_t n3105;
struct gprs_rlcmac_trx trx[8];
bool dl_tbf_preemptive_retransmission;
uint8_t si13[GSM_MACBLOCK_LEN];
bool si13_is_set;
/* 0 to support resegmentation in DL, 1 for no reseg */

View File

@ -51,6 +51,7 @@ struct gprs_pcu *gprs_pcu_alloc(void *ctx)
pcu->vty.max_mcs_ul = MAX_EDGE_MCS;
pcu->vty.max_mcs_dl = MAX_EDGE_MCS;
pcu->vty.alpha = 0; /* a = 0.0 */
pcu->vty.dl_tbf_preemptive_retransmission = true;
pcu->T_defs = T_defs_pcu;
osmo_tdefs_reset(pcu->T_defs);

View File

@ -76,6 +76,7 @@ struct gprs_pcu {
uint8_t max_mcs_dl, max_mcs_ul;
uint8_t force_two_phase;
uint8_t alpha, gamma;
bool dl_tbf_preemptive_retransmission;
} vty;
struct gsmtap_inst *gsmtap;

View File

@ -231,7 +231,7 @@ static int config_write_pcu(struct vty *vty)
vty_out(vty, " two-phase-access%s", VTY_NEWLINE);
vty_out(vty, " alpha %d%s", the_pcu->vty.alpha, VTY_NEWLINE);
vty_out(vty, " gamma %d%s", the_pcu->vty.gamma * 2, VTY_NEWLINE);
if (!bts->dl_tbf_preemptive_retransmission)
if (!the_pcu->vty.dl_tbf_preemptive_retransmission)
vty_out(vty, " no dl-tbf-preemptive-retransmission%s", VTY_NEWLINE);
if (strcmp(the_pcu->pcu_sock_path, PCU_SOCK_DEFAULT))
vty_out(vty, " pcu-socket %s%s", the_pcu->pcu_sock_path, VTY_NEWLINE);
@ -869,10 +869,7 @@ DEFUN_ATTR(cfg_pcu_dl_tbf_preemptive_retransmission,
RETRANSMISSION_STR " (enabled by default)",
CMD_ATTR_IMMEDIATE)
{
struct gprs_rlcmac_bts *bts = bts_main_data();
bts->dl_tbf_preemptive_retransmission = true;
the_pcu->vty.dl_tbf_preemptive_retransmission = true;
return CMD_SUCCESS;
}
@ -882,10 +879,7 @@ DEFUN_ATTR(cfg_pcu_no_dl_tbf_preemptive_retransmission,
NO_STR RETRANSMISSION_STR,
CMD_ATTR_IMMEDIATE)
{
struct gprs_rlcmac_bts *bts = bts_main_data();
bts->dl_tbf_preemptive_retransmission = false;
the_pcu->vty.dl_tbf_preemptive_retransmission = false;
return CMD_SUCCESS;
}

View File

@ -545,7 +545,7 @@ int gprs_rlcmac_dl_tbf::take_next_bsn(uint32_t fn,
force_cs ? " (forced)" : "");
bsn = create_new_bsn(fn, new_cs);
} else if (bts->bts_data()->dl_tbf_preemptive_retransmission && !m_window.window_empty()) {
} else if (bts->pcu->vty.dl_tbf_preemptive_retransmission && !m_window.window_empty()) {
/* The window contains unacked packages, but not acked.
* Mark unacked bsns as RESEND */
LOGPTBFDL(this, LOGL_DEBUG,