Received: with ECARTIS (v1.0.0; list netdev); Mon, 28 Mar 2005 13:41:29 -0800 (PST) Received: from mx1.redhat.com (mx1.redhat.com [66.187.233.31]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id j2SLfCmG003416 for ; Mon, 28 Mar 2005 13:41:13 -0800 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.12.11/8.12.11) with ESMTP id j2SLf9SU010969; Mon, 28 Mar 2005 16:41:09 -0500 Received: from devserv.devel.redhat.com (devserv.devel.redhat.com [172.16.58.1]) by int-mx1.corp.redhat.com (8.11.6/8.11.6) with ESMTP id j2SLf3O08703; Mon, 28 Mar 2005 16:41:03 -0500 Received: from devserv.devel.redhat.com (localhost.localdomain [127.0.0.1]) by devserv.devel.redhat.com (8.12.11/8.12.11) with ESMTP id j2SLf3XF014412; Mon, 28 Mar 2005 16:41:03 -0500 Received: (from davej@localhost) by devserv.devel.redhat.com (8.12.11/8.12.11/Submit) id j2SLf3Qx014408; Mon, 28 Mar 2005 16:41:03 -0500 X-Authentication-Warning: devserv.devel.redhat.com: davej set sender to davej@redhat.com using -f Date: Mon, 28 Mar 2005 16:41:03 -0500 From: Dave Jones To: cliff white Cc: jgarzik@pobox.com, netdev@oss.sgi.com Subject: Re: gcc confused about static inline. - route.c Message-ID: <20050328214103.GA3609@redhat.com> References: <20050328132314.480b8b1d@es175> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20050328132314.480b8b1d@es175> User-Agent: Mutt/1.4.1i X-Virus-Scanned: ClamAV version 0.83, clamav-milter version 0.83 on oss.sgi.com X-Virus-Status: Clean X-archive-position: 881 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: davej@redhat.com Precedence: bulk X-list: netdev Content-Length: 1847 Lines: 56 On Mon, Mar 28, 2005 at 01:23:14PM -0800, cliff white wrote: > > Building the gkernel bits, have this error: > > 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 > > route.c has this define at line 151 > : > static inline int compare_keys(struct flowi *fl1, struct flowi *fl2); > > function body is defined starting at line 861. > > We are using gcc 3.4.2 right now, is there a way to fix this? > thanks > cliffw Shuffling the order of the functions fixed this for me. Dave Signed-off-by: Dave Jones diff -urNp --exclude-from=/home/davej/.exclude linux-10001/init/Makefile linux-10002/init/Makefile --- linux-2.6.11/net/ipv4/route.c~ 2005-03-24 19:18:24.000000000 -0500 +++ linux-2.6.11/net/ipv4/route.c 2005-03-24 19:19:39.000000000 -0500 @@ -520,6 +520,13 @@ static inline u32 rt_score(struct rtable return score; } +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; +} + #ifdef CONFIG_IP_ROUTE_MULTIPATH_CACHED static struct rtable **rt_remove_balanced_route(struct rtable **chain_head, struct rtable *expentry, @@ -858,13 +865,6 @@ work_done: 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;