Home
last modified time | relevance | path

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

12345678910>>...47

/kernel/linux/linux-6.6/Documentation/networking/
Dnapi.rst6 NAPI title
9 NAPI is the event handling mechanism used by the Linux networking stack.
10 The name NAPI no longer stands for anything in particular [#]_.
14 The host then schedules a NAPI instance to process the events.
15 The device may also be polled for events via NAPI without receiving
18 NAPI processing usually happens in the software interrupt context,
20 for NAPI processing.
22 All in all NAPI abstracts away from the drivers the context and configuration
28 The two most important elements of NAPI are the struct napi_struct
30 of the NAPI instance while the method is the driver-specific event
[all …]
/kernel/linux/linux-6.6/include/trace/events/
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;
29 __assign_str(dev_name, napi->dev ? napi->dev->name : NO_DEV);
34 TP_printk("napi poll on napi struct %p for device %s work %d budget %d",
35 __entry->napi, __get_str(dev_name),
/kernel/linux/linux-5.10/include/trace/events/
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;
29 __assign_str(dev_name, napi->dev ? napi->dev->name : NO_DEV);
34 TP_printk("napi poll on napi struct %p for device %s work %d budget %d",
35 __entry->napi, __get_str(dev_name),
/kernel/linux/linux-6.6/net/core/
Dgro.c232 static void napi_gro_complete(struct napi_struct *napi, struct sk_buff *skb) in napi_gro_complete() argument
265 gro_normal_one(napi, skb, NAPI_GRO_CB(skb)->count); in napi_gro_complete()
268 static void __napi_gro_flush_chain(struct napi_struct *napi, u32 index, in __napi_gro_flush_chain() argument
271 struct list_head *head = &napi->gro_hash[index].list; in __napi_gro_flush_chain()
278 napi_gro_complete(napi, skb); in __napi_gro_flush_chain()
279 napi->gro_hash[index].count--; in __napi_gro_flush_chain()
282 if (!napi->gro_hash[index].count) in __napi_gro_flush_chain()
283 __clear_bit(index, &napi->gro_bitmask); in __napi_gro_flush_chain()
286 /* napi->gro_hash[].list contains packets ordered by age.
290 void napi_gro_flush(struct napi_struct *napi, bool flush_old) in napi_gro_flush() argument
[all …]
Dgro_cells.c9 struct napi_struct napi; member
39 napi_schedule(&cell->napi); in gro_cells_receive()
50 static int gro_cell_poll(struct napi_struct *napi, int budget) in gro_cell_poll() argument
52 struct gro_cell *cell = container_of(napi, struct gro_cell, napi); in gro_cell_poll()
60 napi_gro_receive(napi, skb); in gro_cell_poll()
65 napi_complete_done(napi, work_done); in gro_cell_poll()
82 set_bit(NAPI_STATE_NO_BUSY_POLL, &cell->napi.state); in gro_cells_init()
84 netif_napi_add(dev, &cell->napi, gro_cell_poll); in gro_cells_init()
85 napi_enable(&cell->napi); in gro_cells_init()
115 napi_disable(&cell->napi); in gro_cells_destroy()
[all …]
/kernel/linux/linux-5.10/net/core/
Dgro_cells.c9 struct napi_struct napi; member
39 napi_schedule(&cell->napi); in gro_cells_receive()
50 static int gro_cell_poll(struct napi_struct *napi, int budget) in gro_cell_poll() argument
52 struct gro_cell *cell = container_of(napi, struct gro_cell, napi); in gro_cell_poll()
60 napi_gro_receive(napi, skb); in gro_cell_poll()
65 napi_complete_done(napi, work_done); in gro_cell_poll()
82 set_bit(NAPI_STATE_NO_BUSY_POLL, &cell->napi.state); in gro_cells_init()
84 netif_napi_add(dev, &cell->napi, gro_cell_poll, in gro_cells_init()
86 napi_enable(&cell->napi); in gro_cells_init()
101 napi_disable(&cell->napi); in gro_cells_destroy()
[all …]
/kernel/linux/linux-6.6/drivers/net/ethernet/intel/igc/
Digc_xdp.c49 struct napi_struct *napi; in igc_xdp_enable_pool() local
78 /* Rx and Tx rings share the same napi context. */ in igc_xdp_enable_pool()
79 napi = &rx_ring->q_vector->napi; in igc_xdp_enable_pool()
84 napi_disable(napi); in igc_xdp_enable_pool()
91 napi_enable(napi); in igc_xdp_enable_pool()
109 struct napi_struct *napi; in igc_xdp_disable_pool() local
124 /* Rx and Tx rings share the same napi context. */ in igc_xdp_disable_pool()
125 napi = &rx_ring->q_vector->napi; in igc_xdp_disable_pool()
130 napi_disable(napi); in igc_xdp_disable_pool()
138 napi_enable(napi); in igc_xdp_disable_pool()
/kernel/linux/linux-6.6/drivers/infiniband/hw/hfi1/
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()
Dnetdev.h18 * @napi: napi object
23 struct napi_struct napi; member
47 * When 0 NAPI will be disabled.
58 /* count of enabled napi polls */
103 int hfi1_netdev_rx_napi(struct napi_struct *napi, int budget);
/kernel/linux/linux-5.10/drivers/infiniband/hw/hfi1/
Dipoib_rx.c25 static struct sk_buff *prepare_frag_skb(struct napi_struct *napi, int size) in prepare_frag_skb() argument
36 return napi_alloc_skb(napi, size); in prepare_frag_skb()
52 struct napi_struct *napi = &rxq->napi; in hfi1_ipoib_prepare_skb() local
58 * napi cache. Otherwise we will try to use napi frag cache. in hfi1_ipoib_prepare_skb()
61 skb = napi_alloc_skb(napi, skb_size); in hfi1_ipoib_prepare_skb()
63 skb = prepare_frag_skb(napi, skb_size); in hfi1_ipoib_prepare_skb()
Dnetdev_rx.c211 rxq->rcd->napi = &rxq->napi; in hfi1_netdev_rxq_init()
212 dd_dev_info(dd, "Setting rcv queue %d napi to context %d\n", in hfi1_netdev_rxq_init()
215 * Disable BUSY_POLL on this NAPI as this is not supported in hfi1_netdev_rxq_init()
218 set_bit(NAPI_STATE_NO_BUSY_POLL, &rxq->napi.state); in hfi1_netdev_rxq_init()
219 netif_napi_add(dev, &rxq->napi, hfi1_netdev_rx_napi, 64); in hfi1_netdev_rxq_init()
253 netif_napi_del(&rxq->napi); in hfi1_netdev_rxq_deinit()
273 napi_enable(&rxq->napi); in enable_queues()
292 /* wait for napi if it was scheduled */ in disable_queues()
296 napi_synchronize(&rxq->napi); in disable_queues()
297 napi_disable(&rxq->napi); in disable_queues()
[all …]
/kernel/linux/linux-5.10/include/linux/
Dnetpoll.h69 static inline void *netpoll_poll_lock(struct napi_struct *napi) in netpoll_poll_lock() argument
71 struct net_device *dev = napi->dev; in netpoll_poll_lock()
76 while (cmpxchg(&napi->poll_owner, -1, owner) != -1) in netpoll_poll_lock()
79 return napi; in netpoll_poll_lock()
86 struct napi_struct *napi = have; in netpoll_poll_unlock() local
88 if (napi) in netpoll_poll_unlock()
89 smp_store_release(&napi->poll_owner, -1); in netpoll_poll_unlock()
98 static inline void *netpoll_poll_lock(struct napi_struct *napi) in netpoll_poll_lock() argument
/kernel/linux/linux-6.6/include/linux/
Dnetpoll.h70 static inline void *netpoll_poll_lock(struct napi_struct *napi) in netpoll_poll_lock() argument
72 struct net_device *dev = napi->dev; in netpoll_poll_lock()
77 while (cmpxchg(&napi->poll_owner, -1, owner) != -1) in netpoll_poll_lock()
80 return napi; in netpoll_poll_lock()
87 struct napi_struct *napi = have; in netpoll_poll_unlock() local
89 if (napi) in netpoll_poll_unlock()
90 smp_store_release(&napi->poll_owner, -1); in netpoll_poll_unlock()
99 static inline void *netpoll_poll_lock(struct napi_struct *napi) in netpoll_poll_lock() argument
/kernel/linux/linux-5.10/drivers/net/wireless/ath/wil6210/
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 …]
/kernel/linux/linux-6.6/drivers/net/wireless/ath/wil6210/
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 …]
/kernel/linux/linux-5.10/drivers/net/ethernet/
Dlantiq_xrx200.c58 struct napi_struct napi; member
119 napi_enable(&priv->chan_tx.napi); in xrx200_open()
123 napi_enable(&priv->chan_rx.napi); in xrx200_open()
146 napi_disable(&priv->chan_rx.napi); in xrx200_close()
149 napi_disable(&priv->chan_tx.napi); in xrx200_close()
217 static int xrx200_poll_rx(struct napi_struct *napi, int budget) in xrx200_poll_rx() argument
219 struct xrx200_chan *ch = container_of(napi, in xrx200_poll_rx()
220 struct xrx200_chan, napi); in xrx200_poll_rx()
238 if (napi_complete_done(&ch->napi, rx)) in xrx200_poll_rx()
245 static int xrx200_tx_housekeeping(struct napi_struct *napi, int budget) in xrx200_tx_housekeeping() argument
[all …]
/kernel/linux/linux-6.6/drivers/net/ethernet/mellanox/mlx5/core/en/
Dtrap.c8 static int mlx5e_trap_napi_poll(struct napi_struct *napi, int budget) in mlx5e_trap_napi_poll() argument
10 struct mlx5e_trap *trap_ctx = container_of(napi, struct mlx5e_trap, napi); in mlx5e_trap_napi_poll()
29 if (unlikely(!napi_complete_done(napi, work_done))) in mlx5e_trap_napi_poll()
73 ccp.napi = &t->napi; in mlx5e_open_trap_rq()
149 netif_napi_add(netdev, &t->napi, mlx5e_trap_napi_poll); in mlx5e_open_trap()
164 netif_napi_del(&t->napi); in mlx5e_open_trap()
173 netif_napi_del(&trap->napi); in mlx5e_close_trap()
179 napi_enable(&trap->napi); in mlx5e_activate_trap()
181 mlx5e_trigger_napi_sched(&trap->napi); in mlx5e_activate_trap()
189 napi_disable(&trap->napi); in mlx5e_deactivate_trap()
/kernel/linux/linux-6.6/drivers/net/ethernet/aquantia/atlantic/
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 …]
/kernel/linux/linux-6.6/drivers/net/ethernet/
Dlantiq_xrx200.c64 struct napi_struct napi; member
151 napi_enable(&priv->chan_tx.napi); in xrx200_open()
155 napi_enable(&priv->chan_rx.napi); in xrx200_open()
178 napi_disable(&priv->chan_rx.napi); in xrx200_close()
181 napi_disable(&priv->chan_tx.napi); in xrx200_close()
283 static int xrx200_poll_rx(struct napi_struct *napi, int budget) in xrx200_poll_rx() argument
285 struct xrx200_chan *ch = container_of(napi, in xrx200_poll_rx()
286 struct xrx200_chan, napi); in xrx200_poll_rx()
306 if (napi_complete_done(&ch->napi, rx)) in xrx200_poll_rx()
313 static int xrx200_tx_housekeeping(struct napi_struct *napi, int budget) in xrx200_tx_housekeeping() argument
[all …]
/kernel/linux/linux-5.10/drivers/net/ethernet/synopsys/
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()
365 struct napi_struct *napi; in xlgmac_tx_timer() local
367 napi = (pdata->per_channel_irq) ? &channel->napi : &pdata->napi; in xlgmac_tx_timer()
369 if (napi_schedule_prep(napi)) { in xlgmac_tx_timer()
378 __napi_schedule(napi); in xlgmac_tx_timer()
[all …]
/kernel/linux/linux-6.6/drivers/net/ethernet/synopsys/
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()
365 struct napi_struct *napi; in xlgmac_tx_timer() local
367 napi = (pdata->per_channel_irq) ? &channel->napi : &pdata->napi; in xlgmac_tx_timer()
369 if (napi_schedule_prep(napi)) { in xlgmac_tx_timer()
378 __napi_schedule(napi); in xlgmac_tx_timer()
[all …]
/kernel/linux/linux-5.10/drivers/net/ethernet/aquantia/atlantic/
Daq_vec.c26 struct napi_struct napi; member
33 static int aq_vec_poll(struct napi_struct *napi, int budget) in aq_vec_poll() argument
35 struct aq_vec_s *self = container_of(napi, struct aq_vec_s, napi); in aq_vec_poll()
73 napi, in aq_vec_poll()
98 napi_complete_done(napi, work_done); in aq_vec_poll()
127 netif_napi_add(aq_nic_get_ndev(aq_nic), &self->napi, in aq_vec_alloc()
240 napi_enable(&self->napi); in aq_vec_start()
260 napi_disable(&self->napi); in aq_vec_stop()
285 netif_napi_del(&self->napi); in aq_vec_free()
321 napi_schedule(&self->napi); in aq_vec_isr()
[all …]
/kernel/linux/linux-6.6/drivers/net/caif/
Dcaif_virtio.c30 /* NAPI schedule quota */
41 /* struct cfv_napi_contxt - NAPI context info
54 * @rx_napi_complete: Number of NAPI completions (RX)
84 * @napi: Napi context used in cfv_rx_poll()
111 struct napi_struct napi; member
250 static int cfv_rx_poll(struct napi_struct *napi, int quota) in cfv_rx_poll() argument
252 struct cfv_info *cfv = container_of(napi, struct cfv_info, napi); in cfv_rx_poll()
319 napi_complete(napi); in cfv_rx_poll()
321 napi_schedule_prep(napi)) { in cfv_rx_poll()
323 __napi_schedule(napi); in cfv_rx_poll()
[all …]
/kernel/linux/linux-5.10/drivers/net/caif/
Dcaif_virtio.c30 /* NAPI schedule quota */
41 /* struct cfv_napi_contxt - NAPI context info
54 * @rx_napi_complete: Number of NAPI completions (RX)
84 * @napi: Napi context used in cfv_rx_poll()
111 struct napi_struct napi; member
250 static int cfv_rx_poll(struct napi_struct *napi, int quota) in cfv_rx_poll() argument
252 struct cfv_info *cfv = container_of(napi, struct cfv_info, napi); in cfv_rx_poll()
319 napi_complete(napi); in cfv_rx_poll()
321 napi_schedule_prep(napi)) { in cfv_rx_poll()
323 __napi_schedule(napi); in cfv_rx_poll()
[all …]
/kernel/linux/linux-6.6/include/net/page_pool/
Dtypes.h29 * use-case. The NAPI budget is 64 packets. After a NAPI poll the RX
35 * this array, as it shares the same softirq/NAPI protection. If
53 * @napi: NAPI which is the sole consumer of pages, otherwise NULL
64 struct napi_struct *napi; member
151 * Softirq/BH scheduling and napi_schedule. NAPI schedule
177 * protected by NAPI, due to above pp_alloc_cache. This
233 /* Caller must provide appropriate safe context, e.g. NAPI. */

12345678910>>...47