/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() 55 lockdep_is_held(&vif->hash.cache.lock)) { in xenvif_add_hash() 65 new->seq = atomic_inc_return(&vif->hash.cache.seq); in xenvif_add_hash() 66 list_add_rcu(&new->link, &vif->hash.cache.list); in xenvif_add_hash() 68 if (++vif->hash.cache.count > xenvif_hash_cache_size) { in xenvif_add_hash() 70 vif->hash.cache.count--; in xenvif_add_hash() 75 spin_unlock_irqrestore(&vif->hash.cache.lock, flags); in xenvif_add_hash() 86 val = xen_netif_toeplitz_hash(vif->hash.key, in xenvif_new_hash() 87 sizeof(vif->hash.key), in xenvif_new_hash() [all …]
|
/drivers/net/ethernet/freescale/fman/ |
D | fman_mac.h | 206 static inline void free_hash_table(struct eth_hash_t *hash) in free_hash_table() argument 211 if (hash) { in free_hash_table() 212 if (hash->lsts) { in free_hash_table() 213 for (i = 0; i < hash->size; i++) { in free_hash_table() 215 dequeue_addr_from_hash_entry(&hash->lsts[i]); in free_hash_table() 219 dequeue_addr_from_hash_entry(&hash-> in free_hash_table() 224 kfree(hash->lsts); in free_hash_table() 227 kfree(hash); in free_hash_table() 234 struct eth_hash_t *hash; in alloc_hash_table() local 237 hash = kmalloc(sizeof(*hash), GFP_KERNEL); in alloc_hash_table() [all …]
|
/drivers/gpu/drm/vboxvideo/ |
D | vbox_hgsmi.c | 12 static u32 hgsmi_hash_process(u32 hash, const u8 *data, int size) in hgsmi_hash_process() argument 15 hash += *data++; in hgsmi_hash_process() 16 hash += (hash << 10); in hgsmi_hash_process() 17 hash ^= (hash >> 6); in hgsmi_hash_process() 20 return hash; in hgsmi_hash_process() 23 static u32 hgsmi_hash_end(u32 hash) in hgsmi_hash_end() argument 25 hash += (hash << 3); in hgsmi_hash_end() 26 hash ^= (hash >> 11); in hgsmi_hash_end() 27 hash += (hash << 15); in hgsmi_hash_end() 29 return hash; in hgsmi_hash_end()
|
/drivers/gpu/drm/vmwgfx/ |
D | vmwgfx_cmdbuf_res.c | 47 struct vmwgfx_hash_item hash; member 86 struct vmwgfx_hash_item *hash; in vmw_cmdbuf_res_lookup() local 89 hash_for_each_possible_rcu(man->resources, hash, head, key) { in vmw_cmdbuf_res_lookup() 90 if (hash->key == key) in vmw_cmdbuf_res_lookup() 91 return hlist_entry(hash, struct vmw_cmdbuf_res, hash)->res; in vmw_cmdbuf_res_lookup() 109 hash_del_rcu(&entry->hash.head); in vmw_cmdbuf_res_free() 170 hash_add_rcu(entry->man->resources, &entry->hash.head, in vmw_cmdbuf_res_revert() 171 entry->hash.key); in vmw_cmdbuf_res_revert() 207 cres->hash.key = user_key | (res_type << 24); in vmw_cmdbuf_res_add() 208 hash_add_rcu(man->resources, &cres->hash.head, cres->hash.key); in vmw_cmdbuf_res_add() [all …]
|
D | ttm_object.c | 126 struct vmwgfx_hash_item hash; member 146 struct vmwgfx_hash_item *hash; in ttm_tfile_find_ref_rcu() local 148 hash_for_each_possible_rcu(tfile->ref_hash, hash, head, key) { in ttm_tfile_find_ref_rcu() 149 if (hash->key == key) { in ttm_tfile_find_ref_rcu() 150 *p_hash = hash; in ttm_tfile_find_ref_rcu() 161 struct vmwgfx_hash_item *hash; in ttm_tfile_find_ref() local 163 hash_for_each_possible(tfile->ref_hash, hash, head, key) { in ttm_tfile_find_ref() 164 if (hash->key == key) { in ttm_tfile_find_ref() 165 *p_hash = hash; in ttm_tfile_find_ref() 261 struct vmwgfx_hash_item *hash; in ttm_base_object_lookup() local [all …]
|
D | vmwgfx_validation.c | 49 struct vmwgfx_hash_item hash; member 78 struct vmwgfx_hash_item hash; member 184 struct vmwgfx_hash_item *hash; in vmw_validation_find_bo_dup() local 187 hash_for_each_possible_rcu(ctx->sw_context->res_ht, hash, head, key) { in vmw_validation_find_bo_dup() 188 if (hash->key == key) { in vmw_validation_find_bo_dup() 189 bo_node = container_of(hash, typeof(*bo_node), hash); in vmw_validation_find_bo_dup() 226 struct vmwgfx_hash_item *hash; in vmw_validation_find_res_dup() local 229 hash_for_each_possible_rcu(ctx->sw_context->res_ht, hash, head, key) { in vmw_validation_find_res_dup() 230 if (hash->key == key) { in vmw_validation_find_res_dup() 231 res_node = container_of(hash, typeof(*res_node), hash); in vmw_validation_find_res_dup() [all …]
|
/drivers/net/wireless/broadcom/brcm80211/brcmfmac/ |
D | flowring.c | 62 struct brcmf_flowring_hash *hash; in brcmf_flowring_lookup() local 85 hash = flow->hash; in brcmf_flowring_lookup() 87 if ((sta || (memcmp(hash[hash_idx].mac, mac, ETH_ALEN) == 0)) && in brcmf_flowring_lookup() 88 (hash[hash_idx].fifo == fifo) && in brcmf_flowring_lookup() 89 (hash[hash_idx].ifidx == ifidx)) { in brcmf_flowring_lookup() 97 return hash[hash_idx].flowid; in brcmf_flowring_lookup() 107 struct brcmf_flowring_hash *hash; in brcmf_flowring_create() local 130 hash = flow->hash; in brcmf_flowring_create() 132 if ((hash[hash_idx].ifidx == BRCMF_FLOWRING_INVALID_IFIDX) && in brcmf_flowring_create() 133 (is_zero_ether_addr(hash[hash_idx].mac))) { in brcmf_flowring_create() [all …]
|
/drivers/scsi/lpfc/ |
D | lpfc_vmid.c | 48 u32 hash, u8 *buf) in lpfc_get_vmid_from_hashtable() argument 52 hash_for_each_possible(vport->hash_table, vmp, hnode, hash) { in lpfc_get_vmid_from_hashtable() 69 lpfc_put_vmid_in_hashtable(struct lpfc_vport *vport, u32 hash, in lpfc_put_vmid_in_hashtable() argument 72 hash_add(vport->hash_table, &vmp->hnode, hash); in lpfc_put_vmid_in_hashtable() 84 int hash = 0; in lpfc_vmid_hash_fn() local 93 hash = (hash + (c << LPFC_VMID_HASH_SHIFT) + in lpfc_vmid_hash_fn() 97 return hash & LPFC_VMID_HASH_MASK; in lpfc_vmid_hash_fn() 132 u32 hash; in lpfc_vmid_assign_cs_ctl() local 138 hash = lpfc_vmid_hash_fn(vmid->host_vmid, vmid->vmid_len); in lpfc_vmid_assign_cs_ctl() 140 lpfc_get_vmid_from_hashtable(vport->phba->pport, hash, in lpfc_vmid_assign_cs_ctl() [all …]
|
/drivers/net/wireguard/ |
D | noise.c | 82 memset(&handshake->hash, 0, NOISE_HASH_LEN); in handshake_zero() 432 static void mix_hash(u8 hash[NOISE_HASH_LEN], const u8 *src, size_t src_len) in mix_hash() 437 blake2s_update(&blake, hash, NOISE_HASH_LEN); in mix_hash() 439 blake2s_final(&blake, hash); in mix_hash() 442 static void mix_psk(u8 chaining_key[NOISE_HASH_LEN], u8 hash[NOISE_HASH_LEN], in mix_psk() 450 mix_hash(hash, temp_hash, NOISE_HASH_LEN); in mix_psk() 455 u8 hash[NOISE_HASH_LEN], in handshake_init() 458 memcpy(hash, handshake_init_hash, NOISE_HASH_LEN); in handshake_init() 460 mix_hash(hash, remote_static, NOISE_PUBLIC_KEY_LEN); in handshake_init() 465 u8 hash[NOISE_HASH_LEN]) in message_encrypt() [all …]
|
D | ratelimiter.c | 30 struct hlist_node hash; member 50 hlist_del_rcu(&entry->hash); in entry_uninit() 64 hlist_for_each_entry_safe(entry, temp, &table_v4[i], hash) { in wg_ratelimiter_gc_entries() 70 hlist_for_each_entry_safe(entry, temp, &table_v6[i], hash) { in wg_ratelimiter_gc_entries() 111 hlist_for_each_entry_rcu(entry, bucket, hash) { in wg_ratelimiter_allow() 144 INIT_HLIST_NODE(&entry->hash); in wg_ratelimiter_allow() 149 hlist_add_head_rcu(&entry->hash, bucket); in wg_ratelimiter_allow()
|
/drivers/net/ethernet/mediatek/ |
D | mtk_ppe.c | 94 u32 hash; in mtk_ppe_hash_entry() local 121 hash = (hv1 & hv2) | ((~hv1) & hv3); in mtk_ppe_hash_entry() 122 hash = (hash >> 24) | ((hash & 0xffffff) << 8); in mtk_ppe_hash_entry() 123 hash ^= hv1 ^ hv2 ^ hv3; in mtk_ppe_hash_entry() 124 hash ^= hash >> 16; in mtk_ppe_hash_entry() 125 hash <<= (ffs(eth->soc->hash_offset) - 1); in mtk_ppe_hash_entry() 126 hash &= MTK_PPE_ENTRIES - 1; in mtk_ppe_hash_entry() 128 return hash; in mtk_ppe_hash_entry() 435 if (entry->hash != 0xffff) { in __mtk_foe_entry_clear() 436 struct mtk_foe_entry *hwe = mtk_foe_get_entry(ppe, entry->hash); in __mtk_foe_entry_clear() [all …]
|
/drivers/md/ |
D | dm-ima.c | 340 if (table->md->ima.active_table.hash != table->md->ima.inactive_table.hash) in dm_ima_measure_on_table_load() 341 kfree(table->md->ima.inactive_table.hash); in dm_ima_measure_on_table_load() 343 table->md->ima.inactive_table.hash = digest_buf; in dm_ima_measure_on_table_load() 392 if (md->ima.active_table.hash != md->ima.inactive_table.hash) in dm_ima_measure_on_device_resume() 393 kfree(md->ima.active_table.hash); in dm_ima_measure_on_device_resume() 395 md->ima.active_table.hash = NULL; in dm_ima_measure_on_device_resume() 406 if (md->ima.inactive_table.hash) { in dm_ima_measure_on_device_resume() 407 md->ima.active_table.hash = md->ima.inactive_table.hash; in dm_ima_measure_on_device_resume() 409 md->ima.inactive_table.hash = NULL; in dm_ima_measure_on_device_resume() 433 if (md->ima.active_table.hash) { in dm_ima_measure_on_device_resume() [all …]
|
/drivers/net/team/ |
D | team_mode_loadbalance.c | 92 #define LB_HTPM_PORT_BY_HASH(lp_priv, hash) \ argument 93 (lb_priv)->ex->tx_hash_to_port_mapping[hash].port 95 #define LB_HTPM_OPT_INST_INFO_BY_HASH(lp_priv, hash) \ argument 96 (lb_priv)->ex->tx_hash_to_port_mapping[hash].opt_inst_info 123 unsigned char hash) in lb_hash_select_tx_port() argument 125 int port_index = team_num_to_port_index(team, hash); in lb_hash_select_tx_port() 134 unsigned char hash) in lb_htpm_select_tx_port() argument 138 port = rcu_dereference_bh(LB_HTPM_PORT_BY_HASH(lb_priv, hash)); in lb_htpm_select_tx_port() 142 return lb_hash_select_tx_port(team, lb_priv, skb, hash); in lb_htpm_select_tx_port() 207 unsigned char hash) in lb_update_tx_stats() argument [all …]
|
/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]);\
|
/drivers/target/tcm_fc/ |
D | tfc_sess.c | 70 INIT_HLIST_HEAD(&tport->hash[i]); in ft_tport_get() 172 head = &tport->hash[ft_sess_hash(port_id)]; in ft_sess_get() 173 hlist_for_each_entry_rcu(sess, head, hash) { in ft_sess_get() 194 struct hlist_head *head = &tport->hash[ft_sess_hash(sess->port_id)]; in ft_sess_alloc_cb() 197 hlist_add_head_rcu(&sess->hash, head); in ft_sess_alloc_cb() 217 head = &tport->hash[ft_sess_hash(port_id)]; in ft_sess_create() 218 hlist_for_each_entry_rcu(sess, head, hash) in ft_sess_create() 250 hlist_del_rcu(&sess->hash); in ft_sess_unhash() 266 head = &tport->hash[ft_sess_hash(port_id)]; in ft_sess_delete() 267 hlist_for_each_entry_rcu(sess, head, hash) { in ft_sess_delete() [all …]
|
/drivers/accessibility/speakup/ |
D | utils.h | 58 int hash = 0; in hash_name() local 61 hash = (hash * 17) & 0xfffffff; in hash_name() 64 hash += (int)*pn; in hash_name() 67 hash %= HASHSIZE; in hash_name() 68 return &key_table[hash]; in hash_name()
|
/drivers/net/ethernet/mellanox/mlx5/core/en/ |
D | rss.c | 71 struct mlx5e_rss_params_hash hash; member 98 rss->hash.hfunc = ETH_RSS_HASH_TOP; in mlx5e_rss_params_init() 99 netdev_rss_key_fill(rss->hash.toeplitz_hash_key, in mlx5e_rss_params_init() 100 sizeof(rss->hash.toeplitz_hash_key)); in mlx5e_rss_params_init() 166 mlx5e_tir_builder_build_rss(builder, &rss->hash, &rss_tt, inner); in mlx5e_rss_create_tir() 248 mlx5e_tir_builder_build_rss(builder, &rss->hash, &rss_tt, inner); in mlx5e_rss_update_tir() 398 err = mlx5e_rqt_redirect_indir(&rss->rqt, rqns, num_rqns, rss->hash.hfunc, &rss->indir); in mlx5e_rss_apply() 480 memcpy(key, rss->hash.toeplitz_hash_key, in mlx5e_rss_get_rxfh() 481 sizeof(rss->hash.toeplitz_hash_key)); in mlx5e_rss_get_rxfh() 484 *hfunc = rss->hash.hfunc; in mlx5e_rss_get_rxfh() [all …]
|
/drivers/crypto/allwinner/sun4i-ss/ |
D | sun4i-ss-hash.c | 27 algt = container_of(alg, struct sun4i_ss_alg_template, alg.hash); in sun4i_hash_crainit() 56 algt = container_of(alg, struct sun4i_ss_alg_template, alg.hash); in sun4i_hash_init() 74 octx->hash[i] = op->hash[i]; in sun4i_hash_export_md5() 76 octx->hash[0] = SHA1_H0; in sun4i_hash_export_md5() 77 octx->hash[1] = SHA1_H1; in sun4i_hash_export_md5() 78 octx->hash[2] = SHA1_H2; in sun4i_hash_export_md5() 79 octx->hash[3] = SHA1_H3; in sun4i_hash_export_md5() 99 op->hash[i] = ictx->hash[i]; in sun4i_hash_import_md5() 116 octx->state[i] = op->hash[i]; in sun4i_hash_export_sha1() 142 op->hash[i] = ictx->state[i]; in sun4i_hash_import_sha1() [all …]
|
/drivers/net/ethernet/mellanox/mlx5/core/ |
D | eswitch_offloads_termtbl.c | 24 u32 hash; in mlx5_eswitch_termtbl_hash() local 26 hash = jhash_1word(flow_act->action, 0); in mlx5_eswitch_termtbl_hash() 27 hash = jhash((const void *)&flow_act->vlan, in mlx5_eswitch_termtbl_hash() 28 sizeof(flow_act->vlan), hash); in mlx5_eswitch_termtbl_hash() 29 hash = jhash((const void *)&dest->vport.num, in mlx5_eswitch_termtbl_hash() 30 sizeof(dest->vport.num), hash); in mlx5_eswitch_termtbl_hash() 31 hash = jhash((const void *)&dest->vport.vhca_id, in mlx5_eswitch_termtbl_hash() 32 sizeof(dest->vport.num), hash); in mlx5_eswitch_termtbl_hash() 34 hash = jhash(flow_act->pkt_reformat, in mlx5_eswitch_termtbl_hash() 36 hash); in mlx5_eswitch_termtbl_hash() [all …]
|
/drivers/net/ethernet/fungible/funeth/ |
D | funeth_trace.h | 78 u32 hash, 81 TP_ARGS(rxq, num_rqes, pkt_len, hash, cls_vec), 88 __field(u32, hash) 98 __entry->hash = hash; 105 __entry->num_rqes, __entry->len, __entry->hash,
|
/drivers/crypto/caam/ |
D | key_gen.h | 16 static inline u32 split_key_len(u32 hash) in split_key_len() argument 22 idx = (hash & OP_ALG_ALGSEL_SUBMASK) >> OP_ALG_ALGSEL_SHIFT; in split_key_len() 34 static inline u32 split_key_pad_len(u32 hash) in split_key_pad_len() argument 36 return ALIGN(split_key_len(hash), 16); in split_key_pad_len()
|
/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/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/crypto/xilinx/ |
D | zynqmp-sha.c | 47 static int zynqmp_sha_init_tfm(struct crypto_shash *hash) in zynqmp_sha_init_tfm() argument 49 const char *fallback_driver_name = crypto_shash_alg_name(hash); in zynqmp_sha_init_tfm() 50 struct zynqmp_sha_tfm_ctx *tfm_ctx = crypto_shash_ctx(hash); in zynqmp_sha_init_tfm() 51 struct shash_alg *alg = crypto_shash_alg(hash); in zynqmp_sha_init_tfm() 65 hash->descsize += crypto_shash_descsize(tfm_ctx->fbk_tfm); in zynqmp_sha_init_tfm() 70 static void zynqmp_sha_exit_tfm(struct crypto_shash *hash) in zynqmp_sha_exit_tfm() argument 72 struct zynqmp_sha_tfm_ctx *tfm_ctx = crypto_shash_ctx(hash); in zynqmp_sha_exit_tfm()
|
/drivers/base/power/ |
D | trace.c | 193 unsigned int hash = hash_string(lineno, file, FILEHASH); in show_file_hash() local 194 if (hash != value) in show_file_hash() 211 unsigned int hash = hash_string(DEVSEED, dev_name(dev), DEVHASH); in show_dev_hash() local 212 if (hash == value) { in show_dev_hash() 238 unsigned int hash = hash_string(DEVSEED, dev_name(dev), in show_trace_dev_match() local 240 if (hash == value) { in show_trace_dev_match()
|