Received: by 2002:a05:6a10:c7c6:0:0:0:0 with SMTP id h6csp1647911pxy; Mon, 2 Aug 2021 07:03:05 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzRnwX1QTp/w0F55X36rNnK/hOKMXljDQloCbsmmLogueAya/BfDGcuio/DtlrvWSQPUV6w X-Received: by 2002:a05:6602:1814:: with SMTP id t20mr4606569ioh.204.1627912985706; Mon, 02 Aug 2021 07:03:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1627912985; cv=none; d=google.com; s=arc-20160816; b=K/eOzQ88vkg0RnJ0UvroQMfYleWMjhtGcnDgoWSRh8nbmFeXWjyQr39qSIkFzYqIt9 oNo3WcuOxRb51U7Rhzqg9iF65NuUCNhpC81B0PzRoo/IDTuBDdIQDPiY4d8oY6Z2CidC nMAGJspnetwaTxBtQOUJm741qZauOz7SP9E0I0BTjKNVI7tTSgvmNyTRMQxndrfZpNrL Jto9U1AN2SJisyNNl4iNjJTHPC+hIG8BxzzD1n/kWf+4y76JHLSsYNWf6fhjQS/RshcS luUnuG+WtYyarIZwN42fbE+y/8Qz0VDlZpahCN6L3O2FXyD39pvFmDLL9Hu85VITfRvK Sl1g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=lgohj4ajRr0eyO+Cts4gB2naZBqZFxifgyx3iCtWY24=; b=0+y6OD895rYgNH7ewTyEulxA8Q8fX7F/IQ3j+e58GLcgVEHRAF19UJZ7yG8LCsQ1v8 uBoWJRZ7Jm9bX8zLNEuUxyyIeldax+7lOuy67pWdmpocTG7AHWS2SBrd8gEjObth8lfR RGXrh7WCO4KoYJXEo7ugYD44JDNZovNscNn8/lX5fIMCEptTc/mlvDp9FX4AojGgTbdp vdgxS8O9Bj9DUd2LJpT5pqqwV/4X6cilIw9vTNVCTil43Z+eV/4xrRl0o5edYY8cn1Zv 9o4ejsNGC1dQOTagtNYe2OYeStckha/IBfbcdhgTVFD/zTer/tDz5r9aymBFDUrOBgjP aoUQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=ZQCBtt+h; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id k14si12231684ion.22.2021.08.02.07.02.53; Mon, 02 Aug 2021 07:03:05 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=ZQCBtt+h; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235833AbhHBOAh (ORCPT + 99 others); Mon, 2 Aug 2021 10:00:37 -0400 Received: from mail.kernel.org ([198.145.29.99]:34364 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236114AbhHBNy6 (ORCPT ); Mon, 2 Aug 2021 09:54:58 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 6A7E961132; Mon, 2 Aug 2021 13:53:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1627912397; bh=3Rb9xnnj8msVK0vQ8fw2U8uSV00cjfyyUzZWgEEvkk8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ZQCBtt+hEBxKIbxpqp8gx3t6h4jQJD2dP/pHQI14DyBhS5Np6vg9iD85wF4n+hmmm DeQ0P0NPqZVKc/VOD/pGmM942yaeKJfcRVOGYX/OHr6zVLvJ9Y7rBItThnhQNIWgeu ntk0A/eUNiPErxWe6JUc84IERPYfjNC1sMyM0xFs= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Shannon Nelson , "David S. Miller" , Sasha Levin Subject: [PATCH 5.10 41/67] ionic: remove intr coalesce update from napi Date: Mon, 2 Aug 2021 15:45:04 +0200 Message-Id: <20210802134340.413057912@linuxfoundation.org> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210802134339.023067817@linuxfoundation.org> References: <20210802134339.023067817@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Shannon Nelson [ 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: 04a834592bf5 ("ionic: dynamic interrupt moderation") Signed-off-by: Shannon Nelson Signed-off-by: David S. Miller Signed-off-by: Sasha Levin --- drivers/net/ethernet/pensando/ionic/ionic_lif.c | 14 +++++++++++++- drivers/net/ethernet/pensando/ionic/ionic_txrx.c | 4 ---- 2 files changed, 13 insertions(+), 5 deletions(-) diff --git a/drivers/net/ethernet/pensando/ionic/ionic_lif.c b/drivers/net/ethernet/pensando/ionic/ionic_lif.c index d0ae1cf43592..6dc7ce649448 100644 --- a/drivers/net/ethernet/pensando/ionic/ionic_lif.c +++ b/drivers/net/ethernet/pensando/ionic/ionic_lif.c @@ -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); qcq = container_of(dim, struct ionic_qcq, dim); 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; } diff --git a/drivers/net/ethernet/pensando/ionic/ionic_txrx.c b/drivers/net/ethernet/pensando/ionic/ionic_txrx.c index 909eca14f647..ec064327c998 100644 --- a/drivers/net/ethernet/pensando/ionic/ionic_txrx.c +++ b/drivers/net/ethernet/pensando/ionic/ionic_txrx.c @@ -429,10 +429,6 @@ static void ionic_dim_update(struct ionic_qcq *qcq) lif = qcq->q.lif; 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, lif->txqstats[qi].pkts, lif->txqstats[qi].bytes, -- 2.30.2