From: "David S. Miller" <davem@redhat.com>
To: krkumar@us.ibm.com
Cc: kuznet@ms2.inr.ac.ru, netdev@oss.sgi.com, linux-net@vger.kernel.org
Subject: Re: [PATCH] Prefix List patch against 2.5.70
Date: Fri, 30 May 2003 23:32:29 -0700 (PDT) [thread overview]
Message-ID: <20030530.233229.08331783.davem@redhat.com> (raw)
In-Reply-To: <3ED80230.2030508@us.ibm.com>
From: Krishna Kumar <krkumar@us.ibm.com>
Date: Fri, 30 May 2003 18:15:28 -0700
This code is so gross..
+/* prefix list returned to user space in this structure */
+struct plist_user_info {
+ char name[IFNAMSIZ]; /* interface name */
+ int ifindex; /* interface index */
Just as Yoshfuji said, name is determinable with ifindex alone.
Don't duplicate information.
+ struct var_plist_user_info { /* multiple elements */
+ char flags[3]; /* router advertised flags */
BARF
+#ifdef CONFIG_IPV6_PREFIXLIST
+ BUG_TRAP(list_empty(&idev->prefix_list) == 1);
+#endif
list_empty() returns a boolean, which for true is not necessarily the
integer value "1". This will therefore never trigger when it should
on cpus which use "-1" as the boolean value true.
You have all of this complexity which duplicates work made by
the routing code to keep track of these kinds of entities.
Your "takes a long time to walk the routes" argument is NULL
and void, what if I have 6,000 VLAN interfaces configured up
speaking ipv6? This is not a hypothetical situation, I know
people who do this.
If you're worried about search complexity, you can keep the
"interesting" routes on a special linked list to avoid having to walk
all of the routes. These prefix things really do seem like route
attributes.
That is 1,000 times cleaner than this thing you are showing us.
next prev parent reply other threads:[~2003-05-31 6:32 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-05-31 1:15 [PATCH] Prefix List patch against 2.5.70 Krishna Kumar
2003-05-31 2:02 ` YOSHIFUJI Hideaki / 吉藤英明
2003-05-31 6:32 ` David S. Miller
2003-06-17 20:46 ` Krishna Kumar
2003-06-17 20:59 ` YOSHIFUJI Hideaki / 吉藤英明
2003-06-17 21:31 ` Krishna Kumar
2003-06-02 17:32 ` Krishna Kumar
2003-05-31 6:32 ` David S. Miller [this message]
-- strict thread matches above, loose matches on Subject: below --
2003-06-02 19:46 Krishna Kumar
2003-06-02 21:02 David Stevens
2003-06-03 4:48 ` Pekka Savola
2003-06-03 4:49 ` David S. Miller
2003-06-03 6:42 David Stevens
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=20030530.233229.08331783.davem@redhat.com \
--to=davem@redhat.com \
--cc=krkumar@us.ibm.com \
--cc=kuznet@ms2.inr.ac.ru \
--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).