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

Commit d97a7b30 authored by Hemant Kumar's avatar Hemant Kumar
Browse files

usb: f_gsi: Honor RNDIS host IN aggregation size



Currently aggregation size is capped to 9K. This
results in to low downlink throughput of 1.8Gbps
when desired throughput is 2.4Gbps. Fix this issue
by honoring host provided IN aggregation size. On
Win7 Host this size is 16K. This improves the bus
utilization and allows to achieve desired throughput.
Also update the default GSI_IN_RNDIS_AGGR_SIZE to
16K and increase number of RNDIS IN buffers to 50
to accommodate 3 aggregated RNDIS packets.

Change-Id: I6d6022825f8226bf1415a8f128051535aa946871
Signed-off-by: default avatarHemant Kumar <hemantk@codeaurora.org>
parent 0e01c2e9
Loading
Loading
Loading
Loading
+5 −6
Original line number Diff line number Diff line
@@ -1655,11 +1655,10 @@ static void gsi_rndis_command_complete(struct usb_ep *ep,

	buf = (rndis_init_msg_type *)req->buf;
	if (buf->MessageType == RNDIS_MSG_INIT) {
		gsi->d_port.in_aggr_size = min_t(u32, gsi->d_port.in_aggr_size,
		/* honor host dl aggr size */
		gsi->d_port.in_aggr_size = gsi->params->dl_max_xfer_size;
		log_event_dbg("RNDIS host dl_aggr_size:%d\n",
				gsi->params->dl_max_xfer_size);
		log_event_dbg("RNDIS host dl_aggr_size:%d in_aggr_size:%d\n",
				gsi->params->dl_max_xfer_size,
				gsi->d_port.in_aggr_size);
	}
}

@@ -2565,7 +2564,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_BUFFERS;
		info.in_req_num_buf = GSI_NUM_IN_RNDIS_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;
+2 −2
Original line number Diff line number Diff line
@@ -34,13 +34,13 @@
#define GSI_MAX_CTRL_PKT_SIZE 4096
#define GSI_CTRL_DTR (1 << 0)


#define GSI_NUM_IN_RNDIS_BUFFERS 50
#define GSI_NUM_IN_BUFFERS 15
#define GSI_IN_BUFF_SIZE 2048
#define GSI_NUM_OUT_BUFFERS 14
#define GSI_OUT_AGGR_SIZE 24576

#define GSI_IN_RNDIS_AGGR_SIZE 9216
#define GSI_IN_RNDIS_AGGR_SIZE 16384
#define GSI_IN_MBIM_AGGR_SIZE 16384
#define GSI_IN_RMNET_AGGR_SIZE 16384
#define GSI_ECM_AGGR_SIZE 2048