enum {
L2T_STATE_VALID, /* entry is up to date */
L2T_STATE_STALE, /* entry may be used but needs revalidation */
L2T_STATE_RESOLVING, /* entry needs address resolution */
L2T_STATE_UNUSED /* entry not in use */
};
struct neighbour; struct sk_buff;
/* *EachL2Tentryplaysmultipleroles.Firstofall,itkeepsstateforthe *correspondingentryoftheHWL2tableandmaintainsaqueueofoffload *packetsawaitingaddressresolution.Second,itisanodeofahashtable *chain,wherethenodesofthechainarelinkedtogetherthroughtheirnext *pointer.Finally,eachnodeisabucketofahashtable,pointingtothe *firstelementinitschainthroughitsfirstpointer.
*/ struct l2t_entry {
u16 state; /* entry state */
u16 idx; /* entry index */
u32 addr; /* dest IP address */ int ifindex; /* neighbor's net_device's ifindex */
u16 smt_idx; /* SMT index */
u16 vlan; /* VLAN TCI (id: bits 0-11, prio: 13-15 */ struct neighbour *neigh; /* associated neighbour */ struct l2t_entry *first; /* start of hash chain */ struct l2t_entry *next; /* next l2t_entry on chain */ struct sk_buff_head arpq; /* queue of packets awaiting resolution */
spinlock_t lock;
atomic_t refcnt; /* entry reference count */
u8 dmac[6]; /* neighbour's MAC address */
};
struct l2t_data { unsignedint nentries; /* number of entries */ struct l2t_entry *rover; /* starting point for next allocation */
atomic_t nfree; /* number of free entries */
rwlock_t lock; struct rcu_head rcu_head; /* to handle rcu cleanup */ struct l2t_entry l2tab[] __counted_by(nentries);
};
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.