summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSubash Abhinov Kasiviswanathan <subashab@codeaurora.org>2021-07-14 22:08:01 -0700
committerSubash Abhinov Kasiviswanathan <subashab@codeaurora.org>2021-07-18 12:25:22 -0600
commit2bb9cb1f3c08ad356095a19ee340983a8816e6af (patch)
treeb9d37822246f5415ba3b397aa6dc30c342ce6bb4
parent1667d90ff51d06207ac82a4ace78572c5429e517 (diff)
downloaddatarmnet-2bb9cb1f3c08ad356095a19ee340983a8816e6af.tar.gz
core: Add a stat to track chaining frags
Keep count of single fragments and other fragment counts in increments of 6 upto the maximum possible 16. CRs-Fixed: 2992022 Change-Id: I1b1c474e51cf1fe8856d53511ae7c374caa0b4a2 Signed-off-by: Subash Abhinov Kasiviswanathan <subashab@codeaurora.org>
-rwxr-xr-xcore/rmnet_config.h2
-rw-r--r--core/rmnet_descriptor.c22
-rw-r--r--core/rmnet_vnd.c6
3 files changed, 30 insertions, 0 deletions
diff --git a/core/rmnet_config.h b/core/rmnet_config.h
index 003cff1..e1efa32 100755
--- a/core/rmnet_config.h
+++ b/core/rmnet_config.h
@@ -61,6 +61,8 @@ struct rmnet_port_priv_stats {
u64 dl_trl_count;
struct rmnet_agg_stats agg;
u64 dl_chain_stat[7];
+ u64 dl_frag_stat_1;
+ u64 dl_frag_stat[5];
};
struct rmnet_egress_agg_params {
diff --git a/core/rmnet_descriptor.c b/core/rmnet_descriptor.c
index c8ccea5..78517d4 100644
--- a/core/rmnet_descriptor.c
+++ b/core/rmnet_descriptor.c
@@ -1771,6 +1771,26 @@ void rmnet_descriptor_classify_chain_count(u64 chain_count,
port->stats.dl_chain_stat[index] += chain_count;
}
+void rmnet_descriptor_classify_frag_count(u64 frag_count,
+ struct rmnet_port *port)
+{
+ u64 index;
+
+ if (frag_count <= 1) {
+ port->stats.dl_frag_stat_1 += frag_count;
+ return;
+ }
+
+ if (frag_count >= 16) {
+ port->stats.dl_frag_stat[4] += frag_count;
+ return;
+ }
+
+ index = frag_count;
+ do_div(index, 4);
+ port->stats.dl_frag_stat[index] += frag_count;
+}
+
void rmnet_frag_ingress_handler(struct sk_buff *skb,
struct rmnet_port *port)
{
@@ -1786,6 +1806,8 @@ void rmnet_frag_ingress_handler(struct sk_buff *skb,
struct sk_buff *skb_frag;
chain_count++;
+ rmnet_descriptor_classify_frag_count(skb_shinfo(skb)->nr_frags,
+ port);
rmnet_frag_deaggregate(skb, port, &desc_list, skb->priority);
if (!list_empty(&desc_list)) {
diff --git a/core/rmnet_vnd.c b/core/rmnet_vnd.c
index 89cee6c..2aab2ba 100644
--- a/core/rmnet_vnd.c
+++ b/core/rmnet_vnd.c
@@ -440,6 +440,12 @@ static const char rmnet_port_gstrings_stats[][ETH_GSTRING_LEN] = {
"DL chaining [40-50)",
"DL chaining [50-60)",
"DL chaining >= 60",
+ "DL chaining frags [0-1]",
+ "DL chaining frags [2-3]",
+ "DL chaining frags [4-7]",
+ "DL chaining frags [8-11]",
+ "DL chaining frags [12-15]",
+ "DL chaining frags = 16",
};
static const char rmnet_ll_gstrings_stats[][ETH_GSTRING_LEN] = {