Lines Matching refs:dsmark
64 struct rtnl_dsmark_qdisc *dsmark; in dsmark_qdisc_msg_parser() local
71 dsmark = dsmark_qdisc_alloc(qdisc); in dsmark_qdisc_msg_parser()
72 if (!dsmark) in dsmark_qdisc_msg_parser()
76 dsmark->qdm_indices = nla_get_u16(tb[TCA_DSMARK_INDICES]); in dsmark_qdisc_msg_parser()
77 dsmark->qdm_mask |= SCH_DSMARK_ATTR_INDICES; in dsmark_qdisc_msg_parser()
81 dsmark->qdm_default_index = in dsmark_qdisc_msg_parser()
83 dsmark->qdm_mask |= SCH_DSMARK_ATTR_DEFAULT_INDEX; in dsmark_qdisc_msg_parser()
87 dsmark->qdm_set_tc_index = 1; in dsmark_qdisc_msg_parser()
88 dsmark->qdm_mask |= SCH_DSMARK_ATTR_SET_TC_INDEX; in dsmark_qdisc_msg_parser()
112 struct rtnl_dsmark_class *dsmark; in dsmark_class_msg_parser() local
119 dsmark = dsmark_class_alloc(class); in dsmark_class_msg_parser()
120 if (!dsmark) in dsmark_class_msg_parser()
124 dsmark->cdm_bmask = nla_get_u8(tb[TCA_DSMARK_MASK]); in dsmark_class_msg_parser()
125 dsmark->cdm_mask |= SCH_DSMARK_ATTR_MASK; in dsmark_class_msg_parser()
129 dsmark->cdm_value = nla_get_u8(tb[TCA_DSMARK_VALUE]); in dsmark_class_msg_parser()
130 dsmark->cdm_mask |= SCH_DSMARK_ATTR_VALUE; in dsmark_class_msg_parser()
139 struct rtnl_dsmark_qdisc *dsmark = dsmark_qdisc(qdisc); in dsmark_qdisc_dump_line() local
141 if (dsmark && (dsmark->qdm_mask & SCH_DSMARK_ATTR_INDICES)) in dsmark_qdisc_dump_line()
142 nl_dump(p, " indices 0x%04x", dsmark->qdm_indices); in dsmark_qdisc_dump_line()
148 struct rtnl_dsmark_qdisc *dsmark = dsmark_qdisc(qdisc); in dsmark_qdisc_dump_details() local
150 if (!dsmark) in dsmark_qdisc_dump_details()
153 if (dsmark->qdm_mask & SCH_DSMARK_ATTR_DEFAULT_INDEX) in dsmark_qdisc_dump_details()
154 nl_dump(p, " default index 0x%04x", dsmark->qdm_default_index); in dsmark_qdisc_dump_details()
156 if (dsmark->qdm_mask & SCH_DSMARK_ATTR_SET_TC_INDEX) in dsmark_qdisc_dump_details()
163 struct rtnl_dsmark_class *dsmark = dsmark_class(class); in dsmark_class_dump_line() local
165 if (!dsmark) in dsmark_class_dump_line()
168 if (dsmark->cdm_mask & SCH_DSMARK_ATTR_VALUE) in dsmark_class_dump_line()
169 nl_dump(p, " value 0x%02x", dsmark->cdm_value); in dsmark_class_dump_line()
171 if (dsmark->cdm_mask & SCH_DSMARK_ATTR_MASK) in dsmark_class_dump_line()
172 nl_dump(p, " mask 0x%02x", dsmark->cdm_bmask); in dsmark_class_dump_line()
177 struct rtnl_dsmark_qdisc *dsmark = dsmark_qdisc(qdisc); in dsmark_qdisc_get_opts() local
180 if (!dsmark) in dsmark_qdisc_get_opts()
187 if (dsmark->qdm_mask & SCH_DSMARK_ATTR_INDICES) in dsmark_qdisc_get_opts()
188 NLA_PUT_U16(msg, TCA_DSMARK_INDICES, dsmark->qdm_indices); in dsmark_qdisc_get_opts()
190 if (dsmark->qdm_mask & SCH_DSMARK_ATTR_DEFAULT_INDEX) in dsmark_qdisc_get_opts()
192 dsmark->qdm_default_index); in dsmark_qdisc_get_opts()
194 if (dsmark->qdm_mask & SCH_DSMARK_ATTR_SET_TC_INDEX) in dsmark_qdisc_get_opts()
206 struct rtnl_dsmark_class *dsmark = dsmark_class(class); in dsmark_class_get_opts() local
209 if (!dsmark) in dsmark_class_get_opts()
216 if (dsmark->cdm_mask & SCH_DSMARK_ATTR_MASK) in dsmark_class_get_opts()
217 NLA_PUT_U8(msg, TCA_DSMARK_MASK, dsmark->cdm_bmask); in dsmark_class_get_opts()
219 if (dsmark->cdm_mask & SCH_DSMARK_ATTR_VALUE) in dsmark_class_get_opts()
220 NLA_PUT_U8(msg, TCA_DSMARK_VALUE, dsmark->cdm_value); in dsmark_class_get_opts()
242 struct rtnl_dsmark_class *dsmark; in rtnl_class_dsmark_set_bitmask() local
244 dsmark = dsmark_class(class); in rtnl_class_dsmark_set_bitmask()
245 if (!dsmark) in rtnl_class_dsmark_set_bitmask()
248 dsmark->cdm_bmask = mask; in rtnl_class_dsmark_set_bitmask()
249 dsmark->cdm_mask |= SCH_DSMARK_ATTR_MASK; in rtnl_class_dsmark_set_bitmask()
261 struct rtnl_dsmark_class *dsmark; in rtnl_class_dsmark_get_bitmask() local
263 dsmark = dsmark_class(class); in rtnl_class_dsmark_get_bitmask()
264 if (dsmark && dsmark->cdm_mask & SCH_DSMARK_ATTR_MASK) in rtnl_class_dsmark_get_bitmask()
265 return dsmark->cdm_bmask; in rtnl_class_dsmark_get_bitmask()
278 struct rtnl_dsmark_class *dsmark; in rtnl_class_dsmark_set_value() local
280 dsmark = dsmark_class(class); in rtnl_class_dsmark_set_value()
281 if (!dsmark) in rtnl_class_dsmark_set_value()
284 dsmark->cdm_value = value; in rtnl_class_dsmark_set_value()
285 dsmark->cdm_mask |= SCH_DSMARK_ATTR_VALUE; in rtnl_class_dsmark_set_value()
297 struct rtnl_dsmark_class *dsmark; in rtnl_class_dsmark_get_value() local
299 dsmark = dsmark_class(class); in rtnl_class_dsmark_get_value()
300 if (dsmark && dsmark->cdm_mask & SCH_DSMARK_ATTR_VALUE) in rtnl_class_dsmark_get_value()
301 return dsmark->cdm_value; in rtnl_class_dsmark_get_value()
320 struct rtnl_dsmark_qdisc *dsmark; in rtnl_qdisc_dsmark_set_indices() local
322 dsmark = dsmark_qdisc(qdisc); in rtnl_qdisc_dsmark_set_indices()
323 if (!dsmark) in rtnl_qdisc_dsmark_set_indices()
326 dsmark->qdm_indices = indices; in rtnl_qdisc_dsmark_set_indices()
327 dsmark->qdm_mask |= SCH_DSMARK_ATTR_INDICES; in rtnl_qdisc_dsmark_set_indices()
339 struct rtnl_dsmark_qdisc *dsmark; in rtnl_qdisc_dsmark_get_indices() local
341 dsmark = dsmark_qdisc(qdisc); in rtnl_qdisc_dsmark_get_indices()
342 if (dsmark && dsmark->qdm_mask & SCH_DSMARK_ATTR_INDICES) in rtnl_qdisc_dsmark_get_indices()
343 return dsmark->qdm_indices; in rtnl_qdisc_dsmark_get_indices()
357 struct rtnl_dsmark_qdisc *dsmark; in rtnl_qdisc_dsmark_set_default_index() local
359 dsmark = dsmark_qdisc(qdisc); in rtnl_qdisc_dsmark_set_default_index()
360 if (!dsmark) in rtnl_qdisc_dsmark_set_default_index()
363 dsmark->qdm_default_index = default_index; in rtnl_qdisc_dsmark_set_default_index()
364 dsmark->qdm_mask |= SCH_DSMARK_ATTR_DEFAULT_INDEX; in rtnl_qdisc_dsmark_set_default_index()
376 struct rtnl_dsmark_qdisc *dsmark; in rtnl_qdisc_dsmark_get_default_index() local
378 dsmark = dsmark_qdisc(qdisc); in rtnl_qdisc_dsmark_get_default_index()
379 if (dsmark && dsmark->qdm_mask & SCH_DSMARK_ATTR_DEFAULT_INDEX) in rtnl_qdisc_dsmark_get_default_index()
380 return dsmark->qdm_default_index; in rtnl_qdisc_dsmark_get_default_index()
393 struct rtnl_dsmark_qdisc *dsmark; in rtnl_qdisc_dsmark_set_set_tc_index() local
395 dsmark = dsmark_qdisc(qdisc); in rtnl_qdisc_dsmark_set_set_tc_index()
396 if (!dsmark) in rtnl_qdisc_dsmark_set_set_tc_index()
399 dsmark->qdm_set_tc_index = !!flag; in rtnl_qdisc_dsmark_set_set_tc_index()
400 dsmark->qdm_mask |= SCH_DSMARK_ATTR_SET_TC_INDEX; in rtnl_qdisc_dsmark_set_set_tc_index()
413 struct rtnl_dsmark_qdisc *dsmark; in rtnl_qdisc_dsmark_get_set_tc_index() local
415 dsmark = dsmark_qdisc(qdisc); in rtnl_qdisc_dsmark_get_set_tc_index()
416 if (dsmark && dsmark->qdm_mask & SCH_DSMARK_ATTR_SET_TC_INDEX) in rtnl_qdisc_dsmark_get_set_tc_index()
417 return dsmark->qdm_set_tc_index; in rtnl_qdisc_dsmark_get_set_tc_index()