Lines Matching defs:cb
5597 struct rte_eth_dev_callback *cb, *next;
5625 for (cb = TAILQ_FIRST(&dev->link_intr_cbs); cb != NULL;
5626 cb = next) {
5628 next = TAILQ_NEXT(cb, next);
5630 if (cb->cb_fn != cb_fn || cb->event != event ||
5631 (cb_arg != (void *)-1 && cb->cb_arg != cb_arg))
5638 if (cb->active == 0) {
5639 TAILQ_REMOVE(&(dev->link_intr_cbs), cb, next);
5640 rte_free(cb);
5843 struct rte_eth_rxtx_callback *cb = rte_zmalloc(NULL, sizeof(*cb), 0);
5845 if (cb == NULL) {
5850 cb->fn.rx = fn;
5851 cb->param = user_param;
5859 /* Stores to cb->fn and cb->param should complete before
5860 * cb is visible to data plane.
5864 cb, rte_memory_order_release);
5869 /* Stores to cb->fn and cb->param should complete before
5870 * cb is visible to data plane.
5872 rte_atomic_store_explicit(&tail->next, cb, rte_memory_order_release);
5876 rte_eth_trace_add_rx_callback(port_id, queue_id, fn, user_param, cb);
5878 return cb;
5896 struct rte_eth_rxtx_callback *cb = rte_zmalloc(NULL, sizeof(*cb), 0);
5898 if (cb == NULL) {
5903 cb->fn.rx = fn;
5904 cb->param = user_param;
5908 cb->next = rte_eth_devices[port_id].post_rx_burst_cbs[queue_id];
5909 /* Stores to cb->fn, cb->param and cb->next should complete before
5910 * cb is visible to data plane threads.
5914 cb, rte_memory_order_release);
5918 cb);
5920 return cb;
5946 struct rte_eth_rxtx_callback *cb = rte_zmalloc(NULL, sizeof(*cb), 0);
5948 if (cb == NULL) {
5953 cb->fn.tx = fn;
5954 cb->param = user_param;
5962 /* Stores to cb->fn and cb->param should complete before
5963 * cb is visible to data plane.
5967 cb, rte_memory_order_release);
5972 /* Stores to cb->fn and cb->param should complete before
5973 * cb is visible to data plane.
5975 rte_atomic_store_explicit(&tail->next, cb, rte_memory_order_release);
5979 rte_eth_trace_add_tx_callback(port_id, queue_id, fn, user_param, cb);
5981 return cb;
5998 struct rte_eth_rxtx_callback *cb;
6004 for (; *prev_cb != NULL; prev_cb = &cb->next) {
6005 cb = *prev_cb;
6006 if (cb == user_cb) {
6007 /* Remove the user cb from the callback list. */
6008 rte_atomic_store_explicit(prev_cb, cb->next, rte_memory_order_relaxed);
6035 struct rte_eth_rxtx_callback *cb;
6040 for (; *prev_cb != NULL; prev_cb = &cb->next) {
6041 cb = *prev_cb;
6042 if (cb == user_cb) {
6043 /* Remove the user cb from the callback list. */
6044 rte_atomic_store_explicit(prev_cb, cb->next, rte_memory_order_relaxed);