Home
last modified time | relevance | path

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

12345

/net/dccp/ccids/lib/
Dpacket_history.c110 void tfrc_rx_hist_add_packet(struct tfrc_rx_hist *h, in tfrc_rx_hist_add_packet() argument
114 struct tfrc_rx_hist_entry *entry = tfrc_rx_hist_last_rcv(h); in tfrc_rx_hist_add_packet()
120 int tfrc_rx_hist_duplicate(struct tfrc_rx_hist *h, struct sk_buff *skb) in tfrc_rx_hist_duplicate() argument
125 if (dccp_delta_seqno(tfrc_rx_hist_loss_prev(h)->tfrchrx_seqno, seq) <= 0) in tfrc_rx_hist_duplicate()
128 for (i = 1; i <= h->loss_count; i++) in tfrc_rx_hist_duplicate()
129 if (tfrc_rx_hist_entry(h, i)->tfrchrx_seqno == seq) in tfrc_rx_hist_duplicate()
135 static void tfrc_rx_hist_swap(struct tfrc_rx_hist *h, const u8 a, const u8 b) in tfrc_rx_hist_swap() argument
137 const u8 idx_a = tfrc_rx_hist_index(h, a), in tfrc_rx_hist_swap()
138 idx_b = tfrc_rx_hist_index(h, b); in tfrc_rx_hist_swap()
140 swap(h->ring[idx_a], h->ring[idx_b]); in tfrc_rx_hist_swap()
[all …]
Dpacket_history.h91 static inline u8 tfrc_rx_hist_index(const struct tfrc_rx_hist *h, const u8 n) in tfrc_rx_hist_index() argument
93 return (h->loss_start + n) & TFRC_NDUPACK; in tfrc_rx_hist_index()
100 tfrc_rx_hist_last_rcv(const struct tfrc_rx_hist *h) in tfrc_rx_hist_last_rcv() argument
102 return h->ring[tfrc_rx_hist_index(h, h->loss_count)]; in tfrc_rx_hist_last_rcv()
109 tfrc_rx_hist_entry(const struct tfrc_rx_hist *h, const u8 n) in tfrc_rx_hist_entry() argument
111 return h->ring[tfrc_rx_hist_index(h, n)]; in tfrc_rx_hist_entry()
118 tfrc_rx_hist_loss_prev(const struct tfrc_rx_hist *h) in tfrc_rx_hist_loss_prev() argument
120 return h->ring[h->loss_start]; in tfrc_rx_hist_loss_prev()
124 static inline bool tfrc_rx_hist_loss_pending(const struct tfrc_rx_hist *h) in tfrc_rx_hist_loss_pending() argument
126 return h->loss_count > 0; in tfrc_rx_hist_loss_pending()
[all …]
/net/xfrm/
Dxfrm_hash.h89 unsigned int h = family ^ reqid; in __xfrm_dst_hash() local
92 h ^= __xfrm4_daddr_saddr_hash(daddr, saddr); in __xfrm_dst_hash()
95 h ^= __xfrm6_daddr_saddr_hash(daddr, saddr); in __xfrm_dst_hash()
98 return (h ^ (h >> 16)) & hmask; in __xfrm_dst_hash()
106 unsigned int h = family; in __xfrm_src_hash() local
109 h ^= __xfrm4_daddr_saddr_hash(daddr, saddr); in __xfrm_src_hash()
112 h ^= __xfrm6_daddr_saddr_hash(daddr, saddr); in __xfrm_src_hash()
115 return (h ^ (h >> 16)) & hmask; in __xfrm_src_hash()
122 unsigned int h = (__force u32)spi ^ proto; in __xfrm_spi_hash() local
125 h ^= __xfrm4_addr_hash(daddr); in __xfrm_spi_hash()
[all …]
Dxfrm_state.c97 unsigned int h; in xfrm_hash_transfer() local
99 h = __xfrm_dst_hash(&x->id.daddr, &x->props.saddr, in xfrm_hash_transfer()
102 hlist_add_head_rcu(&x->bydst, ndsttable + h); in xfrm_hash_transfer()
104 h = __xfrm_src_hash(&x->id.daddr, &x->props.saddr, in xfrm_hash_transfer()
107 hlist_add_head_rcu(&x->bysrc, nsrctable + h); in xfrm_hash_transfer()
110 h = __xfrm_spi_hash(&x->id.daddr, x->id.spi, in xfrm_hash_transfer()
113 hlist_add_head_rcu(&x->byspi, nspitable + h); in xfrm_hash_transfer()
117 h = __xfrm_seq_hash(x->km.seq, nhashmask); in xfrm_hash_transfer()
118 hlist_add_head_rcu(&x->byseq, nseqtable + h); in xfrm_hash_transfer()
958 unsigned int h = xfrm_spi_hash(net, daddr, spi, proto, family); in __xfrm_state_lookup() local
[all …]
/net/sunrpc/
Dsvcauth_unix.c34 struct auth_domain h; member
44 struct unix_domain *ud = container_of(dom, struct unix_domain, h); in svcauth_unix_domain_release_rcu()
63 if (new && rv != &new->h) in unix_domain_find()
64 svcauth_unix_domain_release(&new->h); in unix_domain_find()
76 kref_init(&new->h.ref); in unix_domain_find()
77 new->h.name = kstrdup(name, GFP_KERNEL); in unix_domain_find()
78 if (new->h.name == NULL) { in unix_domain_find()
82 new->h.flavour = &svcauth_unix; in unix_domain_find()
83 rv = auth_domain_lookup(name, &new->h); in unix_domain_find()
97 struct cache_head h; member
[all …]
Dcache.c43 static void cache_init(struct cache_head *h, struct cache_detail *detail) in cache_init() argument
46 INIT_HLIST_NODE(&h->cache_list); in cache_init()
47 h->flags = 0; in cache_init()
48 kref_init(&h->ref); in cache_init()
49 h->expiry_time = now + CACHE_NEW_EXPIRY; in cache_init()
53 h->last_refresh = now; in cache_init()
182 struct cache_head *h) in cache_make_negative() argument
184 set_bit(CACHE_NEGATIVE, &h->flags); in cache_make_negative()
185 trace_cache_entry_make_negative(detail, h); in cache_make_negative()
189 struct cache_head *h, in cache_entry_update() argument
[all …]
/net/netfilter/ipset/
Dip_set_hash_gen.h45 #define AHASH_MAX(h) ((h)->bucketsize) argument
67 #define ahash_bucket_start(h, htable_bits) \ argument
69 : (h) * jhash_size(HTABLE_REGION_BITS))
70 #define ahash_bucket_end(h, htable_bits) \ argument
72 : ((h) + 1) * jhash_size(HTABLE_REGION_BITS))
90 #define hbucket(h, i) ((h)->bucket[i]) argument
313 mtype_add_cidr(struct ip_set *set, struct htype *h, u8 cidr, u8 n) in mtype_add_cidr() argument
319 for (i = 0, j = -1; i < NLEN && h->nets[i].cidr[n]; i++) { in mtype_add_cidr()
322 } else if (h->nets[i].cidr[n] < cidr) { in mtype_add_cidr()
324 } else if (h->nets[i].cidr[n] == cidr) { in mtype_add_cidr()
[all …]
Dip_set_hash_ip.c82 const struct hash_ip4 *h = set->data; in hash_ip4_kadt() local
89 ip &= ip_set_netmask(h->netmask); in hash_ip4_kadt()
101 struct hash_ip4 *h = set->data; in hash_ip4_uadt() local
122 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()
155 hash_ip4_data_next(&h->next, &e); in hash_ip4_uadt()
224 const struct hash_ip6 *h = set->data; in hash_ip6_kadt() local
230 hash_ip6_netmask(&e.ip, h->netmask); in hash_ip6_kadt()
241 const struct hash_ip6 *h = set->data; in hash_ip6_uadt() local
[all …]
Dip_set_hash_ipmark.c84 const struct hash_ipmark4 *h = set->data; in hash_ipmark4_kadt() local
90 e.mark &= h->markmask; in hash_ipmark4_kadt()
100 struct hash_ipmark4 *h = set->data; in hash_ipmark4_uadt() local
123 e.mark &= h->markmask; in hash_ipmark4_uadt()
152 ip = ntohl(h->next.ip); in hash_ipmark4_uadt()
156 hash_ipmark4_data_next(&h->next, &e); in hash_ipmark4_uadt()
219 const struct hash_ipmark6 *h = set->data; in hash_ipmark6_kadt() local
225 e.mark &= h->markmask; in hash_ipmark6_kadt()
235 const struct hash_ipmark6 *h = set->data; in hash_ipmark6_uadt() local
265 e.mark &= h->markmask; in hash_ipmark6_uadt()
/net/ncsi/
Dncsi-aen.c19 static int ncsi_validate_aen_pkt(struct ncsi_aen_pkt_hdr *h, in ncsi_validate_aen_pkt() argument
25 if (h->common.revision != NCSI_PKT_REVISION) in ncsi_validate_aen_pkt()
27 if (ntohs(h->common.length) != payload) in ncsi_validate_aen_pkt()
34 pchecksum = (__be32 *)((void *)(h + 1) + payload - 4); in ncsi_validate_aen_pkt()
38 checksum = ncsi_calculate_checksum((unsigned char *)h, in ncsi_validate_aen_pkt()
39 sizeof(*h) + payload - 4); in ncsi_validate_aen_pkt()
47 struct ncsi_aen_pkt_hdr *h) in ncsi_aen_handler_lsc() argument
60 ncsi_find_package_and_channel(ndp, h->common.channel, NULL, &nc); in ncsi_aen_handler_lsc()
65 lsc = (struct ncsi_aen_lsc_pkt *)h; in ncsi_aen_handler_lsc()
141 struct ncsi_aen_pkt_hdr *h) in ncsi_aen_handler_cr() argument
[all …]
Dncsi-cmd.c38 static void ncsi_cmd_build_header(struct ncsi_pkt_hdr *h, in ncsi_cmd_build_header() argument
44 h->mc_id = 0; in ncsi_cmd_build_header()
45 h->revision = NCSI_PKT_REVISION; in ncsi_cmd_build_header()
46 h->reserved = 0; in ncsi_cmd_build_header()
47 h->id = nca->id; in ncsi_cmd_build_header()
48 h->type = nca->type; in ncsi_cmd_build_header()
49 h->channel = NCSI_TO_CHANNEL(nca->package, in ncsi_cmd_build_header()
51 h->length = htons(nca->payload); in ncsi_cmd_build_header()
52 h->reserved1[0] = 0; in ncsi_cmd_build_header()
53 h->reserved1[1] = 0; in ncsi_cmd_build_header()
[all …]
/net/netfilter/
Dnf_conntrack_helper.c59 unsigned int h; in __nf_ct_helper_find() local
64 h = helper_hash(tuple); in __nf_ct_helper_find()
65 hlist_for_each_entry_rcu(helper, &nf_ct_helper_hash[h], hnode) { in __nf_ct_helper_find()
75 struct nf_conntrack_helper *h; in __nf_conntrack_helper_find() local
79 hlist_for_each_entry_rcu(h, &nf_ct_helper_hash[i], hnode) { in __nf_conntrack_helper_find()
80 if (strcmp(h->name, name)) in __nf_conntrack_helper_find()
83 if (h->tuple.src.l3num != NFPROTO_UNSPEC && in __nf_conntrack_helper_find()
84 h->tuple.src.l3num != l3num) in __nf_conntrack_helper_find()
87 if (h->tuple.dst.protonum == protonum) in __nf_conntrack_helper_find()
88 return h; in __nf_conntrack_helper_find()
[all …]
Dnf_conntrack_core.c731 nf_ct_key_equal(struct nf_conntrack_tuple_hash *h, in nf_ct_key_equal() argument
736 struct nf_conn *ct = nf_ct_tuplehash_to_ctrack(h); in nf_ct_key_equal()
741 return nf_ct_tuple_equal(tuple, &h->tuple) && in nf_ct_key_equal()
742 nf_ct_zone_equal(ct, zone, NF_CT_DIRECTION(h)) && in nf_ct_key_equal()
780 struct nf_conntrack_tuple_hash *h; in ____nf_conntrack_find() local
789 hlist_nulls_for_each_entry_rcu(h, n, &ct_hash[bucket], hnnode) { in ____nf_conntrack_find()
792 ct = nf_ct_tuplehash_to_ctrack(h); in ____nf_conntrack_find()
798 if (nf_ct_key_equal(h, tuple, zone, net)) in ____nf_conntrack_find()
799 return h; in ____nf_conntrack_find()
819 struct nf_conntrack_tuple_hash *h; in __nf_conntrack_find_get() local
[all …]
/net/netfilter/ipvs/
Dip_vs_ovf.c28 struct ip_vs_dest *dest, *h = NULL; in ip_vs_ovf_schedule() local
41 if (!h || w > hw) { in ip_vs_ovf_schedule()
42 h = dest; in ip_vs_ovf_schedule()
47 if (h) { in ip_vs_ovf_schedule()
49 IP_VS_DBG_ADDR(h->af, &h->addr), in ip_vs_ovf_schedule()
50 ntohs(h->port), in ip_vs_ovf_schedule()
51 atomic_read(&h->activeconns), in ip_vs_ovf_schedule()
52 atomic_read(&h->weight)); in ip_vs_ovf_schedule()
53 return h; in ip_vs_ovf_schedule()
/net/sched/
Dcls_route.c79 int h = route4_fastmap_hash(id, iif); in route4_set_fastmap() local
83 head->fastmap[h].id = id; in route4_set_fastmap()
84 head->fastmap[h].iif = iif; in route4_set_fastmap()
85 head->fastmap[h].filter = f; in route4_set_fastmap()
131 u32 id, h; in route4_classify() local
142 h = route4_fastmap_hash(id, iif); in route4_classify()
145 if (id == head->fastmap[h].id && in route4_classify()
146 iif == head->fastmap[h].iif && in route4_classify()
147 (f = head->fastmap[h].filter) != NULL) { in route4_classify()
159 h = route4_hash_to(id); in route4_classify()
[all …]
Dcls_fw.c135 int h; in fw_destroy() local
140 for (h = 0; h < HTSIZE; h++) { in fw_destroy()
141 while ((f = rtnl_dereference(head->ht[h])) != NULL) { in fw_destroy()
142 RCU_INIT_POINTER(head->ht[h], in fw_destroy()
162 int h; in fw_delete() local
182 for (h = 0; h < HTSIZE; h++) { in fw_delete()
183 if (rcu_access_pointer(head->ht[h])) { in fw_delete()
347 int h; in fw_walk() local
355 for (h = 0; h < HTSIZE; h++) { in fw_walk()
358 for (f = rtnl_dereference(head->ht[h]); f; in fw_walk()
Dcls_u32.c98 unsigned int h = ntohl(key & sel->hmask) >> fshift; in u32_hash_fold() local
100 return h; in u32_hash_fold()
475 static void u32_clear_hw_hnode(struct tcf_proto *tp, struct tc_u_hnode *h, in u32_clear_hw_hnode() argument
481 tc_cls_common_offload_init(&cls_u32.common, tp, h->flags, extack); in u32_clear_hw_hnode()
483 cls_u32.hnode.divisor = h->divisor; in u32_clear_hw_hnode()
484 cls_u32.hnode.handle = h->handle; in u32_clear_hw_hnode()
485 cls_u32.hnode.prio = h->prio; in u32_clear_hw_hnode()
490 static int u32_replace_hw_hnode(struct tcf_proto *tp, struct tc_u_hnode *h, in u32_replace_hw_hnode() argument
501 cls_u32.hnode.divisor = h->divisor; in u32_replace_hw_hnode()
502 cls_u32.hnode.handle = h->handle; in u32_replace_hw_hnode()
[all …]
/net/ipv4/
Dinet_hashtables.c108 struct inet_hashinfo *hashinfo = sk->sk_prot->h.hashinfo; in __inet_put_port()
133 struct inet_hashinfo *table = sk->sk_prot->h.hashinfo; in __inet_inherit_port()
179 inet_lhash2_bucket_sk(struct inet_hashinfo *h, struct sock *sk) in inet_lhash2_bucket_sk() argument
193 return inet_lhash2_bucket(h, hash); in inet_lhash2_bucket_sk()
196 static void inet_hash2(struct inet_hashinfo *h, struct sock *sk) in inet_hash2() argument
200 if (!h->lhash2) in inet_hash2()
203 ilb2 = inet_lhash2_bucket_sk(h, sk); in inet_hash2()
216 static void inet_unhash2(struct inet_hashinfo *h, struct sock *sk) in inet_unhash2() argument
220 if (!h->lhash2 || in inet_unhash2()
224 ilb2 = inet_lhash2_bucket_sk(h, sk); in inet_unhash2()
[all …]
Dipconfig.c817 struct iphdr *h; in ic_bootp_send_if() local
831 h = ip_hdr(skb); in ic_bootp_send_if()
832 h->version = 4; in ic_bootp_send_if()
833 h->ihl = 5; in ic_bootp_send_if()
834 h->tot_len = htons(sizeof(struct bootp_pkt)); in ic_bootp_send_if()
835 h->frag_off = htons(IP_DF); in ic_bootp_send_if()
836 h->ttl = 64; in ic_bootp_send_if()
837 h->protocol = IPPROTO_UDP; in ic_bootp_send_if()
838 h->daddr = htonl(INADDR_BROADCAST); in ic_bootp_send_if()
839 h->check = ip_fast_csum((unsigned char *) h, h->ihl); in ic_bootp_send_if()
[all …]
/net/sunrpc/auth_gss/
Dsvcauth_gss.c75 struct cache_head h; member
103 struct rsi *rsii = container_of(ref, struct rsi, h.ref); in rsi_put()
116 struct rsi *item = container_of(a, struct rsi, h); in rsi_match()
117 struct rsi *tmp = container_of(b, struct rsi, h); in rsi_match()
138 struct rsi *new = container_of(cnew, struct rsi, h); in rsi_init()
139 struct rsi *item = container_of(citem, struct rsi, h); in rsi_init()
157 struct rsi *new = container_of(cnew, struct rsi, h); in update_rsi()
158 struct rsi *item = container_of(citem, struct rsi, h); in update_rsi()
178 return &rsii->h; in rsi_alloc()
183 static int rsi_upcall(struct cache_detail *cd, struct cache_head *h) in rsi_upcall() 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.c49 kfree(b->h.items); in crush_destroy_bucket_uniform()
57 kfree(b->h.items); in crush_destroy_bucket_list()
63 kfree(b->h.items); in crush_destroy_bucket_tree()
72 kfree(b->h.items); in crush_destroy_bucket_straw()
79 kfree(b->h.items); in crush_destroy_bucket_straw2()
/net/netlabel/
Dnetlabel_addrlist.h59 struct list_head *h) in __af4list_valid() argument
63 while (i != h && !n->valid) { in __af4list_valid()
71 struct list_head *h) in __af4list_valid_rcu() argument
75 while (i != h && !n->valid) { in __af4list_valid_rcu()
126 struct list_head *h) in __af6list_valid() argument
130 while (i != h && !n->valid) { in __af6list_valid()
138 struct list_head *h) in __af6list_valid_rcu() argument
142 while (i != h && !n->valid) { in __af6list_valid_rcu()
/net/9p/
Dtrans_xen.c199 struct xen_9pfs_header h; in p9_xen_response() local
212 sizeof(h)) { in p9_xen_response()
221 xen_9pfs_read_packet(&h, ring->data.in, sizeof(h), in p9_xen_response()
225 req = p9_tag_lookup(priv->client, h.tag); in p9_xen_response()
227 dev_warn(&priv->dev->dev, "Wrong req tag=%x\n", h.tag); in p9_xen_response()
228 cons += h.size; in p9_xen_response()
234 if (h.size > req->rc.capacity) { in p9_xen_response()
237 h.size, h.tag, req->rc.capacity); in p9_xen_response()
242 memcpy(&req->rc, &h, sizeof(h)); in p9_xen_response()
247 xen_9pfs_read_packet(req->rc.sdata, ring->data.in, h.size, in p9_xen_response()
[all …]
/net/packet/
Daf_packet.c369 union tpacket_uhdr h; in __packet_set_status() local
373 h.raw = frame; in __packet_set_status()
376 WRITE_ONCE(h.h1->tp_status, status); in __packet_set_status()
377 flush_dcache_page(pgv_to_page(&h.h1->tp_status)); in __packet_set_status()
380 WRITE_ONCE(h.h2->tp_status, status); in __packet_set_status()
381 flush_dcache_page(pgv_to_page(&h.h2->tp_status)); in __packet_set_status()
384 WRITE_ONCE(h.h3->tp_status, status); in __packet_set_status()
385 flush_dcache_page(pgv_to_page(&h.h3->tp_status)); in __packet_set_status()
397 union tpacket_uhdr h; in __packet_get_status() local
403 h.raw = frame; in __packet_get_status()
[all …]

12345