diff options
Diffstat (limited to 'sys/net/if_llatbl.h')
-rw-r--r-- | sys/net/if_llatbl.h | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/sys/net/if_llatbl.h b/sys/net/if_llatbl.h index 2009a7a..044959e 100644 --- a/sys/net/if_llatbl.h +++ b/sys/net/if_llatbl.h @@ -63,7 +63,8 @@ struct llentry { uint16_t mac16[3]; uint8_t mac8[20]; /* IB needs 20 bytes. */ } ll_addr; - uint32_t spare0; + uint16_t r_flags; /* LLE runtime flags */ + uint16_t r_skip_req; /* feedback from fast path */ uint64_t spare1; struct lltable *lle_tbl; @@ -83,6 +84,7 @@ struct llentry { LIST_ENTRY(llentry) lle_chain; /* chain of deleted items */ struct callout lle_timer; struct rwlock lle_lock; + struct mtx req_mtx; }; #define LLE_WLOCK(lle) rw_wlock(&(lle)->lle_lock) @@ -95,6 +97,12 @@ struct llentry { #define LLE_LOCK_DESTROY(lle) rw_destroy(&(lle)->lle_lock) #define LLE_WLOCK_ASSERT(lle) rw_assert(&(lle)->lle_lock, RA_WLOCKED) +#define LLE_REQ_INIT(lle) mtx_init(&(lle)->req_mtx, "lle req", \ + NULL, MTX_DEF) +#define LLE_REQ_DESTROY(lle) mtx_destroy(&(lle)->req_mtx) +#define LLE_REQ_LOCK(lle) mtx_lock(&(lle)->req_mtx) +#define LLE_REQ_UNLOCK(lle) mtx_unlock(&(lle)->req_mtx) + #define LLE_IS_VALID(lle) (((lle) != NULL) && ((lle) != (void *)-1)) #define LLE_ADDREF(lle) do { \ @@ -187,6 +195,11 @@ MALLOC_DECLARE(M_LLTABLE); #define LLE_LINKED 0x0040 /* linked to lookup structure */ /* LLE request flags */ #define LLE_EXCLUSIVE 0x2000 /* return lle xlocked */ +#define LLE_UNLOCKED 0x4000 /* return lle unlocked */ + +/* LLE flags used by fastpath code */ +#define RLLE_VALID 0x0001 /* entry is valid */ +#define RLLE_IFADDR LLE_IFADDR /* entry is ifaddr */ #define LLATBL_HASH(key, mask) \ (((((((key >> 8) ^ key) >> 8) ^ key) >> 8) ^ key) & mask) |