Project

General

Profile

Actions

Bug #4623

closed

VTY max_power_red value change should propagate over OML to the BTS

Added by pespin almost 4 years ago. Updated almost 4 years ago.

Status:
Closed
Priority:
Low
Assignee:
-
Category:
A-bis OML
Target version:
-
Start date:
06/19/2020
Due date:
% Done:

0%

Spec Reference:

Description

Current VTY implementation of "max_power_red" command is not updating the setting over OML, as described by this comment:

DEFUN(cfg_trx_max_power_red,
      cfg_trx_max_power_red_cmd,
      "max_power_red <0-100>",
      "Reduction of maximum BS RF Power (relative to nominal power)\n" 
      "Reduction of maximum BS RF Power in dB\n")
{
    int maxpwr_r = atoi(argv[0]);
    struct gsm_bts_trx *trx = vty->index;
    int upper_limit = 24;    /* default 12.21 max power red. */

    /* FIXME: check if our BTS type supports more than 12 */
    if (maxpwr_r < 0 || maxpwr_r > upper_limit) {
        vty_out(vty, "%% Power %d dB is not in the valid range%s",
            maxpwr_r, VTY_NEWLINE);
        return CMD_WARNING;
    }
    if (maxpwr_r & 1) {
        vty_out(vty, "%% Power %d dB is not an even value%s",
            maxpwr_r, VTY_NEWLINE);
        return CMD_WARNING;
    }

    trx->max_power_red = maxpwr_r;

    /* FIXME: make sure we update this using OML */   <--------- SEE HERE

    return CMD_SUCCESS;
}

On the other hand, there seems to be a CTRL iface command which can do it, in bsc_ctrl_commands.c:

static int set_trx_max_power(struct ctrl_cmd *cmd, void *_data)
{
    struct gsm_bts_trx *trx = cmd->node;
    int old_power;

    /* remember the old value, set the new one */
    old_power = trx->max_power_red;
    trx->max_power_red = atoi(cmd->value);

    /* Maybe update the value */
    if (old_power != trx->max_power_red) {
        LOGP(DCTRL, LOGL_NOTICE,
            "%s updating max_pwr_red(%d)\n",
            gsm_trx_name(trx), trx->max_power_red);
        abis_nm_update_max_power_red(trx);
    }

    return get_trx_max_power(cmd, _data);
}
CTRL_CMD_DEFINE(trx_max_power, "max-power-reduction");

So the key here seems to use abis_nm_update_max_power_red(trx); as done by set_trx_max_power(). However, it seems the abis_nm_update_max_power_red unconditionally sends an OML message, and I'm not sure if extra checks should be done in OML to avoid it being sent eg during startup of osmo-bsc when the cmd line is read. Some comments here from someone with more OML knowledge is welcome.

Actions

Also available in: Atom PDF

Add picture from clipboard (Maximum size: 48.8 MB)