Lines Matching refs:ops
162 void *dst_alloc(struct dst_ops *ops, struct net_device *dev, in dst_alloc() argument
167 if (ops->gc && dst_entries_get_fast(ops) > ops->gc_thresh) { in dst_alloc()
168 if (ops->gc(ops)) in dst_alloc()
171 dst = kmem_cache_alloc(ops->kmem_cachep, GFP_ATOMIC); in dst_alloc()
178 dst->ops = ops; in dst_alloc()
202 dst_entries_add(ops, 1); in dst_alloc()
245 dst_entries_add(dst->ops, -1); in dst_destroy()
247 if (dst->ops->destroy) in dst_destroy()
248 dst->ops->destroy(dst); in dst_destroy()
251 kmem_cache_free(dst->ops->kmem_cachep, dst); in dst_destroy()
342 if (dst->ops->ifdown) in dst_ifdown()
343 dst->ops->ifdown(dst, dev, unregister); in dst_ifdown()