ionic: remove intr coalesce update from napi
[ Upstream commit a6ff85e0a2d9d074a4b4c291ba9ec1e5b0aba22b ]
Move the interrupt coalesce value update out of the napi
thread and into the dim_work thread and set it only when it
has actually changed.
Fixes: 04a834592b
("ionic: dynamic interrupt moderation")
Signed-off-by: Shannon Nelson <snelson@pensando.io>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:

committed by
Greg Kroah-Hartman

parent
6961323eed
commit
a7c85a516c
@@ -52,7 +52,19 @@ static void ionic_dim_work(struct work_struct *work)
|
|||||||
cur_moder = net_dim_get_rx_moderation(dim->mode, dim->profile_ix);
|
cur_moder = net_dim_get_rx_moderation(dim->mode, dim->profile_ix);
|
||||||
qcq = container_of(dim, struct ionic_qcq, dim);
|
qcq = container_of(dim, struct ionic_qcq, dim);
|
||||||
new_coal = ionic_coal_usec_to_hw(qcq->q.lif->ionic, cur_moder.usec);
|
new_coal = ionic_coal_usec_to_hw(qcq->q.lif->ionic, cur_moder.usec);
|
||||||
qcq->intr.dim_coal_hw = new_coal ? new_coal : 1;
|
new_coal = new_coal ? new_coal : 1;
|
||||||
|
|
||||||
|
if (qcq->intr.dim_coal_hw != new_coal) {
|
||||||
|
unsigned int qi = qcq->cq.bound_q->index;
|
||||||
|
struct ionic_lif *lif = qcq->q.lif;
|
||||||
|
|
||||||
|
qcq->intr.dim_coal_hw = new_coal;
|
||||||
|
|
||||||
|
ionic_intr_coal_init(lif->ionic->idev.intr_ctrl,
|
||||||
|
lif->rxqcqs[qi]->intr.index,
|
||||||
|
qcq->intr.dim_coal_hw);
|
||||||
|
}
|
||||||
|
|
||||||
dim->state = DIM_START_MEASURE;
|
dim->state = DIM_START_MEASURE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -429,10 +429,6 @@ static void ionic_dim_update(struct ionic_qcq *qcq)
|
|||||||
lif = qcq->q.lif;
|
lif = qcq->q.lif;
|
||||||
qi = qcq->cq.bound_q->index;
|
qi = qcq->cq.bound_q->index;
|
||||||
|
|
||||||
ionic_intr_coal_init(lif->ionic->idev.intr_ctrl,
|
|
||||||
lif->rxqcqs[qi]->intr.index,
|
|
||||||
qcq->intr.dim_coal_hw);
|
|
||||||
|
|
||||||
dim_update_sample(qcq->cq.bound_intr->rearm_count,
|
dim_update_sample(qcq->cq.bound_intr->rearm_count,
|
||||||
lif->txqstats[qi].pkts,
|
lif->txqstats[qi].pkts,
|
||||||
lif->txqstats[qi].bytes,
|
lif->txqstats[qi].bytes,
|
||||||
|
Reference in New Issue
Block a user