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

Commit 7cbc913d authored by Lina Wang's avatar Lina Wang Committed by yanjie.jiang
Browse files

[ALPS08839141] dpmaif: adopting LRO+GRO



[Description]
because LRO has limitation of 8 connections, during higher tput, more
than 8 connections will be used, then some connection will not hardware
LRO, which affects performance.so LRO +GRO will be used whatever tput.

[Test]
bootup pass & PDAS pass &tput--1Gbps~4Gbps pass

MTK-Commit-Id: 128bc4def3bb8abd68d5e45215f9bc867934c263

CR-Id: ALPS08839141
Feature: CCCI_HIF_DATA
Change-Id: I1da78552a7d3ec7f7d4634116154eb57b4f60f64
Signed-off-by: default avatarLina Wang <lina.wang@mediatek.com>
parent eff534c1
Loading
Loading
Loading
Loading
+1 −9
Original line number Diff line number Diff line
@@ -65,7 +65,6 @@ static unsigned long g_init_rps_value;
#define MAX_MTU                 3000
static unsigned long timeout_flush_num, clear_flush_num;
static u64 g_cur_dl_speed;
static u32 g_tcp_is_need_gro = 1;
/*
 * Register the sysctl to set tcp_pacing_shift.
 */
@@ -131,13 +130,6 @@ void ccmni_set_cur_speed(u64 cur_dl_speed)
}
EXPORT_SYMBOL(ccmni_set_cur_speed);

void ccmni_set_tcp_is_need_gro(u32 tcp_is_need_gro)
{
	g_tcp_is_need_gro = tcp_is_need_gro;
}
EXPORT_SYMBOL(ccmni_set_tcp_is_need_gro);


static inline int is_ack_skb(struct sk_buff *skb)
{
	struct tcphdr *tcph;
@@ -218,7 +210,7 @@ static int is_skb_gro(struct sk_buff *skb)
		protocol = ipv6_hdr(skb)->nexthdr;

	if (protocol == IPPROTO_TCP) {
		return g_tcp_is_need_gro;
		return 1;
	} else if (protocol == IPPROTO_UDP) {
		if (g_cur_dl_speed > 300000000LL) //>300Mbps
			return 1;
+0 −19
Original line number Diff line number Diff line
@@ -2677,9 +2677,6 @@ static void dpmaif_total_spd_cb(u64 total_ul_speed, u64 total_dl_speed)
		if (g_page_pool_is_on)
			atomic_set(&g_create_another_pp, 1);
#endif
		if (dpmaif_ctl->support_lro == 1)
			ccmni_set_tcp_is_need_gro(0);

#ifdef DPMAIF_REDUCE_RX_FLUSH
		g_rx_flush_pkt_cnt = 100;
#endif
@@ -2692,9 +2689,6 @@ static void dpmaif_total_spd_cb(u64 total_ul_speed, u64 total_dl_speed)
		if (g_page_pool_is_on)
			atomic_set(&g_create_another_pp, 1);
#endif
		if (dpmaif_ctl->support_lro == 1)
			ccmni_set_tcp_is_need_gro(0);

#ifdef DPMAIF_REDUCE_RX_FLUSH
		g_rx_flush_pkt_cnt = 60;
#endif
@@ -2707,9 +2701,6 @@ static void dpmaif_total_spd_cb(u64 total_ul_speed, u64 total_dl_speed)
		if (g_page_pool_is_on)
			atomic_set(&g_create_another_pp, 1);
#endif
		if (dpmaif_ctl->support_lro == 1)
			ccmni_set_tcp_is_need_gro(0);

#ifdef DPMAIF_REDUCE_RX_FLUSH
		g_rx_flush_pkt_cnt = 30;
#endif
@@ -2722,9 +2713,6 @@ static void dpmaif_total_spd_cb(u64 total_ul_speed, u64 total_dl_speed)
		if (g_page_pool_is_on)
			atomic_set(&g_create_another_pp, 1);
#endif
		if (dpmaif_ctl->support_lro == 1)
			ccmni_set_tcp_is_need_gro(1);

#ifdef DPMAIF_REDUCE_RX_FLUSH
		g_rx_flush_pkt_cnt = 20;
#endif
@@ -2737,9 +2725,6 @@ static void dpmaif_total_spd_cb(u64 total_ul_speed, u64 total_dl_speed)
		if (g_page_pool_is_on)
			atomic_set(&g_create_another_pp, 1);
#endif
		if (dpmaif_ctl->support_lro == 1)
			ccmni_set_tcp_is_need_gro(1);

#ifdef DPMAIF_REDUCE_RX_FLUSH
		g_rx_flush_pkt_cnt = 0;
#endif
@@ -2762,9 +2747,6 @@ static void dpmaif_total_spd_cb(u64 total_ul_speed, u64 total_dl_speed)
				g_alloc_skb_tbl_threshold = MIN_ALLOC_SKB_TBL_CNT;
			g_alloc_frg_tbl_threshold = MIN_ALLOC_FRG_TBL_CNT;
		}
		if (dpmaif_ctl->support_lro == 1)
			ccmni_set_tcp_is_need_gro(1);

#ifdef DPMAIF_REDUCE_RX_FLUSH
		g_rx_flush_pkt_cnt = 0;
#endif
@@ -2790,7 +2772,6 @@ static int dpmaif_init_cap(struct device *dev)
		dpmaif_ctl->support_lro = 1;
		dpmaif_ctl->support_2rxq = 1;
		dpmaif_ctl->max_pit_seq = 0xFF;
		ccmni_set_tcp_is_need_gro(1);
	} else {
		dpmaif_ctl->real_rxq_num = 1;
		dpmaif_ctl->max_pit_seq = 0xFE;
+0 −1
Original line number Diff line number Diff line
@@ -547,6 +547,5 @@ extern void ccmni_clr_flush_timer(void);

extern void mt_irq_dump_status(unsigned int irq);

extern void ccmni_set_tcp_is_need_gro(u32 tcp_is_need_gro);
extern void ccmni_set_cur_speed(u64 cur_dl_speed);
#endif				/* __CCCI_MODEM_DPMA_COMM_H__ */