netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jouni Malinen <jkmaline@cc.hut.fi>
To: Adrian Bunk <bunk@stusta.de>
Cc: Andrew Morton <akpm@osdl.org>,
	netdev@oss.sgi.com, hostap@shmoo.com,
	linux-kernel@vger.kernel.org, linux-net@vger.kernel.org,
	jgarzik@pobox.com
Subject: Re: 2.6.12-rc1-mm1: hostap stack usage
Date: Tue, 22 Mar 2005 20:59:10 -0800	[thread overview]
Message-ID: <20050323045909.GT8648@jm.kir.nu> (raw)
In-Reply-To: <20050322163340.GD1948@stusta.de>

(netdev added to cc:)

On Tue, Mar 22, 2005 at 05:33:40PM +0100, Adrian Bunk wrote:

> The stack usage in some files under drivers/net/wireless/hostap/ is
> too high.

Thanks; I'll fix these and submit a patch (or two) after some testing.

> drivers/net/wireless/hostap/hostap_ioctl.c:
> 
> prism2_ioctl_giwaplist:
>         struct sockaddr addr[IW_MAX_AP];
>         struct iw_quality qual[IW_MAX_AP];
> 
> 64 * (16 + 4) Bytes = 1280 Bytes

OK.

> prism2_ioctl_ethtool:
>         struct ethtool_drvinfo info = { ETHTOOL_GDRVINFO };
> 
> 196 Bytes

This seems to be somewhat obsolete now since most drivers have moved to
use get_drvinfo of ethtool_ops; I'll do the same.

> __prism2_translate_scan:
>         char buf[MAX_WPA_IE_LEN * 2 + 30];
> 
> (64 * 2) + 30 Bytes = 158 Bytes

OK.

> drivers/net/wireless/hostap/hostap_cs.c:
> 
> prism2_config:
>         cisparse_t parse;
>         u_char buf[64];
>         config_info_t conf;
> 
> The main offender seems to be "parse" (but I'm too lame counting how 
> many bytes it's exactly) resulting in nearly 1 kB stack usage.

This is actually very common for PC Card drivers in the current kernel
tree.. I'll change Host AP to kmalloc this, but someone might consider
going through all *_cs.c drivers..

> drivers/net/wireless/hostap/hostap_plx.c:
> 
> prism2_plx_check_cis:
> #define CIS_MAX_LEN 256
>         u8 cis[CIS_MAX_LEN];

OK.

-- 
Jouni Malinen                                            PGP id EFC895FA

      parent reply	other threads:[~2005-03-23  4:59 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20050321025159.1cabd62e.akpm@osdl.org>
2005-03-22 12:22 ` [2.6 patch] fix net/ipv4/route.c with gcc 3.4 Adrian Bunk
     [not found] ` <20050322163340.GD1948@stusta.de>
2005-03-23  4:59   ` Jouni Malinen [this message]

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=20050323045909.GT8648@jm.kir.nu \
    --to=jkmaline@cc.hut.fi \
    --cc=akpm@osdl.org \
    --cc=bunk@stusta.de \
    --cc=hostap@shmoo.com \
    --cc=jgarzik@pobox.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-net@vger.kernel.org \
    --cc=netdev@oss.sgi.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 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).