mirror of https://gitee.com/openkylin/linux.git
i40e/i40evf: use napi_schedule_irqoff()
The i40e_intr and i40e/i40evf_msix_clean_rings functions run from hard interrupt context or with interrupts already disabled in netpoll. They can use napi_schedule_irqoff() instead of napi_schedule() Signed-off-by: Alexander Duyck <aduyck@mirantis.com> Tested-by: Andrew Bowers <andrewx.bowers@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
This commit is contained in:
parent
07f89be81f
commit
5d3465a1e4
|
@ -3267,7 +3267,7 @@ static irqreturn_t i40e_msix_clean_rings(int irq, void *data)
|
|||
if (!q_vector->tx.ring && !q_vector->rx.ring)
|
||||
return IRQ_HANDLED;
|
||||
|
||||
napi_schedule(&q_vector->napi);
|
||||
napi_schedule_irqoff(&q_vector->napi);
|
||||
|
||||
return IRQ_HANDLED;
|
||||
}
|
||||
|
@ -3436,6 +3436,8 @@ static irqreturn_t i40e_intr(int irq, void *data)
|
|||
|
||||
/* only q0 is used in MSI/Legacy mode, and none are used in MSIX */
|
||||
if (icr0 & I40E_PFINT_ICR0_QUEUE_0_MASK) {
|
||||
struct i40e_vsi *vsi = pf->vsi[pf->lan_vsi];
|
||||
struct i40e_q_vector *q_vector = vsi->q_vectors[0];
|
||||
|
||||
/* temporarily disable queue cause for NAPI processing */
|
||||
u32 qval = rd32(hw, I40E_QINT_RQCTL(0));
|
||||
|
@ -3448,7 +3450,7 @@ static irqreturn_t i40e_intr(int irq, void *data)
|
|||
wr32(hw, I40E_QINT_TQCTL(0), qval);
|
||||
|
||||
if (!test_bit(__I40E_DOWN, &pf->state))
|
||||
napi_schedule(&pf->vsi[pf->lan_vsi]->q_vectors[0]->napi);
|
||||
napi_schedule_irqoff(&q_vector->napi);
|
||||
}
|
||||
|
||||
if (icr0 & I40E_PFINT_ICR0_ADMINQ_MASK) {
|
||||
|
|
|
@ -334,7 +334,7 @@ static irqreturn_t i40evf_msix_clean_rings(int irq, void *data)
|
|||
if (!q_vector->tx.ring && !q_vector->rx.ring)
|
||||
return IRQ_HANDLED;
|
||||
|
||||
napi_schedule(&q_vector->napi);
|
||||
napi_schedule_irqoff(&q_vector->napi);
|
||||
|
||||
return IRQ_HANDLED;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue