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

Commit 0f0aee72 authored by Ravinder Konka's avatar Ravinder Konka
Browse files

msm_rmnet_bam: changes to use netif_rx in place of netif_rx_ni



As per current implementation, we use netif_rx_ni for all
the packets which might give undue advantage to DL traffic
causing delays in UL traffic, especially TCP ACKs. This
results in tput drops. To avoid this, we can use netif_rx
in place of netif_rx_ni so that we process all the packets
in same context and there is no advantage for any data.
Also, we can invoke netif_rx_ni for every nth packet, this
value n can be configurable since it is defined as a module
parameter.

Change-Id: I413c2a284708b10b93bc176f36d039d4199a8065
Acked-by: default avatarMohit Pahuja <mpahuja@qti.qualcomm.com>
Signed-off-by: default avatarRavinder Konka <rkonka@codeaurora.org>
parent 5684450d
Loading
Loading
Loading
Loading
+14 −1
Original line number Diff line number Diff line
@@ -45,6 +45,11 @@ module_param(msm_rmnet_bam_headroom_check_failure, ulong, S_IRUGO);
MODULE_PARM_DESC(msm_rmnet_bam_headroom_check_failure,
		 "Number of packets with insufficient headroom");

/* Packet threshold. */
static unsigned int pkt_threshold = 1;
module_param(pkt_threshold,
	     uint, S_IRUGO | S_IWUSR | S_IWGRP);

#define DEBUG_MASK_LVL0 (1U << 0)
#define DEBUG_MASK_LVL1 (1U << 1)
#define DEBUG_MASK_LVL2 (1U << 2)
@@ -226,7 +231,15 @@ static void bam_recv_notify(void *dev, struct sk_buff *skb)
			p->stats.rx_packets, skb->len);

		/* Deliver to network stack */
		if (pkt_threshold == 1) {
			netif_rx_ni(skb);
		} else {
			/* For every nth packet, use netif_rx_ni(). */
			if (p->stats.rx_packets % pkt_threshold == 0)
				netif_rx_ni(skb);
			else
				netif_rx(skb);
		}
	} else
		pr_err("[%s] %s: No skb received",
			((struct net_device *)dev)->name, __func__);