Lines Matching +defs:src +defs:hash

48 #include "hash.h"
62 /* hash class keys */
98 * batadv_choose_tt() - return the index of the tt entry in the hash table
100 * @size: the size of the hash table
102 * Return: the hash index where the object represented by 'data' should be
108 u32 hash = 0;
111 hash = jhash(&tt->addr, ETH_ALEN, hash);
112 hash = jhash(&tt->vid, sizeof(tt->vid), hash);
114 return hash % size;
118 * batadv_tt_hash_find() - look for a client in the given hash table
119 * @hash: the hash table to search
127 batadv_tt_hash_find(struct batadv_hashtable *hash, const u8 *addr,
134 if (!hash)
140 index = batadv_choose_tt(&to_search, hash->size);
141 head = &hash->table[index];
569 /* drop reference of remove hash entry */
706 /* remove the reference for the hash */
1088 * @hash: hash to dump
1098 struct batadv_hashtable *hash, unsigned int bucket,
1104 spin_lock_bh(&hash->list_locks[bucket]);
1105 cb->seq = atomic_read(&hash->generation) << 1 | 1;
1107 hlist_for_each_entry(common, &hash->table[bucket], hash_entry) {
1113 spin_unlock_bh(&hash->list_locks[bucket]);
1118 spin_unlock_bh(&hash->list_locks[bucket]);
1136 struct batadv_hashtable *hash;
1154 hash = bat_priv->tt.local_hash;
1156 while (bucket < hash->size) {
1158 hash, bucket, &idx))
1248 /* drop reference of remove hash entry */
1304 struct batadv_hashtable *hash = bat_priv->tt.local_hash;
1306 spinlock_t *list_lock; /* protects write access to the hash lists */
1309 for (i = 0; i < hash->size; i++) {
1310 head = &hash->table[i];
1311 list_lock = &hash->list_locks[i];
1321 struct batadv_hashtable *hash;
1322 spinlock_t *list_lock; /* protects write access to the hash lists */
1332 hash = bat_priv->tt.local_hash;
1334 for (i = 0; i < hash->size; i++) {
1335 head = &hash->table[i];
1336 list_lock = &hash->list_locks[i];
1351 batadv_hash_destroy(hash);
1610 /* remove the reference for the hash */
1679 /* Do not remove multicast addresses from the local hash on
1685 /* remove address from local hash if present */
1903 struct batadv_hashtable *hash;
1923 hash = bat_priv->tt.global_hash;
1925 while (bucket < hash->size) {
1926 head = &hash->table[bucket];
2151 struct batadv_hashtable *hash = bat_priv->tt.global_hash;
2154 spinlock_t *list_lock; /* protects write access to the hash lists */
2157 if (!hash)
2160 for (i = 0; i < hash->size; i++) {
2161 head = &hash->table[i];
2162 list_lock = &hash->list_locks[i];
2217 struct batadv_hashtable *hash = bat_priv->tt.global_hash;
2220 spinlock_t *list_lock; /* protects write access to the hash lists */
2226 for (i = 0; i < hash->size; i++) {
2227 head = &hash->table[i];
2228 list_lock = &hash->list_locks[i];
2256 struct batadv_hashtable *hash;
2257 spinlock_t *list_lock; /* protects write access to the hash lists */
2267 hash = bat_priv->tt.global_hash;
2269 for (i = 0; i < hash->size; i++) {
2270 head = &hash->table[i];
2271 list_lock = &hash->list_locks[i];
2285 batadv_hash_destroy(hash);
2309 * @src: mac address of the source client
2321 const u8 *src,
2330 if (src && batadv_vlan_ap_isola_get(bat_priv, vid)) {
2331 tt_local_entry = batadv_tt_local_hash_find(bat_priv, src, vid);
2378 * produce a unique hash of the table, but since the order which is used to feed
2380 * probably sorts the clients differently, the hash function cannot be directly
2392 struct batadv_hashtable *hash = bat_priv->tt.global_hash;
2401 for (i = 0; i < hash->size; i++) {
2402 head = &hash->table[i];
2472 struct batadv_hashtable *hash = bat_priv->tt.local_hash;
2479 for (i = 0; i < hash->size; i++) {
2480 head = &hash->table[i];
2691 * specified tt hash
2693 * @hash: hash table containing the tt entries
2699 * Fills the tvlv buff with the tt entries from the specified hash. If valid_cb
2705 struct batadv_hashtable *hash,
2727 for (i = 0; i < hash->size; i++) {
2728 head = &hash->table[i];
3551 struct batadv_hashtable *hash = bat_priv->tt.local_hash;
3556 if (!hash)
3559 for (i = 0; i < hash->size; i++) {
3560 head = &hash->table[i];
3588 struct batadv_hashtable *hash = bat_priv->tt.local_hash;
3593 spinlock_t *list_lock; /* protects write access to the hash lists */
3596 if (!hash)
3599 for (i = 0; i < hash->size; i++) {
3600 head = &hash->table[i];
3601 list_lock = &hash->list_locks[i];
3674 * @src: source mac address of packet
3678 * Return: true when src+dst(+vid) pair should be isolated, false otherwise
3680 bool batadv_is_ap_isolated(struct batadv_priv *bat_priv, u8 *src, u8 *dst,
3699 tt_global_entry = batadv_tt_global_hash_find(bat_priv, src, vid);
3966 * @src: mac address of tt tvlv sender
3975 u8 *src, u8 *dst,
4006 ret = batadv_send_tt_response(bat_priv, tt_data, src, dst);
4025 src, tt_num_entries);
4048 * @src: mac address of tt tvlv sender
4057 u8 *src, u8 *dst,
4074 orig_node = batadv_orig_hash_find(bat_priv, src);
4083 src, roaming_adv->client);