Lines Matching refs:ent

476 void nghttp2_hd_entry_init(nghttp2_hd_entry *ent, nghttp2_hd_nv *nv)  in nghttp2_hd_entry_init()  argument
478 ent->nv = *nv; in nghttp2_hd_entry_init()
479 ent->cnv.name = nv->name->base; in nghttp2_hd_entry_init()
480 ent->cnv.namelen = nv->name->len; in nghttp2_hd_entry_init()
481 ent->cnv.value = nv->value->base; in nghttp2_hd_entry_init()
482 ent->cnv.valuelen = nv->value->len; in nghttp2_hd_entry_init()
483 ent->cnv.flags = nv->flags; in nghttp2_hd_entry_init()
484 ent->next = NULL; in nghttp2_hd_entry_init()
485 ent->hash = 0; in nghttp2_hd_entry_init()
487 nghttp2_rcbuf_incref(ent->nv.name); in nghttp2_hd_entry_init()
488 nghttp2_rcbuf_incref(ent->nv.value); in nghttp2_hd_entry_init()
491 void nghttp2_hd_entry_free(nghttp2_hd_entry *ent) in nghttp2_hd_entry_free() argument
493 nghttp2_rcbuf_decref(ent->nv.value); in nghttp2_hd_entry_free()
494 nghttp2_rcbuf_decref(ent->nv.name); in nghttp2_hd_entry_free()
528 static void hd_map_insert(nghttp2_hd_map *map, nghttp2_hd_entry *ent) in hd_map_insert() argument
532 bucket = &map->table[ent->hash & (HD_MAP_SIZE - 1)]; in hd_map_insert()
535 *bucket = ent; in hd_map_insert()
540 ent->next = *bucket; in hd_map_insert()
541 *bucket = ent; in hd_map_insert()
574 static void hd_map_remove(nghttp2_hd_map *map, nghttp2_hd_entry *ent) in hd_map_remove() argument
578 dst = &map->table[ent->hash & (HD_MAP_SIZE - 1)]; in hd_map_remove()
581 if (*dst != ent) { in hd_map_remove()
585 *dst = ent->next; in hd_map_remove()
586 ent->next = NULL; in hd_map_remove()
647 nghttp2_hd_entry *ent = hd_ringbuf_get(ringbuf, i); in hd_ringbuf_free() local
649 nghttp2_hd_entry_free(ent); in hd_ringbuf_free()
650 nghttp2_mem_free(mem, ent); in hd_ringbuf_free()
656 nghttp2_hd_entry *ent, nghttp2_mem *mem) in hd_ringbuf_push_front() argument
666 ringbuf->buffer[--ringbuf->first & ringbuf->mask] = ent; in hd_ringbuf_push_front()
1141 nghttp2_hd_entry *ent = hd_ringbuf_get(&context->hd_table, idx); in add_hd_table_incremental() local
1144 entry_room(ent->nv.name->len, ent->nv.value->len); in add_hd_table_incremental()
1147 (char *)ent->nv.name->base, (char *)ent->nv.value->base); in add_hd_table_incremental()
1151 hd_map_remove(map, ent); in add_hd_table_incremental()
1154 nghttp2_hd_entry_free(ent); in add_hd_table_incremental()
1155 nghttp2_mem_free(mem, ent); in add_hd_table_incremental()
1203 nghttp2_hd_static_entry *ent; in search_static_table() local
1212 ent = &static_table[i]; in search_static_table()
1213 if (ent->value.len == nv->valuelen && in search_static_table()
1214 memcmp(ent->value.base, nv->value, nv->valuelen) == 0) { in search_static_table()
1229 nghttp2_hd_entry *ent; in search_hd_table() local
1234 ent = hd_map_find(map, &exact_match, nv, token, hash, name_only); in search_hd_table()
1240 if (ent == NULL) { in search_hd_table()
1244 res.index = (ssize_t)(context->next_seq - 1 - ent->seq + in search_hd_table()
1261 nghttp2_hd_entry *ent = hd_ringbuf_get(&context->hd_table, idx); in hd_context_shrink_table_size() local
1263 entry_room(ent->nv.name->len, ent->nv.value->len); in hd_context_shrink_table_size()
1266 hd_map_remove(map, ent); in hd_context_shrink_table_size()
1269 nghttp2_hd_entry_free(ent); in hd_context_shrink_table_size()
1270 nghttp2_mem_free(mem, ent); in hd_context_shrink_table_size()
1340 nghttp2_hd_static_entry *ent = &static_table[idx]; in nghttp2_hd_table_get() local
1341 nghttp2_hd_nv nv = { &ent->name, &ent->value, ent->token, in nghttp2_hd_table_get()