/drivers/net/xen-netback/ |
D | hash.c | 50 spin_lock_irqsave(&vif->hash.cache.lock, flags); in xenvif_add_hash() 54 list_for_each_entry_rcu(entry, &vif->hash.cache.list, link) { in xenvif_add_hash() 64 new->seq = atomic_inc_return(&vif->hash.cache.seq); in xenvif_add_hash() 65 list_add_rcu(&new->link, &vif->hash.cache.list); in xenvif_add_hash() 67 if (++vif->hash.cache.count > xenvif_hash_cache_size) { in xenvif_add_hash() 69 vif->hash.cache.count--; in xenvif_add_hash() 74 spin_unlock_irqrestore(&vif->hash.cache.lock, flags); in xenvif_add_hash() 85 val = xen_netif_toeplitz_hash(vif->hash.key, in xenvif_new_hash() 86 sizeof(vif->hash.key), in xenvif_new_hash() 103 spin_lock_irqsave(&vif->hash.cache.lock, flags); in xenvif_flush_hash() [all …]
|
/drivers/net/ethernet/freescale/fman/ |
D | fman_mac.h | 224 static inline void free_hash_table(struct eth_hash_t *hash) in free_hash_table() argument 229 if (hash) { in free_hash_table() 230 if (hash->lsts) { in free_hash_table() 231 for (i = 0; i < hash->size; i++) { in free_hash_table() 233 dequeue_addr_from_hash_entry(&hash->lsts[i]); in free_hash_table() 237 dequeue_addr_from_hash_entry(&hash-> in free_hash_table() 242 kfree(hash->lsts); in free_hash_table() 245 kfree(hash); in free_hash_table() 252 struct eth_hash_t *hash; in alloc_hash_table() local 255 hash = kmalloc_array(size, sizeof(struct eth_hash_t *), GFP_KERNEL); in alloc_hash_table() [all …]
|
/drivers/staging/vboxvideo/ |
D | vbox_hgsmi.c | 32 static u32 hgsmi_hash_process(u32 hash, const u8 *data, int size) in hgsmi_hash_process() argument 35 hash += *data++; in hgsmi_hash_process() 36 hash += (hash << 10); in hgsmi_hash_process() 37 hash ^= (hash >> 6); in hgsmi_hash_process() 40 return hash; in hgsmi_hash_process() 43 static u32 hgsmi_hash_end(u32 hash) in hgsmi_hash_end() argument 45 hash += (hash << 3); in hgsmi_hash_end() 46 hash ^= (hash >> 11); in hgsmi_hash_end() 47 hash += (hash << 15); in hgsmi_hash_end() 49 return hash; in hgsmi_hash_end()
|
/drivers/net/wireless/broadcom/brcm80211/brcmfmac/ |
D | flowring.c | 70 struct brcmf_flowring_hash *hash; in brcmf_flowring_lookup() local 93 hash = flow->hash; in brcmf_flowring_lookup() 95 if ((sta || (memcmp(hash[hash_idx].mac, mac, ETH_ALEN) == 0)) && in brcmf_flowring_lookup() 96 (hash[hash_idx].fifo == fifo) && in brcmf_flowring_lookup() 97 (hash[hash_idx].ifidx == ifidx)) { in brcmf_flowring_lookup() 105 return hash[hash_idx].flowid; in brcmf_flowring_lookup() 115 struct brcmf_flowring_hash *hash; in brcmf_flowring_create() local 138 hash = flow->hash; in brcmf_flowring_create() 140 if ((hash[hash_idx].ifidx == BRCMF_FLOWRING_INVALID_IFIDX) && in brcmf_flowring_create() 141 (is_zero_ether_addr(hash[hash_idx].mac))) { in brcmf_flowring_create() [all …]
|
/drivers/gpu/drm/ttm/ |
D | ttm_object.c | 122 struct drm_hash_item hash; member 176 &base->hash, in ttm_base_object_init() 191 (void)drm_ht_remove_item_rcu(&tdev->object_hash, &base->hash); in ttm_base_object_init() 205 (void)drm_ht_remove_item_rcu(&tdev->object_hash, &base->hash); in ttm_release_base() 233 struct drm_hash_item *hash; in ttm_base_object_lookup() local 238 ret = drm_ht_find_item_rcu(ht, key, &hash); in ttm_base_object_lookup() 241 base = drm_hash_entry(hash, struct ttm_ref_object, hash)->obj; in ttm_base_object_lookup() 255 struct drm_hash_item *hash; in ttm_base_object_lookup_for_ref() local 260 ret = drm_ht_find_item_rcu(ht, key, &hash); in ttm_base_object_lookup_for_ref() 263 base = drm_hash_entry(hash, struct ttm_base_object, hash); in ttm_base_object_lookup_for_ref() [all …]
|
/drivers/infiniband/core/ |
D | uverbs_ioctl_merge.c | 315 struct uverbs_attr_spec_hash *hash = NULL; in build_method_with_attrs() local 322 hash = kzalloc(sizeof(*hash) + in build_method_with_attrs() 323 ALIGN(sizeof(*hash->attrs) * (attr_max_bucket + 1), in build_method_with_attrs() 327 if (!hash) { in build_method_with_attrs() 331 hash->num_attrs = attr_max_bucket + 1; in build_method_with_attrs() 332 method->num_child_attrs += hash->num_attrs; in build_method_with_attrs() 333 hash->mandatory_attrs_bitmask = (void *)(hash + 1) + in build_method_with_attrs() 334 ALIGN(sizeof(*hash->attrs) * in build_method_with_attrs() 338 method->attr_buckets[bucket_idx] = hash; in build_method_with_attrs() 367 attr = &hash->attrs[min_id]; in build_method_with_attrs() [all …]
|
D | iwpm_util.c | 519 u32 hash = jhash_2words(ipv6_hash, (__force u32) ipv6_sockaddr->sin6_port, 0); in iwpm_ipv6_jhash() local 520 return hash; in iwpm_ipv6_jhash() 526 u32 hash = jhash_2words(ipv4_hash, (__force u32) ipv4_sockaddr->sin_port, 0); in iwpm_ipv4_jhash() local 527 return hash; in iwpm_ipv4_jhash() 531 struct sockaddr_storage *b_sockaddr, u32 *hash) in get_hash_bucket() argument 548 *hash = a_hash; in get_hash_bucket() 550 *hash = jhash_2words(a_hash, b_hash, 0); in get_hash_bucket() 558 u32 hash; in get_mapinfo_hash_bucket() local 561 ret = get_hash_bucket(local_sockaddr, mapped_sockaddr, &hash); in get_mapinfo_hash_bucket() 564 return &iwpm_hash_bucket[hash & IWPM_MAPINFO_HASH_MASK]; in get_mapinfo_hash_bucket() [all …]
|
D | uverbs_ioctl.c | 165 attr_spec_bucket, &attr_bundle->hash[ret], in uverbs_uattrs_process() 189 attr_bundle->hash[i].valid_bitmap, in uverbs_validate_kernel_mandatory() 275 sizeof(*ctx->uverbs_attr_bundle->hash[0].attrs) * in ib_uverbs_cmd_verbs() 277 sizeof(*ctx->uverbs_attr_bundle->hash[0].valid_bitmap) * in ib_uverbs_cmd_verbs() 293 (sizeof(ctx->uverbs_attr_bundle->hash[0]) * in ib_uverbs_cmd_verbs() 305 ctx->uverbs_attr_bundle->hash[i].attrs = curr_attr; in ib_uverbs_cmd_verbs() 307 ctx->uverbs_attr_bundle->hash[i].num_attrs = curr_num_attrs; in ib_uverbs_cmd_verbs() 308 ctx->uverbs_attr_bundle->hash[i].valid_bitmap = curr_bitmap; in ib_uverbs_cmd_verbs()
|
/drivers/gpu/drm/vmwgfx/ |
D | vmwgfx_cmdbuf_res.c | 45 struct drm_hash_item hash; member 84 struct drm_hash_item *hash; in vmw_cmdbuf_res_lookup() local 88 ret = drm_ht_find_item(&man->resources, key, &hash); in vmw_cmdbuf_res_lookup() 93 (drm_hash_entry(hash, struct vmw_cmdbuf_res, hash)->res); in vmw_cmdbuf_res_lookup() 109 WARN_ON(drm_ht_remove_item(&man->resources, &entry->hash)); in vmw_cmdbuf_res_free() 173 &entry->hash); in vmw_cmdbuf_res_revert() 211 cres->hash.key = user_key | (res_type << 24); in vmw_cmdbuf_res_add() 212 ret = drm_ht_insert_item(&man->resources, &cres->hash); in vmw_cmdbuf_res_add() 250 struct drm_hash_item *hash; in vmw_cmdbuf_res_remove() local 254 &hash); in vmw_cmdbuf_res_remove() [all …]
|
/drivers/net/team/ |
D | team_mode_loadbalance.c | 96 #define LB_HTPM_PORT_BY_HASH(lp_priv, hash) \ argument 97 (lb_priv)->ex->tx_hash_to_port_mapping[hash].port 99 #define LB_HTPM_OPT_INST_INFO_BY_HASH(lp_priv, hash) \ argument 100 (lb_priv)->ex->tx_hash_to_port_mapping[hash].opt_inst_info 127 unsigned char hash) in lb_hash_select_tx_port() argument 129 int port_index = team_num_to_port_index(team, hash); in lb_hash_select_tx_port() 138 unsigned char hash) in lb_htpm_select_tx_port() argument 140 return rcu_dereference_bh(LB_HTPM_PORT_BY_HASH(lb_priv, hash)); in lb_htpm_select_tx_port() 205 unsigned char hash) in lb_update_tx_stats() argument 213 hash_stats = &pcpu_stats->hash_stats[hash]; in lb_update_tx_stats() [all …]
|
/drivers/staging/lustre/lustre/fld/ |
D | fld_request.c | 66 int hash; in fld_rrb_scan() local 75 hash = fld_rrb_hash(fld, seq); in fld_rrb_scan() 77 hash = 0; in fld_rrb_scan() 81 if (target->ft_idx == hash) in fld_rrb_scan() 85 if (hash != 0) { in fld_rrb_scan() 90 hash = 0; in fld_rrb_scan() 95 fld->lcf_name, hash, seq, fld->lcf_count); in fld_rrb_scan() 257 static inline int hash_is_sane(int hash) in hash_is_sane() argument 259 return (hash >= 0 && hash < ARRAY_SIZE(fld_hash)); in hash_is_sane() 263 const char *prefix, int hash) in fld_client_init() argument [all …]
|
D | lproc_fld.c | 85 struct lu_fld_hash *hash = NULL; in fld_debugfs_hash_seq_write() local 102 hash = &fld_hash[i]; in fld_debugfs_hash_seq_write() 107 if (hash) { in fld_debugfs_hash_seq_write() 109 fld->lcf_hash = hash; in fld_debugfs_hash_seq_write() 113 fld->lcf_name, hash->fh_name); in fld_debugfs_hash_seq_write()
|
/drivers/net/ethernet/mellanox/mlx5/core/lib/ |
D | mpfs.h | 48 #define for_each_l2hash_node(hn, tmp, hash, i) \ argument 50 hlist_for_each_entry_safe(hn, tmp, &(hash)[i], hlist) 52 #define l2addr_hash_find(hash, mac, type) ({ \ argument 57 hlist_for_each_entry(ptr, &(hash)[ix], node.hlist) \ 67 #define l2addr_hash_add(hash, mac, type, gfp) ({ \ argument 74 hlist_add_head(&ptr->node.hlist, &(hash)[ix]);\
|
D | mpfs.c | 73 struct hlist_head hash[MLX5_L2_ADDR_HASH_SIZE]; member 129 WARN_ON(!hlist_empty(mpfs->hash)); in mlx5_mpfs_cleanup() 146 l2addr = l2addr_hash_find(mpfs->hash, mac, struct l2table_node); in mlx5_mpfs_add_mac() 156 l2addr = l2addr_hash_add(mpfs->hash, mac, struct l2table_node, GFP_KERNEL); in mlx5_mpfs_add_mac() 188 l2addr = l2addr_hash_find(mpfs->hash, mac, struct l2table_node); in mlx5_mpfs_del_mac()
|
/drivers/target/tcm_fc/ |
D | tfc_sess.c | 82 INIT_HLIST_HEAD(&tport->hash[i]); in ft_tport_get() 184 head = &tport->hash[ft_sess_hash(port_id)]; in ft_sess_get() 185 hlist_for_each_entry_rcu(sess, head, hash) { in ft_sess_get() 206 struct hlist_head *head = &tport->hash[ft_sess_hash(sess->port_id)]; in ft_sess_alloc_cb() 209 hlist_add_head_rcu(&sess->hash, head); in ft_sess_alloc_cb() 229 head = &tport->hash[ft_sess_hash(port_id)]; in ft_sess_create() 230 hlist_for_each_entry_rcu(sess, head, hash) in ft_sess_create() 262 hlist_del_rcu(&sess->hash); in ft_sess_unhash() 278 head = &tport->hash[ft_sess_hash(port_id)]; in ft_sess_delete() 279 hlist_for_each_entry_rcu(sess, head, hash) { in ft_sess_delete() [all …]
|
/drivers/staging/lustre/lnet/libcfs/linux/ |
D | linux-crypto.c | 148 unsigned char *hash, unsigned int *hash_len) in cfs_crypto_hash_digest() argument 162 if (!hash || *hash_len < type->cht_size) { in cfs_crypto_hash_digest() 170 ahash_request_set_crypt(req, &sl, hash, sl.length); in cfs_crypto_hash_digest() 274 unsigned char *hash, unsigned int *hash_len) in cfs_crypto_hash_final() argument 280 if (!hash || !hash_len) { in cfs_crypto_hash_final() 289 ahash_request_set_crypt(req, NULL, hash, 0); in cfs_crypto_hash_final() 318 unsigned char hash[CFS_CRYPTO_HASH_DIGESTSIZE_MAX]; in cfs_crypto_performance_test() local 319 unsigned int hash_len = sizeof(hash); in cfs_crypto_performance_test() 349 err = cfs_crypto_hash_final(hdesc, hash, &hash_len); in cfs_crypto_performance_test()
|
/drivers/crypto/sunxi-ss/ |
D | sun4i-ss-hash.c | 29 algt = container_of(alg, struct sun4i_ss_alg_template, alg.hash); in sun4i_hash_crainit() 47 algt = container_of(alg, struct sun4i_ss_alg_template, alg.hash); in sun4i_hash_init() 65 octx->hash[i] = op->hash[i]; in sun4i_hash_export_md5() 67 octx->hash[0] = SHA1_H0; in sun4i_hash_export_md5() 68 octx->hash[1] = SHA1_H1; in sun4i_hash_export_md5() 69 octx->hash[2] = SHA1_H2; in sun4i_hash_export_md5() 70 octx->hash[3] = SHA1_H3; in sun4i_hash_export_md5() 90 op->hash[i] = ictx->hash[i]; in sun4i_hash_import_md5() 107 octx->state[i] = op->hash[i]; in sun4i_hash_export_sha1() 133 op->hash[i] = ictx->state[i]; in sun4i_hash_import_sha1() [all …]
|
/drivers/staging/lustre/lnet/lnet/ |
D | peer.c | 44 struct list_head *hash; in lnet_peer_tables_create() local 58 LIBCFS_CPT_ALLOC(hash, lnet_cpt_table(), i, in lnet_peer_tables_create() 59 LNET_PEER_HASH_SIZE * sizeof(*hash)); in lnet_peer_tables_create() 60 if (!hash) { in lnet_peer_tables_create() 67 INIT_LIST_HEAD(&hash[j]); in lnet_peer_tables_create() 68 ptable->pt_hash = hash; /* sign of initialization */ in lnet_peer_tables_create() 78 struct list_head *hash; in lnet_peer_tables_destroy() local 86 hash = ptable->pt_hash; in lnet_peer_tables_destroy() 87 if (!hash) /* not initialized */ in lnet_peer_tables_destroy() 94 LASSERT(list_empty(&hash[j])); in lnet_peer_tables_destroy() [all …]
|
/drivers/misc/ |
D | uid_sys_stats.c | 64 struct hlist_node hash; member 75 struct hlist_node hash; member 182 hash_for_each_possible(uid_entry->task_entries, task_entry, hash, in find_task_entry() 214 hash_add(uid_entry->task_entries, &task_entry->hash, (unsigned int)pid); in find_or_register_task() 226 tmp_task, task_entry, hash) { in remove_uid_tasks() 227 hash_del(&task_entry->hash); in remove_uid_tasks() 237 hash_for_each(uid_entry->task_entries, bkt_task, task_entry, hash) { in set_io_uid_tasks_zero() 261 hash_for_each(uid_entry->task_entries, bkt_task, task_entry, hash) { in compute_io_uid_tasks() 274 hash_for_each(uid_entry->task_entries, bkt_task, task_entry, hash) { in show_io_uid_tasks() 304 hash_for_each_possible(hash_table, uid_entry, hash, uid) { in find_uid_entry() [all …]
|
/drivers/infiniband/hw/mthca/ |
D | mthca_mcg.c | 65 u16 *hash, int *prev, int *index) in find_mgm() argument 79 err = mthca_MGID_HASH(dev, mailbox, hash); in find_mgm() 86 mthca_dbg(dev, "Hash for %pI6 is %04x\n", gid, *hash); in find_mgm() 88 *index = *hash; in find_mgm() 99 if (*index != *hash) { in find_mgm() 125 u16 hash; in mthca_multicast_attach() local 138 err = find_mgm(dev, gid->raw, mailbox, &hash, &prev, &index); in mthca_multicast_attach() 219 u16 hash; in mthca_multicast_detach() local 231 err = find_mgm(dev, gid->raw, mailbox, &hash, &prev, &index); in mthca_multicast_detach()
|
/drivers/base/power/ |
D | trace.c | 185 unsigned int hash = hash_string(lineno, file, FILEHASH); in show_file_hash() local 186 if (hash != value) in show_file_hash() 203 unsigned int hash = hash_string(DEVSEED, dev_name(dev), DEVHASH); in show_dev_hash() local 204 if (hash == value) { in show_dev_hash() 230 unsigned int hash = hash_string(DEVSEED, dev_name(dev), in show_trace_dev_match() local 232 if (hash == value) { in show_trace_dev_match()
|
/drivers/net/ethernet/ti/ |
D | tlan.h | 533 u8 hash; in tlan_hash_func() local 535 hash = (a[0]^a[3]); /* & 077 */ in tlan_hash_func() 536 hash ^= ((a[0]^a[3])>>6); /* & 003 */ in tlan_hash_func() 537 hash ^= ((a[1]^a[4])<<2); /* & 074 */ in tlan_hash_func() 538 hash ^= ((a[1]^a[4])>>4); /* & 017 */ in tlan_hash_func() 539 hash ^= ((a[2]^a[5])<<4); /* & 060 */ in tlan_hash_func() 540 hash ^= ((a[2]^a[5])>>2); /* & 077 */ in tlan_hash_func() 542 return hash & 077; in tlan_hash_func()
|
/drivers/scsi/ |
D | libiscsi_tcp.c | 173 segment->hash = NULL; in iscsi_tcp_segment_splice_digest() 202 if (segment->hash && copied) { in iscsi_tcp_segment_done() 217 ahash_request_set_crypt(segment->hash, &sg, NULL, copied); in iscsi_tcp_segment_done() 218 crypto_ahash_update(segment->hash); in iscsi_tcp_segment_done() 263 if (segment->hash) { in iscsi_tcp_segment_done() 264 ahash_request_set_crypt(segment->hash, NULL, in iscsi_tcp_segment_done() 266 crypto_ahash_final(segment->hash); in iscsi_tcp_segment_done() 316 iscsi_tcp_dgst_header(struct ahash_request *hash, const void *hdr, in iscsi_tcp_dgst_header() argument 322 ahash_request_set_crypt(hash, &sg, digest, hdrlen); in iscsi_tcp_dgst_header() 323 crypto_ahash_digest(hash); in iscsi_tcp_dgst_header() [all …]
|
/drivers/net/ppp/ |
D | pppoe.c | 148 unsigned char hash = 0; in hash_item() local 152 hash ^= addr[i]; in hash_item() 154 hash ^= (__force __u32)sid >> i; in hash_item() 156 hash ^= hash >> i; in hash_item() 158 return hash & PPPOE_HASH_MASK; in hash_item() 169 int hash = hash_item(sid, addr); in __get_item() local 172 ret = pn->hash_table[hash]; in __get_item() 186 int hash = hash_item(po->pppoe_pa.sid, po->pppoe_pa.remote); in __set_item() local 189 ret = pn->hash_table[hash]; in __set_item() 198 po->next = pn->hash_table[hash]; in __set_item() [all …]
|
/drivers/net/ethernet/chelsio/cxgb3/ |
D | l2t.c | 240 int hash = arp_hash(e->addr, e->ifindex, d); in alloc_l2e() local 242 for (p = &d->l2tab[hash].first; *p; p = &(*p)->next) in alloc_l2e() 308 int hash; in t3_l2t_get() local 330 hash = arp_hash(addr, ifidx, d); in t3_l2t_get() 333 for (e = d->l2tab[hash].first; e; e = e->next) in t3_l2t_get() 346 e->next = d->l2tab[hash].first; in t3_l2t_get() 347 d->l2tab[hash].first = e; in t3_l2t_get() 405 int hash = arp_hash(addr, ifidx, d); in t3_l2t_update() local 408 for (e = d->l2tab[hash].first; e; e = e->next) in t3_l2t_update()
|