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

Commit 4c1a5c14 authored by Subash Abhinov Kasiviswanathan's avatar Subash Abhinov Kasiviswanathan Committed by Gerrit - the friendly Code Review server
Browse files

net: qualcomm: rmnet: Add stat for TX csum offloaded packet



This stat keeps count of packets in transmit path whose checksum
will be computed in hardware.

Sample output-

:/ # ethtool -S rmnet_data0 | grep hardware
     Checksum computed in hardware: 1200720

CRs-Fixed: 2341450
Change-Id: Ie7c45371d1ecb698e4182fca941ce880afe789c5
Signed-off-by: default avatarSubash Abhinov Kasiviswanathan <subashab@codeaurora.org>
parent 90ed92ec
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -91,6 +91,7 @@ struct rmnet_priv_stats {
	u64 csum_fragmented_pkt;
	u64 csum_skipped;
	u64 csum_sw;
	u64 csum_hw;
};

struct rmnet_priv {
+2 −0
Original line number Diff line number Diff line
@@ -423,10 +423,12 @@ void rmnet_map_checksum_uplink_packet(struct sk_buff *skb,

		if (skb->protocol == htons(ETH_P_IP)) {
			rmnet_map_ipv4_ul_csum_header(iphdr, ul_header, skb);
			priv->stats.csum_hw++;
			return;
		} else if (skb->protocol == htons(ETH_P_IPV6)) {
#if IS_ENABLED(CONFIG_IPV6)
			rmnet_map_ipv6_ul_csum_header(iphdr, ul_header, skb);
			priv->stats.csum_hw++;
			return;
#else
			priv->stats.csum_err_invalid_ip_version++;
+1 −0
Original line number Diff line number Diff line
@@ -187,6 +187,7 @@ static const char rmnet_gstrings_stats[][ETH_GSTRING_LEN] = {
	"Checksum skipped on ip fragment",
	"Checksum skipped",
	"Checksum computed in software",
	"Checksum computed in hardware",
};

static const char rmnet_port_gstrings_stats[][ETH_GSTRING_LEN] = {