From: "Denis V. Lunev" <den@openvz.org>
To: davem@davemloft.net
Cc: containers@lists.osdl.org, devel@openvz.org,
netdev@vger.kernel.org, ebiederm@xmission.com
Subject: [PATCH 2.6.25] Remove ip_fib_local_table and ip_fib_main_table defines
Date: Thu, 6 Dec 2007 17:58:25 +0300 [thread overview]
Message-ID: <20071206145825.GA22435@iris.sw.ru> (raw)
From: Eric W. Biederman <ebiederm@xmission.com>
There are only 2 users and it doesn't hurt to call fib_get_table
instead, and it makes it easier to make the fib network namespace
aware.
Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
Signed-off-by: Denis V. Lunev <den@openvz.org>
---
include/net/ip_fib.h | 3 ---
net/ipv4/fib_hash.c | 5 +++--
2 files changed, 3 insertions(+), 5 deletions(-)
diff --git a/include/net/ip_fib.h b/include/net/ip_fib.h
index ed514bf..690fb4d 100644
--- a/include/net/ip_fib.h
+++ b/include/net/ip_fib.h
@@ -191,9 +191,6 @@ extern void __init fib4_rules_init(void);
extern u32 fib_rules_tclass(struct fib_result *res);
#endif
-#define ip_fib_local_table fib_get_table(RT_TABLE_LOCAL)
-#define ip_fib_main_table fib_get_table(RT_TABLE_MAIN)
-
extern int fib_lookup(struct flowi *flp, struct fib_result *res);
extern struct fib_table *fib_new_table(u32 id);
diff --git a/net/ipv4/fib_hash.c b/net/ipv4/fib_hash.c
index 9d0cee2..30ff657 100644
--- a/net/ipv4/fib_hash.c
+++ b/net/ipv4/fib_hash.c
@@ -810,7 +810,8 @@ struct fib_iter_state {
static struct fib_alias *fib_get_first(struct seq_file *seq)
{
struct fib_iter_state *iter = seq->private;
- struct fn_hash *table = (struct fn_hash *) ip_fib_main_table->tb_data;
+ struct fib_table *main_table = fib_get_table(RT_TABLE_MAIN);
+ struct fn_hash *table = (struct fn_hash *)main_table->tb_data;
iter->bucket = 0;
iter->hash_head = NULL;
@@ -949,7 +950,7 @@ static void *fib_seq_start(struct seq_file *seq, loff_t *pos)
void *v = NULL;
read_lock(&fib_hash_lock);
- if (ip_fib_main_table)
+ if (fib_get_table(RT_TABLE_MAIN))
v = *pos ? fib_get_idx(seq, *pos - 1) : SEQ_START_TOKEN;
return v;
}
--
1.5.3.rc5
next reply other threads:[~2007-12-06 14:57 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-12-06 14:58 Denis V. Lunev [this message]
2007-12-07 8:46 ` [PATCH 2.6.25] Remove ip_fib_local_table and ip_fib_main_table defines David Miller
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=20071206145825.GA22435@iris.sw.ru \
--to=den@openvz.org \
--cc=containers@lists.osdl.org \
--cc=davem@davemloft.net \
--cc=devel@openvz.org \
--cc=ebiederm@xmission.com \
--cc=netdev@vger.kernel.org \
/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).