* Re: [PATCH] rtnl: Simplify ASSERT_RTNL
From: Eric W. Biederman @ 2007-10-11 16:33 UTC (permalink / raw)
To: Herbert Xu; +Cc: David Miller, netdev, Patrick McHardy
In-Reply-To: <20071011082845.GA16527@gondor.apana.org.au>
Herbert Xu <herbert@gondor.apana.org.au> writes:
> Well thanks to that warning we're on our way of improving the
> code that triggered it in such a way that this warning will soon
> go silent.
>
> That's precisely the reason why I object to having this warning
> removed. Now you have a good point that this warning doesn't
> trigger all the time. The fix to that is to *make* it trigger
> always, not removing it.
I'm almost convinced but.
Where people deliberately use convoluted locking is where we
most need things like ASSERT_RTNL.
Having ASSERT_RTNL warn if you were sleeping does not seem
intuitive from the name.
This instance of convoluted locking seems like a complete
one off to me, and if it will warn about other constructs
currently in the kernel it seems wrong.
Frankly I don't feel comfortable adding the check because I can't
defend the presence of might_sleep() in ASSERT_RTNL. If I can't
understand a change well enough to defend it I will not take
responsibility for it, and I will not add my Signed-off-by to it.
The patch I wrote was trivial a trivial optimization and obviously
correct. Adding the might_sleep() and the patch becomes the start
of a crusade for better code that I don't believe in.
So I would rather forget this patch then make that one line addition.
Thanks,
Eric
^ permalink raw reply
* Re: authenc compile warnings in current net-2.6.24
From: Oliver Hartkopp @ 2007-10-11 16:38 UTC (permalink / raw)
To: Sebastian Siewior, netdev
In-Reply-To: <20071011105806.GA28862@Chamillionaire.breakpoint.cc>
Sebastian Siewior wrote:
> * David Miller | 2007-10-10 16:25:28 [-0700]:
>
>
>> From: Sebastian Siewior <netdev@ml.breakpoint.cc>
>> Date: Wed, 10 Oct 2007 21:53:37 +0200
>>
>>
>>> * Oliver Hartkopp | 2007-10-10 19:53:53 [+0200]:
>>>
>>>
>>>> CC [M] crypto/authenc.o
>>>> crypto/authenc.c: In function ?crypto_authenc_hash?:
>>>> crypto/authenc.c:88: warning: ?cryptlen? may be used uninitialized in this
>>>> function
>>>> crypto/authenc.c:87: warning: ?dst? may be used uninitialized in this
>>>> function
>>>> crypto/authenc.c: In function ?crypto_authenc_decrypt?:
>>>> crypto/authenc.c:163: warning: ?cryptlen? may be used uninitialized in this
>>>> function
>>>> crypto/authenc.c:163: note: ?cryptlen? was declared here
>>>> crypto/authenc.c:162: warning: ?src? may be used uninitialized in this
>>>> function
>>>> crypto/authenc.c:162: note: ?src? was declared here
>>>>
>>>> do you already know these warnings?
>>>>
>>> Those warnings are looking like a compiler bug to me.
>>>
>> To be honest I don't know of any compiler which commits enough
>> flow variable analysis to support doing %100 accurate warnings
>> in situations like this.
>>
>
> gcc (GCC) 4.1.2 (Gentoo 4.1.2) did not produce any warnings in this
> case.
>
>
Hi Sebasian,
my gcc was the lastest Debian unstable one:
gcc -v
Using built-in specs.
Target: i486-linux-gnu
Configured with: ../src/configure -v
--enable-languages=c,c++,fortran,objc,obj-c++,treelang --prefix=/usr
--enable-shared --with-system-zlib --libexecdir=/usr/lib
--without-included-gettext --enable-threads=posix --enable-nls
--with-gxx-include-dir=/usr/include/c++/4.2 --program-suffix=-4.2
--enable-clocale=gnu --enable-libstdcxx-debug --enable-mpfr
--enable-targets=all --disable-werror --enable-checking=release
--build=i486-linux-gnu --host=i486-linux-gnu --target=i486-linux-gnu
Thread model: posix
gcc version 4.2.1 (Debian 4.2.1-5)
Regards,
Oliver
^ permalink raw reply
* Re: Fwd: [PATCH#2 3/4] [PPC] Compile fix for 8xx CPM Ehernet driver
From: Jochen Friedrich @ 2007-10-11 16:41 UTC (permalink / raw)
To: Jeff Garzik; +Cc: netdev, linux-ppc-embedded ((((E-Mail))))
In-Reply-To: <46FD1FF0.7020607@garzik.org>
Hi Jeff,
> Kumar Gala wrote:
>
>> Begin forwarded message:
>>
>>
>>> From: Jochen Friedrich <jochen@scram.de>
>>> Date: September 24, 2007 12:15:35 PM CDT
>>> To: linuxppc-embedded@ozlabs.org
>>> Cc: linux-kernel@vger.kernel.org, Marcelo Tosatti <marcelo@kvack.org>
>>> Subject: [PATCH#2 3/4] [PPC] Compile fix for 8xx CPM Ehernet driver
>>>
>> Jeff,
>>
>> Please pick up for 2.6.23 if you don't mind.
>>
>
> Please send an apply-able patch...
>
> Jeff, off to bed
>
I rebased git://git.bocc.de/dbox2.git ppc-fixes against 2.6.23. This
patch is the only remaining one in this head.
I'll resend.
Thanks,
Jochen
^ permalink raw reply
* [PATCH] [PPC] Compile fix for 8xx CPM Ehernet driver
From: Jochen Friedrich @ 2007-10-11 16:41 UTC (permalink / raw)
To: Jeff Garzik; +Cc: netdev, linux-ppc-embedded ((((E-Mail))))
[-- Attachment #1: Type: text/plain, Size: 492 bytes --]
Add #include <asm/cacheflush.h> for flush_dcache_range
to make the driver compile again.
CC arch/ppc/8xx_io/enet.o
arch/ppc/8xx_io/enet.c: In function 'scc_enet_start_xmit':
arch/ppc/8xx_io/enet.c:240: error: implicit declaration of function
'flush_dcache_range'
make[1]: *** [arch/ppc/8xx_io/enet.o] Error 1
make: *** [arch/ppc/8xx_io] Error 2
Signed-off-by: Jochen Friedrich <jochen@scram.de>
---
arch/ppc/8xx_io/enet.c | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
[-- Attachment #2: 16d5c009c75feb68cf1136330efabdffbec8e095.diff --]
[-- Type: text/x-patch, Size: 308 bytes --]
diff --git a/arch/ppc/8xx_io/enet.c b/arch/ppc/8xx_io/enet.c
index 703d47e..eace3bc 100644
--- a/arch/ppc/8xx_io/enet.c
+++ b/arch/ppc/8xx_io/enet.c
@@ -44,6 +44,7 @@
#include <asm/mpc8xx.h>
#include <asm/uaccess.h>
#include <asm/commproc.h>
+#include <asm/cacheflush.h>
/*
* Theory of Operation
[-- Attachment #3: Type: text/plain, Size: 161 bytes --]
_______________________________________________
Linuxppc-embedded mailing list
Linuxppc-embedded@ozlabs.org
https://ozlabs.org/mailman/listinfo/linuxppc-embedded
^ permalink raw reply related
* Re: [PATCH][BNX2X] round three
From: Eliezer Tamir @ 2007-10-11 17:13 UTC (permalink / raw)
To: Stephen Hemminger, Andy Whitcroft
Cc: davem@davemloft.net, netdev@vger.kernel.org, jeff@garzik.org,
Michael Chan
In-Reply-To: <20071010182857.610893a3@freepuppy.rosehill>
[added Andy Whitcroft, who is listed as a CHECKPATCH maintainer]
Stephen Hemminger wrote:
> Minor formatting nits reported by checkpatch.pl script:
Thanks, I Will fix them.
...
> WARNING: no space between function name and open parenthesis '('
> #777: FILE: drivers/net/bnx2x.c:722:
> + case (RAMROD_CMD_ID_ETH_PORT_SETUP | BNX2X_STATE_OPENING_WAIT4_PORT):
>
> WARNING: no space between function name and open parenthesis '('
> #782: FILE: drivers/net/bnx2x.c:727:
> + case (RAMROD_CMD_ID_ETH_HALT | BNX2X_STATE_CLOSING_WAIT4_HALT):
>
> WARNING: no space between function name and open parenthesis '('
> #788: FILE: drivers/net/bnx2x.c:733:
> + case (RAMROD_CMD_ID_ETH_PORT_DEL | BNX2X_STATE_CLOSING_WAIT4_DELETE):
>
> WARNING: no space between function name and open parenthesis '('
> #793: FILE: drivers/net/bnx2x.c:738:
> + case (RAMROD_CMD_ID_ETH_SET_MAC | BNX2X_STATE_OPEN):
>
These look like false positives
...
> CHECK: spinlock_t definition without comment
> #9486: FILE: drivers/net/bnx2x.h:508:
> + spinlock_t spq_lock; /* Used to serialize slowpath
This one too
...
> ERROR: Macros with complex values should be enclosed in parenthesis
> #21196: FILE: drivers/net/bnx2x_init.h:138:
> +#define INIT_INTERNAL0_MEM_WR(block_bar, block, reg, \
> + part, hw, value, off, len) \
Not sure, I think this one is too, but I'm going to rewrite bnx2x_init.h anyway,
this code is going away.
...
Thanks
Eliezer
^ permalink raw reply
* Re: [PATCH][BNX2X] round three - sparse warnings.
From: Eliezer Tamir @ 2007-10-11 17:21 UTC (permalink / raw)
To: Stephen Hemminger
Cc: davem@davemloft.net, netdev@vger.kernel.org, jeff@garzik.org,
Michael Chan
In-Reply-To: <20071010185455.79dafc7b@freepuppy.rosehill>
On Wed, 2007-10-10 at 18:54 -0700, Stephen Hemminger wrote:
> Please fix these...
>
Thanks,
All that code is going to be rewritten, as per Dave's request,
but I will make sure to test the new code with sparse.
Eliezer
^ permalink raw reply
* Re: [PATCH][NETNS] Make ifindex generation per-namespace
From: Eric W. Biederman @ 2007-10-11 17:22 UTC (permalink / raw)
To: Johannes Berg; +Cc: Pavel Emelyanov, David Miller, Linux Netdev List, devel
In-Reply-To: <1192095150.4770.25.camel@johannes.berg>
Johannes Berg <johannes@sipsolutions.net> writes:
> On Wed, 2007-10-10 at 13:51 -0600, Eric W. Biederman wrote:
>
>> Yes. Netlink sockets are per-namespace and you can use the namespace
>> of a netlink socket to look up a netdev.
>
> Ok, thanks. I still haven't really looked into the wireless vs. net
> namespaces problem but this will probably help.
I think I may even have some patches in my proof of concept tree that
address some of the wireless issues. Especially rtnetlink ones.
Generally those cases haven't been hard to spot.
Having hash tables and the like that hash and do key compares
on an ifindex instead of a net_device * are the in kernel places that
make it very hard to have duplicate ifindexes.
Thinking about it probably the biggest challenge to deal with
is iff in struct sk_buff.
Eric
^ permalink raw reply
* Re: e100 problems in .23rc8 ?
From: Dave Jones @ 2007-10-11 17:25 UTC (permalink / raw)
To: Kok, Auke; +Cc: Herbert Xu, netdev, esandeen, dmack
In-Reply-To: <470E4AFA.60507@intel.com>
On Thu, Oct 11, 2007 at 09:10:34AM -0700, Kok, Auke wrote:
> Herbert Xu wrote:
> > On Wed, Oct 10, 2007 at 08:36:38PM -0400, Dave Jones wrote:
> >> The e1000 changes you reference above, is this the changeset you mean?
> >>
> >> commit 416b5d10afdc797c21c457ade3714e8f2f75edd9
> >> Author: Auke Kok <auke-jan.h.kok@intel.com>
> >> Date: Fri Jun 1 10:22:39 2007 -0700
> >>
> >> e1000: disable polling before registering netdevice
> >
> > Yep.
>
> this patch actually called napi_disable() in the probe routine which was wrong,
> but e100 does not do that. Nonetheless e100 doesn't call netif_carrier_off() and
> netif_stop_queue(), so to make e100 the same as e1000 we should probably do this,
> see below.
>
> Dave, can you see if this resolves the issue for you? If so then we might want to
> push this to -stable.
Will do, thanks Auke.
Eric/David, the Fedora 8 RPM version 2.6.23-6.fc8 will have this if you
want to give it a shot too. It'll be at
http://people.redhat.com/davej/kernels/Fedora/f7.92/ when it's done
building in an hour or so.
Dave
--
http://www.codemonkey.org.uk
^ permalink raw reply
* [IPv6] Update setsockopt(IPV6_MULTICAST_IF) to support RFC 3493, try2
From: Brian Haley @ 2007-10-11 17:40 UTC (permalink / raw)
To: David Miller, YOSHIFUJI Hideaki; +Cc: netdev@vger.kernel.org, David Stevens
[-- Attachment #1: Type: text/plain, Size: 621 bytes --]
Hi,
From RFC 3493, Section 5.2:
IPV6_MULTICAST_IF
Set the interface to use for outgoing multicast packets. The
argument is the index of the interface to use. If the
interface index is specified as zero, the system selects the
interface (for example, by looking up the address in a routing
table and using the resulting interface).
This patch adds support for (index == 0) to reset the value to it's
original state, allowing the system to choose the best interface. IPv4
already behaves this way.
-Brian
Signed-off-by: Brian Haley <brian.haley@hp.com>
[-- Attachment #2: ipv6.multicast_if.patch --]
[-- Type: text/x-patch, Size: 655 bytes --]
diff --git a/net/ipv6/ipv6_sockglue.c b/net/ipv6/ipv6_sockglue.c
index 532425d..1334fc1 100644
--- a/net/ipv6/ipv6_sockglue.c
+++ b/net/ipv6/ipv6_sockglue.c
@@ -539,12 +539,15 @@ done:
case IPV6_MULTICAST_IF:
if (sk->sk_type == SOCK_STREAM)
goto e_inval;
- if (sk->sk_bound_dev_if && sk->sk_bound_dev_if != val)
- goto e_inval;
- if (__dev_get_by_index(&init_net, val) == NULL) {
- retv = -ENODEV;
- break;
+ if (val) {
+ if (sk->sk_bound_dev_if && sk->sk_bound_dev_if != val)
+ goto e_inval;
+
+ if (__dev_get_by_index(&init_net, val) == NULL) {
+ retv = -ENODEV;
+ break;
+ }
}
np->mcast_oif = val;
retv = 0;
^ permalink raw reply related
* Re: [IPv6] Update setsockopt(IPV6_MULTICAST_IF) to support RFC 3493, try2
From: David Stevens @ 2007-10-11 17:49 UTC (permalink / raw)
To: Brian Haley
Cc: David Miller, netdev@vger.kernel.org, netdev-owner,
YOSHIFUJI Hideaki
In-Reply-To: <470E5FF8.7050004@hp.com>
Acked-by: David L Stevens <dlstevens@us.ibm.com>
>
> Signed-off-by: Brian Haley <brian.haley@hp.com>
> diff --git a/net/ipv6/ipv6_sockglue.c b/net/ipv6/ipv6_sockglue.c
> index 532425d..1334fc1 100644
> --- a/net/ipv6/ipv6_sockglue.c
> +++ b/net/ipv6/ipv6_sockglue.c
> @@ -539,12 +539,15 @@ done:
> case IPV6_MULTICAST_IF:
> if (sk->sk_type == SOCK_STREAM)
> goto e_inval;
> - if (sk->sk_bound_dev_if && sk->sk_bound_dev_if != val)
> - goto e_inval;
>
> - if (__dev_get_by_index(&init_net, val) == NULL) {
> - retv = -ENODEV;
> - break;
> + if (val) {
> + if (sk->sk_bound_dev_if && sk->sk_bound_dev_if != val)
> + goto e_inval;
> +
> + if (__dev_get_by_index(&init_net, val) == NULL) {
> + retv = -ENODEV;
> + break;
> + }
> }
> np->mcast_oif = val;
> retv = 0;
^ permalink raw reply
* Re: [PATCH][BNX2X] round three
From: Eliezer Tamir @ 2007-10-11 17:53 UTC (permalink / raw)
To: David Miller; +Cc: netdev, jeff, mchan
In-Reply-To: <20071010.175942.55509516.davem@davemloft.net>
On Wed, 2007-10-10 at 17:59 -0700, David Miller wrote:
...
> I was going to add this to the tree for 2.6.24 but there is simply
> too much super-ugly stuff in this driver for me to do so.
We will rewrite bnx2x_hsi.h bnx2x_init.h and bnx2x_init_vlaues.h.
Does bnx2x_asm.h look OK?
> Look, there is zero way I'm adding a driver that's written like this
> to the tree.
>
...
> This huge header file full of register programming magic goes way
> beyond the limits of "reasonable" and has to go.
Will it be OK if we replace it with 4-5 headers so we can maintain them
better manually. (I'm asking what is the upper bound to the number of
header files you would consider reasonable for this driver.)
Thanks
Eliezer
^ permalink raw reply
* iproute2: resend of patches from Debian.
From: Andreas Henriksson @ 2007-10-11 18:25 UTC (permalink / raw)
To: shemminger; +Cc: netdev
[-- Attachment #1: Type: text/plain, Size: 1246 bytes --]
Hello all!
Posting this set of patches again, since there where no reaction last time I sent them.
Regards,
Andreas Henriksson
----
Hello Stephen Hemminger and the rest of the people on the nevdev list!
I'm posting a bunch of patches for iproute2. A few I've written myself
and have a Signed-off-by with my name in them, the others I've picked up
from the iproute package in Debian. I tried my best to add a decent
description, references to debian bug number and when possible a From
header suggesting who the original author might be.
They should all apply with some offset and sometimes a bit fuzz to the
current iproute2 git tree.
new patches posted to the debian bug tracking system:
add-mpath-docs.diff
doublefree.diff
fix-layer-syntax.diff
new-manpages.diff
tick2time-fix.diff
wrandom-fix.diff
fixes in the debian iproute package:
empty_linkname.diff
ip_address_flush_loop.diff
lartc.diff
netbug_fix.diff
okey-ikey.diff
remove_tc_filters_reference.diff
patches updating help text syntax:
ip_route_usage.diff
ip_rule_usage.diff
patches fixing documentation typos:
fix_ss_typo.diff
ip.8-typo.diff
ip_address.diff
libnetlink_typo.diff
manpages-typo.diff
tcb_htb_typo.diff
tc_cbq_details_typo.diff
--
Regards,
Andreas Henriksson
[-- Attachment #2: empty_linkname.diff --]
[-- Type: text/x-patch, Size: 572 bytes --]
Disallow empty link name.
From: Alexander Wirt <formorer@debian.org>
Patch from debian iproute package.
diff -urNad iproute-20060323~/ip/iplink.c iproute-20060323/ip/iplink.c
--- iproute-20060323~/ip/iplink.c 2006-03-22 00:57:50.000000000 +0100
+++ iproute-20060323/ip/iplink.c 2006-09-08 21:07:14.000000000 +0200
@@ -384,6 +384,10 @@
}
if (newname && strcmp(dev, newname)) {
+ if (strlen(newname) == 0) {
+ printf("\"\" is not valid device identifier\n",dev);
+ return -1;
+ }
if (do_changename(dev, newname) < 0)
return -1;
dev = newname;
[-- Attachment #3: ip_address_flush_loop.diff --]
[-- Type: text/x-patch, Size: 1153 bytes --]
Abort flush after 10 seconds.
From: Alexander Wirt <formorer@debian.org>
Patch from Debian iproute package.
diff -urNad iproute-20060323~/ip/ipaddress.c iproute-20060323/ip/ipaddress.c
--- iproute-20060323~/ip/ipaddress.c 2006-09-08 17:02:03.000000000 +0200
+++ iproute-20060323/ip/ipaddress.c 2006-09-08 17:03:01.000000000 +0200
@@ -15,6 +15,7 @@
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
+#include <time.h>
#include <syslog.h>
#include <fcntl.h>
#include <sys/ioctl.h>
@@ -589,6 +590,7 @@
if (flush) {
int round = 0;
char flushb[4096-512];
+ time_t start = time(0);
filter.flushb = flushb;
filter.flushp = 0;
@@ -617,6 +619,12 @@
printf("Warum?\n");
return 1;
+ if (time(0) - start > 10) {
+ printf("\n*** Flush not completed after %ld seconds, %d entries remain ***\n",
+ time(0) - start, filter.flushed);
+ exit(1);
+ }
+
if (show_stats) {
printf("\n*** Round %d, deleting %d addresses ***\n", round, filter.flushed);
fflush(stdout);
[-- Attachment #4: lartc.diff --]
[-- Type: text/x-patch, Size: 755 bytes --]
Add references to lartc, also drop bogus reference to tc-filters
Patch from Debian iproute package.
diff -Nur old/man/man8/ip.8 new/man/man8/ip.8
--- old/man/man8/ip.8 2005-01-05 22:40:29.000000000 +0000
+++ new/man/man8/ip.8 2005-01-05 22:47:03.000000000 +0000
@@ -1803,6 +1803,8 @@
.RB "IP Command reference " ip-cref.ps
.br
.RB "IP tunnels " ip-cref.ps
+.br
+.RB http://lartc.org/
.SH AUTHOR
diff -Nur old/man/man8/tc.8 new/man/man8/tc.8
--- old/man/man8/tc.8 2004-10-19 20:49:02.000000000 +0000
+++ new/man/man8/tc.8 2005-01-05 22:46:15.000000000 +0000
@@ -341,7 +341,7 @@
.BR tc-pfifo (8),
.BR tc-bfifo (8),
.BR tc-pfifo_fast (8),
-.BR tc-filters (8)
+.BR http://lartc.org/
.SH AUTHOR
Manpage maintained by bert hubert (ahu@ds9a.nl)
[-- Attachment #5: netbug_fix.diff --]
[-- Type: text/x-patch, Size: 1490 bytes --]
Fix misc/netbug script.
See the following debian bugs:
http://bugs.debian.org/289541
http://bugs.debian.org/313540
http://bugs.debian.org/313541
http://bugs.debian.org/313544
http://bugs.debian.org/347699
Changes from Debian iproute package rediffed to apply against current
iproute2 git tree.
--- iproute2/misc/netbug 2007-09-09 17:36:19.000000000 +0200
+++ iproute-20070313/misc/netbug 2007-09-09 20:42:01.000000000 +0200
@@ -1,23 +1,16 @@
#! /bin/bash
+set -e
+
echo -n "Send network configuration summary to [ENTER means kuznet@ms2.inr.ac.ru] "
IFS="" read mail || exit 1
[ -z "$mail" ] && mail=kuznet@ms2.inr.ac.ru
+netbug=`mktemp -d -t netbug.XXXXXX` || (echo "$0: Cannot create temporary directory" >&2; exit 1; )
+netbugtar=`tempfile -d $netbug --suffix=tar.gz` || (echo "$0: Cannot create temporary file" >&2; exit 1; )
+tmppath=$netbug
+trap "/bin/rm -rf $netbug $netbugtar" 0 1 2 3 13 15
-netbug=""
-while [ "$netbug" = "" ]; do
- netbug=`echo netbug.$$.$RANDOM`
- if [ -e /tmp/$netbug ]; then
- netbug=""
- fi
-done
-
-tmppath=/tmp/$netbug
-
-trap "rm -rf $tmppath $tmppath.tar.gz" 0 SIGINT
-
-mkdir $tmppath
mkdir $tmppath/net
cat /proc/slabinfo > $tmppath/slabinfo
@@ -44,9 +37,8 @@
fi
cd /tmp
-tar c $netbug | gzip -9c > $netbug.tar.gz
-
-uuencode $netbug.tar.gz $netbug.tar.gz | mail -s $netbug "$mail"
+tar c $tmppath | gzip -9c > $netbugtar
+uuencode $netbugtar $netbugtar | mail -s $netbug "$mail"
echo "Sending to <$mail>; subject is $netbug"
[-- Attachment #6: okey-ikey.diff --]
[-- Type: text/x-patch, Size: 681 bytes --]
Fix typo in GRE tunnels (i_key vs. o_key).
From: <herbert@gondor.apana.org.au>
If a dotted quad ikey is specified for GRE tunnels, it gets set as the
okey instead. This patch fixes it.
See Debian bug #200714 - http://bugs.debian.org/200714
Patch from Debian iproute package.
--- iproute/ip/iptunnel.c.orig 2003-07-10 11:47:06.000000000 +1000
+++ iproute/ip/iptunnel.c 2003-07-10 11:47:11.000000000 +1000
@@ -221,7 +221,7 @@
NEXT_ARG();
p->i_flags |= GRE_KEY;
if (strchr(*argv, '.'))
- p->o_key = get_addr32(*argv);
+ p->i_key = get_addr32(*argv);
else {
if (get_unsigned(&uval, *argv, 0)<0) {
fprintf(stderr, "invalid value of \"ikey\"\n");
[-- Attachment #7: remove_tc_filters_reference.diff --]
[-- Type: text/x-patch, Size: 1084 bytes --]
Remove bogus reference to tc-filters(8) from tc(8) manpage.
See debian bug #289225 - http://bugs.debian.org/289225
Patch from Debian iproute package.
diff -urNad iproute-20070313~/man/man8/tc.8 iproute-20070313/man/man8/tc.8
--- iproute-20070313~/man/man8/tc.8 2007-06-10 20:22:40.000000000 +0200
+++ iproute-20070313/man/man8/tc.8 2007-06-10 20:23:16.000000000 +0200
@@ -202,8 +202,7 @@
tc filters
If tc filters are attached to a class, they are consulted first
for relevant instructions. Filters can match on all fields of a packet header,
-as well as on the firewall mark applied by ipchains or iptables. See
-.BR tc-filters (8).
+as well as on the firewall mark applied by ipchains or iptables.
.TP
Type of Service
Some qdiscs have built in rules for classifying packets based on the TOS field.
@@ -242,8 +241,7 @@
.TP
FILTERS
Filters have a three part ID, which is only needed when using a hashed
-filter hierarchy, for which see
-.BR tc-filters (8).
+filter hierarchy.
.SH UNITS
All parameters accept a floating point number, possibly followed by a unit.
.P
[-- Attachment #8: add-mpath-docs.diff --]
[-- Type: text/x-patch, Size: 3607 bytes --]
Add mpath to ip manpage.
From: Norbert Buchmuller <norbi@nix.hu>
The 'mpath' parameter of 'ip route' is not documented in the manual page
nor in ip-cref.tex.
...huge part of the text in the patch was taken from the net/ipv4/Kconfig
file in the Linux kernel source (2.6.18). I suppose that's OK because both
Linux and iproute2 are GPL'd, but I let you know anyway.
See Debian bug #428442 - http://bugs.debian.org/428442
diff -Naur iproute-20061002/doc/ip-cref.tex iproute-20061002.fixed/doc/ip-cref.tex
--- iproute-20061002/doc/ip-cref.tex 2007-06-11 19:26:52.000000000 +0200
+++ iproute-20061002.fixed/doc/ip-cref.tex 2007-06-11 20:34:09.000000000 +0200
@@ -1348,6 +1348,28 @@
route reflecting its relative bandwidth or quality.
\end{itemize}
+\item \verb|mpath MP_ALGO|
+
+--- the multipath algo to use.
+\verb|MP_ALGO| may be one of the following values:
+\begin{itemize}
+\item \verb|rr| --- round robin algorithm.
+Multipath routes are chosen according to Round Robin.
+\item \verb|drr| --- interface round robin algorithm.
+Connections are distributed in a round robin fashion over the
+available interfaces. This policy makes sense if the connections
+should be primarily distributed on interfaces and not on routes.
+\item \verb|random| --- random algorithm.
+Multipath routes are chosen in a random fashion. Actually,
+there is no weight for a route. The advantage of this policy
+is that it is implemented stateless and therefore introduces only
+a very small delay.
+\item \verb|wrandom| --- weighted random algorithm.
+Multipath routes are chosen in a weighted random fashion.
+The per route weights are the weights visible via ip route 2. As the
+corresponding state management introduces some overhead routing delay
+is increased.
+\end{itemize}
\item \verb|scope SCOPE_VAL|
--- the scope of the destinations covered by the route prefix.
diff -Naur iproute-20061002/man/man8/ip.8 iproute-20061002.fixed/man/man8/ip.8
--- iproute-20061002/man/man8/ip.8 2007-06-11 19:26:52.000000000 +0200
+++ iproute-20061002.fixed/man/man8/ip.8 2007-06-11 20:26:43.000000000 +0200
@@ -146,7 +146,9 @@
.B scope
.IR SCOPE " ] [ "
.B metric
-.IR METRIC " ]"
+.IR METRIC " ] [ "
+.B mpath
+.IR MP_ALGO " ]"
.ti -8
.IR INFO_SPEC " := " "NH OPTIONS FLAGS" " ["
@@ -205,6 +207,10 @@
.BR onlink " | " pervasive " ]"
.ti -8
+.IR MP_ALGO " := [ "
+.BR rr " | " drr " | " random " | " wrandom " ]"
+
+.ti -8
.IR RTPROTO " := [ "
.BR kernel " | " boot " | " static " |"
.IR NUMBER " ]"
@@ -1116,6 +1122,38 @@
.in -8
.TP
+.BI mpath " MP_ALGO"
+the multipath algo to use.
+.I MP_ALGO
+may be one of the following values:
+
+.in +8
+.B rr
+- round robin algorithm.
+Multipath routes are chosen according to Round Robin.
+.sp
+.B drr
+- interface round robin algorithm.
+Connections are distributed in a round robin fashion over the
+available interfaces. This policy makes sense if the connections
+should be primarily distributed on interfaces and not on routes.
+.sp
+.B random
+- random algorithm.
+Multipath routes are chosen in a random fashion. Actually,
+there is no weight for a route. The advantage of this policy
+is that it is implemented stateless and therefore introduces only
+a very small delay.
+.sp
+.B wrandom
+- weighted random algorithm.
+Multipath routes are chosen in a weighted random fashion.
+The per route weights are the weights visible via ip route 2. As the
+corresponding state management introduces some overhead routing delay
+is increased.
+.in -8
+
+.TP
.BI scope " SCOPE_VAL"
the scope of the destinations covered by the route prefix.
.I SCOPE_VAL
[-- Attachment #9: doublefree.diff --]
[-- Type: text/x-patch, Size: 1675 bytes --]
Fix corruption when using batch files with comments and broken lines.
See Debian bug #398912 - http://bugs.debian.org/398912
Signed-off-by: Andreas Henriksson <andreas@fatal.se>
diff -urip iproute-20061002/include/utils.h iproute-20061002.fixed2/include/utils.h
--- iproute-20061002/include/utils.h 2006-10-02 22:13:34.000000000 +0200
+++ iproute-20061002.fixed2/include/utils.h 2007-08-16 00:51:58.000000000 +0200
@@ -132,7 +132,7 @@ int print_timestamp(FILE *fp);
#define ARRAY_SIZE(x) (sizeof(x) / sizeof((x)[0]))
extern int cmdlineno;
-extern size_t getcmdline(char **line, size_t *len, FILE *in);
+extern ssize_t getcmdline(char **line, size_t *len, FILE *in);
extern int makeargs(char *line, char *argv[], int maxargs);
#endif /* __UTILS_H__ */
diff -urip iproute-20061002/lib/utils.c iproute-20061002.fixed2/lib/utils.c
--- iproute-20061002/lib/utils.c 2006-10-02 22:13:34.000000000 +0200
+++ iproute-20061002.fixed2/lib/utils.c 2007-08-16 00:49:02.000000000 +0200
@@ -578,9 +578,9 @@ int print_timestamp(FILE *fp)
int cmdlineno;
/* Like glibc getline but handle continuation lines and comments */
-size_t getcmdline(char **linep, size_t *lenp, FILE *in)
+ssize_t getcmdline(char **linep, size_t *lenp, FILE *in)
{
- size_t cc;
+ ssize_t cc;
char *cp;
if ((cc = getline(linep, lenp, in)) < 0)
@@ -608,9 +608,11 @@ size_t getcmdline(char **linep, size_t *
if (cp)
*cp = '\0';
- *linep = realloc(*linep, strlen(*linep) + strlen(line1) + 1);
+ *lenp = strlen(*linep) + strlen(line1) + 1;
+ *linep = realloc(*linep, *lenp);
if (!*linep) {
fprintf(stderr, "Out of memory\n");
+ *lenp = 0;
return -1;
}
cc += cc1 - 2;
[-- Attachment #10: fix-layer-syntax.diff --]
[-- Type: text/x-patch, Size: 2089 bytes --]
Fix ematch cmp and nbyte syntax help text.
From: Lionel Elie Mamane <lionel@mamane.lu>
The help/usage screen of ematch cmp and nbyte say recognised symbolic
values for "layer FOO" are link, header and next-header, but the code
does _not_ implement that: it will recognise "next-header" as what is
supposed to be "header" and will not recognise "header". The right
symbolic values seem to be link, network, transport. Here is a patch
that changes the help/usage screen to match the code.
See Debian bug #438653 - http://bugs.debian.org/438653
diff --recursive -N -u iproute-20070313.deb/tc/em_cmp.c iproute-20070313.lio/tc/em_cmp.c
--- iproute-20070313.deb/tc/em_cmp.c 2007-03-13 22:50:56.000000000 +0100
+++ iproute-20070313.lio/tc/em_cmp.c 2007-08-18 18:44:26.773897785 +0200
@@ -1,5 +1,5 @@
/*
- * em_cmp.c Simle coparison Ematch
+ * em_cmp.c Simple comparison Ematch
*
* This program is free software; you can distribute it and/or
* modify it under the terms of the GNU General Public License
@@ -32,7 +32,7 @@
"Usage: cmp(ALIGN at OFFSET [ ATTRS ] { eq | lt | gt } VALUE)\n" \
"where: ALIGN := { u8 | u16 | u32 }\n" \
" ATTRS := [ layer LAYER ] [ mask MASK ] [ trans ]\n" \
- " LAYER := { link | header | next-header | 0..%d }\n" \
+ " LAYER := { link | network | transport | 0..%d }\n" \
"\n" \
"Example: cmp(u16 at 3 layer 2 mask 0xff00 gt 20)\n",
TCF_LAYER_MAX);
diff --recursive -N -u iproute-20070313.deb/tc/em_nbyte.c iproute-20070313.lio/tc/em_nbyte.c
--- iproute-20070313.deb/tc/em_nbyte.c 2007-03-13 22:50:56.000000000 +0100
+++ iproute-20070313.lio/tc/em_nbyte.c 2007-08-18 18:45:48.159607231 +0200
@@ -32,7 +32,7 @@
"Usage: nbyte(NEEDLE at OFFSET [layer LAYER])\n" \
"where: NEEDLE := { string | \"c-escape-sequence\" }\n" \
" OFFSET := int\n" \
- " LAYER := { link | header | next-header | 0..%d }\n" \
+ " LAYER := { link | network | transport | 0..%d }\n" \
"\n" \
"Example: nbyte(\"ababa\" at 12 layer 1)\n",
TCF_LAYER_MAX);
[-- Attachment #11: new-manpages.diff --]
[-- Type: text/x-patch, Size: 6032 bytes --]
Add new manpages and symlinks.
Symlink rtstat(8) and ctstat(8) to lnstat(8).
Add rtacct/nstat manpage based on doc/nstat.sgml as rtacct(8).
Symlink nstat(8) to rtacct(8).
Add arpd(8) symlink based on doc/arpd.sgml.
Signed-off-by: Andreas Henriksson <andreas@fatal.se>
diff --git a/Makefile b/Makefile
index af0d5e4..6c976dd 100644
--- a/Makefile
+++ b/Makefile
@@ -53,6 +53,9 @@ install: all
install -m 0755 -d $(DESTDIR)$(MANDIR)/man8
install -m 0644 $(shell find man/man8 -maxdepth 1 -type f) $(DESTDIR)$(MANDIR)/man8
ln -sf tc-bfifo.8 $(DESTDIR)$(MANDIR)/man8/tc-pfifo.8
+ ln -sf lnstat.8 $(DESTDIR)$(MANDIR)/man8/rtstat.8
+ ln -sf lnstat.8 $(DESTDIR)$(MANDIR)/man8/ctstat.8
+ ln -sf rtacct.8 $(DESTDIR)$(MANDIR)/man8/nstat.8
install -m 0755 -d $(DESTDIR)$(MANDIR)/man3
install -m 0644 $(shell find man/man3 -maxdepth 1 -type f) $(DESTDIR)$(MANDIR)/man3
diff --git a/man/man8/arpd.8 b/man/man8/arpd.8
new file mode 100644
index 0000000..d172600
--- /dev/null
+++ b/man/man8/arpd.8
@@ -0,0 +1,66 @@
+.TH ARPD 8 "28 June, 2007"
+
+.SH NAME
+arpd \- userspace arp daemon.
+
+.SH SYNOPSIS
+Usage: arpd [ -lk ] [ -a N ] [ -b dbase ] [ -f file ] [ interfaces ]
+
+.SH DESCRIPTION
+The
+.B arpd
+daemon collects gratuitous ARP information, saving it on local disk and feeding it to kernel on demand to avoid redundant broadcasting due to limited size of kernel ARP cache.
+
+.SH OPTIONS
+.TP
+-h -?
+Print help
+.TP
+-l
+Dump arpd database to stdout and exit. Output consists of three columns: interface index, IP address and MAC address. Negative entries for dead hosts are also shown, in this case MAC address is replaced by word FAILED followed by colon and time when the fact that host is dead was proven the last time.
+.TP
+-f <FILE>
+Read and load arpd database from FILE in text format similar dumped by option -l. Exit after load, probably listing resulting database, if option -l is also given. If FILE is -, stdin is read to get ARP table.
+.TP
+-b <DATABASE>
+location of database file. Default location is /var/lib/arpd/arpd.db
+.TP
+-a <NUMBER>
+arpd not only passively listens ARP on wire, but also send brodcast queries itself. NUMBER is number of such queries to make before destination is considered as dead. When arpd is started as kernel helper (i.e. with app_solicit enabled in sysctl or even with option -k) without this option and still did not learn enough information, you can observe 1 second gaps in service. Not fatal, but not good.
+.TP
+-k
+Suppress sending broadcast queries by kernel. It takes sense together with option -a.
+.TP
+-n <TIME>
+Timeout of negative cache. When resolution fails arpd suppresses further attempts to resolve for this period. It makes sense only together with option -k This timeout should not be too much longer than boot time of a typical host not supporting gratuitous ARP. Default value is 60 seconds.
+.TP
+-r <RATE>
+Maximal steady rate of broadcasts sent by arpd in packets per second. Default value is 1.
+.TP
+-B <NUMBER>
+Number of broadcasts sent by <tt/arpd/ back to back. Default value is 3. Together with option <tt/-R/ this option allows to police broadcasting not to exceed B+R*T over any interval of time T.
+.P
+<INTERFACE> is the name of networking interface to watch. If no interfaces given, arpd monitors all the interfaces. In this case arpd does not adjust sysctl parameters, it is supposed user does this himself after arpd is started.
+.P
+Signals
+.br
+arpd exits gracefully syncing database and restoring adjusted sysctl parameters, when receives SIGINT or SIGTERM. SIGHUP syncs database to disk. SIGUSR1 sends some statistics to syslog. Effect of another signals is undefined, they may corrupt database and leave sysctl praameters in an unpredictable state.
+.P
+Note
+.br
+In order for arpd to be able to serve as ARP resolver, kernel must be compiled with the option CONFIG_ARPD and, in the case when interface list in not given on command line, variable app_solicit on interfaces of interest should be in /proc/sys/net/ipv4/neigh/*. If this is not made arpd still collects gratuitous ARP information in its database.
+.SH EXAMPLES
+.TP
+arpd -b /var/tmp/arpd.db
+Start arpd to collect gratuitous ARP, but not messing with kernel functionality.
+.TP
+killall arpd ; arpd -l -b /var/tmp/arpd.db
+Look at result after some time.
+.TP
+arpd -b /var/tmp/arpd.db -a 1 eth0 eth1
+Enable kernel helper, leaving leading role to kernel.
+.TP
+arpd -b /var/tmp/arpd.db -a 3 -k eth0 eth1
+Completely replace kernel resolution on interfaces eth0 and eth1. In this case kernel still does unicast probing to validate entries, but all the broadcast activity is suppressed and made under authority of arpd.
+.PP
+This is mode which arpd is supposed to work normally. It is not default just to prevent occasional enabling of too aggressive mode occasionally.
diff --git a/man/man8/rtacct.8 b/man/man8/rtacct.8
new file mode 100644
index 0000000..fb9afe8
--- /dev/null
+++ b/man/man8/rtacct.8
@@ -0,0 +1,48 @@
+.TH RTACCT 8 "27 June, 2007"
+
+.SH NAME
+nstat, rtacct - network statistics tools.
+
+.SH SYNOPSIS
+Usage: nstat [ -h?vVzrnasd:t: ] [ PATTERN [ PATTERN ] ]
+.br
+Usage: rtacct [ -h?vVzrnasd:t: ] [ ListOfRealms ]
+
+.SH DESCRIPTION
+.B nstat
+and
+.B rtacct
+are simple tools to monitor kernel snmp counters and network interface statistics.
+
+.SH OPTIONS
+.TP
+-h -?
+Print help
+.TP
+-v -V
+Print version
+.TP
+-z
+Dump zero counters too. By default they are not shown.
+.TP
+-r
+Reset history.
+.TP
+-n
+Do not display anything, only update history.
+.TP
+-a
+Dump absolute values of counters. The default is to calculate increments since the previous use.
+.TP
+-s
+Do not update history, so that the next time you will see counters including values accumulated to the moment of this measurement too.
+.TP
+-d <INTERVAL>
+Run in daemon mode collecting statistics. <INTERVAL> is interval between measurements in seconds.
+.TP
+-t <INTERVAL>
+Time interval to average rates. Default value is 60 seconds.
+
+.SH SEE ALSO
+lnstat(8)
+
[-- Attachment #12: tick2time-fix.diff --]
[-- Type: text/x-patch, Size: 1318 bytes --]
Fix overflow in time2tick / tick2time.
The helper functions gets passed an unsigned int, which gets cast to long
and overflows.
See Debian bug #175462 - http://bugs.debian.org/175462
Signed-off-by: Andreas Henriksson <andreas@fatal.se>
diff -uri iproute-20070313.orig/tc/tc_core.c iproute-20070313/tc/tc_core.c
--- iproute-20070313.orig/tc/tc_core.c 2007-03-13 22:50:56.000000000 +0100
+++ iproute-20070313/tc/tc_core.c 2007-08-15 00:41:30.000000000 +0200
@@ -35,12 +35,12 @@
}
-long tc_core_time2tick(long time)
+unsigned tc_core_time2tick(unsigned time)
{
return time*tick_in_usec;
}
-long tc_core_tick2time(long tick)
+unsigned tc_core_tick2time(unsigned tick)
{
return tick/tick_in_usec;
}
diff -uri iproute-20070313.orig/tc/tc_core.h iproute-20070313/tc/tc_core.h
--- iproute-20070313.orig/tc/tc_core.h 2007-03-13 22:50:56.000000000 +0100
+++ iproute-20070313/tc/tc_core.h 2007-08-15 00:41:49.000000000 +0200
@@ -7,8 +7,8 @@
#define TIME_UNITS_PER_SEC 1000000000
int tc_core_time2big(long time);
-long tc_core_time2tick(long time);
-long tc_core_tick2time(long tick);
+unsigned tc_core_time2tick(unsigned time);
+unsigned tc_core_tick2time(unsigned tick);
long tc_core_time2ktime(long time);
long tc_core_ktime2time(long ktime);
unsigned tc_calc_xmittime(unsigned rate, unsigned size);
[-- Attachment #13: wrandom-fix.diff --]
[-- Type: text/x-patch, Size: 1082 bytes --]
Fix off-by-one in print of wrandom algo.
From: Norbert Buchmuller <norbi@nix.hu>
The 'wrandom' multipath algo is recognised when adding the route, but
not resolved when it is printed (prints 'unknown'):
ianus:~# ip ro add 1.2.3.4 mpath wrandom nexthop dev ppp0 weight 1 nexthop dev ppp1 weight 2
ianus:~# ip ro get to 1.2.3.4
1.2.3.4 mpath unknown dev ppp0 src 62.77.192.67
cache mtu 1492 advmss 1452 hoplimit 64
ianus:~# ip ro del 1.2.3.4 mpath wrandom nexthop dev ppp0 weight 1 nexthop dev ppp1 weight 2
See Debian bug #428440 - http://bugs.debian.org/428440
diff -Naur iproute-20061002/ip/iproute.c iproute-20061002.fixed/ip/iproute.c
--- iproute-20061002/ip/iproute.c 2007-06-11 19:26:52.000000000 +0200
+++ iproute-20061002.fixed/ip/iproute.c 2007-06-11 19:27:29.000000000 +0200
@@ -358,7 +358,7 @@
__u32 mp_alg = *(__u32*) RTA_DATA(tb[RTA_MP_ALGO]);
if (mp_alg > IP_MP_ALG_NONE) {
fprintf(fp, "mpath %s ",
- mp_alg < IP_MP_ALG_MAX ? mp_alg_names[mp_alg] : "unknown");
+ mp_alg <= IP_MP_ALG_MAX ? mp_alg_names[mp_alg] : "unknown");
}
}
[-- Attachment #14: ip_route_usage.diff --]
[-- Type: text/x-patch, Size: 1032 bytes --]
Add src syntax to route help text.
From: Alexander Wirt <formorer@debian.org>
Add src option to ip_route usage.
See Debian bug #226142 - http://bugs.debian.org/226142
diff -urNad iproute-20061002~/ip/iproute.c iproute-20061002/ip/iproute.c
--- iproute-20061002~/ip/iproute.c 2006-10-15 16:44:25.000000000 +0200
+++ iproute-20061002/ip/iproute.c 2006-10-15 16:50:29.000000000 +0200
@@ -73,7 +73,7 @@
fprintf(stderr, "OPTIONS := FLAGS [ mtu NUMBER ] [ advmss NUMBER ]\n");
fprintf(stderr, " [ rtt NUMBER ] [ rttvar NUMBER ]\n");
fprintf(stderr, " [ window NUMBER] [ cwnd NUMBER ] [ initcwnd NUMBER ]\n");
- fprintf(stderr, " [ ssthresh NUMBER ] [ realms REALM ]\n");
+ fprintf(stderr, " [ ssthresh NUMBER ] [ realms REALM ] [ src ADDRESS ]\n");
fprintf(stderr, "TYPE := [ unicast | local | broadcast | multicast | throw |\n");
fprintf(stderr, " unreachable | prohibit | blackhole | nat ]\n");
fprintf(stderr, "TABLE_ID := [ local | main | default | all | NUMBER ]\n");
[-- Attachment #15: ip_rule_usage.diff --]
[-- Type: text/x-patch, Size: 935 bytes --]
Add syntax for rule prio help text.
From: Alexander Wirt <formorer@debian.org>
Add [ prio NUMBER ] to ip_rule.c
See Debian bug #213673 - http://bugs.debian.org/213673
diff -urNad iproute-20070313~/ip/iprule.c iproute-20070313/ip/iprule.c
--- iproute-20070313~/ip/iprule.c 2007-03-13 22:50:56.000000000 +0100
+++ iproute-20070313/ip/iprule.c 2007-06-10 17:54:46.000000000 +0200
@@ -38,7 +38,7 @@
{
fprintf(stderr, "Usage: ip rule [ list | add | del | flush ] SELECTOR ACTION\n");
fprintf(stderr, "SELECTOR := [ not ] [ from PREFIX ] [ to PREFIX ] [ tos TOS ] [ fwmark FWMARK[/MASK] ]\n");
- fprintf(stderr, " [ dev STRING ] [ pref NUMBER ]\n");
+ fprintf(stderr, " [ dev STRING ] [ pref NUMBER ] [ prio NUMBER ]\n");
fprintf(stderr, "ACTION := [ table TABLE_ID ]\n");
fprintf(stderr, " [ prohibit | reject | unreachable ]\n");
fprintf(stderr, " [ realms [SRCREALM/]DSTREALM ]\n");
[-- Attachment #16: fix_ss_typo.diff --]
[-- Type: text/x-patch, Size: 603 bytes --]
Fix typo in ss manpage.
Patch from debian iproute package.
diff -urNad iproute-20070313~/man/man8/ss.8 iproute-20070313/man/man8/ss.8
--- iproute-20070313~/man/man8/ss.8 2007-03-13 22:50:56.000000000 +0100
+++ iproute-20070313/man/man8/ss.8 2007-06-10 19:36:04.000000000 +0200
@@ -9,7 +9,7 @@
is used to dump socket statistics. It allows showing information similar
to
.IR netstat .
-It can display more TCP information than state than other tools.
+It can display more TCP and state informations than other tools.
.SH OPTIONS
These programs follow the usual GNU command line syntax, with long
[-- Attachment #17: ip.8-typo.diff --]
[-- Type: text/x-patch, Size: 430 bytes --]
Make the backslash visible in ip manpage.
See Debian bug #285507 - http://bugs.debian.org/285507
--- orig/man/man8/ip.8 2004-10-19 20:49:02.000000000 +0000
+++ new/man/man8/ip.8 2005-01-05 22:04:12.000000000 +0000
@@ -374,7 +374,7 @@
.BR "\-o" , " \-oneline"
output each record on a single line, replacing line feeds
with the
-.B '\'
+.B '\e\'
character. This is convenient when you want to count records
with
.BR wc (1)
[-- Attachment #18: ip_address.diff --]
[-- Type: text/x-patch, Size: 570 bytes --]
Strict syntax for advice in error message.
diff -ruN iproute-20051007.orig/ip/ipaddress.c iproute-20051007/ip/ipaddress.c
--- iproute-20051007.orig/ip/ipaddress.c 2005-09-21 21:33:18.000000000 +0200
+++ iproute-20051007/ip/ipaddress.c 2006-03-14 07:26:26.830934712 +0100
@@ -901,7 +901,7 @@
return ipaddr_list_or_flush(argc-1, argv+1, 1);
if (matches(*argv, "help") == 0)
usage();
- fprintf(stderr, "Command \"%s\" is unknown, try \"ip address help\".\n", *argv);
+ fprintf(stderr, "Command \"%s\" is unknown, try \"ip addr help\".\n", *argv);
exit(-1);
}
[-- Attachment #19: libnetlink_typo.diff --]
[-- Type: text/x-patch, Size: 559 bytes --]
Fix typo in libnetlink manpage (writen -> written).
diff -urNad iproute-20070313~/man/man3/libnetlink.3 iproute-20070313/man/man3/libnetlink.3
--- iproute-20070313~/man/man3/libnetlink.3 2007-03-13 22:50:56.000000000 +0100
+++ iproute-20070313/man/man3/libnetlink.3 2007-06-10 19:28:30.000000000 +0200
@@ -187,7 +187,7 @@
This library should be named librtnetlink.
.SH AUTHORS
-netlink/rtnetlink was designed and writen by Alexey Kuznetsov.
+netlink/rtnetlink was designed and written by Alexey Kuznetsov.
Andi Kleen wrote the man page.
.SH SEE ALSO
[-- Attachment #20: manpages-typo.diff --]
[-- Type: text/x-patch, Size: 1753 bytes --]
Fix typos in tc-prio(8) manpage.
From: Alexander Wirt <formorer@debian.org>
diff -urNad iproute-20061002~/man/man8/tc-prio.8 iproute-20061002/man/man8/tc-prio.8
--- iproute-20061002~/man/man8/tc-prio.8 2006-10-15 17:06:41.000000000 +0200
+++ iproute-20061002/man/man8/tc-prio.8 2006-10-15 17:10:52.000000000 +0200
@@ -30,7 +30,7 @@
On creation with 'tc qdisc add', a fixed number of bands is created. Each
band is a class, although is not possible to add classes with 'tc qdisc
add', the number of bands to be created must instead be specified on the
-commandline attaching PRIO to its root.
+command line attaching PRIO to its root.
When dequeueing, band 0 is tried first and only if it did not deliver a
packet does PRIO try band 1, and so onwards. Maximum reliability packets
@@ -88,7 +88,7 @@
The four TOS bits (the 'TOS field') are defined as:
.nf
-Binary Decimcal Meaning
+Binary Decimal Meaning
-----------------------------------------
1000 8 Minimize delay (md)
0100 4 Maximize throughput (mt)
@@ -125,13 +125,13 @@
The second column contains the value of the relevant
four TOS bits, followed by their translated meaning. For example, 15 stands
-for a packet wanting Minimal Montetary Cost, Maximum Reliability, Maximum
+for a packet wanting Minimal Monetary Cost, Maximum Reliability, Maximum
Throughput AND Minimum Delay.
The fourth column lists the way the Linux kernel interprets the TOS bits, by
showing to which Priority they are mapped.
-The last column shows the result of the default priomap. On the commandline,
+The last column shows the result of the default priomap. On the command line,
the default priomap looks like this:
1, 2, 2, 2, 1, 2, 0, 0 , 1, 1, 1, 1, 1, 1, 1, 1
[-- Attachment #21: tcb_htb_typo.diff --]
[-- Type: text/x-patch, Size: 847 bytes --]
Fix typo in tc-htb(8) manpage (mininum -> minimum).
diff -urNad iproute-20070313~/man/man8/tc-htb.8 iproute-20070313/man/man8/tc-htb.8
--- iproute-20070313~/man/man8/tc-htb.8 2007-03-13 22:50:56.000000000 +0100
+++ iproute-20070313/man/man8/tc-htb.8 2007-06-10 19:30:08.000000000 +0200
@@ -137,7 +137,7 @@
.SH NOTES
Due to Unix timing constraints, the maximum ceil rate is not infinite and may in fact be quite low. On Intel,
there are 100 timer events per second, the maximum rate is that rate at which 'burst' bytes are sent each timer tick.
-From this, the mininum burst size for a specified rate can be calculated. For i386, a 10mbit rate requires a 12 kilobyte
+From this, the minimum burst size for a specified rate can be calculated. For i386, a 10mbit rate requires a 12 kilobyte
burst as 100*12kb*8 equals 10mbit.
.SH SEE ALSO
[-- Attachment #22: tc_cbq_details_typo.diff --]
[-- Type: text/x-patch, Size: 732 bytes --]
Fix typo in tc-cbq-details(8) manpage (occured -> occurred).
diff -urNad iproute-20070313~/man/man8/tc-cbq-details.8 iproute-20070313/man/man8/tc-cbq-details.8
--- iproute-20070313~/man/man8/tc-cbq-details.8 2007-06-10 19:25:18.000000000 +0200
+++ iproute-20070313/man/man8/tc-cbq-details.8 2007-06-10 19:25:58.000000000 +0200
@@ -210,7 +210,7 @@
priority. If found, choose it, and terminate.
.TP
(iii)
-Choose the class at which break out to the fallback algorithm occured. Terminate.
+Choose the class at which break out to the fallback algorithm occurred. Terminate.
.P
The packet is enqueued to the class which was chosen when either algorithm
terminated. It is therefore possible for a packet to be enqueued *not* at a
^ permalink raw reply related
* Re: e100 problems in .23rc8 ?
From: Eric Sandeen @ 2007-10-11 18:56 UTC (permalink / raw)
To: Dave Jones; +Cc: Kok, Auke, Herbert Xu, netdev, esandeen, dmack
In-Reply-To: <20071011172551.GA21339@redhat.com>
> Eric/David, the Fedora 8 RPM version 2.6.23-6.fc8 will have this if you
> want to give it a shot too. It'll be at
> http://people.redhat.com/davej/kernels/Fedora/f7.92/ when it's done
> building in an hour or so.
>
> Dave
>
Thanks, I'll give it a whirl this evening. I put a new net card in that
box 'cause I got tired of resetting it :)
-Eric
^ permalink raw reply
* Re: iproute2: resend of patches from Debian.
From: Lennart Sorensen @ 2007-10-11 19:25 UTC (permalink / raw)
To: Andreas Henriksson; +Cc: shemminger, netdev
In-Reply-To: <1192127132.4732.9.camel@localhost.localdomain>
On Thu, Oct 11, 2007 at 08:25:32PM +0200, Andreas Henriksson wrote:
> Patch from debian iproute package.
>
> diff -urNad iproute-20060323~/ip/iplink.c iproute-20060323/ip/iplink.c
> --- iproute-20060323~/ip/iplink.c 2006-03-22 00:57:50.000000000 +0100
> +++ iproute-20060323/ip/iplink.c 2006-09-08 21:07:14.000000000 +0200
> @@ -384,6 +384,10 @@
> }
>
> if (newname && strcmp(dev, newname)) {
> + if (strlen(newname) == 0) {
> + printf("\"\" is not valid device identifier\n",dev);
> + return -1;
> + }
> if (do_changename(dev, newname) < 0)
> return -1;
> dev = newname;
Isn't that printf missing somewhere for the 'dev' argument to go?
--
Len Sorensen
^ permalink raw reply
* Re: [RFC/PATCH 4/4] UDP memory usage accounting (take 4): memory limitation
From: Stephen Hemminger @ 2007-10-11 19:46 UTC (permalink / raw)
To: Satoshi OSHIMA
Cc: Andi Kleen, David Miller, Evgeniy Polyakov, Herbert Xu, netdev,
?? ??, Yumiko SUGITA, ??@RedHat
In-Reply-To: <470E1C42.1050901@hitachi.com>
On Thu, 11 Oct 2007 21:51:14 +0900
Satoshi OSHIMA <satoshi.oshima.fk@hitachi.com> wrote:
> Hi Stephen,
>
> Thank you for your comment.
>
> >> {
> >> + .ctl_name = NET_UDP_MEM,
> >> + .procname = "udp_mem",
> >> + .data = &sysctl_udp_mem,
> >> + .maxlen = sizeof(sysctl_udp_mem),
> >> + .mode = 0644,
> >> + .proc_handler = &proc_dointvec
> >> + },
> >> + {
> >> .ctl_name = NET_TCP_APP_WIN,
> >> .procname = "tcp_app_win",
> >> .data = &sysctl_tcp_app_win,
> >
> > if you use &proc_dointvec_minmax, then you could inforce min/max
> > values for udp_mem for the sysctl
One other comment. Sysctl value indexes are deprecated at this point
so all new values should use CTL_UNNUMBERED. Therefore unless NET_UDP_MEM
already exists, please don't add it.
--
Stephen Hemminger <shemminger@linux-foundation.org>
^ permalink raw reply
* Re: iproute2: resend of patches from Debian.
From: Andreas Henriksson @ 2007-10-11 19:59 UTC (permalink / raw)
To: Lennart Sorensen, Alexander Wirt; +Cc: shemminger, netdev
In-Reply-To: <20071011192509.GA4004@csclub.uwaterloo.ca>
On tor, 2007-10-11 at 15:25 -0400, Lennart Sorensen wrote:
> On Thu, Oct 11, 2007 at 08:25:32PM +0200, Andreas Henriksson wrote:
> > Patch from debian iproute package.
> >
> > diff -urNad iproute-20060323~/ip/iplink.c iproute-20060323/ip/iplink.c
> > --- iproute-20060323~/ip/iplink.c 2006-03-22 00:57:50.000000000 +0100
> > +++ iproute-20060323/ip/iplink.c 2006-09-08 21:07:14.000000000 +0200
> > @@ -384,6 +384,10 @@
> > }
> >
> > if (newname && strcmp(dev, newname)) {
> > + if (strlen(newname) == 0) {
> > + printf("\"\" is not valid device identifier\n",dev);
> > + return -1;
> > + }
> > if (do_changename(dev, newname) < 0)
> > return -1;
> > dev = newname;
>
> Isn't that printf missing somewhere for the 'dev' argument to go?
This is not my patch so I don't know what the original intention was,
but now that you point it out I'd say that the dev argument should just
be removed.
The new check is for an empty new name.... old name (dev) probably isn't
interesting.
I think Alexander Wirt is the original author, lets CC and see if he has
a comment...
--
Regards,
Andreas Henriksson
^ permalink raw reply
* Re: iproute2: resend of patches from Debian.
From: Stephen Hemminger @ 2007-10-11 20:11 UTC (permalink / raw)
To: Andreas Henriksson; +Cc: netdev
In-Reply-To: <1192127132.4732.9.camel@localhost.localdomain>
On Thu, 11 Oct 2007 20:25:32 +0200
Andreas Henriksson <andreas@fatal.se> wrote:
> Hello all!
>
> Posting this set of patches again, since there where no reaction last time I sent them.
>
> Regards,
> Andreas Henriksson
>
Since there are so many. Please send them as git separate emails to me and
make sure they are in the proper format for importing into git. If you really
want to make it easy, just put them in git yourself and then use 'git formatpatch origin'
so all the formatting is correct.
The current iproute2 git repository is:
git://git.kernel.org/pub/scm/linux/kernel/git/shemminger/iproute2.git
(or symlink git://git.kernel.org/pub/network/iproute2/iproute2.git)
--
Stephen Hemminger <shemminger@linux-foundation.org>
^ permalink raw reply
* Re: [PATCH] IB/ipoib: Bound the net device to the ipoib_neigh structue
From: Roland Dreier @ 2007-10-11 20:17 UTC (permalink / raw)
To: Moni Shoua; +Cc: Jay Vosburgh, jeff, David Miller, ogerlitz, netdev, Moni Levy
In-Reply-To: <470E37AD.3070408@voltaire.com>
> It happens only when ib interfaces are slaves of a bonding device.
> I thought before that the stuck is in napi_disable() but it's almost right.
> I put prints before and after call to napi_disable and see that it is called twice.
> I'll try to investigate in this direction.
>
> ib0: stopping interface
> ib0: before napi_disable
> ib0: after napi_disable
> ib0: downing ib_dev
> ib0: All sends and receives done.
> ib0: stopping interface
> ib0: before napi_disable
Yes, two napi_disable()s in a row without a matching napi_enable()
will deadlock. I guess the question is why the ipoib interface is
being stopped twice.
If you just take the net-2.6.24 tree (without bonding patches), does
bonding for ethernet interfaces work OK, or is there a similar problem
with double napi_disable()? How about bonding of ethernet after this
batch of bonding patches?
- R.
^ permalink raw reply
* Re: iproute2: resend of patches from Debian.
From: Patrick McHardy @ 2007-10-11 20:30 UTC (permalink / raw)
To: Andreas Henriksson; +Cc: shemminger, netdev
In-Reply-To: <1192127132.4732.9.camel@localhost.localdomain>
Andreas Henriksson wrote:
> Abort flush after 10 seconds.
This should be optional IMO.
> Add references to lartc, also drop bogus reference to tc-filters
There's a bad habit of reporting bugs on lartc that belong to netdev,
please also make it perfectly clear that lartc is not for bug-reports.
> Fix overflow in time2tick / tick2time.
>
> The helper functions gets passed an unsigned int, which gets cast to long
> and overflows.
>
> See Debian bug #175462 - http://bugs.debian.org/175462
>
> Signed-off-by: Andreas Henriksson <andreas@fatal.se>
>
> diff -uri iproute-20070313.orig/tc/tc_core.c iproute-20070313/tc/tc_core.c
> --- iproute-20070313.orig/tc/tc_core.c 2007-03-13 22:50:56.000000000 +0100
> +++ iproute-20070313/tc/tc_core.c 2007-08-15 00:41:30.000000000 +0200
> @@ -35,12 +35,12 @@
> }
>
>
> -long tc_core_time2tick(long time)
> +unsigned tc_core_time2tick(unsigned time)
> {
> return time*tick_in_usec;
> }
>
> -long tc_core_tick2time(long tick)
> +unsigned tc_core_tick2time(unsigned tick)
> {
> return tick/tick_in_usec;
> }
What about the other functions returning long? I think all of these
should be unsigned.
^ permalink raw reply
* Re: iproute2: resend of patches from Debian.
From: Andreas Henriksson @ 2007-10-11 20:32 UTC (permalink / raw)
To: Stephen Hemminger; +Cc: netdev
In-Reply-To: <20071011131114.774406fc@freepuppy.rosehill>
On tor, 2007-10-11 at 13:11 -0700, Stephen Hemminger wrote:
> Since there are so many. Please send them as git separate emails to me and
> make sure they are in the proper format for importing into git. If you really
> want to make it easy, just put them in git yourself and then use 'git formatpatch origin'
> so all the formatting is correct.
I'm not so great with git, but I'll read up on how to do this and
hopefully resend properly tomorrow.
(I'll make sure the patch Len commented on also gets fixed by then.)
--
Regards,
Andreas Henriksson
^ permalink raw reply
* Re: iproute2: resend of patches from Debian.
From: Patrick McHardy @ 2007-10-11 21:05 UTC (permalink / raw)
To: Andreas Henriksson; +Cc: shemminger, netdev
In-Reply-To: <1192127132.4732.9.camel@localhost.localdomain>
Andreas Henriksson wrote:
> Add mpath to ip manpage.
>
> From: Norbert Buchmuller <norbi@nix.hu>
>
> The 'mpath' parameter of 'ip route' is not documented in the manual page
> nor in ip-cref.tex.
>
> ...huge part of the text in the patch was taken from the net/ipv4/Kconfig
> file in the Linux kernel source (2.6.18). I suppose that's OK because both
> Linux and iproute2 are GPL'd, but I let you know anyway.
>
> See Debian bug #428442 - http://bugs.debian.org/428442
>
> diff -Naur iproute-20061002/doc/ip-cref.tex iproute-20061002.fixed/doc/ip-cref.tex
> --- iproute-20061002/doc/ip-cref.tex 2007-06-11 19:26:52.000000000 +0200
> +++ iproute-20061002.fixed/doc/ip-cref.tex 2007-06-11 20:34:09.000000000 +0200
> @@ -1348,6 +1348,28 @@
> route reflecting its relative bandwidth or quality.
> \end{itemize}
>
> +\item \verb|mpath MP_ALGO|
This has been removed from the kernel again because of complete
brokeness, so this patch shouldn't be merged.
^ permalink raw reply
* Re: iproute2: resend of patches from Debian.
From: Andreas Henriksson @ 2007-10-11 21:22 UTC (permalink / raw)
To: Patrick McHardy, Alexander Wirt; +Cc: shemminger, netdev
In-Reply-To: <470E87EA.4030200@trash.net>
On tor, 2007-10-11 at 22:30 +0200, Patrick McHardy wrote:
> Andreas Henriksson wrote:
> > Abort flush after 10 seconds.
>
> This should be optional IMO.
Copying Alexander Wirt here again, as I think this is his patch.
I'll skip this patch in my next resend...
>
> > Add references to lartc, also drop bogus reference to tc-filters
>
> There's a bad habit of reporting bugs on lartc that belong to netdev,
> please also make it perfectly clear that lartc is not for bug-reports.
I'll update the patch to mention this.
>
> > Fix overflow in time2tick / tick2time.
> >
> > The helper functions gets passed an unsigned int, which gets cast to long
> > and overflows.
> >
> > See Debian bug #175462 - http://bugs.debian.org/175462
> >
> > Signed-off-by: Andreas Henriksson <andreas@fatal.se>
> >
> > diff -uri iproute-20070313.orig/tc/tc_core.c iproute-20070313/tc/tc_core.c
> > --- iproute-20070313.orig/tc/tc_core.c 2007-03-13 22:50:56.000000000 +0100
> > +++ iproute-20070313/tc/tc_core.c 2007-08-15 00:41:30.000000000 +0200
> > @@ -35,12 +35,12 @@
> > }
> >
> >
> > -long tc_core_time2tick(long time)
> > +unsigned tc_core_time2tick(unsigned time)
> > {
> > return time*tick_in_usec;
> > }
> >
> > -long tc_core_tick2time(long tick)
> > +unsigned tc_core_tick2time(unsigned tick)
> > {
> > return tick/tick_in_usec;
> > }
>
> What about the other functions returning long? I think all of these
> should be unsigned.
Since I'm no superhacker, I was afraid to touch anything else then the
things I could test and this change is what's needed to fix the reported
bug. (Actually only one of them was needed IIRC, but it would be stupid
to only change one.)
I'll have a look at the other helper functions as well, probably adding
a separate patch so that it can be easily dropped if I screw something
up there.. :)
I'll also drop the mpath stuff you mentioned in the other mail...
Thanks for reviewing the patches!
--
Regards,
Andreas Henriksson
^ permalink raw reply
* [RFD] iptables: mangle table obsoletes filter table
From: Al Boldi @ 2007-10-11 21:31 UTC (permalink / raw)
To: netfilter-devel, netdev; +Cc: linux-net, linux-kernel
With the existence of the mangle table, how useful is the filter table?
Other than requiring the REJECT target to be ported to the mangle table, is
the filter table faster than the mangle table?
If not, then shouldn't the filter table be obsoleted to avoid confusion?
Thanks!
--
Al
^ permalink raw reply
* Re: [IPv6] Update setsockopt(IPV6_MULTICAST_IF) to support RFC 3493, try2
From: David Miller @ 2007-10-11 21:39 UTC (permalink / raw)
To: dlstevens; +Cc: brian.haley, netdev, netdev-owner, yoshfuji
In-Reply-To: <OFF4E419EA.816C7D2D-ON88257371.0061B23A-88257371.0061CC92@us.ibm.com>
From: David Stevens <dlstevens@us.ibm.com>
Date: Thu, 11 Oct 2007 10:49:14 -0700
> Acked-by: David L Stevens <dlstevens@us.ibm.com>
Applied, thanks everyone!
^ permalink raw reply
* Re: [PATCH][BNX2X] round three
From: David Miller @ 2007-10-11 21:40 UTC (permalink / raw)
To: eliezert; +Cc: netdev, jeff, mchan
In-Reply-To: <1192125219.29746.143.camel@eliezer>
From: "Eliezer Tamir" <eliezert@broadcom.com>
Date: Thu, 11 Oct 2007 19:53:39 +0200
> Will it be OK if we replace it with 4-5 headers so we can maintain them
> better manually. (I'm asking what is the upper bound to the number of
> header files you would consider reasonable for this driver.)
It's not the count, it's what's in them that's the problem.
^ permalink raw reply
page: next (older) | prev (newer) | latest
- recent:[subjects (threaded)|topics (new)|topics (active)]
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox