Home
last modified time | relevance | path

Searched refs:shm (Results 1 – 25 of 37) sorted by relevance

12

/f-stack/app/nginx-1.16.1/src/os/unix/
H A Dngx_shmem.c15 ngx_shm_alloc(ngx_shm_t *shm) in ngx_shm_alloc() argument
17 shm->addr = (u_char *) mmap(NULL, shm->size, in ngx_shm_alloc()
32 ngx_shm_free(ngx_shm_t *shm) in ngx_shm_free() argument
34 if (munmap((void *) shm->addr, shm->size) == -1) { in ngx_shm_free()
36 "munmap(%p, %uz) failed", shm->addr, shm->size); in ngx_shm_free()
43 ngx_shm_alloc(ngx_shm_t *shm) in ngx_shm_alloc() argument
55 shm->addr = (u_char *) mmap(NULL, shm->size, PROT_READ|PROT_WRITE, in ngx_shm_alloc()
73 ngx_shm_free(ngx_shm_t *shm) in ngx_shm_free() argument
75 if (munmap((void *) shm->addr, shm->size) == -1) { in ngx_shm_free()
77 "munmap(%p, %uz) failed", shm->addr, shm->size); in ngx_shm_free()
[all …]
H A Dngx_shmem.h25 ngx_int_t ngx_shm_alloc(ngx_shm_t *shm);
26 void ngx_shm_free(ngx_shm_t *shm);
H A Dngx_process.c600 sp = (ngx_slab_pool_t *) shm_zone[i].shm.addr; in ngx_unlock_mutexes()
605 &shm_zone[i].shm.name, pid); in ngx_unlock_mutexes()
/f-stack/dpdk/examples/l2fwd-keepalive/ka-agent/
H A Dmain.c28 struct rte_keepalive_shm *shm; in ka_shm_create() local
35 shm = (struct rte_keepalive_shm *) mmap( in ka_shm_create()
38 if (shm == MAP_FAILED) in ka_shm_create()
41 return shm; in ka_shm_create()
45 shm = 0; in ka_shm_create()
51 struct rte_keepalive_shm *shm = ka_shm_create(); in main() local
60 if (shm == NULL) { in main()
68 if (shm->core_last_seen_times[idx_core] > in main()
71 shm->core_last_seen_times[idx_core]; in main()
74 if (sem_timedwait(&shm->core_died, &timeout) == -1) { in main()
[all …]
/f-stack/dpdk/lib/librte_mbuf/
H A Drte_mbuf_dyn.c54 static struct mbuf_dyn_shm *shm; variable
67 if (shm->free_space[i]) in process_score()
68 shm->free_space[i] = 1; in process_score()
92 shm->free_space[i] = RTE_MAX(align, shm->free_space[i]); in process_score()
121 shm = mz->addr; in init_shared_mem()
127 memset(shm, 0, sizeof(*shm)); in init_shared_mem()
132 shm->free_flags |= mask; in init_shared_mem()
152 if (!shm->free_space[i + offset]) in check_offset()
310 shm->free_space[i] = 0; in __rte_mbuf_dynfield_register_offset()
443 if (shm->free_flags == 0) { in __rte_mbuf_dynflag_register_bitnum()
[all …]
/f-stack/app/nginx-1.16.1/src/core/
H A Dngx_cycle.c443 if (shm_zone[i].shm.name.len != oshm_zone[n].shm.name.len) { in ngx_init_cycle()
456 && shm_zone[i].shm.size == oshm_zone[n].shm.size in ngx_init_cycle()
459 shm_zone[i].shm.addr = oshm_zone[n].shm.addr; in ngx_init_cycle()
461 shm_zone[i].shm.handle = oshm_zone[n].shm.handle; in ngx_init_cycle()
663 if (oshm_zone[i].shm.name.len != shm_zone[n].shm.name.len) { in ngx_init_cycle()
676 && oshm_zone[i].shm.size == shm_zone[n].shm.size in ngx_init_cycle()
880 if (shm_zone[i].shm.name.len != oshm_zone[n].shm.name.len) { in ngx_init_cycle()
893 && shm_zone[i].shm.size == oshm_zone[n].shm.size in ngx_init_cycle()
949 if (zn->shm.exists) { in ngx_init_zone_pool()
977 sp->end = zn->shm.addr + zn->shm.size; in ngx_init_zone_pool()
[all …]
H A Dngx_cycle.h31 ngx_shm_t shm; member
/f-stack/dpdk/examples/l2fwd-keepalive/
H A Dshm.c74 void rte_keepalive_relayed_state(struct rte_keepalive_shm *shm, in rte_keepalive_relayed_state() argument
80 shm->core_state[id_core] = core_state; in rte_keepalive_relayed_state()
81 shm->core_last_seen_times[id_core] = last_alive; in rte_keepalive_relayed_state()
89 if (sem_getvalue(&shm->core_died, &count) == -1) { in rte_keepalive_relayed_state()
97 if (sem_post(&shm->core_died) != 0) in rte_keepalive_relayed_state()
H A Dshm.h58 void rte_keepalive_relayed_state(struct rte_keepalive_shm *shm,
H A Dmeson.build19 'main.c', 'shm.c'
H A DMakefile8 SRCS-y := main.c shm.c
/f-stack/dpdk/drivers/net/pfe/
H A Dpfe_hif.c59 mb_priv = rte_mempool_get_priv(hif->shm->pool); in pfe_hif_release_buffers()
62 if (i < hif->shm->rx_buf_pool_cnt && in pfe_hif_release_buffers()
63 !hif->shm->rx_buf_pool[i]) { in pfe_hif_release_buffers()
68 hif->shm->rx_buf_pool[i] = mbuf; in pfe_hif_release_buffers()
105 (struct rte_mbuf *)hif->shm->rx_buf_pool[i]; in pfe_hif_init_buffers()
134 hif->shm->rx_buf_pool[i] = NULL; in pfe_hif_init_buffers()
397 &hif->shm->g_client_status[0]))) { in pfe_hif_rx_process()
417 hif->client_ctrl, hif->shm->pool, in pfe_hif_rx_process()
847 hif->shm->g_client_status[0] = 0; in pfe_hif_exit()
849 hif->shm->g_client_status[1] = 0; in pfe_hif_exit()
[all …]
H A Dpfe_hif_lib.c104 pool = client->pfe->hif.shm->pool; in hif_lib_client_release_rx_buffers()
275 hif_shm = client->pfe->hif.shm; in hif_lib_client_register()
567 pfe->hif.shm = &ghif_shm; in pfe_hif_lib_init()
H A Dpfe_ethdev.c156 work_done = hif_lib_receive_pkt(rxq, priv->pfe->hif.shm->pool, in pfe_recv_pkts_on_intr()
180 pool = priv->pfe->hif.shm->pool; in pfe_recv_pkts()
266 hif_shm = client->pfe->hif.shm; in pfe_eth_open()
475 rc = pfe_hif_shm_init(pfe->hif.shm, mb_pool); in pfe_rx_queue_setup()
481 pfe->hif.shm->pool = mb_pool; in pfe_rx_queue_setup()
H A Dpfe_hif.h108 struct hif_shm *shm; member
/f-stack/dpdk/drivers/raw/ifpga/base/
H A Dopae_hw_api.c464 if (!adapter->shm.ptr) in opae_adapter_shm_init()
467 sd = (opae_share_data *)adapter->shm.ptr; in opae_adapter_shm_init()
487 adapter->shm.ptr = NULL; in opae_adapter_shm_alloc()
496 adapter->shm.id = shm_id; in opae_adapter_shm_alloc()
497 adapter->shm.size = size; in opae_adapter_shm_alloc()
500 if (adapter->shm.ptr) { in opae_adapter_shm_alloc()
503 shm_name, adapter->shm.ptr); in opae_adapter_shm_alloc()
515 return adapter->shm.ptr; in opae_adapter_shm_alloc()
525 if (!adapter->shm.ptr) in opae_adapter_shm_free()
533 ret = munmap(adapter->shm.ptr, adapter->shm.size); in opae_adapter_shm_free()
[all …]
H A Difpga_fme.c928 if (hw && hw->adapter && hw->adapter->shm.ptr) { in init_spi_share_data()
930 sd = (opae_share_data *)hw->adapter->shm.ptr; in init_spi_share_data()
1218 if (hw && hw->adapter && hw->adapter->shm.ptr) { in init_i2c_mutex()
1220 sd = (opae_share_data *)hw->adapter->shm.ptr; in init_i2c_mutex()
/f-stack/app/nginx-1.16.1/src/stream/
H A Dngx_stream_limit_conn_module.c164 shpool = (ngx_slab_pool_t *) limits[i].shm_zone->shm.addr; in ngx_stream_limit_conn_handler()
203 &limits[i].shm_zone->shm.name); in ngx_stream_limit_conn_handler()
326 shpool = (ngx_slab_pool_t *) lccln->shm_zone->shm.addr; in ngx_stream_limit_conn_cleanup()
332 ngx_log_debug2(NGX_LOG_DEBUG_STREAM, lccln->shm_zone->shm.log, 0, in ngx_stream_limit_conn_cleanup()
380 ngx_log_error(NGX_LOG_EMERG, shm_zone->shm.log, 0, in ngx_stream_limit_conn_init_zone()
383 &shm_zone->shm.name, &ctx->key.value, in ngx_stream_limit_conn_init_zone()
393 shpool = (ngx_slab_pool_t *) shm_zone->shm.addr; in ngx_stream_limit_conn_init_zone()
395 if (shm_zone->shm.exists) { in ngx_stream_limit_conn_init_zone()
416 len = sizeof(" in limit_conn_zone \"\"") + shm_zone->shm.name.len; in ngx_stream_limit_conn_init_zone()
424 &shm_zone->shm.name); in ngx_stream_limit_conn_init_zone()
H A Dngx_stream_upstream_zone_module.c127 shpool = (ngx_slab_pool_t *) shm_zone->shm.addr; in ngx_stream_upstream_init_zone()
131 if (shm_zone->shm.exists) { in ngx_stream_upstream_init_zone()
148 len = sizeof(" in upstream zone \"\"") + shm_zone->shm.name.len; in ngx_stream_upstream_init_zone()
156 &shm_zone->shm.name); in ngx_stream_upstream_init_zone()
/f-stack/app/nginx-1.16.1/src/http/modules/
H A Dngx_http_limit_conn_module.c186 shpool = (ngx_slab_pool_t *) limits[i].shm_zone->shm.addr; in ngx_http_limit_conn_handler()
225 &limits[i].shm_zone->shm.name); in ngx_http_limit_conn_handler()
347 shpool = (ngx_slab_pool_t *) lccln->shm_zone->shm.addr; in ngx_http_limit_conn_cleanup()
353 ngx_log_debug2(NGX_LOG_DEBUG_HTTP, lccln->shm_zone->shm.log, 0, in ngx_http_limit_conn_cleanup()
401 ngx_log_error(NGX_LOG_EMERG, shm_zone->shm.log, 0, in ngx_http_limit_conn_init_zone()
404 &shm_zone->shm.name, &ctx->key.value, in ngx_http_limit_conn_init_zone()
414 shpool = (ngx_slab_pool_t *) shm_zone->shm.addr; in ngx_http_limit_conn_init_zone()
416 if (shm_zone->shm.exists) { in ngx_http_limit_conn_init_zone()
437 len = sizeof(" in limit_conn_zone \"\"") + shm_zone->shm.name.len; in ngx_http_limit_conn_init_zone()
445 &shm_zone->shm.name); in ngx_http_limit_conn_init_zone()
H A Dngx_http_upstream_zone_module.c130 shpool = (ngx_slab_pool_t *) shm_zone->shm.addr; in ngx_http_upstream_init_zone()
134 if (shm_zone->shm.exists) { in ngx_http_upstream_init_zone()
151 len = sizeof(" in upstream zone \"\"") + shm_zone->shm.name.len; in ngx_http_upstream_init_zone()
159 &shm_zone->shm.name); in ngx_http_upstream_init_zone()
H A Dngx_http_limit_req_module.c235 &limit->shm_zone->shm.name); in ngx_http_limit_req_handler()
271 excess / 1000, excess % 1000, &limit->shm_zone->shm.name); in ngx_http_limit_req_handler()
646 ngx_log_error(NGX_LOG_EMERG, shm_zone->shm.log, 0, in ngx_http_limit_req_init_zone()
649 &shm_zone->shm.name, &ctx->key.value, in ngx_http_limit_req_init_zone()
660 ctx->shpool = (ngx_slab_pool_t *) shm_zone->shm.addr; in ngx_http_limit_req_init_zone()
662 if (shm_zone->shm.exists) { in ngx_http_limit_req_init_zone()
680 len = sizeof(" in limit_req zone \"\"") + shm_zone->shm.name.len; in ngx_http_limit_req_init_zone()
688 &shm_zone->shm.name); in ngx_http_limit_req_init_zone()
/f-stack/app/nginx-1.16.1/src/event/
H A Dngx_event.c503 ngx_shm_t shm; in ngx_event_module_init() local
576 shm.size = size; in ngx_event_module_init()
577 ngx_str_set(&shm.name, "nginx_shared_zone"); in ngx_event_module_init()
578 shm.log = cycle->log; in ngx_event_module_init()
580 if (ngx_shm_alloc(&shm) != NGX_OK) { in ngx_event_module_init()
584 shared = shm.addr; in ngx_event_module_init()
/f-stack/dpdk/doc/guides/howto/
H A Dvirtio_user_for_container_networking.rst46 Virtio, in essence, is a shm-based solution to transmit/receive packets. How is
95 Note: If we run all above setup on the host, it's a shm-based IPC.
/f-stack/app/nginx-1.16.1/src/http/
H A Dngx_http_file_cache.c95 ngx_log_error(NGX_LOG_EMERG, shm_zone->shm.log, 0, in ngx_http_file_cache_init()
98 &shm_zone->shm.name, &cache->path->name, in ngx_http_file_cache_init()
106 ngx_log_error(NGX_LOG_EMERG, shm_zone->shm.log, 0, in ngx_http_file_cache_init()
108 &shm_zone->shm.name); in ngx_http_file_cache_init()
127 cache->shpool = (ngx_slab_pool_t *) shm_zone->shm.addr; in ngx_http_file_cache_init()
129 if (shm_zone->shm.exists) { in ngx_http_file_cache_init()
159 len = sizeof(" in cache keys zone \"\"") + shm_zone->shm.name.len; in ngx_http_file_cache_init()
167 &shm_zone->shm.name); in ngx_http_file_cache_init()

12