Indicate this function decrements the timer as well as testing for expiry.
This commit is contained in:
parent
7e330e8220
commit
47190ea664
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=232070
@ -134,7 +134,7 @@ static void bstp_tick(void *);
|
||||
static void bstp_timer_start(struct bstp_timer *, uint16_t);
|
||||
static void bstp_timer_stop(struct bstp_timer *);
|
||||
static void bstp_timer_latch(struct bstp_timer *);
|
||||
static int bstp_timer_expired(struct bstp_timer *);
|
||||
static int bstp_timer_dectest(struct bstp_timer *);
|
||||
static void bstp_hello_timer_expiry(struct bstp_state *,
|
||||
struct bstp_port *);
|
||||
static void bstp_message_age_expiry(struct bstp_state *,
|
||||
@ -1862,7 +1862,7 @@ bstp_tick(void *arg)
|
||||
CURVNET_SET(bs->bs_vnet);
|
||||
|
||||
/* poll link events on interfaces that do not support linkstate */
|
||||
if (bstp_timer_expired(&bs->bs_link_timer)) {
|
||||
if (bstp_timer_dectest(&bs->bs_link_timer)) {
|
||||
LIST_FOREACH(bp, &bs->bs_bplist, bp_next) {
|
||||
if (!(bp->bp_ifp->if_capabilities & IFCAP_LINKSTATE))
|
||||
bstp_ifupdstatus(bs, bp);
|
||||
@ -1872,21 +1872,21 @@ bstp_tick(void *arg)
|
||||
|
||||
LIST_FOREACH(bp, &bs->bs_bplist, bp_next) {
|
||||
/* no events need to happen for these */
|
||||
bstp_timer_expired(&bp->bp_tc_timer);
|
||||
bstp_timer_expired(&bp->bp_recent_root_timer);
|
||||
bstp_timer_expired(&bp->bp_forward_delay_timer);
|
||||
bstp_timer_expired(&bp->bp_recent_backup_timer);
|
||||
bstp_timer_dectest(&bp->bp_tc_timer);
|
||||
bstp_timer_dectest(&bp->bp_recent_root_timer);
|
||||
bstp_timer_dectest(&bp->bp_forward_delay_timer);
|
||||
bstp_timer_dectest(&bp->bp_recent_backup_timer);
|
||||
|
||||
if (bstp_timer_expired(&bp->bp_hello_timer))
|
||||
if (bstp_timer_dectest(&bp->bp_hello_timer))
|
||||
bstp_hello_timer_expiry(bs, bp);
|
||||
|
||||
if (bstp_timer_expired(&bp->bp_message_age_timer))
|
||||
if (bstp_timer_dectest(&bp->bp_message_age_timer))
|
||||
bstp_message_age_expiry(bs, bp);
|
||||
|
||||
if (bstp_timer_expired(&bp->bp_migrate_delay_timer))
|
||||
if (bstp_timer_dectest(&bp->bp_migrate_delay_timer))
|
||||
bstp_migrate_delay_expiry(bs, bp);
|
||||
|
||||
if (bstp_timer_expired(&bp->bp_edge_delay_timer))
|
||||
if (bstp_timer_dectest(&bp->bp_edge_delay_timer))
|
||||
bstp_edge_delay_expiry(bs, bp);
|
||||
|
||||
/* update the various state machines for the port */
|
||||
@ -1925,7 +1925,7 @@ bstp_timer_latch(struct bstp_timer *t)
|
||||
}
|
||||
|
||||
static int
|
||||
bstp_timer_expired(struct bstp_timer *t)
|
||||
bstp_timer_dectest(struct bstp_timer *t)
|
||||
{
|
||||
if (t->active == 0 || t->latched)
|
||||
return (0);
|
||||
|
Loading…
Reference in New Issue
Block a user