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

Commit 441f2325 authored by Ajay Agarwal's avatar Ajay Agarwal
Browse files

usb: gadget: f_gsi: Increase num of buffers to 50 for ECM and RmNet



Currently the ECM interface has 15 data buffers allocated by the
driver which can be used by IPA. In some telematics platform
concurrency scenarios like Ethernet and USB together, this number
is not enough for IPA to keep packets in its stack and service
the Ethernet pipe. Hence the packets get dropped leading to lower
throughput on both the pipes. Fix this by increasing the number
of buffers to 50 for relevant interfaces.

Change-Id: I65e0282143d489ab9f6b9fcc640cad7808adb68d
Signed-off-by: default avatarAjay Agarwal <ajaya@codeaurora.org>
parent 5c3ec50d
Loading
Loading
Loading
Loading
+4 −4
Original line number Diff line number Diff line
/*
 * Copyright (c) 2015-2019, Linux Foundation. All rights reserved.
 * Copyright (c) 2015-2020, Linux Foundation. All rights reserved.
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License version 2 and
@@ -3125,7 +3125,7 @@ static int gsi_bind(struct usb_configuration *c, struct usb_function *f)
		info.out_epname = "gsi-epout";
		info.in_req_buf_len = GSI_IN_BUFF_SIZE;
		gsi->d_port.in_aggr_size = GSI_IN_RNDIS_AGGR_SIZE;
		info.in_req_num_buf = GSI_NUM_IN_RNDIS_BUFFERS;
		info.in_req_num_buf = GSI_NUM_IN_RNDIS_RMNET_ECM_BUFFERS;
		gsi->d_port.out_aggr_size = GSI_OUT_AGGR_SIZE;
		info.out_req_buf_len = GSI_OUT_AGGR_SIZE;
		info.out_req_num_buf = GSI_NUM_OUT_BUFFERS;
@@ -3316,7 +3316,7 @@ static int gsi_bind(struct usb_configuration *c, struct usb_function *f)
		info.out_epname = "gsi-epout";
		gsi->d_port.in_aggr_size = GSI_IN_RMNET_AGGR_SIZE;
		info.in_req_buf_len = GSI_IN_BUFF_SIZE;
		info.in_req_num_buf = GSI_NUM_IN_BUFFERS;
		info.in_req_num_buf = GSI_NUM_IN_RNDIS_RMNET_ECM_BUFFERS;
		gsi->d_port.out_aggr_size = GSI_OUT_AGGR_SIZE;
		info.out_req_buf_len = GSI_OUT_RMNET_BUF_LEN;
		info.out_req_num_buf = GSI_NUM_OUT_BUFFERS;
@@ -3349,7 +3349,7 @@ static int gsi_bind(struct usb_configuration *c, struct usb_function *f)
		info.out_epname = "gsi-epout";
		gsi->d_port.in_aggr_size = GSI_ECM_AGGR_SIZE;
		info.in_req_buf_len = GSI_IN_BUFF_SIZE;
		info.in_req_num_buf = GSI_NUM_IN_BUFFERS;
		info.in_req_num_buf = GSI_NUM_IN_RNDIS_RMNET_ECM_BUFFERS;
		gsi->d_port.out_aggr_size = GSI_ECM_AGGR_SIZE;
		info.out_req_buf_len = GSI_OUT_ECM_BUF_LEN;
		info.out_req_num_buf = GSI_NUM_OUT_BUFFERS;
+2 −2
Original line number Diff line number Diff line
/*
 * Copyright (c) 2015-2019, The Linux Foundation. All rights reserved.
 * Copyright (c) 2015-2020, The Linux Foundation. All rights reserved.
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License version 2 and
@@ -43,7 +43,7 @@
#define GSI_MAX_CTRL_PKT_SIZE 8192
#define GSI_CTRL_DTR (1 << 0)

#define GSI_NUM_IN_RNDIS_BUFFERS 50
#define GSI_NUM_IN_RNDIS_RMNET_ECM_BUFFERS 50
#define GSI_NUM_IN_BUFFERS 15
#define GSI_IN_BUFF_SIZE 2048
#define GSI_NUM_OUT_BUFFERS 14