qcacmn: improve mboxping TX t-put for SDIO project

qcacld-2.0 to qcacmn propagation

Return HTC_SEND_FULL_KEEP directly in epping_tx_queue_full function
and give nodrop pkts higher priority over normal pkts

Change-Id: Ib36e1a9f34eb9054b12f0e8ba54a86ace7d6c8f8
CRs-Fixed: 990726
This commit is contained in:
gbian
2016-09-30 17:01:07 +08:00
committed by qcabuildsw
parent 7aa5d2d431
commit b417db2f04
4 changed files with 42 additions and 5 deletions

View File

@@ -266,6 +266,7 @@ HTC_HANDLE htc_create(void *ol_sc, HTC_INIT_INFO *pInfo, qdf_device_t osdev,
qdf_spinlock_create(&target->HTCRxLock); qdf_spinlock_create(&target->HTCRxLock);
qdf_spinlock_create(&target->HTCTxLock); qdf_spinlock_create(&target->HTCTxLock);
qdf_spinlock_create(&target->HTCCreditLock); qdf_spinlock_create(&target->HTCCreditLock);
target->is_nodrop_pkt = false;
do { do {
qdf_mem_copy(&target->HTCInitInfo, pInfo, qdf_mem_copy(&target->HTCInitInfo, pInfo,

View File

@@ -637,6 +637,19 @@ A_STATUS htc_add_receive_pkt_multiple(HTC_HANDLE HTCHandle,
bool htc_is_endpoint_active(HTC_HANDLE HTCHandle, bool htc_is_endpoint_active(HTC_HANDLE HTCHandle,
HTC_ENDPOINT_ID Endpoint); HTC_ENDPOINT_ID Endpoint);
/*+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
@desc: Set up nodrop pkt flag for mboxping nodrop pkt
@function name: htc_set_nodrop_pkt
@input: HTCHandle - HTC handle
isNodropPkt - indicates whether it is nodrop pkt
@output:
@return:
@notes:
@example:
@see also:
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/
void htc_set_nodrop_pkt(HTC_HANDLE HTCHandle, A_BOOL isNodropPkt);
/*+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ /*+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
@desc: Get the number of recv buffers currently queued into an HTC endpoint @desc: Get the number of recv buffers currently queued into an HTC endpoint
@function name: htc_get_num_recv_buffers @function name: htc_get_num_recv_buffers

View File

@@ -201,6 +201,12 @@ typedef struct _HTC_TARGET {
#endif #endif
uint32_t con_mode; uint32_t con_mode;
/*
* This flag is from the mboxping tool. It indicates that we cannot
* drop it. Besides, nodrop pkts have higher priority than normal pkts.
*/
A_BOOL is_nodrop_pkt;
} HTC_TARGET; } HTC_TARGET;
#if defined ENABLE_BUNDLE_TX #if defined ENABLE_BUNDLE_TX

View File

@@ -1122,11 +1122,22 @@ static HTC_SEND_QUEUE_RESULT htc_try_send(HTC_TARGET *target,
LOCK_HTC_TX(target); LOCK_HTC_TX(target);
if (!HTC_QUEUE_EMPTY(&sendQueue)) { if (!HTC_QUEUE_EMPTY(&sendQueue)) {
/* transfer packets to tail */ if (target->is_nodrop_pkt) {
HTC_PACKET_QUEUE_TRANSFER_TO_TAIL(&pEndpoint->TxQueue, /*
&sendQueue); * nodrop pkts have higher priority than normal pkts,
A_ASSERT(HTC_QUEUE_EMPTY(&sendQueue)); * insert nodrop pkt to head for proper
INIT_HTC_PACKET_QUEUE(&sendQueue); * start/termination of test.
*/
HTC_PACKET_QUEUE_TRANSFER_TO_HEAD(&pEndpoint->TxQueue,
&sendQueue);
target->is_nodrop_pkt = false;
} else {
/* transfer packets to tail */
HTC_PACKET_QUEUE_TRANSFER_TO_TAIL(&pEndpoint->TxQueue,
&sendQueue);
A_ASSERT(HTC_QUEUE_EMPTY(&sendQueue));
INIT_HTC_PACKET_QUEUE(&sendQueue);
}
} }
/* increment tx processing count on entry */ /* increment tx processing count on entry */
@@ -2034,6 +2045,12 @@ bool htc_is_endpoint_active(HTC_HANDLE HTCHandle, HTC_ENDPOINT_ID Endpoint)
return true; return true;
} }
void htc_set_nodrop_pkt(HTC_HANDLE HTCHandle, A_BOOL isNodropPkt)
{
HTC_TARGET *target = GET_HTC_TARGET_FROM_HANDLE(HTCHandle);
target->is_nodrop_pkt = isNodropPkt;
}
/** /**
* htc_process_credit_rpt() - process credit report, call distribution function * htc_process_credit_rpt() - process credit report, call distribution function
* @target: pointer to HTC_TARGET * @target: pointer to HTC_TARGET