Lines Matching refs:neigh

289 					struct prestera_nh_neigh *neigh)  in __prestera_nh_neigh_destroy()  argument
292 &neigh->ht_node, in __prestera_nh_neigh_destroy()
294 kfree(neigh); in __prestera_nh_neigh_destroy()
301 struct prestera_nh_neigh *neigh; in __prestera_nh_neigh_create() local
304 neigh = kzalloc(sizeof(*neigh), GFP_KERNEL); in __prestera_nh_neigh_create()
305 if (!neigh) in __prestera_nh_neigh_create()
308 memcpy(&neigh->key, key, sizeof(*key)); in __prestera_nh_neigh_create()
309 neigh->info.connected = false; in __prestera_nh_neigh_create()
310 INIT_LIST_HEAD(&neigh->nexthop_group_list); in __prestera_nh_neigh_create()
312 &neigh->ht_node, in __prestera_nh_neigh_create()
317 return neigh; in __prestera_nh_neigh_create()
320 kfree(neigh); in __prestera_nh_neigh_create()
340 struct prestera_nh_neigh *neigh; in prestera_nh_neigh_get() local
342 neigh = prestera_nh_neigh_find(sw, key); in prestera_nh_neigh_get()
343 if (!neigh) in prestera_nh_neigh_get()
346 return neigh; in prestera_nh_neigh_get()
350 struct prestera_nh_neigh *neigh) in prestera_nh_neigh_put() argument
352 if (list_empty(&neigh->nexthop_group_list)) in prestera_nh_neigh_put()
353 __prestera_nh_neigh_destroy(sw, neigh); in prestera_nh_neigh_put()
358 struct prestera_nh_neigh *neigh) in prestera_nh_neigh_set() argument
364 list_for_each_entry(nh_head, &neigh->nexthop_group_list, head) { in prestera_nh_neigh_set()
406 if (!prestera_nh_neigh_key_is_valid(&nh_grp->key.neigh[nh_cnt])) in __prestera_nexthop_group_create()
410 &nh_grp->key.neigh[nh_cnt]); in __prestera_nexthop_group_create()
414 nh_grp->nh_neigh_head[nh_cnt].neigh = nh_neigh; in __prestera_nexthop_group_create()
447 prestera_nh_neigh_put(sw, nh_grp->nh_neigh_head[nh_cnt].neigh); in __prestera_nexthop_group_create()
467 nh_neigh = nh_grp->nh_neigh_head[nh_cnt].neigh; in __prestera_nexthop_group_destroy()
522 struct prestera_nh_neigh *neigh; in prestera_nexthop_group_set() local
527 neigh = nh_grp->nh_neigh_head[nh_cnt].neigh; in prestera_nexthop_group_set()
528 if (!neigh) in prestera_nexthop_group_set()
531 memcpy(&info[nh_cnt], &neigh->info, sizeof(neigh->info)); in prestera_nexthop_group_set()