• Home
  • Raw
  • Download

Lines Matching refs:qdisc

35 	struct rtnl_qdisc *qdisc;  in qdisc_msg_parser()  local
38 if (!(qdisc = rtnl_qdisc_alloc())) in qdisc_msg_parser()
41 if ((err = rtnl_tc_msg_parse(n, TC_CAST(qdisc))) < 0) in qdisc_msg_parser()
44 err = pp->pp_cb(OBJ_CAST(qdisc), pp); in qdisc_msg_parser()
46 rtnl_qdisc_put(qdisc); in qdisc_msg_parser()
78 void rtnl_qdisc_put(struct rtnl_qdisc *qdisc) in rtnl_qdisc_put() argument
80 nl_object_put((struct nl_object *) qdisc); in rtnl_qdisc_put()
90 static int build_qdisc_msg(struct rtnl_qdisc *qdisc, int type, int flags, in build_qdisc_msg() argument
93 if (!(qdisc->ce_mask & TCA_ATTR_IFINDEX)) { in build_qdisc_msg()
98 return rtnl_tc_msg_build(TC_CAST(qdisc), type, flags, result); in build_qdisc_msg()
115 int rtnl_qdisc_build_add_request(struct rtnl_qdisc *qdisc, int flags, in rtnl_qdisc_build_add_request() argument
118 if (!(qdisc->ce_mask & (TCA_ATTR_HANDLE | TCA_ATTR_PARENT))) { in rtnl_qdisc_build_add_request()
123 return build_qdisc_msg(qdisc, RTM_NEWQDISC, flags, result); in rtnl_qdisc_build_add_request()
163 int rtnl_qdisc_add(struct nl_sock *sk, struct rtnl_qdisc *qdisc, int flags) in rtnl_qdisc_add() argument
168 if ((err = rtnl_qdisc_build_add_request(qdisc, flags, &msg)) < 0) in rtnl_qdisc_add()
189 int rtnl_qdisc_build_update_request(struct rtnl_qdisc *qdisc, in rtnl_qdisc_build_update_request() argument
199 if (!(qdisc->ce_mask & TCA_ATTR_IFINDEX)) { in rtnl_qdisc_build_update_request()
204 if (!(qdisc->ce_mask & (TCA_ATTR_HANDLE | TCA_ATTR_PARENT))) { in rtnl_qdisc_build_update_request()
209 rtnl_tc_set_ifindex(TC_CAST(new), qdisc->q_ifindex); in rtnl_qdisc_build_update_request()
211 if (qdisc->ce_mask & TCA_ATTR_HANDLE) in rtnl_qdisc_build_update_request()
212 rtnl_tc_set_handle(TC_CAST(new), qdisc->q_handle); in rtnl_qdisc_build_update_request()
214 if (qdisc->ce_mask & TCA_ATTR_PARENT) in rtnl_qdisc_build_update_request()
215 rtnl_tc_set_parent(TC_CAST(new), qdisc->q_parent); in rtnl_qdisc_build_update_request()
248 int rtnl_qdisc_update(struct nl_sock *sk, struct rtnl_qdisc *qdisc, in rtnl_qdisc_update() argument
254 err = rtnl_qdisc_build_update_request(qdisc, new, flags, &msg); in rtnl_qdisc_update()
274 int rtnl_qdisc_build_delete_request(struct rtnl_qdisc *qdisc, in rtnl_qdisc_build_delete_request() argument
281 if ((qdisc->ce_mask & required) != required) { in rtnl_qdisc_build_delete_request()
292 tchdr.tcm_ifindex = qdisc->q_ifindex; in rtnl_qdisc_build_delete_request()
293 tchdr.tcm_parent = qdisc->q_parent; in rtnl_qdisc_build_delete_request()
295 if (qdisc->ce_mask & TCA_ATTR_HANDLE) in rtnl_qdisc_build_delete_request()
296 tchdr.tcm_handle = qdisc->q_handle; in rtnl_qdisc_build_delete_request()
301 if (qdisc->ce_mask & TCA_ATTR_KIND) in rtnl_qdisc_build_delete_request()
302 NLA_PUT_STRING(msg, TCA_KIND, qdisc->q_kind); in rtnl_qdisc_build_delete_request()
341 int rtnl_qdisc_delete(struct nl_sock *sk, struct rtnl_qdisc *qdisc) in rtnl_qdisc_delete() argument
346 if ((err = rtnl_qdisc_build_delete_request(qdisc, &msg)) < 0) in rtnl_qdisc_delete()
451 void rtnl_qdisc_foreach_child(struct rtnl_qdisc *qdisc, struct nl_cache *cache, in rtnl_qdisc_foreach_child() argument
460 rtnl_tc_set_parent(TC_CAST(filter), qdisc->q_handle); in rtnl_qdisc_foreach_child()
461 rtnl_tc_set_ifindex(TC_CAST(filter), qdisc->q_ifindex); in rtnl_qdisc_foreach_child()
462 rtnl_tc_set_kind(TC_CAST(filter), qdisc->q_kind); in rtnl_qdisc_foreach_child()
475 void rtnl_qdisc_foreach_cls(struct rtnl_qdisc *qdisc, struct nl_cache *cache, in rtnl_qdisc_foreach_cls() argument
483 rtnl_tc_set_ifindex(TC_CAST(filter), qdisc->q_ifindex); in rtnl_qdisc_foreach_cls()
484 rtnl_tc_set_parent(TC_CAST(filter), qdisc->q_parent); in rtnl_qdisc_foreach_cls()
497 int rtnl_qdisc_build_change_request(struct rtnl_qdisc *qdisc, in rtnl_qdisc_build_change_request() argument
501 return rtnl_qdisc_build_update_request(qdisc, new, NLM_F_REPLACE, in rtnl_qdisc_build_change_request()
512 int rtnl_qdisc_change(struct nl_sock *sk, struct rtnl_qdisc *qdisc, in rtnl_qdisc_change() argument
515 return rtnl_qdisc_update(sk, qdisc, new, NLM_F_REPLACE); in rtnl_qdisc_change()
522 struct rtnl_qdisc *qdisc = (struct rtnl_qdisc *) tc; in qdisc_dump_details() local
524 nl_dump(p, "refcnt %u", qdisc->q_info); in qdisc_dump_details()