Lines Matching refs:fdb

35 				  struct net_bridge_fdb_entry *fdb)  in has_expired()  argument
37 if (!fdb->is_static && in has_expired()
38 time_before_eq(fdb->ageing_timer, __timeout(br))) in has_expired()
170 struct net_bridge_fdb_entry *fdb; in br_fdb_get() local
173 fdb = br->hash[br_mac_hash(addr)]; in br_fdb_get()
174 while (fdb != NULL) { in br_fdb_get()
175 if (!memcmp(fdb->addr.addr, addr, ETH_ALEN)) { in br_fdb_get()
176 if (!has_expired(br, fdb)) { in br_fdb_get()
177 atomic_inc(&fdb->use_count); in br_fdb_get()
179 return fdb; in br_fdb_get()
186 fdb = fdb->next_hash; in br_fdb_get()
270 static __inline__ void __fdb_possibly_replace(struct net_bridge_fdb_entry *fdb, in __fdb_possibly_replace() argument
274 if (!fdb->is_static || is_local) { in __fdb_possibly_replace()
275 fdb->dst = source; in __fdb_possibly_replace()
276 fdb->is_local = is_local; in __fdb_possibly_replace()
277 fdb->is_static = is_local; in __fdb_possibly_replace()
278 fdb->ageing_timer = jiffies; in __fdb_possibly_replace()
287 struct net_bridge_fdb_entry *fdb; in br_fdb_insert() local
293 fdb = br->hash[hash]; in br_fdb_insert()
294 while (fdb != NULL) { in br_fdb_insert()
295 if (!memcmp(fdb->addr.addr, addr, ETH_ALEN)) { in br_fdb_insert()
297 if (fdb->is_local) { in br_fdb_insert()
309 __fdb_possibly_replace(fdb, source, is_local); in br_fdb_insert()
313 fdb = fdb->next_hash; in br_fdb_insert()
316 fdb = kmalloc(sizeof(*fdb), GFP_ATOMIC); in br_fdb_insert()
317 if (fdb == NULL) in br_fdb_insert()
320 memcpy(fdb->addr.addr, addr, ETH_ALEN); in br_fdb_insert()
321 atomic_set(&fdb->use_count, 1); in br_fdb_insert()
322 fdb->dst = source; in br_fdb_insert()
323 fdb->is_local = is_local; in br_fdb_insert()
324 fdb->is_static = is_local; in br_fdb_insert()
325 fdb->ageing_timer = jiffies; in br_fdb_insert()
327 __hash_link(br, fdb, hash); in br_fdb_insert()