From: Alex Elder <elder@linaro.org>
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 [thread overview]
Message-ID: <20220613171759.578856-6-elder@linaro.org> (raw)
In-Reply-To: <20220613171759.578856-1-elder@linaro.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 <elder@linaro.org>
---
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
next prev parent reply other threads:[~2022-06-13 19:24 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-06-13 17:17 [PATCH net-next 0/6] net: ipa: simplify completion statistics Alex Elder
2022-06-13 17:17 ` [PATCH net-next 1/6] net: ipa: use "tre_ring" for all TRE ring local variables Alex Elder
2022-06-13 17:17 ` [PATCH net-next 2/6] net: ipa: rename two transaction fields Alex Elder
2022-06-13 17:17 ` [PATCH net-next 3/6] net: ipa: introduce gsi_trans_tx_committed() Alex Elder
2022-06-13 17:17 ` [PATCH net-next 4/6] net: ipa: simplify TX completion statistics Alex Elder
2022-06-13 17:17 ` Alex Elder [this message]
2022-06-13 17:17 ` [PATCH net-next 6/6] net: ipa: rework gsi_channel_tx_update() Alex Elder
2022-06-15 8:20 ` [PATCH net-next 0/6] net: ipa: simplify completion statistics patchwork-bot+netdevbpf
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20220613171759.578856-6-elder@linaro.org \
--to=elder@linaro.org \
--cc=bjorn.andersson@linaro.org \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=elder@kernel.org \
--cc=evgreen@chromium.org \
--cc=kuba@kernel.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mka@chromium.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=quic_avuyyuru@quicinc.com \
--cc=quic_cpratapa@quicinc.com \
--cc=quic_jponduru@quicinc.com \
--cc=quic_subashab@quicinc.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox