* [2.6 patch] fix net/ipv4/route.c with gcc 3.4
[not found] <20050321025159.1cabd62e.akpm@osdl.org>
@ 2005-03-22 12:22 ` Adrian Bunk
[not found] ` <20050322163340.GD1948@stusta.de>
1 sibling, 0 replies; 2+ messages in thread
From: Adrian Bunk @ 2005-03-22 12:22 UTC (permalink / raw)
To: Einar Lueck; +Cc: linux-kernel, netdev
The following compile error comes from Linus' tree with
CONFIG_IP_ROUTE_MULTIPATH_CACHED=y:
<-- snip -->
...
CC net/ipv4/route.o
net/ipv4/route.c: In function `rt_remove_balanced_route':
net/ipv4/route.c:151: sorry, unimplemented: inlining failed in call to 'compare_keys': function body not available
net/ipv4/route.c:540: sorry, unimplemented: called from here
make[2]: *** [net/ipv4/route.o] Error 1
<-- snip -->
This patch fixes this compile error by moving compare_keys up.
Signed-off-by: Adrian Bunk <bunk@stusta.de>
---
net/ipv4/route.c | 15 +++++++--------
1 files changed, 7 insertions(+), 8 deletions(-)
--- linux-2.6.12-rc1-mm1-full/net/ipv4/route.c.old 2005-03-22 13:10:35.000000000 +0100
+++ linux-2.6.12-rc1-mm1-full/net/ipv4/route.c 2005-03-22 13:12:29.000000000 +0100
@@ -148,7 +148,6 @@
static void ipv4_link_failure(struct sk_buff *skb);
static void ip_rt_update_pmtu(struct dst_entry *dst, u32 mtu);
static int rt_garbage_collect(void);
-static inline int compare_keys(struct flowi *fl1, struct flowi *fl2);
static struct dst_ops ipv4_dst_ops = {
@@ -450,6 +449,13 @@
#endif /* CONFIG_PROC_FS */
+static inline int compare_keys(struct flowi *fl1, struct flowi *fl2)
+{
+ return memcmp(&fl1->nl_u.ip4_u, &fl2->nl_u.ip4_u, sizeof(fl1->nl_u.ip4_u)) == 0 &&
+ fl1->oif == fl2->oif &&
+ fl1->iif == fl2->iif;
+}
+
static __inline__ void rt_free(struct rtable *rt)
{
multipath_remove(rt);
@@ -858,13 +864,6 @@
out: return 0;
}
-static inline int compare_keys(struct flowi *fl1, struct flowi *fl2)
-{
- return memcmp(&fl1->nl_u.ip4_u, &fl2->nl_u.ip4_u, sizeof(fl1->nl_u.ip4_u)) == 0 &&
- fl1->oif == fl2->oif &&
- fl1->iif == fl2->iif;
-}
-
static int rt_intern_hash(unsigned hash, struct rtable *rt, struct rtable **rp)
{
struct rtable *rth, **rthp;
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: 2.6.12-rc1-mm1: hostap stack usage
[not found] ` <20050322163340.GD1948@stusta.de>
@ 2005-03-23 4:59 ` Jouni Malinen
0 siblings, 0 replies; 2+ messages in thread
From: Jouni Malinen @ 2005-03-23 4:59 UTC (permalink / raw)
To: Adrian Bunk
Cc: Andrew Morton, netdev, hostap, linux-kernel, linux-net, jgarzik
(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
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2005-03-23 4:59 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[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 ` 2.6.12-rc1-mm1: hostap stack usage Jouni Malinen
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).