diff --git a/core/rmnet_config.h b/core/rmnet_config.h index 003cff160e..e1efa32b37 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 c8ccea592e..78517d4774 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 89cee6ceeb..2aab2bac43 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] = {