| /dpdk/drivers/net/sfc/ |
| H A D | sfc_switch.c | 129 rte_spinlock_t lock; member 135 .lock = RTE_SPINLOCK_INITIALIZER, 146 SFC_ASSERT(rte_spinlock_is_locked(&sfc_mae_switch.lock)); in sfc_mae_find_switch_domain_by_id() 167 rte_spinlock_lock(&sfc_mae_switch.lock); in sfc_mae_switch_ports_iterate() 171 rte_spinlock_unlock(&sfc_mae_switch.lock); in sfc_mae_switch_ports_iterate() 180 rte_spinlock_unlock(&sfc_mae_switch.lock); in sfc_mae_switch_ports_iterate() 190 SFC_ASSERT(rte_spinlock_is_locked(&sfc_mae_switch.lock)); in sfc_mae_find_switch_domain_by_hw_switch_id() 208 rte_spinlock_lock(&sfc_mae_switch.lock); in sfc_mae_assign_switch_domain() 244 rte_spinlock_unlock(&sfc_mae_switch.lock); in sfc_mae_assign_switch_domain() 255 rte_spinlock_unlock(&sfc_mae_switch.lock); in sfc_mae_assign_switch_domain() [all …]
|
| /dpdk/drivers/raw/ifpga/base/ |
| H A D | ifpga_port.c | 102 spinlock_lock(&port->lock); in port_get_ap1_event() 104 spinlock_unlock(&port->lock); in port_get_ap1_event() 119 spinlock_lock(&port->lock); in port_set_ap1_event() 123 spinlock_unlock(&port->lock); in port_set_ap1_event() 136 spinlock_lock(&port->lock); in port_get_ap2_event() 138 spinlock_unlock(&port->lock); in port_get_ap2_event() 153 spinlock_lock(&port->lock); in port_set_ap2_event() 157 spinlock_unlock(&port->lock); in port_set_ap2_event() 170 spinlock_lock(&port->lock); in port_get_power_state() 172 spinlock_unlock(&port->lock); in port_get_power_state() [all …]
|
| H A D | opae_ifpga_hw_api.c | 44 spinlock_lock(&fme->lock); in opae_manager_ifpga_get_info() 46 spinlock_unlock(&fme->lock); in opae_manager_ifpga_get_info() 103 spinlock_lock(&port->lock); in opae_bridge_ifpga_get_info() 106 spinlock_unlock(&port->lock); in opae_bridge_ifpga_get_info() 125 spinlock_lock(&port->lock); in opae_bridge_ifpga_get_region_info() 128 spinlock_unlock(&port->lock); in opae_bridge_ifpga_get_region_info()
|
| H A D | ifpga_port_error.c | 80 spinlock_lock(&port->lock); in port_err_set_clear() 82 spinlock_unlock(&port->lock); in port_err_set_clear() 93 spinlock_lock(&port->lock); in port_error_init() 97 spinlock_unlock(&port->lock); in port_error_init() 150 spinlock_lock(&port->lock); in port_error_set_irq() 152 spinlock_unlock(&port->lock); in port_error_set_irq()
|
| H A D | ifpga_fme_iperf.c | 55 spinlock_lock(&fme->lock); in fme_iperf_set_cache_freeze() 61 spinlock_unlock(&fme->lock); in fme_iperf_set_cache_freeze() 76 spinlock_lock(&fme->lock); in read_cache_counter() 92 spinlock_unlock(&fme->lock); in read_cache_counter() 99 spinlock_unlock(&fme->lock); in read_cache_counter() 146 spinlock_lock(&fme->lock); in fme_iperf_set_vtd_freeze() 152 spinlock_unlock(&fme->lock); in fme_iperf_set_vtd_freeze() 165 spinlock_lock(&fme->lock); in read_iommu_sip_counter() 177 spinlock_unlock(&fme->lock); in read_iommu_sip_counter() 183 spinlock_unlock(&fme->lock); in read_iommu_sip_counter() [all …]
|
| H A D | ifpga_fme_error.c | 52 spinlock_lock(&fme->lock); in fme_err_set_clear() 56 spinlock_unlock(&fme->lock); in fme_err_set_clear() 95 spinlock_lock(&fme->lock); in fme_err_set_pcie0_errors() 106 spinlock_unlock(&fme->lock); in fme_err_set_pcie0_errors() 132 spinlock_lock(&fme->lock); in fme_err_set_pcie1_errors() 143 spinlock_unlock(&fme->lock); in fme_err_set_pcie1_errors() 194 spinlock_lock(&fme->lock); in fme_err_set_inject_errors() 200 spinlock_unlock(&fme->lock); in fme_err_set_inject_errors() 205 spinlock_unlock(&fme->lock); in fme_err_set_inject_errors() 400 spinlock_lock(&fme->lock); in fme_global_err_set_irq() [all …]
|
| /dpdk/lib/eal/include/ |
| H A D | rte_seqlock.h | 12 * A sequence lock (seqlock) is a synchronization primitive allowing 14 * data-race free manner) access lock-protected data. The RTE seqlock 42 * rte_seqlock_t lock; 54 * sn = rte_seqlock_read_begin(&config->lock); 62 * } while (rte_seqlock_read_retry(&config->lock, sn)); 69 * rte_seqlock_write_lock(&config->lock); 73 * rte_seqlock_write_unlock(&config->lock); 78 * serialization is provided by other means, the use of sequence lock 103 rte_spinlock_t lock; /**< Spinlock used to serialize writers. */ member 112 .lock [all...] |
| /dpdk/drivers/net/cxgbe/ |
| H A D | mps_tcam.c | 76 t4_os_write_lock(&mpstcam->lock); in cxgbe_mpstcam_alloc() 80 t4_os_write_unlock(&mpstcam->lock); in cxgbe_mpstcam_alloc() 85 t4_os_write_unlock(&mpstcam->lock); in cxgbe_mpstcam_alloc() 93 t4_os_write_unlock(&mpstcam->lock); in cxgbe_mpstcam_alloc() 107 t4_os_write_unlock(&mpstcam->lock); in cxgbe_mpstcam_alloc() 119 t4_os_write_lock(&mpstcam->lock); in cxgbe_mpstcam_modify() 121 t4_os_write_unlock(&mpstcam->lock); in cxgbe_mpstcam_modify() 130 t4_os_write_unlock(&mpstcam->lock); in cxgbe_mpstcam_modify() 137 t4_os_write_unlock(&mpstcam->lock); in cxgbe_mpstcam_modify() 157 t4_os_write_unlock(&mpstcam->lock); in cxgbe_mpstcam_modify() [all …]
|
| H A D | clip_tbl.c | 57 t4_os_lock(&ce->lock); in cxgbe_clip_release() 63 t4_os_unlock(&ce->lock); in cxgbe_clip_release() 113 t4_os_write_lock(&ctbl->lock); in t4_clip_alloc() 116 t4_os_lock(&ce->lock); in t4_clip_alloc() 134 t4_os_unlock(&ce->lock); in t4_clip_alloc() 136 t4_os_write_unlock(&ctbl->lock); in t4_clip_alloc() 177 t4_os_rwlock_init(&ctbl->lock); in t4_init_clip_tbl() 180 t4_os_lock_init(&ctbl->cl_list[i].lock); in t4_init_clip_tbl()
|
| H A D | smt.c | 21 t4_os_lock(&e->lock); in cxgbe_do_smt_write_rpl() 23 t4_os_unlock(&e->lock); in cxgbe_do_smt_write_rpl() 155 t4_os_write_lock(&s->lock); in t4_smt_alloc_switching() 158 t4_os_lock(&e->lock); in t4_smt_alloc_switching() 166 t4_os_unlock(&e->lock); in t4_smt_alloc_switching() 175 t4_os_unlock(&e->lock); in t4_smt_alloc_switching() 179 t4_os_write_unlock(&s->lock); in t4_smt_alloc_switching() 216 t4_os_rwlock_init(&s->lock); in t4_init_smt() 223 t4_os_lock_init(&s->smtab[i].lock); in t4_init_smt()
|
| H A D | l2t.c | 42 t4_os_lock(&e->lock); in cxgbe_do_l2t_write_rpl() 45 t4_os_unlock(&e->lock); in cxgbe_do_l2t_write_rpl() 150 t4_os_write_lock(&d->lock); in t4_l2t_alloc_switching() 153 t4_os_lock(&e->lock); in t4_l2t_alloc_switching() 167 t4_os_unlock(&e->lock); in t4_l2t_alloc_switching() 169 t4_os_write_unlock(&d->lock); in t4_l2t_alloc_switching() 210 t4_os_rwlock_init(&d->lock); in t4_init_l2t() 215 t4_os_lock_init(&d->l2tab[i].lock); in t4_init_l2t()
|
| /dpdk/lib/metrics/ |
| H A D | rte_metrics.c | 55 rte_spinlock_t lock; member 78 rte_spinlock_init(&stats->lock); in rte_metrics_init() 138 rte_spinlock_lock(&stats->lock); in rte_metrics_reg_names() 155 rte_spinlock_unlock(&stats->lock); in rte_metrics_reg_names() 191 rte_spinlock_lock(&stats->lock); in rte_metrics_update_values() 194 rte_spinlock_unlock(&stats->lock); in rte_metrics_update_values() 208 rte_spinlock_unlock(&stats->lock); in rte_metrics_update_values() 224 rte_spinlock_unlock(&stats->lock); in rte_metrics_update_values() 242 rte_spinlock_lock(&stats->lock); in rte_metrics_get_names() 246 rte_spinlock_unlock(&stats->lock); in rte_metrics_get_names() [all …]
|
| /dpdk/lib/stack/ |
| H A D | rte_stack_std.h | 30 rte_spinlock_lock(&stack->lock); in __rte_stack_std_push() 35 rte_spinlock_unlock(&stack->lock); in __rte_stack_std_push() 45 rte_spinlock_unlock(&stack->lock); in __rte_stack_std_push() 68 rte_spinlock_lock(&stack->lock); in __rte_stack_std_pop() 71 rte_spinlock_unlock(&stack->lock); in __rte_stack_std_pop() 82 rte_spinlock_unlock(&stack->lock); in __rte_stack_std_pop()
|
| /dpdk/drivers/net/cxgbe/base/ |
| H A D | adapter.h | 354 #define t4_os_rwlock_init(lock) rte_rwlock_init(lock) argument 360 #define t4_os_write_lock(lock) rte_rwlock_write_lock(lock) argument 366 #define t4_os_write_unlock(lock) rte_rwlock_write_unlock(lock) argument 647 #define t4_os_lock_init(lock) rte_spinlock_init(lock) argument 653 #define t4_os_lock(lock) rte_spinlock_lock(lock) argument 659 #define t4_os_unlock(lock) rte_spinlock_unlock(lock) argument 665 #define t4_os_trylock(lock) rte_spinlock_trylock(lock) argument 689 rte_spinlock_t *lock) in t4_os_atomic_add_tail() argument 691 t4_os_lock(lock); in t4_os_atomic_add_tail() 693 t4_os_unlock(lock); in t4_os_atomic_add_tail() [all …]
|
| /dpdk/examples/bond/ |
| H A D | main.c | 338 rte_spinlock_t lock; member 367 rte_spinlock_lock(&global_flag_stru_p->lock); in lcore_main() 370 rte_spinlock_unlock(&global_flag_stru_p->lock); in lcore_main() 391 if (rte_spinlock_trylock(&global_flag_stru_p->lock) == 1) { in lcore_main() 393 rte_spinlock_unlock(&global_flag_stru_p->lock); in lcore_main() 404 if (rte_spinlock_trylock(&global_flag_stru_p->lock) == 1) { in lcore_main() 406 rte_spinlock_unlock(&global_flag_stru_p->lock); in lcore_main() 429 if (rte_spinlock_trylock(&global_flag_stru_p->lock) == 1) { in lcore_main() 431 rte_spinlock_unlock(&global_flag_stru_p->lock); in lcore_main() 450 rte_spinlock_lock(&global_flag_stru_p->lock); in lcore_main() [all …]
|
| /dpdk/drivers/common/cpt/ |
| H A D | cpt_fpm_tables.c | 1080 static rte_spinlock_t lock = RTE_SPINLOCK_INITIALIZER; variable 1092 rte_spinlock_lock(&lock); in cpt_fpm_init() 1105 rte_spinlock_unlock(&lock); in cpt_fpm_init() 1123 rte_spinlock_unlock(&lock); in cpt_fpm_init() 1130 rte_spinlock_lock(&lock); in cpt_fpm_clear() 1137 rte_spinlock_unlock(&lock); in cpt_fpm_clear()
|
| /dpdk/drivers/vdpa/sfc/ |
| H A D | sfc_vdpa.h | 52 rte_spinlock_t lock; member 125 #define sfc_vdpa_adapter_lock_init(sva) rte_spinlock_init(&(sva)->lock) 126 #define sfc_vdpa_adapter_is_locked(sva) rte_spinlock_is_locked(&(sva)->lock) 127 #define sfc_vdpa_adapter_lock(sva) rte_spinlock_lock(&(sva)->lock) 128 #define sfc_vdpa_adapter_trylock(sva) rte_spinlock_trylock(&(sva)->lock) 129 #define sfc_vdpa_adapter_unlock(sva) rte_spinlock_unlock(&(sva)->lock)
|
| /dpdk/drivers/raw/cnxk_gpio/ |
| H A D | cnxk_gpio_irq.c | 41 pthread_mutex_t lock; member 141 pthread_mutex_init(&irqchip->lock, NULL); in cnxk_gpio_irq_init() 166 pthread_mutex_lock(&irqchip->lock); in cnxk_gpio_irq_request() 186 pthread_mutex_unlock(&irqchip->lock); in cnxk_gpio_irq_request() 193 pthread_mutex_unlock(&irqchip->lock); in cnxk_gpio_irq_request() 203 pthread_mutex_lock(&irqchip->lock); in cnxk_gpio_irq_free() 207 pthread_mutex_unlock(&irqchip->lock); in cnxk_gpio_irq_free() 213 pthread_mutex_unlock(&irqchip->lock); in cnxk_gpio_irq_free()
|
| /dpdk/lib/eal/x86/ |
| H A D | rte_power_intrinsics.c | 19 rte_spinlock_t lock; 183 rte_spinlock_lock(&s->lock); in rte_power_monitor() 190 rte_spinlock_unlock(&s->lock); in rte_power_monitor() 203 rte_spinlock_lock(&s->lock); in rte_power_monitor() 205 rte_spinlock_unlock(&s->lock); 293 * unneeded, and since T1 is still waiting on T2 releasing the lock, the in rte_power_monitor_wakeup() 299 rte_spinlock_lock(&s->lock); in rte_power_monitor_wakeup() 302 rte_spinlock_unlock(&s->lock); 333 * the mere act of reading the lock status here adds the lock t in rte_power_monitor_multi() 18 rte_spinlock_t lock; global() member [all...] |
| /dpdk/app/test/ |
| H A D | test_pflock.c | 98 int lock = 0; in test_pflock_perf() local 104 load_loop_fn(&lock); in test_pflock_perf() 110 lock = 1; in test_pflock_perf() 112 load_loop_fn(&lock); in test_pflock_perf() 121 if (rte_eal_mp_remote_launch(load_loop_fn, &lock, SKIP_MAIN) < 0) in test_pflock_perf() 126 load_loop_fn(&lock); in test_pflock_perf()
|
| H A D | test_mcslock.c | 99 int lock = 0; in test_mcslock_perf() local 104 load_loop_fn(&lock); in test_mcslock_perf() 111 lock = 1; in test_mcslock_perf() 112 load_loop_fn(&lock); in test_mcslock_perf() 120 rte_eal_mp_remote_launch(load_loop_fn, &lock, SKIP_MAIN); in test_mcslock_perf() 124 load_loop_fn(&lock); in test_mcslock_perf()
|
| /dpdk/doc/guides/prog_guide/ |
| H A D | stack_lib.rst | 13 user-specified socket, with either standard (lock-based) or lock-free 28 The library supports two types of stacks: standard (lock-based) and lock-free. 36 The lock-based stack consists of a contiguous array of pointers, a current 45 The lock-free stack consists of a linked list of elements, each containing a 47 lock-free property means that multiple threads can push and pop simultaneously, 51 The lock-free push operation enqueues a linked list of pointers by pointing the 57 The lock-free pop operation first reserves one or more list elements by 63 The linked list elements themselves are maintained in a lock-free LIFO, and are 67 The lock-free behavior is selected by passing the *RTE_STACK_F_LF* flag to
|
| /dpdk/lib/eal/common/ |
| H A D | malloc_mp.c | 79 pthread_mutex_t lock; member 82 .lock = PTHREAD_MUTEX_INITIALIZER 304 /* lock access to request */ in handle_request() 305 pthread_mutex_lock(&mp_request_list.lock); in handle_request() 391 pthread_mutex_unlock(&mp_request_list.lock); in handle_request() 394 pthread_mutex_unlock(&mp_request_list.lock); in handle_request() 412 /* lock the request */ in handle_sync_response() 413 pthread_mutex_lock(&mp_request_list.lock); in handle_sync_response() 543 pthread_mutex_unlock(&mp_request_list.lock); in handle_sync_response() 546 pthread_mutex_unlock(&mp_request_list.lock); in handle_sync_response() [all...] |
| /dpdk/examples/ethtool/ethtool-app/ |
| H A D | main.c | 37 rte_spinlock_t lock; member 58 rte_spinlock_lock(&ptr_port->lock); in lock_port() 65 rte_spinlock_unlock(&ptr_port->lock); in unlock_port() 165 rte_spinlock_init(&ptr_port->lock); in setup_ports() 196 lock_result = rte_spinlock_trylock(&ptr_port->lock); in worker_main() 200 rte_spinlock_unlock(&ptr_port->lock); in worker_main() 210 rte_spinlock_unlock(&ptr_port->lock); in worker_main() 252 rte_spinlock_unlock(&ptr_port->lock); in worker_main()
|
| /dpdk/doc/guides/mempool/ |
| H A D | stack.rst | 23 The underlying **rte_stack** operates in standard (lock-based) mode. 28 The underlying **rte_stack** operates in lock-free mode. For more 31 The standard stack outperforms the lock-free stack on average, however the 33 the stack lock, that thread will block all other mempool accesses until it 34 returns and releases the lock. As a result, an application using the standard 38 The lock-free stack, by design, is not susceptible to this problem; one thread can
|