netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [patch 2.6.12-rc1-bk1] multipath: early use of inlined function
@ 2005-03-21 21:34 Francois Romieu
  2005-03-23  4:08 ` David S. Miller
  0 siblings, 1 reply; 2+ messages in thread
From: Francois Romieu @ 2005-03-21 21:34 UTC (permalink / raw)
  To: David S. Miller; +Cc: netdev


Early use of inlined function

$ grep -n compare_keys net/ipv4/route.c
151:static inline int compare_keys(struct flowi *fl1, struct flowi *fl2);
                                                                       ^^^
541:                compare_keys(&(*rthp)->fl, &expentry->fl)) {
861:static inline int compare_keys(struct flowi *fl1, struct flowi *fl2)
890:                compare_keys(&rth->fl, &rt->fl)) {
892:            if (compare_keys(&rth->fl, &rt->fl)) {

Signed-off-by: Francois Romieu <romieu@fr.zoreil.com>

diff -puN net/ipv4/route.c~netdev-10 net/ipv4/route.c
--- linux-2.6.12-rcX/net/ipv4/route.c~netdev-10	2005-03-21 22:24:16.639836385 +0100
+++ linux-2.6.12-rcX-fr/net/ipv4/route.c	2005-03-21 22:30:05.904038902 +0100
@@ -148,7 +148,6 @@ static struct dst_entry *ipv4_negative_a
 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 = {
@@ -520,6 +519,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 +864,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;

_

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [patch 2.6.12-rc1-bk1] multipath: early use of inlined function
  2005-03-21 21:34 [patch 2.6.12-rc1-bk1] multipath: early use of inlined function Francois Romieu
@ 2005-03-23  4:08 ` David S. Miller
  0 siblings, 0 replies; 2+ messages in thread
From: David S. Miller @ 2005-03-23  4:08 UTC (permalink / raw)
  To: Francois Romieu; +Cc: netdev

On Mon, 21 Mar 2005 22:34:09 +0100
Francois Romieu <romieu@fr.zoreil.com> wrote:

> $ grep -n compare_keys net/ipv4/route.c
> 151:static inline int compare_keys(struct flowi *fl1, struct flowi *fl2);
>                                                                        ^^^
> 541:                compare_keys(&(*rthp)->fl, &expentry->fl)) {
> 861:static inline int compare_keys(struct flowi *fl1, struct flowi *fl2)
> 890:                compare_keys(&rth->fl, &rt->fl)) {
> 892:            if (compare_keys(&rth->fl, &rt->fl)) {
> 
> Signed-off-by: Francois Romieu <romieu@fr.zoreil.com>

Applied, thanks Francois.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2005-03-23  4:08 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-03-21 21:34 [patch 2.6.12-rc1-bk1] multipath: early use of inlined function Francois Romieu
2005-03-23  4:08 ` David S. Miller

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).