static void fw_free_data(struct rtnl_cls *cls) { struct rtnl_fw *f = rtnl_cls_data(cls); nl_data_free(f->cf_act); nl_data_free(f->cf_police); }
static void u32_free_data(struct rtnl_cls *cls) { struct rtnl_u32 *u = rtnl_cls_data(cls); nl_data_free(u->cu_selector); nl_data_free(u->cu_act); nl_data_free(u->cu_police); nl_data_free(u->cu_pcnt); }
static void u32_free_data(struct rtnl_tc *tc, void *data) { struct rtnl_u32 *u = data; nl_data_free(u->cu_selector); nl_data_free(u->cu_act); nl_data_free(u->cu_police); nl_data_free(u->cu_pcnt); }
static void u32_free_data(struct rtnl_tc *tc, void *data) { struct rtnl_u32 *u = data; if (u->cu_act) rtnl_act_put_all(&u->cu_act); nl_data_free(u->cu_mark); nl_data_free(u->cu_selector); nl_data_free(u->cu_police); nl_data_free(u->cu_pcnt); }
static void cls_free_data(struct nl_object *obj) { struct rtnl_cls *cls = (struct rtnl_cls *) obj; struct rtnl_cls_ops *cops; tca_free_data((struct rtnl_tca *) cls); cops = rtnl_cls_lookup_ops(cls); if (cops && cops->co_free_data) cops->co_free_data(cls); nl_data_free(cls->c_subdata); }
int rtnl_u32_del_mark(struct rtnl_cls *cls) { struct rtnl_u32 *u; if (!(u = rtnl_tc_data(TC_CAST(cls)))) return -NLE_NOMEM; if (!(u->cu_mask)) return -NLE_INVAL; if (!(u->cu_mask & U32_ATTR_MARK)) return -NLE_INVAL; nl_data_free(u->cu_mark); u->cu_mark = NULL; u->cu_mask &= ~U32_ATTR_MARK; return 0; }
void tca_free_data(struct rtnl_tc *tca) { rtnl_link_put(tca->tc_link); nl_data_free(tca->tc_opts); nl_data_free(tca->tc_xstats); }