• Home
  • Raw
  • Download

Lines Matching refs:mask

97 	struct fl_flow_key mask;  member
112 struct fl_flow_mask *mask; member
140 static unsigned short int fl_mask_range(const struct fl_flow_mask *mask) in fl_mask_range() argument
142 return mask->range.end - mask->range.start; in fl_mask_range()
145 static void fl_mask_update_range(struct fl_flow_mask *mask) in fl_mask_update_range() argument
147 const u8 *bytes = (const u8 *) &mask->key; in fl_mask_update_range()
148 size_t size = sizeof(mask->key); in fl_mask_update_range()
164 mask->range.start = rounddown(first, sizeof(long)); in fl_mask_update_range()
165 mask->range.end = roundup(last + 1, sizeof(long)); in fl_mask_update_range()
169 const struct fl_flow_mask *mask) in fl_key_get_start() argument
171 return (u8 *) key + mask->range.start; in fl_key_get_start()
175 struct fl_flow_mask *mask) in fl_set_masked_key() argument
177 const long *lkey = fl_key_get_start(key, mask); in fl_set_masked_key()
178 const long *lmask = fl_key_get_start(&mask->key, mask); in fl_set_masked_key()
179 long *lmkey = fl_key_get_start(mkey, mask); in fl_set_masked_key()
182 for (i = 0; i < fl_mask_range(mask); i += sizeof(long)) in fl_set_masked_key()
187 struct fl_flow_mask *mask) in fl_mask_fits_tmplt() argument
189 const long *lmask = fl_key_get_start(&mask->key, mask); in fl_mask_fits_tmplt()
195 ltmplt = fl_key_get_start(&tmplt->mask, mask); in fl_mask_fits_tmplt()
196 for (i = 0; i < fl_mask_range(mask); i += sizeof(long)) { in fl_mask_fits_tmplt()
204 struct fl_flow_mask *mask) in fl_clear_masked_range() argument
206 memset(fl_key_get_start(key, mask), 0, fl_mask_range(mask)); in fl_clear_masked_range()
215 min_mask = ntohs(filter->mask->key.tp_range.tp_min.dst); in fl_range_port_dst_cmp()
216 max_mask = ntohs(filter->mask->key.tp_range.tp_max.dst); in fl_range_port_dst_cmp()
238 min_mask = ntohs(filter->mask->key.tp_range.tp_min.src); in fl_range_port_src_cmp()
239 max_mask = ntohs(filter->mask->key.tp_range.tp_max.src); in fl_range_port_src_cmp()
255 static struct cls_fl_filter *__fl_lookup(struct fl_flow_mask *mask, in __fl_lookup() argument
258 return rhashtable_lookup_fast(&mask->ht, fl_key_get_start(mkey, mask), in __fl_lookup()
259 mask->filter_ht_params); in __fl_lookup()
262 static struct cls_fl_filter *fl_lookup_range(struct fl_flow_mask *mask, in fl_lookup_range() argument
268 list_for_each_entry_rcu(filter, &mask->filters, list) { in fl_lookup_range()
275 f = __fl_lookup(mask, mkey); in fl_lookup_range()
283 struct cls_fl_filter *fl_mask_lookup(struct fl_flow_mask *mask, struct fl_flow_key *key) in fl_mask_lookup() argument
287 fl_set_masked_key(&mkey, key, mask); in fl_mask_lookup()
288 if ((mask->flags & TCA_FLOWER_MASK_FLAGS_RANGE)) in fl_mask_lookup()
289 return fl_lookup_range(mask, &mkey, key); in fl_mask_lookup()
291 return __fl_lookup(mask, &mkey); in fl_mask_lookup()
316 struct fl_flow_mask *mask; in fl_classify() local
319 list_for_each_entry_rcu(mask, &head->masks, list) { in fl_classify()
321 fl_clear_masked_range(&skb_key, mask); in fl_classify()
323 skb_flow_dissect_meta(skb, &mask->dissector, &skb_key); in fl_classify()
328 skb_flow_dissect_tunnel_info(skb, &mask->dissector, &skb_key); in fl_classify()
329 skb_flow_dissect_ct(skb, &mask->dissector, &skb_key, in fl_classify()
333 skb_flow_dissect_hash(skb, &mask->dissector, &skb_key); in fl_classify()
334 skb_flow_dissect(skb, &mask->dissector, &skb_key, 0); in fl_classify()
336 f = fl_mask_lookup(mask, &skb_key); in fl_classify()
362 static void fl_mask_free(struct fl_flow_mask *mask, bool mask_init_done) in fl_mask_free() argument
366 WARN_ON(!list_empty(&mask->filters)); in fl_mask_free()
367 rhashtable_destroy(&mask->ht); in fl_mask_free()
369 kfree(mask); in fl_mask_free()
374 struct fl_flow_mask *mask = container_of(to_rcu_work(work), in fl_mask_free_work() local
377 fl_mask_free(mask, true); in fl_mask_free_work()
382 struct fl_flow_mask *mask = container_of(to_rcu_work(work), in fl_uninit_mask_free_work() local
385 fl_mask_free(mask, false); in fl_uninit_mask_free_work()
388 static bool fl_mask_put(struct cls_fl_head *head, struct fl_flow_mask *mask) in fl_mask_put() argument
390 if (!refcount_dec_and_test(&mask->refcnt)) in fl_mask_put()
393 rhashtable_remove_fast(&head->ht, &mask->ht_node, mask_ht_params); in fl_mask_put()
396 list_del_rcu(&mask->list); in fl_mask_put()
399 tcf_queue_work(&mask->rwork, fl_mask_free_work); in fl_mask_put()
460 cls_flower.rule->match.dissector = &f->mask->dissector; in fl_hw_replace_filter()
461 cls_flower.rule->match.mask = &f->mask->key; in fl_hw_replace_filter()
552 rhashtable_remove_fast(&f->mask->ht, &f->ht_node, in __fl_delete()
553 f->mask->filter_ht_params); in __fl_delete()
558 *last = fl_mask_put(head, f->mask); in __fl_delete()
582 struct fl_flow_mask *mask, *next_mask; in fl_destroy() local
586 list_for_each_entry_safe(mask, next_mask, &head->masks, list) { in fl_destroy()
587 list_for_each_entry_safe(f, next, &mask->filters, list) { in fl_destroy()
759 void *mask, int mask_type, int len) in fl_set_key_val() argument
765 memset(mask, 0xff, len); in fl_set_key_val()
767 nla_memcpy(mask, tb[mask_type], len); in fl_set_key_val()
771 struct fl_flow_key *mask, in fl_set_key_port_range() argument
775 TCA_FLOWER_KEY_PORT_DST_MIN, &mask->tp_range.tp_min.dst, in fl_set_key_port_range()
778 TCA_FLOWER_KEY_PORT_DST_MAX, &mask->tp_range.tp_max.dst, in fl_set_key_port_range()
781 TCA_FLOWER_KEY_PORT_SRC_MIN, &mask->tp_range.tp_min.src, in fl_set_key_port_range()
784 TCA_FLOWER_KEY_PORT_SRC_MAX, &mask->tp_range.tp_max.src, in fl_set_key_port_range()
787 if (mask->tp_range.tp_min.dst != mask->tp_range.tp_max.dst) { in fl_set_key_port_range()
792 if (mask->tp_range.tp_min.src != mask->tp_range.tp_max.src) { in fl_set_key_port_range()
797 if (mask->tp_range.tp_min.dst && mask->tp_range.tp_max.dst && in fl_set_key_port_range()
805 if (mask->tp_range.tp_min.src && mask->tp_range.tp_max.src && in fl_set_key_port_range()
1057 u32 key, mask; in fl_set_key_flags() local
1066 mask = be32_to_cpu(nla_get_be32(tb[TCA_FLOWER_KEY_FLAGS_MASK])); in fl_set_key_flags()
1071 fl_set_key_flag(key, mask, flags_key, flags_mask, in fl_set_key_flags()
1073 fl_set_key_flag(key, mask, flags_key, flags_mask, in fl_set_key_flags()
1082 struct flow_dissector_key_ip *mask) in fl_set_key_ip() argument
1089 fl_set_key_val(tb, &key->tos, tos_key, &mask->tos, tos_mask, sizeof(key->tos)); in fl_set_key_ip()
1090 fl_set_key_val(tb, &key->ttl, ttl_key, &mask->ttl, ttl_mask, sizeof(key->ttl)); in fl_set_key_ip()
1284 struct fl_flow_key *mask, in fl_set_enc_opt() argument
1334 mask->enc_opts.dst_opt_type = TUNNEL_GENEVE_OPT; in fl_set_enc_opt()
1335 option_len = fl_set_geneve_opt(nla_opt_msk, mask, in fl_set_enc_opt()
1341 mask->enc_opts.len += option_len; in fl_set_enc_opt()
1342 if (key->enc_opts.len != mask->enc_opts.len) { in fl_set_enc_opt()
1364 mask->enc_opts.dst_opt_type = TUNNEL_VXLAN_OPT; in fl_set_enc_opt()
1365 option_len = fl_set_vxlan_opt(nla_opt_msk, mask, in fl_set_enc_opt()
1371 mask->enc_opts.len += option_len; in fl_set_enc_opt()
1372 if (key->enc_opts.len != mask->enc_opts.len) { in fl_set_enc_opt()
1394 mask->enc_opts.dst_opt_type = TUNNEL_ERSPAN_OPT; in fl_set_enc_opt()
1395 option_len = fl_set_erspan_opt(nla_opt_msk, mask, in fl_set_enc_opt()
1401 mask->enc_opts.len += option_len; in fl_set_enc_opt()
1402 if (key->enc_opts.len != mask->enc_opts.len) { in fl_set_enc_opt()
1461 struct flow_dissector_key_ct *mask, in fl_set_key_ct() argument
1472 &mask->ct_state, TCA_FLOWER_KEY_CT_STATE_MASK, in fl_set_key_ct()
1475 err = fl_validate_ct_state(key->ct_state & mask->ct_state, in fl_set_key_ct()
1488 &mask->ct_zone, TCA_FLOWER_KEY_CT_ZONE_MASK, in fl_set_key_ct()
1497 &mask->ct_mark, TCA_FLOWER_KEY_CT_MARK_MASK, in fl_set_key_ct()
1506 mask->ct_labels, TCA_FLOWER_KEY_CT_LABELS_MASK, in fl_set_key_ct()
1514 struct fl_flow_key *key, struct fl_flow_key *mask, in fl_set_key() argument
1525 mask->meta.ingress_ifindex = 0xffffffff; in fl_set_key()
1529 mask->eth.dst, TCA_FLOWER_KEY_ETH_DST_MASK, in fl_set_key()
1532 mask->eth.src, TCA_FLOWER_KEY_ETH_SRC_MASK, in fl_set_key()
1542 &key->vlan, &mask->vlan); in fl_set_key()
1551 &key->cvlan, &mask->cvlan); in fl_set_key()
1554 &mask->basic.n_proto, in fl_set_key()
1559 mask->basic.n_proto = cpu_to_be16(~0); in fl_set_key()
1564 mask->basic.n_proto = cpu_to_be16(~0); in fl_set_key()
1571 &mask->basic.ip_proto, TCA_FLOWER_UNSPEC, in fl_set_key()
1573 fl_set_key_ip(tb, false, &key->ip, &mask->ip); in fl_set_key()
1578 mask->control.addr_type = ~0; in fl_set_key()
1580 &mask->ipv4.src, TCA_FLOWER_KEY_IPV4_SRC_MASK, in fl_set_key()
1583 &mask->ipv4.dst, TCA_FLOWER_KEY_IPV4_DST_MASK, in fl_set_key()
1587 mask->control.addr_type = ~0; in fl_set_key()
1589 &mask->ipv6.src, TCA_FLOWER_KEY_IPV6_SRC_MASK, in fl_set_key()
1592 &mask->ipv6.dst, TCA_FLOWER_KEY_IPV6_DST_MASK, in fl_set_key()
1598 &mask->tp.src, TCA_FLOWER_KEY_TCP_SRC_MASK, in fl_set_key()
1601 &mask->tp.dst, TCA_FLOWER_KEY_TCP_DST_MASK, in fl_set_key()
1604 &mask->tcp.flags, TCA_FLOWER_KEY_TCP_FLAGS_MASK, in fl_set_key()
1608 &mask->tp.src, TCA_FLOWER_KEY_UDP_SRC_MASK, in fl_set_key()
1611 &mask->tp.dst, TCA_FLOWER_KEY_UDP_DST_MASK, in fl_set_key()
1615 &mask->tp.src, TCA_FLOWER_KEY_SCTP_SRC_MASK, in fl_set_key()
1618 &mask->tp.dst, TCA_FLOWER_KEY_SCTP_DST_MASK, in fl_set_key()
1623 &mask->icmp.type, in fl_set_key()
1627 &mask->icmp.code, in fl_set_key()
1633 &mask->icmp.type, in fl_set_key()
1637 &mask->icmp.code, in fl_set_key()
1642 ret = fl_set_key_mpls(tb, &key->mpls, &mask->mpls, extack); in fl_set_key()
1648 &mask->arp.sip, TCA_FLOWER_KEY_ARP_SIP_MASK, in fl_set_key()
1651 &mask->arp.tip, TCA_FLOWER_KEY_ARP_TIP_MASK, in fl_set_key()
1654 &mask->arp.op, TCA_FLOWER_KEY_ARP_OP_MASK, in fl_set_key()
1657 mask->arp.sha, TCA_FLOWER_KEY_ARP_SHA_MASK, in fl_set_key()
1660 mask->arp.tha, TCA_FLOWER_KEY_ARP_THA_MASK, in fl_set_key()
1667 ret = fl_set_key_port_range(tb, key, mask, extack); in fl_set_key()
1675 mask->enc_control.addr_type = ~0; in fl_set_key()
1678 &mask->enc_ipv4.src, in fl_set_key()
1683 &mask->enc_ipv4.dst, in fl_set_key()
1691 mask->enc_control.addr_type = ~0; in fl_set_key()
1694 &mask->enc_ipv6.src, in fl_set_key()
1699 &mask->enc_ipv6.dst, in fl_set_key()
1705 &mask->enc_key_id.keyid, TCA_FLOWER_UNSPEC, in fl_set_key()
1709 &mask->enc_tp.src, TCA_FLOWER_KEY_ENC_UDP_SRC_PORT_MASK, in fl_set_key()
1713 &mask->enc_tp.dst, TCA_FLOWER_KEY_ENC_UDP_DST_PORT_MASK, in fl_set_key()
1716 fl_set_key_ip(tb, true, &key->enc_ip, &mask->enc_ip); in fl_set_key()
1719 &mask->hash.hash, TCA_FLOWER_KEY_HASH_MASK, in fl_set_key()
1723 ret = fl_set_enc_opt(tb, key, mask, extack); in fl_set_key()
1728 ret = fl_set_key_ct(tb, &key->ct, &mask->ct, extack); in fl_set_key()
1734 &mask->control.flags, extack); in fl_set_key()
1755 static int fl_init_mask_hashtable(struct fl_flow_mask *mask) in fl_init_mask_hashtable() argument
1757 mask->filter_ht_params = fl_ht_params; in fl_init_mask_hashtable()
1758 mask->filter_ht_params.key_len = fl_mask_range(mask); in fl_init_mask_hashtable()
1759 mask->filter_ht_params.key_offset += mask->range.start; in fl_init_mask_hashtable()
1761 return rhashtable_init(&mask->ht, &mask->filter_ht_params); in fl_init_mask_hashtable()
1767 #define FL_KEY_IS_MASKED(mask, member) \ argument
1768 memchr_inv(((char *)mask) + FL_KEY_MEMBER_OFFSET(member), \
1778 #define FL_KEY_SET_IF_MASKED(mask, keys, cnt, id, member) \ argument
1780 if (FL_KEY_IS_MASKED(mask, member)) \
1785 struct fl_flow_key *mask) in fl_init_dissector() argument
1790 FL_KEY_SET_IF_MASKED(mask, keys, cnt, in fl_init_dissector()
1794 FL_KEY_SET_IF_MASKED(mask, keys, cnt, in fl_init_dissector()
1796 FL_KEY_SET_IF_MASKED(mask, keys, cnt, in fl_init_dissector()
1798 FL_KEY_SET_IF_MASKED(mask, keys, cnt, in fl_init_dissector()
1800 FL_KEY_SET_IF_MASKED(mask, keys, cnt, in fl_init_dissector()
1802 FL_KEY_SET_IF_MASKED(mask, keys, cnt, in fl_init_dissector()
1804 FL_KEY_SET_IF_MASKED(mask, keys, cnt, in fl_init_dissector()
1806 FL_KEY_SET_IF_MASKED(mask, keys, cnt, in fl_init_dissector()
1808 FL_KEY_SET_IF_MASKED(mask, keys, cnt, in fl_init_dissector()
1810 FL_KEY_SET_IF_MASKED(mask, keys, cnt, in fl_init_dissector()
1812 FL_KEY_SET_IF_MASKED(mask, keys, cnt, in fl_init_dissector()
1814 FL_KEY_SET_IF_MASKED(mask, keys, cnt, in fl_init_dissector()
1816 FL_KEY_SET_IF_MASKED(mask, keys, cnt, in fl_init_dissector()
1818 FL_KEY_SET_IF_MASKED(mask, keys, cnt, in fl_init_dissector()
1820 FL_KEY_SET_IF_MASKED(mask, keys, cnt, in fl_init_dissector()
1822 FL_KEY_SET_IF_MASKED(mask, keys, cnt, in fl_init_dissector()
1824 if (FL_KEY_IS_MASKED(mask, enc_ipv4) || in fl_init_dissector()
1825 FL_KEY_IS_MASKED(mask, enc_ipv6)) in fl_init_dissector()
1828 FL_KEY_SET_IF_MASKED(mask, keys, cnt, in fl_init_dissector()
1830 FL_KEY_SET_IF_MASKED(mask, keys, cnt, in fl_init_dissector()
1832 FL_KEY_SET_IF_MASKED(mask, keys, cnt, in fl_init_dissector()
1834 FL_KEY_SET_IF_MASKED(mask, keys, cnt, in fl_init_dissector()
1836 FL_KEY_SET_IF_MASKED(mask, keys, cnt, in fl_init_dissector()
1843 struct fl_flow_mask *mask) in fl_create_new_mask() argument
1852 fl_mask_copy(newmask, mask); in fl_create_new_mask()
1869 err = rhashtable_replace_fast(&head->ht, &mask->ht_node, in fl_create_new_mask()
1891 struct fl_flow_mask *mask) in fl_check_assign_mask() argument
1902 fnew->mask = rhashtable_lookup_get_insert_fast(&head->ht, in fl_check_assign_mask()
1903 &mask->ht_node, in fl_check_assign_mask()
1905 if (!fnew->mask) { in fl_check_assign_mask()
1913 newmask = fl_create_new_mask(head, mask); in fl_check_assign_mask()
1919 fnew->mask = newmask; in fl_check_assign_mask()
1921 } else if (IS_ERR(fnew->mask)) { in fl_check_assign_mask()
1922 ret = PTR_ERR(fnew->mask); in fl_check_assign_mask()
1923 } else if (fold && fold->mask != fnew->mask) { in fl_check_assign_mask()
1925 } else if (!refcount_inc_not_zero(&fnew->mask->refcnt)) { in fl_check_assign_mask()
1933 rhashtable_remove_fast(&head->ht, &mask->ht_node, in fl_check_assign_mask()
1939 struct cls_fl_filter *f, struct fl_flow_mask *mask, in fl_set_parms() argument
1960 err = fl_set_key(net, tb, &f->key, &mask->key, extack); in fl_set_parms()
1964 fl_mask_update_range(mask); in fl_set_parms()
1965 fl_set_masked_key(&f->mkey, &f->key, mask); in fl_set_parms()
1967 if (!fl_mask_fits_tmplt(tmplt, mask)) { in fl_set_parms()
1979 struct fl_flow_mask *mask = fnew->mask; in fl_ht_insert_unique() local
1982 err = rhashtable_lookup_insert_fast(&mask->ht, in fl_ht_insert_unique()
1984 mask->filter_ht_params); in fl_ht_insert_unique()
2007 struct fl_flow_mask *mask; in fl_change() local
2017 mask = kzalloc(sizeof(struct fl_flow_mask), GFP_KERNEL); in fl_change()
2018 if (!mask) { in fl_change()
2060 err = fl_set_parms(net, tp, fnew, mask, base, tb, tca[TCA_RATE], in fl_change()
2065 err = fl_check_assign_mask(head, fnew, fold, mask); in fl_change()
2103 fnew->mask->filter_ht_params; in fl_change()
2105 err = rhashtable_insert_fast(&fnew->mask->ht, in fl_change()
2114 rhashtable_remove_fast(&fold->mask->ht, in fl_change()
2116 fold->mask->filter_ht_params); in fl_change()
2123 fl_mask_put(head, fold->mask); in fl_change()
2156 list_add_tail_rcu(&fnew->list, &fnew->mask->filters); in fl_change()
2163 tcf_queue_work(&mask->rwork, fl_uninit_mask_free_work); in fl_change()
2174 rhashtable_remove_fast(&fnew->mask->ht, &fnew->ht_node, in fl_change()
2175 fnew->mask->filter_ht_params); in fl_change()
2177 fl_mask_put(head, fnew->mask); in fl_change()
2183 tcf_queue_work(&mask->rwork, fl_uninit_mask_free_work); in fl_change()
2287 cls_flower.rule->match.dissector = &f->mask->dissector; in fl_reoffload()
2288 cls_flower.rule->match.mask = &f->mask->key; in fl_reoffload()
2360 cls_flower.rule->match.mask = &tmplt->mask; in fl_hw_create_tmplt()
2410 err = fl_set_key(net, tb, &tmplt->dummy_key, &tmplt->mask, extack); in fl_tmplt_create()
2414 fl_init_dissector(&tmplt->dissector, &tmplt->mask); in fl_tmplt_create()
2440 void *mask, int mask_type, int len) in fl_dump_key_val() argument
2444 if (!memchr_inv(mask, 0, len)) in fl_dump_key_val()
2450 err = nla_put(skb, mask_type, len, mask); in fl_dump_key_val()
2458 struct fl_flow_key *mask) in fl_dump_key_port_range() argument
2462 &mask->tp_range.tp_min.dst, TCA_FLOWER_UNSPEC, in fl_dump_key_port_range()
2466 &mask->tp_range.tp_max.dst, TCA_FLOWER_UNSPEC, in fl_dump_key_port_range()
2470 &mask->tp_range.tp_min.src, TCA_FLOWER_UNSPEC, in fl_dump_key_port_range()
2474 &mask->tp_range.tp_max.src, TCA_FLOWER_UNSPEC, in fl_dump_key_port_range()
2615 struct flow_dissector_key_ip *mask) in fl_dump_key_ip() argument
2622 if (fl_dump_key_val(skb, &key->tos, tos_key, &mask->tos, tos_mask, sizeof(key->tos)) || in fl_dump_key_ip()
2623 fl_dump_key_val(skb, &key->ttl, ttl_key, &mask->ttl, ttl_mask, sizeof(key->ttl))) in fl_dump_key_ip()
2666 u32 key, mask; in fl_dump_key_flags() local
2674 mask = 0; in fl_dump_key_flags()
2676 fl_get_key_flag(flags_key, flags_mask, &key, &mask, in fl_dump_key_flags()
2678 fl_get_key_flag(flags_key, flags_mask, &key, &mask, in fl_dump_key_flags()
2683 _mask = cpu_to_be32(mask); in fl_dump_key_flags()
2783 struct flow_dissector_key_ct *mask) in fl_dump_key_ct() argument
2787 &mask->ct_state, TCA_FLOWER_KEY_CT_STATE_MASK, in fl_dump_key_ct()
2793 &mask->ct_zone, TCA_FLOWER_KEY_CT_ZONE_MASK, in fl_dump_key_ct()
2799 &mask->ct_mark, TCA_FLOWER_KEY_CT_MARK_MASK, in fl_dump_key_ct()
2805 &mask->ct_labels, TCA_FLOWER_KEY_CT_LABELS_MASK, in fl_dump_key_ct()
2869 struct fl_flow_key *key, struct fl_flow_key *mask) in fl_dump_key() argument
2871 if (mask->meta.ingress_ifindex) { in fl_dump_key()
2880 mask->eth.dst, TCA_FLOWER_KEY_ETH_DST_MASK, in fl_dump_key()
2883 mask->eth.src, TCA_FLOWER_KEY_ETH_SRC_MASK, in fl_dump_key()
2886 &mask->basic.n_proto, TCA_FLOWER_UNSPEC, in fl_dump_key()
2890 if (fl_dump_key_mpls(skb, &key->mpls, &mask->mpls)) in fl_dump_key()
2894 TCA_FLOWER_KEY_VLAN_PRIO, &key->vlan, &mask->vlan)) in fl_dump_key()
2899 &key->cvlan, &mask->cvlan) || in fl_dump_key()
2900 (mask->cvlan.vlan_tpid && in fl_dump_key()
2905 if (mask->basic.n_proto) { in fl_dump_key()
2906 if (mask->cvlan.vlan_eth_type) { in fl_dump_key()
2910 } else if (mask->vlan.vlan_eth_type) { in fl_dump_key()
2920 &mask->basic.ip_proto, TCA_FLOWER_UNSPEC, in fl_dump_key()
2922 fl_dump_key_ip(skb, false, &key->ip, &mask->ip))) in fl_dump_key()
2927 &mask->ipv4.src, TCA_FLOWER_KEY_IPV4_SRC_MASK, in fl_dump_key()
2930 &mask->ipv4.dst, TCA_FLOWER_KEY_IPV4_DST_MASK, in fl_dump_key()
2935 &mask->ipv6.src, TCA_FLOWER_KEY_IPV6_SRC_MASK, in fl_dump_key()
2938 &mask->ipv6.dst, TCA_FLOWER_KEY_IPV6_DST_MASK, in fl_dump_key()
2944 &mask->tp.src, TCA_FLOWER_KEY_TCP_SRC_MASK, in fl_dump_key()
2947 &mask->tp.dst, TCA_FLOWER_KEY_TCP_DST_MASK, in fl_dump_key()
2950 &mask->tcp.flags, TCA_FLOWER_KEY_TCP_FLAGS_MASK, in fl_dump_key()
2955 &mask->tp.src, TCA_FLOWER_KEY_UDP_SRC_MASK, in fl_dump_key()
2958 &mask->tp.dst, TCA_FLOWER_KEY_UDP_DST_MASK, in fl_dump_key()
2963 &mask->tp.src, TCA_FLOWER_KEY_SCTP_SRC_MASK, in fl_dump_key()
2966 &mask->tp.dst, TCA_FLOWER_KEY_SCTP_DST_MASK, in fl_dump_key()
2972 TCA_FLOWER_KEY_ICMPV4_TYPE, &mask->icmp.type, in fl_dump_key()
2976 TCA_FLOWER_KEY_ICMPV4_CODE, &mask->icmp.code, in fl_dump_key()
2983 TCA_FLOWER_KEY_ICMPV6_TYPE, &mask->icmp.type, in fl_dump_key()
2987 TCA_FLOWER_KEY_ICMPV6_CODE, &mask->icmp.code, in fl_dump_key()
2994 TCA_FLOWER_KEY_ARP_SIP, &mask->arp.sip, in fl_dump_key()
2998 TCA_FLOWER_KEY_ARP_TIP, &mask->arp.tip, in fl_dump_key()
3002 TCA_FLOWER_KEY_ARP_OP, &mask->arp.op, in fl_dump_key()
3006 mask->arp.sha, TCA_FLOWER_KEY_ARP_SHA_MASK, in fl_dump_key()
3009 mask->arp.tha, TCA_FLOWER_KEY_ARP_THA_MASK, in fl_dump_key()
3016 fl_dump_key_port_range(skb, key, mask)) in fl_dump_key()
3021 TCA_FLOWER_KEY_ENC_IPV4_SRC, &mask->enc_ipv4.src, in fl_dump_key()
3025 TCA_FLOWER_KEY_ENC_IPV4_DST, &mask->enc_ipv4.dst, in fl_dump_key()
3031 TCA_FLOWER_KEY_ENC_IPV6_SRC, &mask->enc_ipv6.src, in fl_dump_key()
3036 &mask->enc_ipv6.dst, in fl_dump_key()
3042 &mask->enc_key_id, TCA_FLOWER_UNSPEC, in fl_dump_key()
3046 &mask->enc_tp.src, in fl_dump_key()
3051 &mask->enc_tp.dst, in fl_dump_key()
3054 fl_dump_key_ip(skb, true, &key->enc_ip, &mask->enc_ip) || in fl_dump_key()
3055 fl_dump_key_enc_opt(skb, &key->enc_opts, &mask->enc_opts)) in fl_dump_key()
3058 if (fl_dump_key_ct(skb, &key->ct, &mask->ct)) in fl_dump_key()
3061 if (fl_dump_key_flags(skb, key->control.flags, mask->control.flags)) in fl_dump_key()
3065 &mask->hash.hash, TCA_FLOWER_KEY_HASH_MASK, in fl_dump_key()
3080 struct fl_flow_key *key, *mask; in fl_dump() local
3099 mask = &f->mask->key; in fl_dump()
3102 if (fl_dump_key(skb, net, key, mask)) in fl_dump()
3178 struct fl_flow_key *key, *mask; in fl_tmplt_dump() local
3186 mask = &tmplt->mask; in fl_tmplt_dump()
3188 if (fl_dump_key(skb, net, key, mask)) in fl_tmplt_dump()