Received: by 2002:a6b:fb09:0:0:0:0:0 with SMTP id h9csp794141iog; Mon, 13 Jun 2022 13:08:42 -0700 (PDT) X-Google-Smtp-Source: AGRyM1vSiGlXZMNom+dEniIOGB8FfrF7pGdvE9W1SfU1COpF085b8QaHRJom/iFC40da7rSrFQMh X-Received: by 2002:a17:90a:488c:b0:1c7:b62e:8e8c with SMTP id b12-20020a17090a488c00b001c7b62e8e8cmr424464pjh.157.1655150922696; Mon, 13 Jun 2022 13:08:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1655150922; cv=none; d=google.com; s=arc-20160816; b=Tk0CvIA3vrLLKN1nGPv4XAiHHG7OOq9nzyzfL9eSrws/FpiK0ADH7pdlx6jTKw/RCM JtDmraPYUoX9Zu2oNpbJfmVVHYLtEAlv0+nzPz7AB4xG71DtaNt4yVk5ccWAAajqnWQA 5CrjevjX+cBV9IN+lPhGFhmyeNrmGX38+88KiIaJJM60sUuSPRrv3w0RjQQ3rTBE/1eF 4NAj9NVC/NoHaWpsg9gKUnFnhhQo09GXQu5HWPxpQdxIgocqRru55EQ36/gFs2zMyu0+ zILHGrQ+DZ8Phc/CoQdjhNeEBDaD/ok22g7FCLtF+8qRXlv94kii4BwEr9MVf31h8CXc BzTA== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=qCvC/gb8V8fECBsNeP2ccfvKaZ3jzeuxKm8/lAah6es=; b=VHnQbuIcB+ReWSrqK0QIMl/gzyi+JnSKMp3OB6RvwgfTUnSwPwDq+LuQK6cNdojEEL S5Y/nj9rKpDcPjwHwePg6Y4DX0yURYtSMMV5WkY1poNHFe5QZ17fLiiSc8qaKKsAKcE2 uZw3gm0IP8BIeTh9RaUJJiatKeEyJl0t9uRe7Sz2k6J0gRi8C7sjBgf19M0Q8LTrHAzg gK9zLuA5rTlu+xDi0/pgTZop+RGw3M1QAO8b9rH171YkkkZYd0bSc3d2eoJmXsCvclUX aRNvuOWczRbbpYAonSvD9y/v9KYhaqHWnv6TM+DuZANYUW4D8pMuM6VowFJG7c2cby/j awkw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=JeWQv4aS; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id d9-20020a056a00244900b0052299bce8fdsi405211pfj.216.2022.06.13.13.08.30; Mon, 13 Jun 2022 13:08:42 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=JeWQv4aS; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1349412AbiFMTYQ (ORCPT + 99 others); Mon, 13 Jun 2022 15:24:16 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44832 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1349535AbiFMTWU (ORCPT ); Mon, 13 Jun 2022 15:22:20 -0400 Received: from mail-pj1-x1029.google.com (mail-pj1-x1029.google.com [IPv6:2607:f8b0:4864:20::1029]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BF90032072 for ; Mon, 13 Jun 2022 10:18:12 -0700 (PDT) Received: by mail-pj1-x1029.google.com with SMTP id g10-20020a17090a708a00b001ea8aadd42bso6631616pjk.0 for ; Mon, 13 Jun 2022 10:18:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=qCvC/gb8V8fECBsNeP2ccfvKaZ3jzeuxKm8/lAah6es=; b=JeWQv4aSZy+O2cZxsGMbsgJn5bVOigH7tXE9IA96vfg6/XH7Rm8GbjyIelcLUNrrSc hTatJU8NTiUKeILq/kNFHf4VeFZHJNUnBcwmlDMBiQQtq7IkqFTSXQ9mAFz7KH7Bl+2h XwyNU57gxcooV0RfxWHiZ6jaBchMhPmOkUqDpPTmShFDiFy6XobZN2quWxaaAzyEMm00 7p5Tbggf16ga4S+n9v9p71pLhN1uRuX+cFw1JZ4yVIa+A64wQHYeJW7Xqvr0IxySdN9b VbH9FL+sk450DH8fJQsmf3Mizt2npnc7sjtOnKuAPiRyoYGIXD2ABP29Vjwk9QZt+mKu t8/w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=qCvC/gb8V8fECBsNeP2ccfvKaZ3jzeuxKm8/lAah6es=; b=L29gUr/eDyI9JFAELDiZkKn+UFWAp20Z7KNACMazp1zS7bT5k3lHK1LTaY5OdKsv8I hLw6N8fhrARRKEQWDZLX5+644Y07/kg1GprD0QOi2hOdsz+NixjX8kbTnkJE6dmYrRwA zLAJml+PLx4qttVKMzoCv4fOdGGdP9sqVXRFUVGqziKWiqdk+IkEaaiAZnEyCi9b5Fve Qm30KVWDsUo7/Q9js+l558ejH5gEWGEqVKRNYve69MNkc8hizd1ap5wlkQqhfF/dlW72 pYErgdl3jXjS/mQcUcCOBqes/rhOZZ8jBzaDM6AfXFRJeXdeXcKP0SHxfuEiH8vEZdol KH1Q== X-Gm-Message-State: AOAM530xg7/EGTgpqw5Z4n6kXy1F37LZMEPEKb4xG/g9XHbPjWWony4C CtuXVmDmAGYcAFIjrCthIR7Jfg== X-Received: by 2002:a17:90b:a53:b0:1ea:750e:93db with SMTP id gw19-20020a17090b0a5300b001ea750e93dbmr17143228pjb.66.1655140692442; Mon, 13 Jun 2022 10:18:12 -0700 (PDT) Received: from localhost.localdomain ([192.77.111.2]) by smtp.gmail.com with ESMTPSA id u17-20020a62d451000000b0050dc762812csm5646641pfl.6.2022.06.13.10.18.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 13 Jun 2022 10:18:12 -0700 (PDT) From: Alex Elder To: davem@davemloft.net, edumazet@google.com, kuba@kernel.org, pabeni@redhat.com Cc: mka@chromium.org, evgreen@chromium.org, bjorn.andersson@linaro.org, quic_cpratapa@quicinc.com, quic_avuyyuru@quicinc.com, quic_jponduru@quicinc.com, quic_subashab@quicinc.com, elder@kernel.org, netdev@vger.kernel.org, linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH net-next 5/6] net: ipa: stop counting total RX bytes and transactions Date: Mon, 13 Jun 2022 12:17:58 -0500 Message-Id: <20220613171759.578856-6-elder@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220613171759.578856-1-elder@linaro.org> References: <20220613171759.578856-1-elder@linaro.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=1.2 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, RCVD_IN_SBL_CSS,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Level: * X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org In gsi_evt_ring_rx_update(), we update each transaction so its len field reflects the actual number of bytes received. In the process, the total number of transactions and bytes processed on the channel are summed, and added to a running total for the channel. But we don't actually use those running totals for RX endpoints. They're maintained for TX channels to support CoDel when they are associated with a "real" network device. So stop maintaining these totals for RX endpoints, and update the comment where the fields are defined to make it clear they're only valid for TX channels. Signed-off-by: Alex Elder --- drivers/net/ipa/gsi.c | 8 -------- drivers/net/ipa/gsi.h | 2 +- 2 files changed, 1 insertion(+), 9 deletions(-) diff --git a/drivers/net/ipa/gsi.c b/drivers/net/ipa/gsi.c index 4f8187c543824..c2cafd9247a70 100644 --- a/drivers/net/ipa/gsi.c +++ b/drivers/net/ipa/gsi.c @@ -1374,8 +1374,6 @@ static void gsi_evt_ring_rx_update(struct gsi_evt_ring *evt_ring, u32 index) struct gsi_event *event_done; struct gsi_event *event; struct gsi_trans *trans; - u32 trans_count = 0; - u32 byte_count = 0; u32 event_avail; u32 old_index; @@ -1399,8 +1397,6 @@ static void gsi_evt_ring_rx_update(struct gsi_evt_ring *evt_ring, u32 index) event_done = gsi_ring_virt(ring, index); do { trans->len = __le16_to_cpu(event->len); - byte_count += trans->len; - trans_count++; /* Move on to the next event and transaction */ if (--event_avail) @@ -1409,10 +1405,6 @@ static void gsi_evt_ring_rx_update(struct gsi_evt_ring *evt_ring, u32 index) event = gsi_ring_virt(ring, 0); trans = gsi_trans_pool_next(&trans_info->pool, trans); } while (event != event_done); - - /* We record RX bytes when they are received */ - channel->byte_count += byte_count; - channel->trans_count += trans_count; } /* Initialize a ring, including allocating DMA memory for its entries */ diff --git a/drivers/net/ipa/gsi.h b/drivers/net/ipa/gsi.h index 89dac7fc8c4cb..bad1a78a96ede 100644 --- a/drivers/net/ipa/gsi.h +++ b/drivers/net/ipa/gsi.h @@ -117,9 +117,9 @@ struct gsi_channel { struct gsi_ring tre_ring; u32 evt_ring_id; + /* The following counts are used only for TX endpoints */ u64 byte_count; /* total # bytes transferred */ u64 trans_count; /* total # transactions */ - /* The following counts are used only for TX endpoints */ u64 queued_byte_count; /* last reported queued byte count */ u64 queued_trans_count; /* ...and queued trans count */ u64 compl_byte_count; /* last reported completed byte count */ -- 2.34.1