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

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

net: rmnet_data: Skip UL aggregation for non linear packets



Using UL aggregation for non linear data is not efficient since
we are copying data from a non linear segment to a linear buffer.
As a result, we lose the advantages of GSO and increase our RTT.

CRs-Fixed: 2117151
Change-Id: I7963c4a19531c53deaf5e50dc408ba3faea41c35
Signed-off-by: default avatarSubash Abhinov Kasiviswanathan <subashab@codeaurora.org>
parent 5b93813a
Loading
Loading
Loading
Loading
+7 −3
Original line number Diff line number Diff line
@@ -537,6 +537,7 @@ static int rmnet_map_egress_handler(struct sk_buff *skb,
{
	int required_headroom, additional_header_length, ckresult;
	struct rmnet_map_header_s *map_header;
	int non_linear_skb;

	additional_header_length = 0;

@@ -565,9 +566,11 @@ static int rmnet_map_egress_handler(struct sk_buff *skb,
		rmnet_stats_ul_checksum(ckresult);
	}

	non_linear_skb = (orig_dev->features & NETIF_F_GSO) &&
			 skb_is_nonlinear(skb);

	if ((!(config->egress_data_format &
	    RMNET_EGRESS_FORMAT_AGGREGATION)) ||
	    ((orig_dev->features & NETIF_F_GSO) && skb_is_nonlinear(skb)))
	    RMNET_EGRESS_FORMAT_AGGREGATION)) || non_linear_skb)
		map_header = rmnet_map_add_map_header
		(skb, additional_header_length, RMNET_MAP_NO_PAD_BYTES);
	else
@@ -589,7 +592,8 @@ static int rmnet_map_egress_handler(struct sk_buff *skb,

	skb->protocol = htons(ETH_P_MAP);

	if (config->egress_data_format & RMNET_EGRESS_FORMAT_AGGREGATION) {
	if ((config->egress_data_format & RMNET_EGRESS_FORMAT_AGGREGATION) &&
	    !non_linear_skb) {
		rmnet_map_aggregate(skb, config);
		return RMNET_MAP_CONSUMED;
	}