Lines Matching refs:attrs
49 unsigned long attrs;
205 /* unlike the required attrs, we have to track the optional attributes
1465 .attrs = 0,
1472 .attrs = SEG6_F_ATTR(SEG6_LOCAL_NH6),
1479 .attrs = SEG6_F_ATTR(SEG6_LOCAL_TABLE),
1485 .attrs = SEG6_F_ATTR(SEG6_LOCAL_OIF),
1491 .attrs = SEG6_F_ATTR(SEG6_LOCAL_NH6),
1497 .attrs = SEG6_F_ATTR(SEG6_LOCAL_NH4),
1503 .attrs = SEG6_F_ATTR(SEG6_LOCAL_VRFTABLE),
1515 .attrs = 0,
1523 .attrs = SEG6_F_ATTR(SEG6_LOCAL_TABLE),
1530 .attrs = SEG6_F_ATTR(SEG6_LOCAL_VRFTABLE),
1541 .attrs = SEG6_F_ATTR(SEG6_LOCAL_SRH),
1547 .attrs = SEG6_F_ATTR(SEG6_LOCAL_SRH),
1554 .attrs = SEG6_F_ATTR(SEG6_LOCAL_BPF),
1652 static int parse_nla_srh(struct nlattr **attrs, struct seg6_local_lwt *slwt,
1658 srh = nla_data(attrs[SEG6_LOCAL_SRH]);
1659 len = nla_len(attrs[SEG6_LOCAL_SRH]);
1710 static int parse_nla_table(struct nlattr **attrs, struct seg6_local_lwt *slwt,
1713 slwt->table = nla_get_u32(attrs[SEG6_LOCAL_TABLE]);
1744 static int parse_nla_vrftable(struct nlattr **attrs,
1753 info->vrf_table = nla_get_u32(attrs[SEG6_LOCAL_VRFTABLE]);
1782 static int parse_nla_nh4(struct nlattr **attrs, struct seg6_local_lwt *slwt,
1785 memcpy(&slwt->nh4, nla_data(attrs[SEG6_LOCAL_NH4]),
1809 static int parse_nla_nh6(struct nlattr **attrs, struct seg6_local_lwt *slwt,
1812 memcpy(&slwt->nh6, nla_data(attrs[SEG6_LOCAL_NH6]),
1836 static int parse_nla_iif(struct nlattr **attrs, struct seg6_local_lwt *slwt,
1839 slwt->iif = nla_get_u32(attrs[SEG6_LOCAL_IIF]);
1860 static int parse_nla_oif(struct nlattr **attrs, struct seg6_local_lwt *slwt,
1863 slwt->oif = nla_get_u32(attrs[SEG6_LOCAL_OIF]);
1891 static int parse_nla_bpf(struct nlattr **attrs, struct seg6_local_lwt *slwt,
1900 attrs[SEG6_LOCAL_BPF],
1969 static int parse_nla_counters(struct nlattr **attrs,
1978 attrs[SEG6_LOCAL_COUNTERS],
2129 static int parse_nla_flavors(struct nlattr **attrs, struct seg6_local_lwt *slwt,
2139 attrs[SEG6_LOCAL_FLAVORS],
2258 int (*parse)(struct nlattr **attrs, struct seg6_local_lwt *slwt,
2326 * encoded as a flag (i.e: 1 << ID) in the 'attrs' bitmask;
2350 unsigned long attrs = slwt->desc->attrs | slwt->parsed_optattrs;
2352 __destroy_attrs(attrs, SEG6_LOCAL_MAX + 1, slwt);
2355 static int parse_nla_optional_attrs(struct nlattr **attrs,
2365 if (!(desc->optattrs & SEG6_F_ATTR(i)) || !attrs[i])
2373 err = param->parse(attrs, slwt, extack);
2426 static int parse_nla_action(struct nlattr **attrs, struct seg6_local_lwt *slwt,
2444 /* Forcing the desc->optattrs *set* and the desc->attrs *set* to be
2456 invalid_attrs = desc->attrs & desc->optattrs;
2465 if (desc->attrs & SEG6_F_ATTR(i)) {
2466 if (!attrs[i])
2471 err = param->parse(attrs, slwt, extack);
2478 err = parse_nla_optional_attrs(attrs, slwt, extack);
2488 __destroy_attrs(desc->attrs, i, slwt);
2561 unsigned long attrs;
2567 attrs = slwt->desc->attrs | slwt->parsed_optattrs;
2570 if (attrs & SEG6_F_ATTR(i)) {
2584 unsigned long attrs;
2589 attrs = slwt->desc->attrs | slwt->parsed_optattrs;
2591 if (attrs & SEG6_F_ATTR(SEG6_LOCAL_SRH))
2594 if (attrs & SEG6_F_ATTR(SEG6_LOCAL_TABLE))
2597 if (attrs & SEG6_F_ATTR(SEG6_LOCAL_NH4))
2600 if (attrs & SEG6_F_ATTR(SEG6_LOCAL_NH6))
2603 if (attrs & SEG6_F_ATTR(SEG6_LOCAL_IIF))
2606 if (attrs & SEG6_F_ATTR(SEG6_LOCAL_OIF))
2609 if (attrs & SEG6_F_ATTR(SEG6_LOCAL_BPF))
2614 if (attrs & SEG6_F_ATTR(SEG6_LOCAL_VRFTABLE))
2617 if (attrs & SEG6_F_LOCAL_COUNTERS)
2626 if (attrs & SEG6_F_ATTR(SEG6_LOCAL_FLAVORS))
2646 attrs_a = slwt_a->desc->attrs | slwt_a->parsed_optattrs;
2647 attrs_b = slwt_b->desc->attrs | slwt_b->parsed_optattrs;