Home
last modified time | relevance | path

Searched full:napi (Results 1 – 25 of 496) sorted by relevance

12345678910>>...20

/linux/io_uring/
H A Dnapi.c4 #include "napi.h"
37 /* napi approximating usecs, reverse busy_loop_current_time */ in net_to_ktime()
47 /* Non-NAPI IDs can be rejected. */ in __io_napi_add_id()
95 /* Non-NAPI IDs can be rejected. */ in __io_napi_del_id()
223 /* Singular lists use a different napi loop end check function and are in io_napi_blocking_busy_loop()
243 * io_napi_init() - Init napi settings
246 * Init napi settings in the io-uring context.
260 * io_napi_free() - Deallocate napi
263 * Free the napi list and the hash table in the io-uring context.
278 struct io_uring_napi *napi) in io_napi_register_napi() argument
[all …]
/linux/tools/testing/selftests/drivers/net/
H A Dnapi_threaded.py5 Test napi threaded states.
15 napi = nl.napi_get({'id': napi_id})
16 ksft_eq(napi['threaded'], 'enabled')
17 ksft_ne(napi.get('pid'), None)
21 napi = nl.napi_get({'id': napi_id})
22 ksft_eq(napi['threaded'], 'disabled')
23 ksft_eq(napi.get('pid'), None)
44 Test that threaded state (in the persistent NAPI config) gets updated
45 even when NAPI with given ID is not allocated at the time.
56 for napi i
[all...]
/linux/include/trace/events/
H A Dnapi.h3 #define TRACE_SYSTEM napi
16 TP_PROTO(struct napi_struct *napi, int work, int budget),
18 TP_ARGS(napi, work, budget),
21 __field( struct napi_struct *, napi)
22 __string( dev_name, napi->dev ? napi->dev->name : NO_DEV)
28 __entry->napi = napi;
34 TP_printk("napi poll on napi struc
[all...]
/linux/net/core/
H A Ddev.h233 * napi_get_defer_hard_irqs - get the NAPI's defer_hard_irqs
234 * @n: napi struct to get the defer_hard_irqs field from
236 * Return: the per-NAPI value of the defar_hard_irqs field.
244 * napi_set_defer_hard_irqs - set the defer_hard_irqs for a napi
263 struct napi_struct *napi; in netdev_set_defer_hard_irqs() local
267 list_for_each_entry(napi, &netdev->napi_list, dev_list) in netdev_set_defer_hard_irqs()
268 napi_set_defer_hard_irqs(napi, defer); in netdev_set_defer_hard_irqs()
276 * @n: napi struct to get the gro_flush_timeout from
278 * Return: the per-NAPI value of the gro_flush_timeout field.
287 * napi_set_gro_flush_timeout - set the gro_flush_timeout for a napi
[all …]
H A Dgro_cells.c10 struct napi_struct napi; member
44 napi_schedule(&cell->napi); in gro_cells_receive()
57 static int gro_cell_poll(struct napi_struct *napi, int budget) in gro_cell_poll() argument
59 struct gro_cell *cell = container_of(napi, struct gro_cell, napi); in gro_cell_poll()
69 napi_gro_receive(napi, skb); in gro_cell_poll()
74 napi_complete_done(napi, work_done); in gro_cell_poll()
92 set_bit(NAPI_STATE_NO_BUSY_POLL, &cell->napi.state); in gro_cells_init()
94 netif_napi_add(dev, &cell->napi, gro_cell_poll); in gro_cells_init()
95 napi_enable(&cell->napi); in gro_cells_init()
125 napi_disable(&cell->napi); in gro_cells_destroy()
[all …]
H A Ddev.c136 #include <trace/events/napi.h>
469 * (e.g. NAPI context).
797 struct napi_struct *napi; in napi_by_id() local
799 hlist_for_each_entry_rcu(napi, &napi_hash[hash], napi_hash_node) in napi_by_id()
800 if (napi->napi_id == napi_id) in napi_by_id()
801 return napi; in napi_by_id()
810 struct napi_struct *napi; in netdev_napi_by_id() local
812 napi = napi_by_id(napi_id); in netdev_napi_by_id()
813 if (!napi) in netdev_napi_by_id()
816 if (WARN_ON_ONCE(!napi->dev)) in netdev_napi_by_id()
[all …]
H A Dgro.c455 /* Do not adjust napi->gro_hash[].count, caller is adding a new in gro_flush_oldest()
640 static void napi_reuse_skb(struct napi_struct *napi, struct sk_buff *skb) in napi_reuse_skb() argument
652 skb->dev = napi->dev; in napi_reuse_skb()
673 napi->skb = skb; in napi_reuse_skb()
676 struct sk_buff *napi_get_frags(struct napi_struct *napi) in napi_get_frags() argument
678 struct sk_buff *skb = napi->skb; in napi_get_frags()
681 skb = napi_alloc_skb(napi, GRO_MAX_HEAD); in napi_get_frags()
683 napi->skb = skb; in napi_get_frags()
684 skb_mark_napi_id(skb, napi); in napi_get_frags()
691 static gro_result_t napi_frags_finish(struct napi_struct *napi, in napi_frags_finish() argument
[all …]
H A Dnetpoll.c38 #include <trace/events/napi.h>
142 static void poll_one_napi(struct napi_struct *napi) in poll_one_napi() argument
147 * that indicates that napi has been disabled and we need in poll_one_napi()
150 if (test_and_set_bit(NAPI_STATE_NPSVC, &napi->state)) in poll_one_napi()
156 work = napi->poll(napi, 0); in poll_one_napi()
157 WARN_ONCE(work, "%pS exceeded budget in poll\n", napi->poll); in poll_one_napi()
158 trace_napi_poll(napi, work, 0); in poll_one_napi()
160 clear_bit(NAPI_STATE_NPSVC, &napi->state); in poll_one_napi()
165 struct napi_struct *napi; in poll_napi() local
168 list_for_each_entry_rcu(napi, &dev->napi_list, dev_list) { in poll_napi()
[all …]
/linux/drivers/net/ethernet/intel/igc/
H A Digc_xdp.c32 napi_disable(&adapter->rx_ring[i]->q_vector->napi); in igc_xdp_set_prog()
47 napi_enable(&adapter->rx_ring[i]->q_vector->napi); in igc_xdp_set_prog()
62 struct napi_struct *napi; in igc_xdp_enable_pool() local
91 /* Rx and Tx rings share the same napi context. */ in igc_xdp_enable_pool()
92 napi = &rx_ring->q_vector->napi; in igc_xdp_enable_pool()
97 napi_disable(napi); in igc_xdp_enable_pool()
104 napi_enable(napi); in igc_xdp_enable_pool()
122 struct napi_struct *napi; in igc_xdp_disable_pool() local
137 /* Rx and Tx rings share the same napi context. */ in igc_xdp_disable_pool()
138 napi = &rx_ring->q_vector->napi; in igc_xdp_disable_pool()
[all …]
/linux/drivers/infiniband/hw/hfi1/
H A Dipoib_rx.c22 static struct sk_buff *prepare_frag_skb(struct napi_struct *napi, int size) in prepare_frag_skb() argument
33 return napi_alloc_skb(napi, size); in prepare_frag_skb()
49 struct napi_struct *napi = &rxq->napi; in hfi1_ipoib_prepare_skb() local
55 * napi cache. Otherwise we will try to use napi frag cache. in hfi1_ipoib_prepare_skb()
58 skb = napi_alloc_skb(napi, skb_size); in hfi1_ipoib_prepare_skb()
60 skb = prepare_frag_skb(napi, skb_size); in hfi1_ipoib_prepare_skb()
/linux/drivers/net/wireless/ath/wil6210/
H A Dnetdev.c91 static int wil6210_netdev_poll_rx(struct napi_struct *napi, int budget) in wil6210_netdev_poll_rx() argument
93 struct wil6210_priv *wil = container_of(napi, struct wil6210_priv, in wil6210_netdev_poll_rx()
102 napi_complete_done(napi, done); in wil6210_netdev_poll_rx()
104 wil_dbg_txrx(wil, "NAPI RX complete\n"); in wil6210_netdev_poll_rx()
107 wil_dbg_txrx(wil, "NAPI RX poll(%d) done %d\n", budget, done); in wil6210_netdev_poll_rx()
112 static int wil6210_netdev_poll_rx_edma(struct napi_struct *napi, int budget) in wil6210_netdev_poll_rx_edma() argument
114 struct wil6210_priv *wil = container_of(napi, struct wil6210_priv, in wil6210_netdev_poll_rx_edma()
123 napi_complete_done(napi, done); in wil6210_netdev_poll_rx_edma()
125 wil_dbg_txrx(wil, "NAPI RX complete\n"); in wil6210_netdev_poll_rx_edma()
128 wil_dbg_txrx(wil, "NAPI RX poll(%d) done %d\n", budget, done); in wil6210_netdev_poll_rx_edma()
[all …]
/linux/drivers/net/netdevsim/
H A Dnetdev.c48 idx = rq->napi.index; in nsim_start_peer_tx_queue()
366 struct net_device *dev = rq->napi.dev; in nsim_rcv()
397 napi_gro_receive(&rq->napi, skb); in nsim_rcv()
404 static int nsim_poll(struct napi_struct *napi, int budget) in nsim_poll() argument
406 struct nsim_rq *rq = container_of(napi, struct nsim_rq, napi); in nsim_poll()
411 napi_complete_done(napi, done); in nsim_poll()
416 static int nsim_create_page_pool(struct page_pool **p, struct napi_struct *napi) in nsim_create_page_pool() argument
422 .dev = &napi->dev->dev, in nsim_create_page_pool()
423 .napi = napi, in nsim_create_page_pool()
425 .netdev = napi->dev, in nsim_create_page_pool()
[all …]
/linux/drivers/net/ethernet/synopsys/
H A Ddwc-xlgmac-net.c283 * enabled before using the private data napi structure. in xlgmac_isr()
290 if (napi_schedule_prep(&pdata->napi)) { in xlgmac_isr()
296 __napi_schedule_irqoff(&pdata->napi); in xlgmac_isr()
348 * channel napi structure and not the private data napi structure in xlgmac_dma_isr()
350 if (napi_schedule_prep(&channel->napi)) { in xlgmac_dma_isr()
355 __napi_schedule_irqoff(&channel->napi); in xlgmac_dma_isr()
366 struct napi_struct *napi; in xlgmac_tx_timer() local
368 napi = (pdata->per_channel_irq) ? &channel->napi : &pdata->napi; in xlgmac_tx_timer()
370 if (napi_schedule_prep(napi)) { in xlgmac_tx_timer()
379 __napi_schedule(napi); in xlgmac_tx_timer()
[all …]
/linux/drivers/net/ethernet/aquantia/atlantic/
H A Daq_vec.c21 struct napi_struct napi; member
28 static int aq_vec_poll(struct napi_struct *napi, int budget) in aq_vec_poll() argument
30 struct aq_vec_s *self = container_of(napi, struct aq_vec_s, napi); in aq_vec_poll()
68 napi, in aq_vec_poll()
93 napi_complete_done(napi, work_done); in aq_vec_poll()
122 netif_napi_add(aq_nic_get_ndev(aq_nic), &self->napi, aq_vec_poll); in aq_vec_alloc()
151 self->napi.napi_id) < 0) { in aq_vec_ring_alloc()
245 napi_enable(&self->napi); in aq_vec_start()
265 napi_disable(&self->napi); in aq_vec_stop()
290 netif_napi_del(&self->napi); in aq_vec_free()
[all …]
/linux/drivers/net/ethernet/meta/fbnic/
H A Dfbnic_txrx.c606 txq = txring_txq(nv->napi.dev, ring); in fbnic_clean_twq0()
698 netdev_err(nv->napi.dev, in fbnic_clean_tsq()
710 fbn = netdev_priv(nv->napi.dev); in fbnic_clean_tsq()
748 /* sub0 is always fed system pages, from the NAPI-level page_pool */ in fbnic_page_pool_get_head()
1021 netdev_err_once(nv->napi.dev, in fbnic_add_rx_frag()
1150 struct fbnic_net *fbn = netdev_priv(nv->napi.dev); in fbnic_run_xdp()
1170 bpf_warn_invalid_xdp_action(nv->napi.dev, xdp_prog, act); in fbnic_run_xdp()
1173 trace_xdp_exception(nv->napi.dev, xdp_prog, act); in fbnic_run_xdp()
1198 fbn = netdev_priv(nv->napi.dev); in fbnic_rx_tstamp()
1211 struct net_device *netdev = nv->napi.dev; in fbnic_populate_skb_fields()
[all …]
/linux/drivers/net/ethernet/huawei/hinic3/
H A Dhinic3_irq.c31 static int hinic3_poll(struct napi_struct *napi, int budget) in hinic3_poll() argument
34 container_of(napi, struct hinic3_irq_cfg, napi); in hinic3_poll()
52 if (likely(napi_complete_done(napi, work_done))) { in hinic3_poll()
65 netif_napi_add(nic_dev->netdev, &irq_cfg->napi, hinic3_poll); in qp_add_napi()
66 napi_enable(&irq_cfg->napi); in qp_add_napi()
71 napi_disable(&irq_cfg->napi); in qp_del_napi()
72 netif_napi_del(&irq_cfg->napi); in qp_del_napi()
86 napi_schedule(&irq_cfg->napi); in qp_irq()
235 NETDEV_QUEUE_TYPE_RX, &irq_cfg->napi); in hinic3_qps_irq_init()
237 NETDEV_QUEUE_TYPE_TX, &irq_cfg->napi); in hinic3_qps_irq_init()
/linux/tools/testing/selftests/net/
H A Dnl_netdev.py53 Test that verifies various cases of napi threaded
54 set and unset at napi and device level.
67 # set napi threaded and verify
81 # verify if napi threaded is still set
91 # unset napi threaded and verify
100 # check napi threaded is set for both napis
111 # check napi threaded is unset for both napis
119 # set napi threaded for napi0
128 # check napi threaded is unset for both napis
138 Test that verifies various cases of napi threade
[all...]
/linux/drivers/net/ethernet/intel/libeth/
H A Dxsk.c126 * current NAPI poll when there are no free buffers left.
202 * @napi: NAPI corresponding to this queue
208 void libeth_xsk_init_wakeup(call_single_data_t *csd, struct napi_struct *napi) in libeth_xsk_init_wakeup() argument
210 INIT_CSD(csd, libeth_xsk_napi_sched, napi); in libeth_xsk_init_wakeup()
219 * Try to mark the NAPI as missed first, so that it could be rescheduled.
225 struct napi_struct *napi = csd->info; in libeth_xsk_wakeup() local
227 if (napi_if_scheduled_mark_missed(napi) || in libeth_xsk_wakeup()
228 unlikely(!napi_schedule_prep(napi))) in libeth_xsk_wakeup()
237 __napi_schedule(napi); in libeth_xsk_wakeup()
/linux/drivers/net/ethernet/google/gve/
H A Dgve_utils.c67 struct sk_buff *gve_rx_copy_data(struct net_device *dev, struct napi_struct *napi, in gve_rx_copy_data() argument
72 skb = napi_alloc_skb(napi, len); in gve_rx_copy_data()
83 struct sk_buff *gve_rx_copy(struct net_device *dev, struct napi_struct *napi, in gve_rx_copy() argument
89 return gve_rx_copy_data(dev, napi, va, len); in gve_rx_copy()
113 netif_napi_add_locked(priv->dev, &block->napi, gve_poll); in gve_add_napi()
114 netif_napi_set_irq_locked(&block->napi, block->irq); in gve_add_napi()
123 netif_napi_del_locked(&block->napi); in gve_remove_napi()
/linux/drivers/net/wireless/ath/ath12k/wifi7/
H A Ddp.c23 struct napi_struct *napi = &irq_grp->napi; in ath12k_wifi7_dp_service_srng() local
37 work_done = ath12k_wifi7_dp_rx_process_err(dp, napi, budget); in ath12k_wifi7_dp_service_srng()
45 work_done = ath12k_wifi7_dp_rx_process_wbm_err(dp, napi, budget); in ath12k_wifi7_dp_service_srng()
55 work_done = ath12k_wifi7_dp_rx_process(dp, i, napi, budget); in ath12k_wifi7_dp_service_srng()
70 ath12k_wifi7_dp_mon_process_ring(dp, id, napi, in ath12k_wifi7_dp_service_srng()
91 ath12k_wifi7_dp_mon_process_ring(dp, id, napi, in ath12k_wifi7_dp_service_srng()
114 napi, budget, in ath12k_wifi7_dp_service_srng()
/linux/drivers/net/ethernet/qlogic/qlcnic/
H A Dqlcnic_io.c959 static int qlcnic_poll(struct napi_struct *napi, int budget) in qlcnic_poll() argument
966 sds_ring = container_of(napi, struct qlcnic_host_sds_ring, napi); in qlcnic_poll()
979 napi_complete_done(&sds_ring->napi, work_done); in qlcnic_poll()
989 static int qlcnic_tx_poll(struct napi_struct *napi, int budget) in qlcnic_tx_poll() argument
995 tx_ring = container_of(napi, struct qlcnic_host_tx_ring, napi); in qlcnic_tx_poll()
1000 napi_complete(&tx_ring->napi); in qlcnic_tx_poll()
1011 static int qlcnic_rx_poll(struct napi_struct *napi, int budget) in qlcnic_rx_poll() argument
1017 sds_ring = container_of(napi, struct qlcnic_host_sds_ring, napi); in qlcnic_rx_poll()
1023 napi_complete_done(&sds_ring->napi, work_done); in qlcnic_rx_poll()
1248 napi_gro_receive(&sds_ring->napi, skb); in qlcnic_process_rcv()
[all …]
/linux/drivers/net/ethernet/broadcom/
H A Dbcm4908_enet.c68 struct napi_struct napi; member
443 napi_schedule(&ring->napi); in bcm4908_enet_irq_handler()
483 napi_enable(&tx_ring->napi); in bcm4908_enet_open()
489 napi_enable(&rx_ring->napi); in bcm4908_enet_open()
506 napi_disable(&rx_ring->napi); in bcm4908_enet_stop()
507 napi_disable(&tx_ring->napi); in bcm4908_enet_stop()
534 napi_schedule(&enet->tx_ring.napi); in bcm4908_enet_start_xmit()
581 static int bcm4908_enet_poll_rx(struct napi_struct *napi, int weight) in bcm4908_enet_poll_rx() argument
583 struct bcm4908_enet_dma_ring *rx_ring = container_of(napi, struct bcm4908_enet_dma_ring, napi); in bcm4908_enet_poll_rx()
641 napi_complete_done(napi, handled); in bcm4908_enet_poll_rx()
[all …]
/linux/include/net/page_pool/
H A Dtypes.h44 * use-case. The NAPI budget is 64 packets. After a NAPI poll the RX
52 * this array, as it shares the same softirq/NAPI protection. If
77 * @napi: NAPI which is the sole consumer of pages, otherwise NULL
93 struct napi_struct *napi;
216 * Softirq/BH scheduling and napi_schedule. NAPI schedule
247 * protected by NAPI, due to above pp_alloc_cache. This
279 struct napi_struct *napi);
317 /* Caller must provide appropriate safe context, e.g. NAPI. */
/linux/drivers/net/can/dev/
H A Drx-offload.c42 static int can_rx_offload_napi_poll(struct napi_struct *napi, int quota) in can_rx_offload_napi_poll() argument
44 struct can_rx_offload *offload = container_of(napi, in can_rx_offload_napi_poll()
46 napi); in can_rx_offload_napi_poll()
66 napi_complete_done(napi, work_done); in can_rx_offload_napi_poll()
70 napi_schedule(&offload->napi); in can_rx_offload_napi_poll()
325 napi_schedule(&offload->napi); in can_rx_offload_irq_finish()
347 napi_schedule(&offload->napi); in can_rx_offload_threaded_irq_finish()
364 netif_napi_add_weight(dev, &offload->napi, can_rx_offload_napi_poll, in can_rx_offload_init_queue()
417 napi_enable(&offload->napi); in can_rx_offload_enable()
423 netif_napi_del(&offload->napi); in can_rx_offload_del()
/linux/include/linux/
H A Dnetdevice.h367 * Structure for per-NAPI config
379 * Structure for NAPI scheduling similar to tasklet but with weighting
399 /* CPU on which NAPI has been scheduled for processing */
423 NAPI_STATE_MISSED, /* reschedule a napi */
426 NAPI_STATE_LISTED, /* NAPI added to system lists */
428 NAPI_STATE_IN_BUSY_POLL, /* Do not rearm NAPI interrupt */
431 NAPI_STATE_SCHED_THREADED, /* Napi is currently scheduled in threaded mode */
432 NAPI_STATE_HAS_NOTIFIER, /* Napi has an IRQ notifier */
433 NAPI_STATE_THREADED_BUSY_POLL, /* The threaded NAPI poller will busy poll */
524 * napi_is_scheduled - test if NAPI is scheduled
[all …]

12345678910>>...20