Changeset View
Changeset View
Standalone View
Standalone View
sys/net/if_llatbl.h
Show First 20 Lines • Show All 244 Lines • ▼ Show 20 Lines | |||||
*/ | */ | ||||
static __inline struct llentry * | static __inline struct llentry * | ||||
lla_lookup(struct lltable *llt, u_int flags, const struct sockaddr *l3addr) | lla_lookup(struct lltable *llt, u_int flags, const struct sockaddr *l3addr) | ||||
{ | { | ||||
return (llt->llt_lookup(llt, flags, l3addr)); | return (llt->llt_lookup(llt, flags, l3addr)); | ||||
} | } | ||||
void llentry_request_feedback(struct llentry *lle); | |||||
void llentry_mark_used(struct llentry *lle); | |||||
time_t llentry_get_hittime(struct llentry *lle); | |||||
/* | /* | ||||
* Notify the LLE code that the entry was used by datapath. | * Notify the LLE code that the entry was used by datapath. | ||||
*/ | */ | ||||
static __inline void | static __inline void | ||||
llentry_mark_used(struct llentry *lle) | llentry_provide_feedback(struct llentry *lle) | ||||
{ | { | ||||
if (lle->r_skip_req == 0) | if (__predict_true(lle->r_skip_req == 0)) | ||||
return; | return; | ||||
if ((lle->r_flags & RLLE_VALID) != 0) | llentry_mark_used(lle); | ||||
lle->lle_tbl->llt_mark_used(lle); | |||||
} | } | ||||
int lla_rt_output(struct rt_msghdr *, struct rt_addrinfo *); | int lla_rt_output(struct rt_msghdr *, struct rt_addrinfo *); | ||||
enum { | enum { | ||||
LLENTRY_RESOLVED, | LLENTRY_RESOLVED, | ||||
LLENTRY_TIMEDOUT, | LLENTRY_TIMEDOUT, | ||||
LLENTRY_DELETED, | LLENTRY_DELETED, | ||||
LLENTRY_EXPIRED, | LLENTRY_EXPIRED, | ||||
}; | }; | ||||
typedef void (*lle_event_fn)(void *, struct llentry *, int); | typedef void (*lle_event_fn)(void *, struct llentry *, int); | ||||
EVENTHANDLER_DECLARE(lle_event, lle_event_fn); | EVENTHANDLER_DECLARE(lle_event, lle_event_fn); | ||||
#endif /* _NET_IF_LLATBL_H_ */ | #endif /* _NET_IF_LLATBL_H_ */ |