Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 6e3dd573 authored by Sean Tranchetti's avatar Sean Tranchetti
Browse files

net: ethernet: qualcomm: rmnet: Track RSB/RSC byte counts



Allows calculation of the average buffer utilization for RSB/RSC packets.

Change-Id: Id719b97ceffc62b1b9ce28bfab8ec32c6604529c
Signed-off-by: default avatarSean Tranchetti <stranche@codeaurora.org>
parent ceb47a0e
Loading
Loading
Loading
Loading
+4 −0
Original line number Original line Diff line number Diff line
@@ -131,6 +131,10 @@ struct rmnet_coal_stats {
	u64 coal_trans_invalid;
	u64 coal_trans_invalid;
	struct rmnet_coal_close_stats close;
	struct rmnet_coal_close_stats close;
	u64 coal_veid[RMNET_MAX_VEID];
	u64 coal_veid[RMNET_MAX_VEID];
	u64 coal_tcp;
	u64 coal_tcp_bytes;
	u64 coal_udp;
	u64 coal_udp_bytes;
};
};


struct rmnet_priv_stats {
struct rmnet_priv_stats {
+6 −0
Original line number Original line Diff line number Diff line
@@ -805,11 +805,17 @@ rmnet_frag_segment_coal_data(struct rmnet_frag_descriptor *coal_desc,


		th = (struct tcphdr *)((u8 *)iph + coal_desc->ip_len);
		th = (struct tcphdr *)((u8 *)iph + coal_desc->ip_len);
		coal_desc->trans_len = th->doff * 4;
		coal_desc->trans_len = th->doff * 4;
		priv->stats.coal.coal_tcp++;
		priv->stats.coal.coal_tcp_bytes +=
			skb_frag_size(&coal_desc->frag);
	} else if (coal_desc->trans_proto == IPPROTO_UDP) {
	} else if (coal_desc->trans_proto == IPPROTO_UDP) {
		struct udphdr *uh;
		struct udphdr *uh;


		uh = (struct udphdr *)((u8 *)iph + coal_desc->ip_len);
		uh = (struct udphdr *)((u8 *)iph + coal_desc->ip_len);
		coal_desc->trans_len = sizeof(*uh);
		coal_desc->trans_len = sizeof(*uh);
		priv->stats.coal.coal_udp++;
		priv->stats.coal.coal_udp_bytes +=
			skb_frag_size(&coal_desc->frag);
		if (coal_desc->ip_proto == 4 && !uh->check)
		if (coal_desc->ip_proto == 4 && !uh->check)
			zero_csum = true;
			zero_csum = true;
	} else {
	} else {
+4 −0
Original line number Original line Diff line number Diff line
@@ -223,6 +223,10 @@ static const char rmnet_gstrings_stats[][ETH_GSTRING_LEN] = {
	"Coalescing packets over VEID1",
	"Coalescing packets over VEID1",
	"Coalescing packets over VEID2",
	"Coalescing packets over VEID2",
	"Coalescing packets over VEID3",
	"Coalescing packets over VEID3",
	"Coalescing TCP frames",
	"Coalescing TCP bytes",
	"Coalescing UDP frames",
	"Coalescing UDP bytes",
	"Uplink priority packets",
	"Uplink priority packets",
};
};