2010-11-23 01:23:08

by Luis R. Rodriguez

[permalink] [raw]
Subject: [PATCH 1/3] mac80211: make ieee802_1d_to_ac avilable to drivers

This will be used by ath9k's RC next.

Signed-off-by: Luis R. Rodriguez <[email protected]>
---
include/net/mac80211.h | 15 +++++++++++++++
net/mac80211/wme.c | 14 --------------
net/mac80211/wme.h | 2 --
3 files changed, 15 insertions(+), 16 deletions(-)

diff --git a/include/net/mac80211.h b/include/net/mac80211.h
index 5b0fff2..209c858 100644
--- a/include/net/mac80211.h
+++ b/include/net/mac80211.h
@@ -110,6 +110,21 @@ enum ieee80211_ac_numbers {
IEEE80211_AC_BK = 3,
};

+/*
+ * Default mapping in classifier to work with default
+ * queue setup.
+ */
+static const int ieee802_1d_to_ac[8] = {
+ IEEE80211_AC_BE,
+ IEEE80211_AC_BK,
+ IEEE80211_AC_BK,
+ IEEE80211_AC_BE,
+ IEEE80211_AC_VI,
+ IEEE80211_AC_VI,
+ IEEE80211_AC_VO,
+ IEEE80211_AC_VO
+};
+
/**
* struct ieee80211_tx_queue_params - transmit queue configuration
*
diff --git a/net/mac80211/wme.c b/net/mac80211/wme.c
index 58e75bb..43d9a0e 100644
--- a/net/mac80211/wme.c
+++ b/net/mac80211/wme.c
@@ -18,20 +18,6 @@
#include "ieee80211_i.h"
#include "wme.h"

-/* Default mapping in classifier to work with default
- * queue setup.
- */
-const int ieee802_1d_to_ac[8] = {
- IEEE80211_AC_BE,
- IEEE80211_AC_BK,
- IEEE80211_AC_BK,
- IEEE80211_AC_BE,
- IEEE80211_AC_VI,
- IEEE80211_AC_VI,
- IEEE80211_AC_VO,
- IEEE80211_AC_VO
-};
-
static int wme_downgrade_ac(struct sk_buff *skb)
{
switch (skb->priority) {
diff --git a/net/mac80211/wme.h b/net/mac80211/wme.h
index 6053b1c..c5501b5 100644
--- a/net/mac80211/wme.h
+++ b/net/mac80211/wme.h
@@ -18,8 +18,6 @@

#define QOS_CONTROL_ACK_POLICY_SHIFT 5

-extern const int ieee802_1d_to_ac[8];
-
u16 ieee80211_select_queue(struct ieee80211_sub_if_data *sdata,
struct sk_buff *skb);
void ieee80211_set_qos_hdr(struct ieee80211_local *local, struct sk_buff *skb);
--
1.7.3.2.90.gd4c43



2010-11-23 03:01:04

by Johannes Berg

[permalink] [raw]
Subject: Re: [PATCH 1/3] mac80211: make ieee802_1d_to_ac avilable to drivers

> +++ b/include/net/mac80211.h

> +static const int ieee802_1d_to_ac[8] = {

this will duplicate the table in every file including the header, and sparse might warn, are you sure that's a good plan?

Johannes

2010-11-23 13:40:51

by Björn Smedman

[permalink] [raw]
Subject: Re: [PATCH 2/3] ath9k: avoid aggregation for VO traffic

2010/11/23 Felix Fietkau <[email protected]>:
> On 2010-11-23 1:14 PM, Bj?rn Smedman wrote:
>> On Tue, Nov 23, 2010 at 2:23 AM, Luis R. Rodriguez
>> <[email protected]> wrote:
>>> This should help with latency issues which can happen when
>>> using aggregation.
>>
>> Wouldn't it be better to fix the TXOP limit handling in
>> ath_lookup_rate() instead?
> That wouldn't help with latency caused by receiver-side reordering.

Aha, good reason. :)

/Bj?rn

2010-11-23 01:23:10

by Luis R. Rodriguez

[permalink] [raw]
Subject: [PATCH 2/3] ath9k: avoid aggregation for VO traffic

This should help with latency issues which can happen when
using aggregation.

Cc: Matt Smith <[email protected]>
Cc: Senthil Balasubramanian <[email protected]>
Signed-off-by: Luis R. Rodriguez <[email protected]>
---
drivers/net/wireless/ath/ath9k/rc.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/drivers/net/wireless/ath/ath9k/rc.c b/drivers/net/wireless/ath/ath9k/rc.c
index 33bb33b..f1c1a93 100644
--- a/drivers/net/wireless/ath/ath9k/rc.c
+++ b/drivers/net/wireless/ath/ath9k/rc.c
@@ -1363,7 +1363,8 @@ static void ath_tx_status(void *priv, struct ieee80211_supported_band *sband,
/* Check if aggregation has to be enabled for this tid */
if (conf_is_ht(&sc->hw->conf) &&
!(skb->protocol == cpu_to_be16(ETH_P_PAE))) {
- if (ieee80211_is_data_qos(fc)) {
+ if (ieee80211_is_data_qos(fc) &&
+ (ieee802_1d_to_ac[skb->priority] != IEEE80211_AC_VO)) {
u8 *qc, tid;
struct ath_node *an;

--
1.7.3.2.90.gd4c43


2010-11-23 03:02:09

by Johannes Berg

[permalink] [raw]
Subject: Re: [PATCH 2/3] ath9k: avoid aggregation for VO traffic

> -        if (ieee80211_is_data_qos(fc)) {
> +        if (ieee80211_is_data_qos(fc) &&
> +              (ieee802_1d_to_ac[skb->priority] != IEEE80211_AC_VO)) {

Isn't skb queue mapping set up already so you could use that?

Johannes

2010-11-23 01:23:11

by Luis R. Rodriguez

[permalink] [raw]
Subject: [PATCH 3/3] mac80211: avoid aggregation for VO traffic

This should help with latency issues which can happen when
using aggregation.

Cc: Felix Fietkau <[email protected]>
Cc: Matt Smith <[email protected]>
Cc: Senthil Balasubramanian <[email protected]>
Signed-off-by: Luis R. Rodriguez <[email protected]>
---
net/mac80211/rc80211_minstrel_ht.c | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/net/mac80211/rc80211_minstrel_ht.c b/net/mac80211/rc80211_minstrel_ht.c
index 2d6f025..84b13b0 100644
--- a/net/mac80211/rc80211_minstrel_ht.c
+++ b/net/mac80211/rc80211_minstrel_ht.c
@@ -371,6 +371,9 @@ minstrel_aggr_check(struct minstrel_priv *mp, struct ieee80211_sta *pubsta, stru
if (likely(sta->ampdu_mlme.tid_tx[tid]))
return;

+ if (ieee802_1d_to_ac[skb->priority] == IEEE80211_AC_VO)
+ return;
+
ieee80211_start_tx_ba_session(pubsta, tid);
}

--
1.7.3.2.90.gd4c43


2010-11-23 12:56:52

by Felix Fietkau

[permalink] [raw]
Subject: Re: [PATCH 2/3] ath9k: avoid aggregation for VO traffic

On 2010-11-23 1:14 PM, Bj?rn Smedman wrote:
> On Tue, Nov 23, 2010 at 2:23 AM, Luis R. Rodriguez
> <[email protected]> wrote:
>> This should help with latency issues which can happen when
>> using aggregation.
>
> Wouldn't it be better to fix the TXOP limit handling in
> ath_lookup_rate() instead?
That wouldn't help with latency caused by receiver-side reordering.

- Felix

2010-11-23 06:01:01

by Johannes Berg

[permalink] [raw]
Subject: Re: [PATCH 2/3] ath9k: avoid aggregation for VO traffic

On Tue, 2010-11-23 at 04:02 +0100, Johannes Berg wrote:
> > - if (ieee80211_is_data_qos(fc)) {
> > + if (ieee80211_is_data_qos(fc) &&
> > + (ieee802_1d_to_ac[skb->priority] != IEEE80211_AC_VO)) {
>
> Isn't skb queue mapping set up already so you could use that?

It must be set up, so you should use that, compare it to AC_VO, and drop
patch 1.

johannes


2010-11-23 12:14:46

by Björn Smedman

[permalink] [raw]
Subject: Re: [PATCH 2/3] ath9k: avoid aggregation for VO traffic

On Tue, Nov 23, 2010 at 2:23 AM, Luis R. Rodriguez
<[email protected]> wrote:
> This should help with latency issues which can happen when
> using aggregation.

Wouldn't it be better to fix the TXOP limit handling in
ath_lookup_rate() instead?

>From xmit.c:

/*
* Find the lowest frame length among the rate series that will have a
* 4ms transmit duration.
* TODO - TXOP limit needs to be considered.
*/
max_4ms_framelen = ATH_AMPDU_LIMIT_MAX;

/Bj?rn