Lines Matching refs:ops
167 void *dst_alloc(struct dst_ops *ops)
171 if (ops->gc && atomic_read(&ops->entries) > ops->gc_thresh) {
172 if (ops->gc(ops))
175 dst = kmem_cache_zalloc(ops->kmem_cachep, GFP_ATOMIC);
179 dst->ops = ops;
186 atomic_inc(&ops->entries);
239 atomic_dec(&dst->ops->entries);
241 if (dst->ops->destroy)
242 dst->ops->destroy(dst);
248 kmem_cache_free(dst->ops->kmem_cachep, dst);
295 if (dst->ops->ifdown)
296 dst->ops->ifdown(dst, dev, unregister);