lib/stp.c
/* Sets the path cost of port 'p' to 'path_cost'.  Lower values are generally
 * used to indicate faster links.  Use stp_port_set_speed() to automatically
 * generate a default path cost from a link speed. */
Sets the path cost of port 'p' to 'path_cost'.  Lower values are generally
used to indicate faster links.  Use stp_port_set_speed() to automatically
generate a default path cost from a link speed.
Sets the path cost of port ' p ' to ' path_cost ' . Lower values are generally used to indicate faster links . Use stp_port_set_speed () to automatically generate a default path cost from a link speed .
void
stp_port_set_path_cost(struct stp_port *p, uint16_t path_cost)
{
    ovs_mutex_lock(&mutex);
    if (p->path_cost != path_cost) {
        struct stp *stp = p->stp;
        p->path_cost = path_cost;
        stp_configuration_update(stp);
        stp_port_state_selection(stp);
    }
    ovs_mutex_unlock(&mutex);
}
void stp_port_set_path_cost ( struct stp_port * p , uint16_t path_cost ) { ovs_mutex_lock ( & mutex ) ; if ( p -> path_cost != path_cost ) { struct stp * stp = p -> stp ; p -> path_cost = path_cost ; stp_configuration_update ( stp ) ; stp_port_state_selection ( stp ) ; } ovs_mutex_unlock ( & mutex ) ; }
Sets the path cost of port 'p' to 'path_cost'.
Sets the path cost of port ' p ' to ' path_cost ' .