Lines Matching defs:ops
84 if (WARN_ON(!handle || !tp->ops->get_exts))
252 const struct tcf_proto_ops *ops;
254 ops = __tcf_proto_lookup_ops(kind);
255 if (ops)
256 return ops;
263 ops = __tcf_proto_lookup_ops(kind);
269 if (ops) {
270 module_put(ops->owner);
280 int register_tcf_proto_ops(struct tcf_proto_ops *ops)
287 if (!strcmp(ops->kind, t->kind))
290 list_add_tail(&ops->head, &tcf_proto_base);
300 void unregister_tcf_proto_ops(struct tcf_proto_ops *ops)
313 if (t == ops) {
321 WARN(rc, "unregister tc filter kind(%s) failed %d\n", ops->kind, rc);
354 const struct tcf_proto_ops *ops;
360 ops = tcf_proto_lookup_ops(kind, false, NULL);
364 if (IS_ERR(ops))
367 ret = !!(ops->flags & TCF_PROTO_OPS_DOIT_UNLOCKED);
368 module_put(ops->owner);
384 tp->ops = tcf_proto_lookup_ops(kind, rtnl_held, extack);
385 if (IS_ERR(tp->ops)) {
386 err = PTR_ERR(tp->ops);
389 tp->classify = tp->ops->classify;
396 err = tp->ops->init(tp);
398 module_put(tp->ops->owner);
418 tp->ops->destroy(tp, rtnl_held, extack);
422 module_put(tp->ops->owner);
435 if (tp->ops->delete_empty)
436 return tp->ops->delete_empty(tp);
1190 cops = (*q)->ops->cl_ops;
1232 const struct Qdisc_class_ops *cops = q->ops->cl_ops;
1258 const struct Qdisc_class_ops *cops = q->ops->cl_ops;
1546 if (tp->ops->reoffload) {
1547 err = tp->ops->reoffload(tp, add, cb, cb_priv,
1690 !tp->ops->get_exts))
1693 exts = tp->ops->get_exts(tp, n->handle);
1996 if (nla_put_string(skb, TCA_KIND, tp->ops->kind))
2003 if (tp->ops->terse_dump) {
2004 if (tp->ops->terse_dump(net, tp, fh, skb, tcm,
2011 if (tp->ops->dump &&
2012 tp->ops->dump(net, tp, fh, skb, tcm, rtnl_held) < 0)
2082 err = tp->ops->delete(tp, fh, last, rtnl_held, extack);
2115 if (tp->ops->put && fh)
2116 tp->ops->put(tp, fh);
2198 (q && !(q->ops->cl_ops->flags & QDISC_CLASS_OPS_DOIT_UNLOCKED)) ||
2283 if (tca[TCA_KIND] && nla_strcmp(tca[TCA_KIND], tp->ops->kind)) {
2289 fh = tp->ops->get(tp, t->tcm_handle);
2304 if (chain->tmplt_ops && chain->tmplt_ops != tp->ops) {
2317 err = tp->ops->change(net, skb, tp, cl, t->tcm_handle, tca, &fh,
2410 (q && !(q->ops->cl_ops->flags & QDISC_CLASS_OPS_DOIT_UNLOCKED)) ||
2462 } else if (tca[TCA_KIND] && nla_strcmp(tca[TCA_KIND], tp->ops->kind)) {
2479 fh = tp->ops->get(tp, t->tcm_handle);
2566 if ((q && !(q->ops->cl_ops->flags & QDISC_CLASS_OPS_DOIT_UNLOCKED)) ||
2604 } else if (tca[TCA_KIND] && nla_strcmp(tca[TCA_KIND], tp->ops->kind)) {
2610 fh = tp->ops->get(tp, t->tcm_handle);
2693 if (!tp->ops->walk)
2706 tp->ops->walk(tp, &arg.w, true);
2780 cops = q->ops->cl_ops;
2836 const struct tcf_proto_ops *ops;
2841 ops = tmplt_ops;
2863 if (ops) {
2864 if (nla_put_string(skb, TCA_KIND, ops->kind))
2866 if (ops->tmplt_dump(skb, net, priv) < 0)
2943 const struct tcf_proto_ops *ops;
2956 ops = tcf_proto_lookup_ops(name, true, extack);
2957 if (IS_ERR(ops))
2958 return PTR_ERR(ops);
2959 if (!ops->tmplt_create || !ops->tmplt_destroy || !ops->tmplt_dump ||
2960 !ops->tmplt_reoffload) {
2962 module_put(ops->owner);
2966 tmplt_priv = ops->tmplt_create(net, chain, tca, extack);
2968 module_put(ops->owner);
2971 chain->tmplt_ops = ops;
2979 /* If template ops are set, no work to do for us. */
3161 cops = q->ops->cl_ops;
3565 if (tp->ops->hw_add)
3566 tp->ops->hw_add(tp, type_data);
3614 if (tp->ops->hw_del)
3615 tp->ops->hw_del(tp, type_data);
3621 if (tp->ops->hw_add)
3622 tp->ops->hw_add(tp, type_data);
3662 if (tp->ops->hw_del)
3663 tp->ops->hw_del(tp, type_data);
3734 if (act->ops->offload_act_setup) {
3735 return act->ops->offload_act_setup(act, entry, index_inc, true,