* [PATCH] ath6kl: assign Tx packet drop threshold per endpoint based on AC priority
@ 2012-02-09 10:17 Chilam Ng
2012-02-27 17:17 ` Kalle Valo
0 siblings, 1 reply; 2+ messages in thread
From: Chilam Ng @ 2012-02-09 10:17 UTC (permalink / raw)
To: linux-wireless; +Cc: ath6kl-devel
Tx packets will begin to drop when there are multiple traffic priorities
and the current traffic is not the highest priority and the remaining
cookies drop below a certain number, which is fixed for all AC. It is
possilbe that lower priority AC have more traffic which will consume
more cookies and lock out higher priority AC from having any. Assign
each endpoint (AC) with a different Tx-packet-drop threshold so lower
priority AC is more likely to drop packets and the cookies become more
available to higher priority AC.
Signed-off-by: Chilam Ng <chilamng@qca.qualcomm.com>
---
drivers/net/wireless/ath/ath6kl/htc.c | 9 +++++++++
drivers/net/wireless/ath/ath6kl/htc.h | 1 +
drivers/net/wireless/ath/ath6kl/txrx.c | 3 ++-
3 files changed, 12 insertions(+), 1 deletions(-)
diff --git a/drivers/net/wireless/ath/ath6kl/htc.c b/drivers/net/wireless/ath/ath6kl/htc.c
index 7d4e835..93e819d 100644
--- a/drivers/net/wireless/ath/ath6kl/htc.c
+++ b/drivers/net/wireless/ath/ath6kl/htc.c
@@ -2482,6 +2482,15 @@ int ath6kl_htc_conn_service(struct htc_target *target,
endpoint->cred_dist.endpoint = assigned_ep;
endpoint->cred_dist.cred_sz = target->tgt_cred_sz;
+ switch (endpoint->svc_id) {
+ case WMI_DATA_BK_SVC:
+ endpoint->tx_drop_packet_threshold = MAX_DEF_COOKIE_NUM / 3;
+ break;
+ default:
+ endpoint->tx_drop_packet_threshold = MAX_HI_COOKIE_NUM;
+ break;
+ }
+
if (conn_req->max_rxmsg_sz) {
/*
* Override cred_per_msg calculation, this optimizes
diff --git a/drivers/net/wireless/ath/ath6kl/htc.h b/drivers/net/wireless/ath/ath6kl/htc.h
index b85716e..1d90fe6 100644
--- a/drivers/net/wireless/ath/ath6kl/htc.h
+++ b/drivers/net/wireless/ath/ath6kl/htc.h
@@ -500,6 +500,7 @@ struct htc_endpoint {
u8 seqno;
u32 conn_flags;
struct htc_endpoint_stats ep_st;
+ u16 tx_drop_packet_threshold;
};
struct htc_control_buffer {
diff --git a/drivers/net/wireless/ath/ath6kl/txrx.c b/drivers/net/wireless/ath/ath6kl/txrx.c
index dd63371..294e269 100644
--- a/drivers/net/wireless/ath/ath6kl/txrx.c
+++ b/drivers/net/wireless/ath/ath6kl/txrx.c
@@ -576,7 +576,8 @@ enum htc_send_full_action ath6kl_tx_queue_full(struct htc_target *target,
*/
if (ar->ac_stream_pri_map[ar->ep2ac_map[endpoint]] <
ar->hiac_stream_active_pri &&
- ar->cookie_count <= MAX_HI_COOKIE_NUM)
+ ar->cookie_count <=
+ target->endpoint[endpoint].tx_drop_packet_threshold)
/*
* Give preference to the highest priority stream by
* dropping the packets which overflowed.
--
1.7.7.2
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] ath6kl: assign Tx packet drop threshold per endpoint based on AC priority
2012-02-09 10:17 [PATCH] ath6kl: assign Tx packet drop threshold per endpoint based on AC priority Chilam Ng
@ 2012-02-27 17:17 ` Kalle Valo
0 siblings, 0 replies; 2+ messages in thread
From: Kalle Valo @ 2012-02-27 17:17 UTC (permalink / raw)
To: Chilam Ng; +Cc: linux-wireless, ath6kl-devel
On 02/09/2012 12:17 PM, Chilam Ng wrote:
> Tx packets will begin to drop when there are multiple traffic priorities
> and the current traffic is not the highest priority and the remaining
> cookies drop below a certain number, which is fixed for all AC. It is
> possilbe that lower priority AC have more traffic which will consume
> more cookies and lock out higher priority AC from having any. Assign
> each endpoint (AC) with a different Tx-packet-drop threshold so lower
> priority AC is more likely to drop packets and the cookies become more
> available to higher priority AC.
>
> Signed-off-by: Chilam Ng <chilamng@qca.qualcomm.com>
Thanks, applied. The real fix of course is to implement multiqueue
support in ath6kl and get rid of the cookie stuff completely. But this
is a good quick fix.
Kalle
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2012-02-27 17:17 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-02-09 10:17 [PATCH] ath6kl: assign Tx packet drop threshold per endpoint based on AC priority Chilam Ng
2012-02-27 17:17 ` Kalle Valo
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).