Skip to content

Commit 4115ba6

Browse files
brettcreeleykuba-moo
authored andcommitted
ionic: Fix dim work handling in split interrupt mode
Currently ionic_dim_work() is incorrect when in split interrupt mode. This is because the interrupt rate is only being changed for the Rx side even for dim running on Tx. Fix this by using the qcq from the container_of macro. Also, introduce some local variables for a bit of cleanup. Fixes: a6ff85e ("ionic: remove intr coalesce update from napi") Signed-off-by: Brett Creeley <[email protected]> Signed-off-by: Shannon Nelson <[email protected]> Reviewed-by: Florian Fainelli <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Jakub Kicinski <[email protected]>
1 parent 0ceb386 commit 4115ba6

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

drivers/net/ethernet/pensando/ionic/ionic_lif.c

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -49,24 +49,24 @@ static void ionic_lif_queue_identify(struct ionic_lif *lif);
4949
static void ionic_dim_work(struct work_struct *work)
5050
{
5151
struct dim *dim = container_of(work, struct dim, work);
52+
struct ionic_intr_info *intr;
5253
struct dim_cq_moder cur_moder;
5354
struct ionic_qcq *qcq;
55+
struct ionic_lif *lif;
5456
u32 new_coal;
5557

5658
cur_moder = net_dim_get_rx_moderation(dim->mode, dim->profile_ix);
5759
qcq = container_of(dim, struct ionic_qcq, dim);
58-
new_coal = ionic_coal_usec_to_hw(qcq->q.lif->ionic, cur_moder.usec);
60+
lif = qcq->q.lif;
61+
new_coal = ionic_coal_usec_to_hw(lif->ionic, cur_moder.usec);
5962
new_coal = new_coal ? new_coal : 1;
6063

61-
if (qcq->intr.dim_coal_hw != new_coal) {
62-
unsigned int qi = qcq->cq.bound_q->index;
63-
struct ionic_lif *lif = qcq->q.lif;
64-
65-
qcq->intr.dim_coal_hw = new_coal;
64+
intr = &qcq->intr;
65+
if (intr->dim_coal_hw != new_coal) {
66+
intr->dim_coal_hw = new_coal;
6667

6768
ionic_intr_coal_init(lif->ionic->idev.intr_ctrl,
68-
lif->rxqcqs[qi]->intr.index,
69-
qcq->intr.dim_coal_hw);
69+
intr->index, intr->dim_coal_hw);
7070
}
7171

7272
dim->state = DIM_START_MEASURE;

0 commit comments

Comments
 (0)