Lines Matching refs:hash

4039 /* L2 hash helper */
4157 static u32 bond_ip_hash(u32 hash, struct flow_keys *flow, int xmit_policy)
4159 hash ^= (__force u32)flow_get_u32_dst(flow) ^
4161 hash ^= (hash >> 16);
4162 hash ^= (hash >> 8);
4164 /* discard lowest hash bit to deal with the common even ports pattern */
4167 return hash >> 1;
4169 return hash;
4172 /* Generate hash based on xmit policy. If @skb is given it is used to linearize
4180 u32 hash;
4191 hash = bond_eth_hash(skb, data, mhoff, hlen);
4194 memcpy(&hash, &flow.icmp, sizeof(hash));
4196 memcpy(&hash, &flow.ports.ports, sizeof(hash));
4199 return bond_ip_hash(hash, &flow, bond->params.xmit_policy);
4203 * bond_xmit_hash - generate a hash value based on the xmit policy
4208 * them to generate a hash based on the xmit_policy set in the bonding device
4214 return skb->hash;
4222 * bond_xmit_hash_xdp - generate a hash value based on the xmit policy
5060 /* Build the usable slaves array in control path for modes that use xmit-hash
5117 slave_dbg(bond->dev, slave->dev, "Adding slave to tx hash array[%d]\n",
5144 u32 hash;
5146 hash = bond_xmit_hash(bond, skb);
5151 slave = slaves->arr[hash % count];
5160 u32 hash;
5162 hash = bond_xmit_hash_xdp(bond, xdp);
5168 return slaves->arr[hash % count];
5173 * just calculates hash and sends the packet out.
5350 * bond_sk_hash_l34 - generate a hash value based on the socket's L3 and L4 fields
5354 * them to generate a hash based on the LAYER34 xmit_policy.
5360 u32 hash;
5365 memcpy(&hash, &flow.ports.ports, sizeof(hash));
5367 return bond_ip_hash(hash, &flow, BOND_XMIT_POLICY_LAYER34);
5376 u32 hash;
5383 hash = bond_sk_hash_l34(sk);
5384 slave = slaves->arr[hash % count];