Home
last modified time | relevance | path

Searched refs:h (Results 1 – 25 of 113) sorted by relevance

12345

/net/dccp/ccids/lib/
Dpacket_history.c123 void tfrc_rx_hist_add_packet(struct tfrc_rx_hist *h, in tfrc_rx_hist_add_packet() argument
127 struct tfrc_rx_hist_entry *entry = tfrc_rx_hist_last_rcv(h); in tfrc_rx_hist_add_packet()
133 int tfrc_rx_hist_duplicate(struct tfrc_rx_hist *h, struct sk_buff *skb) in tfrc_rx_hist_duplicate() argument
138 if (dccp_delta_seqno(tfrc_rx_hist_loss_prev(h)->tfrchrx_seqno, seq) <= 0) in tfrc_rx_hist_duplicate()
141 for (i = 1; i <= h->loss_count; i++) in tfrc_rx_hist_duplicate()
142 if (tfrc_rx_hist_entry(h, i)->tfrchrx_seqno == seq) in tfrc_rx_hist_duplicate()
148 static void tfrc_rx_hist_swap(struct tfrc_rx_hist *h, const u8 a, const u8 b) in tfrc_rx_hist_swap() argument
150 const u8 idx_a = tfrc_rx_hist_index(h, a), in tfrc_rx_hist_swap()
151 idx_b = tfrc_rx_hist_index(h, b); in tfrc_rx_hist_swap()
152 struct tfrc_rx_hist_entry *tmp = h->ring[idx_a]; in tfrc_rx_hist_swap()
[all …]
Dpacket_history.h104 static inline u8 tfrc_rx_hist_index(const struct tfrc_rx_hist *h, const u8 n) in tfrc_rx_hist_index() argument
106 return (h->loss_start + n) & TFRC_NDUPACK; in tfrc_rx_hist_index()
113 tfrc_rx_hist_last_rcv(const struct tfrc_rx_hist *h) in tfrc_rx_hist_last_rcv() argument
115 return h->ring[tfrc_rx_hist_index(h, h->loss_count)]; in tfrc_rx_hist_last_rcv()
122 tfrc_rx_hist_entry(const struct tfrc_rx_hist *h, const u8 n) in tfrc_rx_hist_entry() argument
124 return h->ring[tfrc_rx_hist_index(h, n)]; in tfrc_rx_hist_entry()
131 tfrc_rx_hist_loss_prev(const struct tfrc_rx_hist *h) in tfrc_rx_hist_loss_prev() argument
133 return h->ring[h->loss_start]; in tfrc_rx_hist_loss_prev()
137 static inline bool tfrc_rx_hist_loss_pending(const struct tfrc_rx_hist *h) in tfrc_rx_hist_loss_pending() argument
139 return h->loss_count > 0; in tfrc_rx_hist_loss_pending()
[all …]
/net/xfrm/
Dxfrm_hash.h90 unsigned int h = family ^ reqid; in __xfrm_dst_hash() local
93 h ^= __xfrm4_daddr_saddr_hash(daddr, saddr); in __xfrm_dst_hash()
96 h ^= __xfrm6_daddr_saddr_hash(daddr, saddr); in __xfrm_dst_hash()
99 return (h ^ (h >> 16)) & hmask; in __xfrm_dst_hash()
107 unsigned int h = family; in __xfrm_src_hash() local
110 h ^= __xfrm4_daddr_saddr_hash(daddr, saddr); in __xfrm_src_hash()
113 h ^= __xfrm6_daddr_saddr_hash(daddr, saddr); in __xfrm_src_hash()
116 return (h ^ (h >> 16)) & hmask; in __xfrm_src_hash()
123 unsigned int h = (__force u32)spi ^ proto; in __xfrm_spi_hash() local
126 h ^= __xfrm4_addr_hash(daddr); in __xfrm_spi_hash()
[all …]
/net/sunrpc/
Dsvcauth_unix.c33 struct auth_domain h; member
42 struct unix_domain *ud = container_of(dom, struct unix_domain, h); in svcauth_unix_domain_release()
56 if (new && rv != &new->h) in unix_domain_find()
57 svcauth_unix_domain_release(&new->h); in unix_domain_find()
69 kref_init(&new->h.ref); in unix_domain_find()
70 new->h.name = kstrdup(name, GFP_KERNEL); in unix_domain_find()
71 if (new->h.name == NULL) { in unix_domain_find()
75 new->h.flavour = &svcauth_unix; in unix_domain_find()
76 rv = auth_domain_lookup(name, &new->h); in unix_domain_find()
90 struct cache_head h; member
[all …]
Dcache.c44 static void cache_init(struct cache_head *h, struct cache_detail *detail) in cache_init() argument
47 INIT_HLIST_NODE(&h->cache_list); in cache_init()
48 h->flags = 0; in cache_init()
49 kref_init(&h->ref); in cache_init()
50 h->expiry_time = now + CACHE_NEW_EXPIRY; in cache_init()
54 h->last_refresh = now; in cache_init()
199 static int cache_make_upcall(struct cache_detail *cd, struct cache_head *h) in cache_make_upcall() argument
202 return cd->cache_upcall(cd, h); in cache_make_upcall()
203 return sunrpc_cache_pipe_upcall(cd, h); in cache_make_upcall()
206 static inline int cache_is_valid(struct cache_head *h) in cache_is_valid() argument
[all …]
/net/netfilter/ipset/
Dip_set_hash_gen.h44 #define AHASH_MAX(h) ((h)->ahash_max) argument
61 #define TUNE_AHASH_MAX(h, multi) \ argument
62 ((h)->ahash_max = tune_ahash_max((h)->ahash_max, multi))
64 #define AHASH_MAX(h) AHASH_MAX_SIZE argument
65 #define TUNE_AHASH_MAX(h, multi) argument
87 #define hbucket(h, i) ((h)->bucket[i]) argument
305 mtype_add_cidr(struct htype *h, u8 cidr, u8 n) in mtype_add_cidr() argument
310 for (i = 0, j = -1; i < NLEN && h->nets[i].cidr[n]; i++) { in mtype_add_cidr()
313 } else if (h->nets[i].cidr[n] < cidr) { in mtype_add_cidr()
315 } else if (h->nets[i].cidr[n] == cidr) { in mtype_add_cidr()
[all …]
Dip_set_hash_ip.c85 const struct hash_ip4 *h = set->data; in hash_ip4_kadt() local
92 ip &= ip_set_netmask(h->netmask); in hash_ip4_kadt()
104 const struct hash_ip4 *h = set->data; in hash_ip4_uadt() local
125 ip &= ip_set_hostmask(h->netmask); in hash_ip4_uadt()
148 hosts = h->netmask == 32 ? 1 : 2 << (32 - h->netmask - 1); in hash_ip4_uadt()
151 ip = ntohl(h->next.ip); in hash_ip4_uadt()
222 const struct hash_ip6 *h = set->data; in hash_ip6_kadt() local
228 hash_ip6_netmask(&e.ip, h->netmask); in hash_ip6_kadt()
239 const struct hash_ip6 *h = set->data; in hash_ip6_uadt() local
267 hash_ip6_netmask(&e.ip, h->netmask); in hash_ip6_uadt()
Dip_set_hash_ipmark.c88 const struct hash_ipmark4 *h = set->data; in hash_ipmark4_kadt() local
94 e.mark &= h->markmask; in hash_ipmark4_kadt()
104 const struct hash_ipmark4 *h = set->data; in hash_ipmark4_uadt() local
127 e.mark &= h->markmask; in hash_ipmark4_uadt()
151 ip = ntohl(h->next.ip); in hash_ipmark4_uadt()
214 const struct hash_ipmark6 *h = set->data; in hash_ipmark6_kadt() local
220 e.mark &= h->markmask; in hash_ipmark6_kadt()
230 const struct hash_ipmark6 *h = set->data; in hash_ipmark6_uadt() local
260 e.mark &= h->markmask; in hash_ipmark6_uadt()
/net/ncsi/
Dncsi-aen.c23 static int ncsi_validate_aen_pkt(struct ncsi_aen_pkt_hdr *h, in ncsi_validate_aen_pkt() argument
29 if (h->common.revision != NCSI_PKT_REVISION) in ncsi_validate_aen_pkt()
31 if (ntohs(h->common.length) != payload) in ncsi_validate_aen_pkt()
38 pchecksum = (__be32 *)((void *)(h + 1) + payload - 4); in ncsi_validate_aen_pkt()
42 checksum = ncsi_calculate_checksum((unsigned char *)h, in ncsi_validate_aen_pkt()
43 sizeof(*h) + payload - 4); in ncsi_validate_aen_pkt()
51 struct ncsi_aen_pkt_hdr *h) in ncsi_aen_handler_lsc() argument
62 ncsi_find_package_and_channel(ndp, h->common.channel, NULL, &nc); in ncsi_aen_handler_lsc()
67 lsc = (struct ncsi_aen_lsc_pkt *)h; in ncsi_aen_handler_lsc()
99 struct ncsi_aen_pkt_hdr *h) in ncsi_aen_handler_cr() argument
[all …]
Dncsi-cmd.c39 static void ncsi_cmd_build_header(struct ncsi_pkt_hdr *h, in ncsi_cmd_build_header() argument
45 h->mc_id = 0; in ncsi_cmd_build_header()
46 h->revision = NCSI_PKT_REVISION; in ncsi_cmd_build_header()
47 h->reserved = 0; in ncsi_cmd_build_header()
48 h->id = nca->id; in ncsi_cmd_build_header()
49 h->type = nca->type; in ncsi_cmd_build_header()
50 h->channel = NCSI_TO_CHANNEL(nca->package, in ncsi_cmd_build_header()
52 h->length = htons(nca->payload); in ncsi_cmd_build_header()
53 h->reserved1[0] = 0; in ncsi_cmd_build_header()
54 h->reserved1[1] = 0; in ncsi_cmd_build_header()
[all …]
/net/netfilter/ipvs/
Dip_vs_ovf.c33 struct ip_vs_dest *dest, *h = NULL; in ip_vs_ovf_schedule() local
46 if (!h || w > hw) { in ip_vs_ovf_schedule()
47 h = dest; in ip_vs_ovf_schedule()
52 if (h) { in ip_vs_ovf_schedule()
54 IP_VS_DBG_ADDR(h->af, &h->addr), in ip_vs_ovf_schedule()
55 ntohs(h->port), in ip_vs_ovf_schedule()
56 atomic_read(&h->activeconns), in ip_vs_ovf_schedule()
57 atomic_read(&h->weight)); in ip_vs_ovf_schedule()
58 return h; in ip_vs_ovf_schedule()
/net/netfilter/
Dnf_conntrack_helper.c120 unsigned int h; in __nf_ct_helper_find() local
125 h = helper_hash(tuple); in __nf_ct_helper_find()
126 hlist_for_each_entry_rcu(helper, &nf_ct_helper_hash[h], hnode) { in __nf_ct_helper_find()
136 struct nf_conntrack_helper *h; in __nf_conntrack_helper_find() local
140 hlist_for_each_entry_rcu(h, &nf_ct_helper_hash[i], hnode) { in __nf_conntrack_helper_find()
141 if (strcmp(h->name, name)) in __nf_conntrack_helper_find()
144 if (h->tuple.src.l3num != NFPROTO_UNSPEC && in __nf_conntrack_helper_find()
145 h->tuple.src.l3num != l3num) in __nf_conntrack_helper_find()
148 if (h->tuple.dst.protonum == protonum) in __nf_conntrack_helper_find()
149 return h; in __nf_conntrack_helper_find()
[all …]
Dnf_conntrack_core.c530 nf_ct_key_equal(struct nf_conntrack_tuple_hash *h, in nf_ct_key_equal() argument
535 struct nf_conn *ct = nf_ct_tuplehash_to_ctrack(h); in nf_ct_key_equal()
540 return nf_ct_tuple_equal(tuple, &h->tuple) && in nf_ct_key_equal()
541 nf_ct_zone_equal(ct, zone, NF_CT_DIRECTION(h)) && in nf_ct_key_equal()
579 struct nf_conntrack_tuple_hash *h; in ____nf_conntrack_find() local
588 hlist_nulls_for_each_entry_rcu(h, n, &ct_hash[bucket], hnnode) { in ____nf_conntrack_find()
591 ct = nf_ct_tuplehash_to_ctrack(h); in ____nf_conntrack_find()
600 if (nf_ct_key_equal(h, tuple, zone, net)) in ____nf_conntrack_find()
601 return h; in ____nf_conntrack_find()
621 struct nf_conntrack_tuple_hash *h; in __nf_conntrack_find_get() local
[all …]
Dxt_RATEEST.c36 unsigned int h; in xt_rateest_hash_insert() local
38 h = xt_rateest_hash(est->name); in xt_rateest_hash_insert()
39 hlist_add_head(&est->list, &rateest_hash[h]); in xt_rateest_hash_insert()
45 unsigned int h; in __xt_rateest_lookup() local
47 h = xt_rateest_hash(name); in __xt_rateest_lookup()
48 hlist_for_each_entry(est, &rateest_hash[h], list) { in __xt_rateest_lookup()
/net/sched/
Dcls_route.c86 int h = route4_fastmap_hash(id, iif); in route4_set_fastmap() local
90 head->fastmap[h].id = id; in route4_set_fastmap()
91 head->fastmap[h].iif = iif; in route4_set_fastmap()
92 head->fastmap[h].filter = f; in route4_set_fastmap()
138 u32 id, h; in route4_classify() local
149 h = route4_fastmap_hash(id, iif); in route4_classify()
152 if (id == head->fastmap[h].id && in route4_classify()
153 iif == head->fastmap[h].iif && in route4_classify()
154 (f = head->fastmap[h].filter) != NULL) { in route4_classify()
166 h = route4_hash_to(id); in route4_classify()
[all …]
Dcls_rsvp.h108 unsigned int h = (__force __u32)dst[RSVP_DST_LEN - 1]; in hash_dst() local
110 h ^= h>>16; in hash_dst()
111 h ^= h>>8; in hash_dst()
112 return (h ^ protocol ^ tunnelid) & 0xFF; in hash_dst()
117 unsigned int h = (__force __u32)src[RSVP_DST_LEN-1]; in hash_src() local
119 h ^= h>>16; in hash_src()
120 h ^= h>>8; in hash_src()
121 h ^= h>>4; in hash_src()
122 return h & 0xF; in hash_src()
227 static void rsvp_replace(struct tcf_proto *tp, struct rsvp_filter *n, u32 h) in rsvp_replace() argument
[all …]
Dcls_fw.c153 int h; in fw_destroy() local
158 for (h = 0; h < HTSIZE; h++) { in fw_destroy()
159 while ((f = rtnl_dereference(head->ht[h])) != NULL) { in fw_destroy()
160 RCU_INIT_POINTER(head->ht[h], in fw_destroy()
179 int h; in fw_delete() local
199 for (h = 0; h < HTSIZE; h++) { in fw_delete()
200 if (rcu_access_pointer(head->ht[h])) { in fw_delete()
364 int h; in fw_walk() local
372 for (h = 0; h < HTSIZE; h++) { in fw_walk()
375 for (f = rtnl_dereference(head->ht[h]); f; in fw_walk()
Dcls_u32.c108 unsigned int h = ntohl(key & sel->hmask) >> fshift; in u32_hash_fold() local
110 return h; in u32_hash_fold()
349 unsigned int h; in tc_u_common_find() local
351 h = tc_u_hash(tp); in tc_u_common_find()
352 hlist_for_each_entry(tc, &tc_u_common_hash[h], hnode) { in tc_u_common_find()
363 unsigned int h; in u32_init() local
384 h = tc_u_hash(tp); in u32_init()
385 hlist_add_head(&tp_c->hnode, &tc_u_common_hash[h]); in u32_init()
507 static int u32_replace_hw_hnode(struct tcf_proto *tp, struct tc_u_hnode *h, in u32_replace_hw_hnode() argument
519 cls_u32.hnode.divisor = h->divisor; in u32_replace_hw_hnode()
[all …]
Dcls_tcindex.c49 struct tcindex_filter __rcu **h; /* imperfect hash; */ member
71 } else if (p->h) { in tcindex_lookup()
75 fp = &p->h[key % p->hash]; in tcindex_lookup()
208 walk = p->h + i; in tcindex_delete()
254 kfree(p->h); in __tcindex_destroy()
383 cp->h = p->h; in tcindex_set_parms()
400 } else if (cp->h && cp->hash != cp->alloc_hash) { in tcindex_set_parms()
408 if (!cp->perfect && !cp->h) in tcindex_set_parms()
422 if (!cp->perfect && !cp->h) { in tcindex_set_parms()
437 cp->h = hash; in tcindex_set_parms()
[all …]
/net/decnet/
Ddn_table.c89 u16 h = le16_to_cpu(key.datum)>>(16 - dz->dz_order); in dn_hash() local
90 h ^= (h >> 10); in dn_hash()
91 h ^= (h >> 6); in dn_hash()
92 h &= DZ_HASHMASK(dz); in dn_hash()
93 return *(dn_fib_idx_t *)&h; in dn_hash()
441 int h, s_h; in dn_hash_dump_zone() local
444 for(h = 0; h < dz->dz_divisor; h++) { in dn_hash_dump_zone()
445 if (h < s_h) in dn_hash_dump_zone()
447 if (h > s_h) in dn_hash_dump_zone()
449 if (dz->dz_hash == NULL || dz->dz_hash[h] == NULL) in dn_hash_dump_zone()
[all …]
/net/sunrpc/auth_gss/
Dsvcauth_gss.c75 struct cache_head h; member
94 struct rsi *rsii = container_of(ref, struct rsi, h.ref); in rsi_put()
107 struct rsi *item = container_of(a, struct rsi, h); in rsi_match()
108 struct rsi *tmp = container_of(b, struct rsi, h); in rsi_match()
129 struct rsi *new = container_of(cnew, struct rsi, h); in rsi_init()
130 struct rsi *item = container_of(citem, struct rsi, h); in rsi_init()
148 struct rsi *new = container_of(cnew, struct rsi, h); in update_rsi()
149 struct rsi *item = container_of(citem, struct rsi, h); in update_rsi()
169 return &rsii->h; in rsi_alloc()
175 struct cache_head *h, in rsi_request() argument
[all …]
/net/ceph/crush/
Dmapper.c138 return bucket_perm_choose(&bucket->h, work, x, r); in bucket_uniform_choose()
147 for (i = bucket->h.size-1; i >= 0; i--) { in bucket_list_choose()
148 __u64 w = crush_hash32_4(bucket->h.hash, x, bucket->h.items[i], in bucket_list_choose()
149 r, bucket->h.id); in bucket_list_choose()
153 i, x, r, bucket->h.items[i], bucket->item_weights[i], in bucket_list_choose()
159 return bucket->h.items[i]; in bucket_list_choose()
163 dprintk("bad list sums for bucket %d\n", bucket->h.id); in bucket_list_choose()
164 return bucket->h.items[0]; in bucket_list_choose()
171 int h = 0; in height() local
173 h++; in height()
[all …]
Dcrush.c50 kfree(b->h.items); in crush_destroy_bucket_uniform()
58 kfree(b->h.items); in crush_destroy_bucket_list()
64 kfree(b->h.items); in crush_destroy_bucket_tree()
73 kfree(b->h.items); in crush_destroy_bucket_straw()
80 kfree(b->h.items); in crush_destroy_bucket_straw2()
/net/netlabel/
Dnetlabel_addrlist.h73 struct list_head *h) in __af4list_valid() argument
77 while (i != h && !n->valid) { in __af4list_valid()
85 struct list_head *h) in __af4list_valid_rcu() argument
89 while (i != h && !n->valid) { in __af4list_valid_rcu()
140 struct list_head *h) in __af6list_valid() argument
144 while (i != h && !n->valid) { in __af6list_valid()
152 struct list_head *h) in __af6list_valid_rcu() argument
156 while (i != h && !n->valid) { in __af6list_valid_rcu()
/net/ipv4/
Dipconfig.c812 struct iphdr *h; in ic_bootp_send_if() local
826 h = ip_hdr(skb); in ic_bootp_send_if()
827 h->version = 4; in ic_bootp_send_if()
828 h->ihl = 5; in ic_bootp_send_if()
829 h->tot_len = htons(sizeof(struct bootp_pkt)); in ic_bootp_send_if()
830 h->frag_off = htons(IP_DF); in ic_bootp_send_if()
831 h->ttl = 64; in ic_bootp_send_if()
832 h->protocol = IPPROTO_UDP; in ic_bootp_send_if()
833 h->daddr = htonl(INADDR_BROADCAST); in ic_bootp_send_if()
834 h->check = ip_fast_csum((unsigned char *) h, h->ihl); in ic_bootp_send_if()
[all …]

12345