From 0447c1367a819a8d0e3cfb2183b8f8e3e23eba28 Mon Sep 17 00:00:00 2001 From: "Alexander V. Chernikov" Date: Tue, 11 Aug 2015 12:38:54 +0000 Subject: Use single 'lle_timer' callout in lltable instead of two different names of the same timer. --- sys/net/if_llatbl.c | 4 ++-- sys/net/if_llatbl.h | 9 +-------- 2 files changed, 3 insertions(+), 10 deletions(-) (limited to 'sys/net') diff --git a/sys/net/if_llatbl.c b/sys/net/if_llatbl.c index b68c19c6f238..3f9e38a43279 100644 --- a/sys/net/if_llatbl.c +++ b/sys/net/if_llatbl.c @@ -374,7 +374,7 @@ lltable_free(struct lltable *llt) IF_AFDATA_WUNLOCK(llt->llt_ifp); LIST_FOREACH_SAFE(lle, &dchain, lle_chain, next) { - if (callout_stop(&lle->la_timer)) + if (callout_stop(&lle->lle_timer)) LLE_REMREF(lle); llentry_free(lle); } @@ -656,7 +656,7 @@ llatbl_lle_show(struct llentry_sa *la) bcopy(&lle->ll_addr.mac16, octet, sizeof(octet)); db_printf(" ll_addr=%02x:%02x:%02x:%02x:%02x:%02x\n", octet[0], octet[1], octet[2], octet[3], octet[4], octet[5]); - db_printf(" la_timer=%p\n", &lle->la_timer); + db_printf(" lle_timer=%p\n", &lle->lle_timer); switch (la->l3_addr.sa_family) { #ifdef INET diff --git a/sys/net/if_llatbl.h b/sys/net/if_llatbl.h index 3f2a08ddad27..8502e8064aa1 100644 --- a/sys/net/if_llatbl.h +++ b/sys/net/if_llatbl.h @@ -82,11 +82,7 @@ struct llentry { int lle_refcnt; LIST_ENTRY(llentry) lle_chain; /* chain of deleted items */ - /* XXX af-private? */ - union { - struct callout ln_timer_ch; - struct callout la_timer; - } lle_timer; + struct callout lle_timer; struct rwlock lle_lock; }; @@ -135,9 +131,6 @@ struct llentry { } while (0) -#define ln_timer_ch lle_timer.ln_timer_ch -#define la_timer lle_timer.la_timer - typedef struct llentry *(llt_lookup_t)(struct lltable *, u_int flags, const struct sockaddr *l3addr); typedef struct llentry *(llt_create_t)(struct lltable *, u_int flags, -- cgit v1.2.3