Lines Matching refs:keys
1733 static inline void __flow_hash_consistentify(struct flow_keys *keys) in __flow_hash_consistentify() argument
1737 switch (keys->control.addr_type) { in __flow_hash_consistentify()
1739 if ((__force u32)keys->addrs.v4addrs.dst < in __flow_hash_consistentify()
1740 (__force u32)keys->addrs.v4addrs.src) in __flow_hash_consistentify()
1741 swap(keys->addrs.v4addrs.src, keys->addrs.v4addrs.dst); in __flow_hash_consistentify()
1743 if ((__force u16)keys->ports.dst < in __flow_hash_consistentify()
1744 (__force u16)keys->ports.src) { in __flow_hash_consistentify()
1745 swap(keys->ports.src, keys->ports.dst); in __flow_hash_consistentify()
1749 addr_diff = memcmp(&keys->addrs.v6addrs.dst, in __flow_hash_consistentify()
1750 &keys->addrs.v6addrs.src, in __flow_hash_consistentify()
1751 sizeof(keys->addrs.v6addrs.dst)); in __flow_hash_consistentify()
1754 swap(keys->addrs.v6addrs.src.s6_addr32[i], in __flow_hash_consistentify()
1755 keys->addrs.v6addrs.dst.s6_addr32[i]); in __flow_hash_consistentify()
1757 if ((__force u16)keys->ports.dst < in __flow_hash_consistentify()
1758 (__force u16)keys->ports.src) { in __flow_hash_consistentify()
1759 swap(keys->ports.src, keys->ports.dst); in __flow_hash_consistentify()
1765 static inline u32 __flow_hash_from_keys(struct flow_keys *keys, in __flow_hash_from_keys() argument
1770 __flow_hash_consistentify(keys); in __flow_hash_from_keys()
1772 hash = siphash(flow_keys_hash_start(keys), in __flow_hash_from_keys()
1773 flow_keys_hash_length(keys), keyval); in __flow_hash_from_keys()
1780 u32 flow_hash_from_keys(struct flow_keys *keys) in flow_hash_from_keys() argument
1783 return __flow_hash_from_keys(keys, &hashrnd); in flow_hash_from_keys()
1788 struct flow_keys *keys, in ___skb_get_hash() argument
1791 skb_flow_dissect_flow_keys(skb, keys, in ___skb_get_hash()
1794 return __flow_hash_from_keys(keys, keyval); in ___skb_get_hash()
1828 struct flow_keys keys; in __skb_get_hash_symmetric() local
1832 memset(&keys, 0, sizeof(keys)); in __skb_get_hash_symmetric()
1834 &keys, NULL, 0, 0, 0, 0); in __skb_get_hash_symmetric()
1836 return __flow_hash_from_keys(&keys, &hashrnd); in __skb_get_hash_symmetric()
1851 struct flow_keys keys; in __skb_get_hash() local
1856 hash = ___skb_get_hash(skb, &keys, &hashrnd); in __skb_get_hash()
1858 __skb_set_sw_hash(skb, hash, flow_keys_have_l4(&keys)); in __skb_get_hash()
1865 struct flow_keys keys; in skb_get_hash_perturb() local
1867 return ___skb_get_hash(skb, &keys, perturb); in skb_get_hash_perturb()
1872 const struct flow_keys_basic *keys, int hlen) in __skb_get_poff() argument
1874 u32 poff = keys->control.thoff; in __skb_get_poff()
1877 if ((keys->control.flags & FLOW_DIS_IS_FRAGMENT) && in __skb_get_poff()
1878 !(keys->control.flags & FLOW_DIS_FIRST_FRAG)) in __skb_get_poff()
1881 switch (keys->basic.ip_proto) { in __skb_get_poff()
1933 struct flow_keys_basic keys; in skb_get_poff() local
1935 if (!skb_flow_dissect_flow_keys_basic(NULL, skb, &keys, in skb_get_poff()
1939 return __skb_get_poff(skb, skb->data, &keys, skb_headlen(skb)); in skb_get_poff()
1942 __u32 __get_hash_from_flowi6(const struct flowi6 *fl6, struct flow_keys *keys) in __get_hash_from_flowi6() argument
1944 memset(keys, 0, sizeof(*keys)); in __get_hash_from_flowi6()
1946 memcpy(&keys->addrs.v6addrs.src, &fl6->saddr, in __get_hash_from_flowi6()
1947 sizeof(keys->addrs.v6addrs.src)); in __get_hash_from_flowi6()
1948 memcpy(&keys->addrs.v6addrs.dst, &fl6->daddr, in __get_hash_from_flowi6()
1949 sizeof(keys->addrs.v6addrs.dst)); in __get_hash_from_flowi6()
1950 keys->control.addr_type = FLOW_DISSECTOR_KEY_IPV6_ADDRS; in __get_hash_from_flowi6()
1951 keys->ports.src = fl6->fl6_sport; in __get_hash_from_flowi6()
1952 keys->ports.dst = fl6->fl6_dport; in __get_hash_from_flowi6()
1953 keys->keyid.keyid = fl6->fl6_gre_key; in __get_hash_from_flowi6()
1954 keys->tags.flow_label = (__force u32)flowi6_get_flowlabel(fl6); in __get_hash_from_flowi6()
1955 keys->basic.ip_proto = fl6->flowi6_proto; in __get_hash_from_flowi6()
1957 return flow_hash_from_keys(keys); in __get_hash_from_flowi6()