Discussion:
[PATCH 0/4] ip-forward-mib performance improvements
(too old to reply)
Robert Story
2011-03-11 13:46:51 UTC
Permalink
On Mon, 28 Feb 2011 12:37:17 -0800 Stephen wrote:
SH> These patches fix the problems with walking the forwarding mib when a
SH> router has full BGP feed.

Excellent! I'm glad someone finally had the time to fix this.

The first 3 patches are no-brainers. I'll apply them shortly.

The netlink one is a bit problematic, in that it unconditionally replaces the
old code, and we need to support older systems which might not have netlink.
Is there some header/constant we can check for that will indicate whether or
not we can get the route table via netlink?
Stephen Hemminger
2011-03-11 17:10:01 UTC
Permalink
On Fri, 11 Mar 2011 08:46:51 -0500
Post by Robert Story
SH> These patches fix the problems with walking the forwarding mib when a
SH> router has full BGP feed.
Excellent! I'm glad someone finally had the time to fix this.
The first 3 patches are no-brainers. I'll apply them shortly.
The netlink one is a bit problematic, in that it unconditionally replaces the
old code, and we need to support older systems which might not have netlink.
Is there some header/constant we can check for that will indicate whether or
not we can get the route table via netlink?
I don't think keeping old code is necessary since netlink has been around
since linux 2.2 (1999) and netlink is already used in if-mib and etherlike-mib.
Stephen Hemminger
2011-03-11 17:42:01 UTC
Permalink
On Fri, 11 Mar 2011 08:46:51 -0500
Post by Robert Story
SH> These patches fix the problems with walking the forwarding mib when a
SH> router has full BGP feed.
Excellent! I'm glad someone finally had the time to fix this.
The first 3 patches are no-brainers. I'll apply them shortly.
The netlink one is a bit problematic, in that it unconditionally replaces the
old code, and we need to support older systems which might not have netlink.
Is there some header/constant we can check for that will indicate whether or
not we can get the route table via netlink?
There are 3 more small performance improvements I put in patch database.
1. Use realloc when growing container

2. Replace data_size with constant

3. Reorder comparisions in sort
Stephen Hemminger
2011-03-11 17:55:05 UTC
Permalink
On Fri, 11 Mar 2011 18:46:56 +0100
Post by Stephen Hemminger
On Fri, 11 Mar 2011 08:46:51 -0500
Post by Robert Story
SH> These patches fix the problems with walking the forwarding mib when a
SH> router has full BGP feed.
Excellent! I'm glad someone finally had the time to fix this.
The first 3 patches are no-brainers. I'll apply them shortly.
The netlink one is a bit problematic, in that it unconditionally replaces
the
Post by Robert Story
old code, and we need to support older systems which might not have
netlink.
Post by Robert Story
Is there some header/constant we can check for that will indicate whether
or
Post by Robert Story
not we can get the route table via netlink?
There are 3 more small performance improvements I put in patch database.
1. Use realloc when growing container
2. Replace data_size with constant
3. Reorder comparisons in sort
Does number (3) refer to patch #3195537 ? That patch has already been
applied as r20077.
Bart.
yes.

--
Robert Story
2011-03-16 15:13:25 UTC
Permalink
On Fri, 11 Mar 2011 09:10:01 -0800 Stephen wrote:
SH> > The netlink one is a bit problematic, in that it unconditionally replaces the
SH> > old code, and we need to support older systems which might not have netlink.
SH> > Is there some header/constant we can check for that will indicate whether or
SH> > not we can get the route table via netlink?
SH>
SH> I don't think keeping old code is necessary since netlink has been around
SH> since linux 2.2 (1999) and netlink is already used in if-mib and etherlike-mib.

Yes, but if I recall correctly, it is used to augment existing methods, not to
replace them. As for kernel support, a vendor trying to fit a custom kernel in
an embedded device might not enable netlink support in the kernel to save
space.
Stephen Hemminger
2011-03-16 15:31:34 UTC
Permalink
On Wed, 16 Mar 2011 11:13:25 -0400
Post by Robert Story
SH> > The netlink one is a bit problematic, in that it unconditionally replaces the
SH> > old code, and we need to support older systems which might not have netlink.
SH> > Is there some header/constant we can check for that will indicate whether or
SH> > not we can get the route table via netlink?
SH>
SH> I don't think keeping old code is necessary since netlink has been around
SH> since linux 2.2 (1999) and netlink is already used in if-mib and etherlike-mib.
Yes, but if I recall correctly, it is used to augment existing methods, not to
replace them. As for kernel support, a vendor trying to fit a custom kernel in
an embedded device might not enable netlink support in the kernel to save
space.
The code in agent/mibgroup/if-mib/data_access/interface_linux.c uses netlink
for prefix listen and ether-like mib uses it for subscriptions.

Netlink is not a configuration option in Linux (even for embedded) it would require
major surgery to remove it. It is possible to keep both methods but the non
netlink one would be subject to disuse and bit rot.

Loading...