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

Commit 94d3f634 authored by Sean Tranchetti's avatar Sean Tranchetti
Browse files

rmnet: Control DL csum offload with RXCSUM



Similar to the UL direction, allow the hardware checksum offload support
to be toggled off with the NETIF_F_RXCSUM flag though ethtool.

Change-Id: I38e43cf9c13363eee340793878be7639f18254e3
Signed-off-by: default avatarSean Tranchetti <stranche@codeaurora.org>
parent 0daa9b15
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -1036,7 +1036,9 @@ int rmnet_frag_process_next_hdr_packet(struct rmnet_frag_descriptor *frag_desc,
			rmnet_recycle_frag_descriptor(frag_desc, port);
		break;
	case RMNET_MAP_HEADER_TYPE_CSUM_OFFLOAD:
		if (rmnet_frag_get_csum_valid(frag_desc)) {
		if (unlikely(!(frag_desc->dev->features & NETIF_F_RXCSUM))) {
			priv->stats.csum_sw++;
		} else if (rmnet_frag_get_csum_valid(frag_desc)) {
			priv->stats.csum_ok++;
			frag_desc->csum_valid = true;
		} else {
+3 −1
Original line number Diff line number Diff line
@@ -1172,7 +1172,9 @@ int rmnet_map_process_next_hdr_packet(struct sk_buff *skb,
			consume_skb(skb);
		break;
	case RMNET_MAP_HEADER_TYPE_CSUM_OFFLOAD:
		if (rmnet_map_get_csum_valid(skb)) {
		if (unlikely(!(skb->dev->features & NETIF_F_RXCSUM))) {
			priv->stats.csum_sw++;
		} else if (rmnet_map_get_csum_valid(skb)) {
			priv->stats.csum_ok++;
			skb->ip_summed = CHECKSUM_UNNECESSARY;
		} else {