All of lore.kernel.org
 help / color / mirror / Atom feed
From: Johannes Berg <johannes@sipsolutions.net>
To: Ido Yariv <ido@wizery.com>
Cc: Luciano Coelho <luciano.coelho@nokia.com>,
	linux-wireless@vger.kernel.org
Subject: Re: [PATCH v2 3/4] wl1271: Allocate TX descriptors more efficiently
Date: Tue, 12 Oct 2010 14:02:01 +0200	[thread overview]
Message-ID: <1286884921.3753.2.camel@jlt3.sipsolutions.net> (raw)
In-Reply-To: <1286873633-10080-4-git-send-email-ido@wizery.com>

On Tue, 2010-10-12 at 10:53 +0200, Ido Yariv wrote:
> On each TX descriptor allocation, a free entry is found by traversing the TX
> descriptors array.
> 
> Improve this by holding a bitmap of all TX descriptors, and using efficient
> bit operations to search for free entries.
> The bitmap is 32 bits long, assuming that the maximum number of
> descriptors (ACX_TX_DESCRIPTORS) will never exceed 32.
> 
> Signed-off-by: Ido Yariv <ido@wizery.com>
> ---
>  drivers/net/wireless/wl12xx/wl1271.h      |    1 +
>  drivers/net/wireless/wl12xx/wl1271_main.c |    1 +
>  drivers/net/wireless/wl12xx/wl1271_tx.c   |   38 ++++++++++++++++------------
>  3 files changed, 24 insertions(+), 16 deletions(-)
> 
> diff --git a/drivers/net/wireless/wl12xx/wl1271.h b/drivers/net/wireless/wl12xx/wl1271.h
> index 4a034a3..ddecc96 100644
> --- a/drivers/net/wireless/wl12xx/wl1271.h
> +++ b/drivers/net/wireless/wl12xx/wl1271.h
> @@ -398,6 +398,7 @@ struct wl1271 {
>  	struct work_struct tx_work;
>  
>  	/* Pending TX frames */
> +	unsigned long tx_frames_map;
>  	struct sk_buff *tx_frames[ACX_TX_DESCRIPTORS];

Just use
	unsigned long tx_frames_map[BITS_TO_LONGS(ACX_TX_DESCRIPTORS)];
instead and you don't have to worry about the number anywhere.

johannes


  parent reply	other threads:[~2010-10-12 12:02 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-10-12  8:53 [PATCH v2 0/4] wl1271: TX optimizations & fixes Ido Yariv
2010-10-12  8:53 ` [PATCH v2 1/4] wl1271: TX aggregation optimization Ido Yariv
2010-10-12 11:10   ` Juuso Oikarinen
2010-10-12  8:53 ` [PATCH v2 2/4] wl1271: Fix TX starvation Ido Yariv
2010-10-12 11:34   ` Juuso Oikarinen
2010-10-12  8:53 ` [PATCH v2 3/4] wl1271: Allocate TX descriptors more efficiently Ido Yariv
2010-10-12 11:57   ` Juuso Oikarinen
2010-10-12 12:02   ` Johannes Berg [this message]
2010-10-12 12:29     ` Ido Yariv
2010-10-12  8:53 ` [PATCH v2 4/4] wl1271: Fix TX queue low watermark handling Ido Yariv
2010-10-12 12:01   ` Juuso Oikarinen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1286884921.3753.2.camel@jlt3.sipsolutions.net \
    --to=johannes@sipsolutions.net \
    --cc=ido@wizery.com \
    --cc=linux-wireless@vger.kernel.org \
    --cc=luciano.coelho@nokia.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.