Netdev List
 help / color / mirror / Atom feed
* Re: Timeline of IPoIB performance
From: Roland Dreier @ 2005-10-11  4:03 UTC (permalink / raw)
  To: Matt Leininger; +Cc: netdev, openib-general
In-Reply-To: <527jcldj4n.fsf@cisco.com>

    Roland> I might get a chance to do it tonight... I'll post if I do.

I'm giving it a shot but I just can't reproduce this well on my
systems.  I do see a pretty big regression between 2.6.12-rc4 and
2.6.14-rc2, but 2.6.12-rc5 looks OK on my systems.

I reflashed to FW 4.7.0 (mem-ful) and built netperf 2.4.1.

With 2.6.12-rc4 I've seen runs as slow as:

    TCP STREAM TEST from 0.0.0.0 (0.0.0.0) port 0 AF_INET to 192.168.145.2 (192.168.145.2) port 0 AF_INET
    Recv   Send    Send                          Utilization       Service Demand
    Socket Socket  Message  Elapsed              Send     Recv     Send    Recv
    Size   Size    Size     Time     Throughput  local    remote   local   remote
    bytes  bytes   bytes    secs.    MBytes  /s  % S      % U      us/KB   us/KB
    
     87380  16384  16384    10.00       553.71   37.46    -1.00    2.642   -1.000

and with 2.6.12-rc5 I've seen runs as fast as:

    TCP STREAM TEST from 0.0.0.0 (0.0.0.0) port 0 AF_INET to 192.168.145.2 (192.168.145.2) port 0 AF_INET
    Recv   Send    Send                          Utilization       Service Demand
    Socket Socket  Message  Elapsed              Send     Recv     Send    Recv
    Size   Size    Size     Time     Throughput  local    remote   local   remote
    bytes  bytes   bytes    secs.    MBytes  /s  % S      % U      us/KB   us/KB
    
     87380  16384  16384    10.00       581.82   39.58    -1.00    2.657   -1.000

so not much difference there.  With 2.6.14-rc2, the best of 10 runs was:

    TCP STREAM TEST from 0.0.0.0 (0.0.0.0) port 0 AF_INET to 192.168.145.2 (192.168.145.2) port 0 AF_INET
    Recv   Send    Send                          Utilization       Service Demand
    Socket Socket  Message  Elapsed              Send     Recv     Send    Recv
    Size   Size    Size     Time     Throughput  local    remote   local   remote
    bytes  bytes   bytes    secs.    MBytes  /s  % S      % U      us/KB   us/KB
    
     87380  16384  16384    10.01       497.00   39.71    -1.00    3.121   -1.000

so we've definitely lost something there.

Time to do some more bisecting...

 - R.

^ permalink raw reply

* [git patch] net driver fix
From: Jeff Garzik @ 2005-10-11  5:59 UTC (permalink / raw)
  To: Andrew Morton, Linus Torvalds; +Cc: netdev, linux-kernel


Please pull from the 'upstream-fixes' branch of
master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/netdev-2.6.git

to cure severe performance loss caused by a performance optimization
(new e100 microcode).  We just revert back to tried-and-true (and full
speed) behavior, and let the Intel people have another crack at it.

 drivers/net/e100.c |  224 ++++-------------------------------------------------
 1 files changed, 18 insertions(+), 206 deletions(-)


commit 875521ddccfa90d519cf31dfc8aa472f7f6325bb
Author: Jeff Garzik <jgarzik@pobox.com>
Date:   Tue Oct 11 01:38:35 2005 -0400

    e100: revert CPU cycle saver microcode, it causes severe problems
    for certain NICs
    
    Reverting 685fac63f5ca6c5ca06bab641e1a32bbf9287e89:
    > [PATCH] e100: CPU cycle saver microcode
    >
    >
    > Add cpu cycle saver microcode to 8086:{1209/1229} other than ICH devices.
    >
    > Signed-off-by: Mallikarjuna R Chilakala <mallikarjuna.chilakala@intel.com>
    > Signed-off-by: Ganesh Venkatesan <ganesh.venkatesan@intel.com>
    > Signed-off-by: John Ronciak <john.ronciak@intel.com>
    > Signed-off-by: Jeff Garzik <jgarzik@pobox.com>


diff --git a/drivers/net/e100.c b/drivers/net/e100.c
--- a/drivers/net/e100.c
+++ b/drivers/net/e100.c
@@ -903,8 +903,8 @@ static void mdio_write(struct net_device
 
 static void e100_get_defaults(struct nic *nic)
 {
-	struct param_range rfds = { .min = 16, .max = 256, .count = 256 };
-	struct param_range cbs  = { .min = 64, .max = 256, .count = 128 };
+	struct param_range rfds = { .min = 16, .max = 256, .count = 64 };
+	struct param_range cbs  = { .min = 64, .max = 256, .count = 64 };
 
 	pci_read_config_byte(nic->pdev, PCI_REVISION_ID, &nic->rev_id);
 	/* MAC type is encoded as rev ID; exception: ICH is treated as 82559 */
@@ -1007,213 +1007,25 @@ static void e100_configure(struct nic *n
 		c[16], c[17], c[18], c[19], c[20], c[21], c[22], c[23]);
 }
 
-/********************************************************/
-/*  Micro code for 8086:1229 Rev 8                      */
-/********************************************************/
-
-/*  Parameter values for the D101M B-step  */
-#define D101M_CPUSAVER_TIMER_DWORD		78
-#define D101M_CPUSAVER_BUNDLE_DWORD		65
-#define D101M_CPUSAVER_MIN_SIZE_DWORD		126
-
-#define D101M_B_RCVBUNDLE_UCODE \
-{\
-0x00550215, 0xFFFF0437, 0xFFFFFFFF, 0x06A70789, 0xFFFFFFFF, 0x0558FFFF, \
-0x000C0001, 0x00101312, 0x000C0008, 0x00380216, \
-0x0010009C, 0x00204056, 0x002380CC, 0x00380056, \
-0x0010009C, 0x00244C0B, 0x00000800, 0x00124818, \
-0x00380438, 0x00000000, 0x00140000, 0x00380555, \
-0x00308000, 0x00100662, 0x00100561, 0x000E0408, \
-0x00134861, 0x000C0002, 0x00103093, 0x00308000, \
-0x00100624, 0x00100561, 0x000E0408, 0x00100861, \
-0x000C007E, 0x00222C21, 0x000C0002, 0x00103093, \
-0x00380C7A, 0x00080000, 0x00103090, 0x00380C7A, \
-0x00000000, 0x00000000, 0x00000000, 0x00000000, \
-0x0010009C, 0x00244C2D, 0x00010004, 0x00041000, \
-0x003A0437, 0x00044010, 0x0038078A, 0x00000000, \
-0x00100099, 0x00206C7A, 0x0010009C, 0x00244C48, \
-0x00130824, 0x000C0001, 0x00101213, 0x00260C75, \
-0x00041000, 0x00010004, 0x00130826, 0x000C0006, \
-0x002206A8, 0x0013C926, 0x00101313, 0x003806A8, \
-0x00000000, 0x00000000, 0x00000000, 0x00000000, \
-0x00000000, 0x00000000, 0x00000000, 0x00000000, \
-0x00080600, 0x00101B10, 0x00050004, 0x00100826, \
-0x00101210, 0x00380C34, 0x00000000, 0x00000000, \
-0x0021155B, 0x00100099, 0x00206559, 0x0010009C, \
-0x00244559, 0x00130836, 0x000C0000, 0x00220C62, \
-0x000C0001, 0x00101B13, 0x00229C0E, 0x00210C0E, \
-0x00226C0E, 0x00216C0E, 0x0022FC0E, 0x00215C0E, \
-0x00214C0E, 0x00380555, 0x00010004, 0x00041000, \
-0x00278C67, 0x00040800, 0x00018100, 0x003A0437, \
-0x00130826, 0x000C0001, 0x00220559, 0x00101313, \
-0x00380559, 0x00000000, 0x00000000, 0x00000000, \
-0x00000000, 0x00000000, 0x00000000, 0x00000000, \
-0x00000000, 0x00130831, 0x0010090B, 0x00124813, \
-0x000CFF80, 0x002606AB, 0x00041000, 0x00010004, \
-0x003806A8, 0x00000000, 0x00000000, 0x00000000, \
-}
-
-/********************************************************/
-/*  Micro code for 8086:1229 Rev 9                      */
-/********************************************************/
-
-/*  Parameter values for the D101S  */
-#define D101S_CPUSAVER_TIMER_DWORD		78
-#define D101S_CPUSAVER_BUNDLE_DWORD		67
-#define D101S_CPUSAVER_MIN_SIZE_DWORD		128
-
-#define D101S_RCVBUNDLE_UCODE \
-{\
-0x00550242, 0xFFFF047E, 0xFFFFFFFF, 0x06FF0818, 0xFFFFFFFF, 0x05A6FFFF, \
-0x000C0001, 0x00101312, 0x000C0008, 0x00380243, \
-0x0010009C, 0x00204056, 0x002380D0, 0x00380056, \
-0x0010009C, 0x00244F8B, 0x00000800, 0x00124818, \
-0x0038047F, 0x00000000, 0x00140000, 0x003805A3, \
-0x00308000, 0x00100610, 0x00100561, 0x000E0408, \
-0x00134861, 0x000C0002, 0x00103093, 0x00308000, \
-0x00100624, 0x00100561, 0x000E0408, 0x00100861, \
-0x000C007E, 0x00222FA1, 0x000C0002, 0x00103093, \
-0x00380F90, 0x00080000, 0x00103090, 0x00380F90, \
-0x00000000, 0x00000000, 0x00000000, 0x00000000, \
-0x0010009C, 0x00244FAD, 0x00010004, 0x00041000, \
-0x003A047E, 0x00044010, 0x00380819, 0x00000000, \
-0x00100099, 0x00206FFD, 0x0010009A, 0x0020AFFD, \
-0x0010009C, 0x00244FC8, 0x00130824, 0x000C0001, \
-0x00101213, 0x00260FF7, 0x00041000, 0x00010004, \
-0x00130826, 0x000C0006, 0x00220700, 0x0013C926, \
-0x00101313, 0x00380700, 0x00000000, 0x00000000, \
-0x00000000, 0x00000000, 0x00000000, 0x00000000, \
-0x00080600, 0x00101B10, 0x00050004, 0x00100826, \
-0x00101210, 0x00380FB6, 0x00000000, 0x00000000, \
-0x002115A9, 0x00100099, 0x002065A7, 0x0010009A, \
-0x0020A5A7, 0x0010009C, 0x002445A7, 0x00130836, \
-0x000C0000, 0x00220FE4, 0x000C0001, 0x00101B13, \
-0x00229F8E, 0x00210F8E, 0x00226F8E, 0x00216F8E, \
-0x0022FF8E, 0x00215F8E, 0x00214F8E, 0x003805A3, \
-0x00010004, 0x00041000, 0x00278FE9, 0x00040800, \
-0x00018100, 0x003A047E, 0x00130826, 0x000C0001, \
-0x002205A7, 0x00101313, 0x003805A7, 0x00000000, \
-0x00000000, 0x00000000, 0x00000000, 0x00000000, \
-0x00000000, 0x00000000, 0x00000000, 0x00130831, \
-0x0010090B, 0x00124813, 0x000CFF80, 0x00260703, \
-0x00041000, 0x00010004, 0x00380700  \
-}
-
-/********************************************************/
-/*  Micro code for the 8086:1229 Rev F/10               */
-/********************************************************/
-
-/*  Parameter values for the D102 E-step  */
-#define D102_E_CPUSAVER_TIMER_DWORD		42
-#define D102_E_CPUSAVER_BUNDLE_DWORD		54
-#define D102_E_CPUSAVER_MIN_SIZE_DWORD		46
-
-#define     D102_E_RCVBUNDLE_UCODE \
-{\
-0x007D028F, 0x0E4204F9, 0x14ED0C85, 0x14FA14E9, 0x0EF70E36, 0x1FFF1FFF, \
-0x00E014B9, 0x00000000, 0x00000000, 0x00000000, \
-0x00E014BD, 0x00000000, 0x00000000, 0x00000000, \
-0x00E014D5, 0x00000000, 0x00000000, 0x00000000, \
-0x00000000, 0x00000000, 0x00000000, 0x00000000, \
-0x00E014C1, 0x00000000, 0x00000000, 0x00000000, \
-0x00000000, 0x00000000, 0x00000000, 0x00000000, \
-0x00000000, 0x00000000, 0x00000000, 0x00000000, \
-0x00000000, 0x00000000, 0x00000000, 0x00000000, \
-0x00E014C8, 0x00000000, 0x00000000, 0x00000000, \
-0x00200600, 0x00E014EE, 0x00000000, 0x00000000, \
-0x0030FF80, 0x00940E46, 0x00038200, 0x00102000, \
-0x00E00E43, 0x00000000, 0x00000000, 0x00000000, \
-0x00300006, 0x00E014FB, 0x00000000, 0x00000000, \
-0x00000000, 0x00000000, 0x00000000, 0x00000000, \
-0x00000000, 0x00000000, 0x00000000, 0x00000000, \
-0x00000000, 0x00000000, 0x00000000, 0x00000000, \
-0x00906E41, 0x00800E3C, 0x00E00E39, 0x00000000, \
-0x00906EFD, 0x00900EFD, 0x00E00EF8, 0x00000000, \
-0x00000000, 0x00000000, 0x00000000, 0x00000000, \
-0x00000000, 0x00000000, 0x00000000, 0x00000000, \
-0x00000000, 0x00000000, 0x00000000, 0x00000000, \
-0x00000000, 0x00000000, 0x00000000, 0x00000000, \
-0x00000000, 0x00000000, 0x00000000, 0x00000000, \
-0x00000000, 0x00000000, 0x00000000, 0x00000000, \
-0x00000000, 0x00000000, 0x00000000, 0x00000000, \
-0x00000000, 0x00000000, 0x00000000, 0x00000000, \
-0x00000000, 0x00000000, 0x00000000, 0x00000000, \
-0x00000000, 0x00000000, 0x00000000, 0x00000000, \
-0x00000000, 0x00000000, 0x00000000, 0x00000000, \
-0x00000000, 0x00000000, 0x00000000, 0x00000000, \
-0x00000000, 0x00000000, 0x00000000, 0x00000000, \
-0x00000000, 0x00000000, 0x00000000, 0x00000000, \
-}
-
 static void e100_load_ucode(struct nic *nic, struct cb *cb, struct sk_buff *skb)
 {
-/* *INDENT-OFF* */
-	static struct {
-		u32 ucode[UCODE_SIZE + 1];
-		u8 mac;
-		u8 timer_dword;
-		u8 bundle_dword;
-		u8 min_size_dword;
-	} ucode_opts[] = {
-		{ D101M_B_RCVBUNDLE_UCODE,
-		  mac_82559_D101M,
-		  D101M_CPUSAVER_TIMER_DWORD,
-		  D101M_CPUSAVER_BUNDLE_DWORD,
-		  D101M_CPUSAVER_MIN_SIZE_DWORD },
-		{ D101S_RCVBUNDLE_UCODE,
-		  mac_82559_D101S,
-		  D101S_CPUSAVER_TIMER_DWORD,
-		  D101S_CPUSAVER_BUNDLE_DWORD,
-		  D101S_CPUSAVER_MIN_SIZE_DWORD },
-		{ D102_E_RCVBUNDLE_UCODE,
-		  mac_82551_F,
-		  D102_E_CPUSAVER_TIMER_DWORD,
-		  D102_E_CPUSAVER_BUNDLE_DWORD,
-		  D102_E_CPUSAVER_MIN_SIZE_DWORD },
-		{ D102_E_RCVBUNDLE_UCODE,
-		  mac_82551_10,
-		  D102_E_CPUSAVER_TIMER_DWORD,
-		  D102_E_CPUSAVER_BUNDLE_DWORD,
-		  D102_E_CPUSAVER_MIN_SIZE_DWORD },
-		{ {0}, 0, 0, 0, 0}
-	}, *opts;
-/* *INDENT-ON* */
-
-#define BUNDLESMALL 1
-#define BUNDLEMAX 50
-#define INTDELAY 15000
-
-	opts = ucode_opts;
-
-	/* do not load u-code for ICH devices */
-	if (nic->flags & ich)
-		return;
-
-	/* Search for ucode match against h/w rev_id */
-	while (opts->mac) {
-		if (nic->mac == opts->mac) {
-			int i;
-			u32 *ucode = opts->ucode;
-
-			/* Insert user-tunable settings */
-			ucode[opts->timer_dword] &= 0xFFFF0000;
-			ucode[opts->timer_dword] |=
-				(u16) INTDELAY;
-			ucode[opts->bundle_dword] &= 0xFFFF0000;
-			ucode[opts->bundle_dword] |= (u16) BUNDLEMAX;
-			ucode[opts->min_size_dword] &= 0xFFFF0000;
-			ucode[opts->min_size_dword] |=
-				(BUNDLESMALL) ?  0xFFFF : 0xFF80;
-
-			for(i = 0; i < UCODE_SIZE; i++)
-				cb->u.ucode[i] = cpu_to_le32(ucode[i]);
-			cb->command = cpu_to_le16(cb_ucode);
-			return;
-		}
-		opts++;
-	}
+	int i;
+	static const u32 ucode[UCODE_SIZE] = {
+		/* NFS packets are misinterpreted as TCO packets and
+		 * incorrectly routed to the BMC over SMBus.  This
+		 * microcode patch checks the fragmented IP bit in the
+		 * NFS/UDP header to distinguish between NFS and TCO. */
+		0x0EF70E36, 0x1FFF1FFF, 0x1FFF1FFF, 0x1FFF1FFF, 0x1FFF1FFF,
+		0x1FFF1FFF, 0x00906E41, 0x00800E3C, 0x00E00E39, 0x00000000,
+		0x00906EFD, 0x00900EFD,	0x00E00EF8,
+	};
 
-	cb->command = cpu_to_le16(cb_nop);
+	if(nic->mac == mac_82551_F || nic->mac == mac_82551_10) {
+		for(i = 0; i < UCODE_SIZE; i++)
+			cb->u.ucode[i] = cpu_to_le32(ucode[i]);
+		cb->command = cpu_to_le16(cb_ucode);
+	} else
+		cb->command = cpu_to_le16(cb_nop);
 }
 
 static void e100_setup_iaaddr(struct nic *nic, struct cb *cb,

^ permalink raw reply

* Re: 32 bit (socket layer) ioctl emulation for 64 bit kernels- Question regarding...
From: spereira @ 2005-10-11  7:09 UTC (permalink / raw)
  To: Arnd Bergmann; +Cc: linux-kernel, netdev
In-Reply-To: <200510101348.49598.arnd@arndb.de>

Thanks Arnd
If I have understood correctly the following would be the changes I
would have to make in the kernel...Please correct me if I am wrong.

It seems to me step (d) would be as you say a little tricky but I
could attempt it
depending on the amount of time I have in the project I am on at the moment.
Proposed modifications...
a) Struct file_operations(include/linux/fs.h) has a compat_ioctl hook for file
ioctls. Include a compat_proto_ioctl hook in proto_ops(include/net.h) for
modular socket ioctls.

b) socket.c has a 'file_operations' type struct socket_file_ops where the
.compat_ioctl member is currently not used. Define compat_sock_ioctl in
socket.c and assign to .compat_ioctl member of socket_file_ops
This is ifdef'd with CONFIG_COMPAT

c) compat_sock_ioctl will by default call the protocol's ioctl
 currently supporting the socket interface when handling modular socket ioctls,
like so. socket->ops->compat_proto_ioctl(...)
which in this case is x25_compat_ioctl.

d)If compat_sock_ioctl has to perform a function similar to
sock_ioctl(socket.c)
where in SIOC* commands are handled, then introduce a newly defined
compat_dev_ioctl that would have stuff like dev_ifsioc that would have
previously
been removed from fs/compat_ioctl.c.
Then the protocol's ioctl (called by default in the step c above) would itself
default to compat_dev_ioctl ensuring other socket layer
ioctls are handled by the device layer function, compat_dev_ioctl

regards,
Shaun


On 10/10/05, Arnd Bergmann <arnd@arndb.de> wrote:
> On Maandag 10 Oktober 2005 06:21, spereira wrote:
> >
> > Is there currently an alternative to register_ioctl32_conversion that
> > would help achive 32 bit ioctl emulation at the socket layer?
> > Any suggestions/advice whould be much appreciated.
>
> The correct solution would be to add the missing functionality to
> net/socket.c and move over the implementation of SIOC* from
> fs/compat_ioctl.c. Getting the code path right is a little tricky,
> but I think a patch to fix this up would be appreciated.
>
> As a start, you could define a compat_sock_ioctl along the
> lines of compat_blkdev_ioctl and add your own handlers to the
> x25_proto_ops, but IMHO it would makes sense to get rid of stuff
> like dev_ifsioc from fs/compat_ioctl.c at the same time by
> introducing a new compat_dev_ioctl called from compat_sock_ioctl.
>
>         Arnd <><
>

^ permalink raw reply

* [PATCH] Add Wake on LAN support to sis900 (2)
From: Daniele Venzano @ 2005-10-11  7:44 UTC (permalink / raw)
  To: Jeff Garzik, NetDev; +Cc: akpm

[-- Attachment #1: Type: text/plain, Size: 548 bytes --]

Sorry, but that day I had smoked somthing too heavy for me, the patch
didn't apply. Here's a new one.

The patch availble below adds support for Wake on LAN to the sis900
driver. Some register addresses were added to sis900.h and two new
functions were implemented in sis900.c. WoL status is controlled by
ethtool.
Patch is against 2.6.13.

Comments are welcome, but also consider for inclusion in the -mm series.

Signed-off-by: Daniele Venzano <venza@brownhat.org>

-- 
------------------------------
Daniele Venzano
Web: http://teg.homeunix.org

[-- Attachment #2: sis900_c_127.diff --]
[-- Type: text/plain, Size: 5558 bytes --]

--- a/drivers/net/sis900.h	2005-07-17 10:43:23.000000000 +0200
+++ b/drivers/net/sis900.h	2005-10-06 12:49:37.000000000 +0200
@@ -33,6 +33,7 @@
         rxcfg=0x34,             //Receive Configuration Register
         flctrl=0x38,            //Flow Control Register
         rxlen=0x3c,             //Receive Packet Length Register
+        cfgpmcsr=0x44,          //Configuration Power Management Control/Status Register
         rfcr=0x48,              //Receive Filter Control Register
         rfdr=0x4C,              //Receive Filter Data Register
         pmctrl=0xB0,            //Power Management Control Register
@@ -140,6 +141,50 @@
 	EEREQ = 0x00000400, EEDONE = 0x00000200, EEGNT = 0x00000100
 };
 
+/* PCI Registers */
+enum sis900_pci_registers {
+	CFGPMC 	 = 0x40,
+	CFGPMCSR = 0x44
+};
+
+/* Power management capabilities bits */
+enum sis900_cfgpmc_register_bits {
+	PMVER	= 0x00070000, 
+	DSI	= 0x00100000,
+	PMESP	= 0xf8000000
+};
+
+enum sis900_pmesp_bits {
+	PME_D0 = 0x1,
+	PME_D1 = 0x2,
+	PME_D2 = 0x4,
+	PME_D3H = 0x8,
+	PME_D3C = 0x10
+};
+
+/* Power management control/status bits */
+enum sis900_cfgpmcsr_register_bits {
+	PMESTS = 0x00004000,
+	PME_EN = 0x00000100, // Power management enable
+	PWR_STA = 0x00000003 // Current power state
+};
+
+/* Wake-on-LAN support. */
+enum sis900_power_management_control_register_bits {
+	LINKLOSS  = 0x00000001,
+	LINKON    = 0x00000002,
+	MAGICPKT  = 0x00000400,
+	ALGORITHM = 0x00000800,
+	FRM1EN    = 0x00100000,
+	FRM2EN    = 0x00200000,
+	FRM3EN    = 0x00400000,
+	FRM1ACS   = 0x01000000,
+	FRM2ACS   = 0x02000000,
+	FRM3ACS   = 0x04000000,
+	WAKEALL   = 0x40000000,
+	GATECLK   = 0x80000000
+};
+
 /* Management Data I/O (mdio) frame */
 #define MIIread         0x6000
 #define MIIwrite        0x5002
--- a/drivers/net/sis900.c	2005-10-06 12:06:06.000000000 +0200
+++ b/drivers/net/sis900.c	2005-10-06 12:05:45.000000000 +0200
@@ -1,6 +1,6 @@
 /* sis900.c: A SiS 900/7016 PCI Fast Ethernet driver for Linux.
    Copyright 1999 Silicon Integrated System Corporation 
-   Revision:	1.08.08 Jan. 22 2005
+   Revision:	1.08.09 Sep. 19 2005
    
    Modified from the driver which is originally written by Donald Becker.
    
@@ -17,6 +17,7 @@
    SiS 7014 Single Chip 100BASE-TX/10BASE-T Physical Layer Solution,
    preliminary Rev. 1.0 Jan. 18, 1998
 
+   Rev 1.08.09 Sep. 19 2005 Daniele Venzano add Wake on LAN support
    Rev 1.08.08 Jan. 22 2005 Daniele Venzano use netif_msg for debugging messages
    Rev 1.08.07 Nov.  2 2003 Daniele Venzano <webvenza@libero.it> add suspend/resume support
    Rev 1.08.06 Sep. 24 2002 Mufasa Yang bug fix for Tx timeout & add SiS963 support
@@ -76,7 +77,7 @@
 #include "sis900.h"
 
 #define SIS900_MODULE_NAME "sis900"
-#define SIS900_DRV_VERSION "v1.08.08 Jan. 22 2005"
+#define SIS900_DRV_VERSION "v1.08.09 Sep. 19 2005"
 
 static char version[] __devinitdata =
 KERN_INFO "sis900.c: " SIS900_DRV_VERSION "\n";
@@ -538,6 +539,11 @@
 		printk("%2.2x:", (u8)net_dev->dev_addr[i]);
 	printk("%2.2x.\n", net_dev->dev_addr[i]);
 
+	/* Detect Wake on Lan support */
+	ret = inl(CFGPMC & PMESP);
+	if (netif_msg_probe(sis_priv) && (ret & PME_D3C) == 0)
+		printk(KERN_INFO "%s: Wake on LAN only available from suspend to RAM.", net_dev->name);
+
 	return 0;
 
  err_unmap_rx:
@@ -2007,6 +2013,67 @@
 	return mii_nway_restart(&sis_priv->mii_info);
 }
 
+/**
+ *	sis900_set_wol - Set up Wake on Lan registers
+ *	@net_dev: the net device to probe
+ *	@wol: container for info passed to the driver
+ *
+ *	Process ethtool command "wol" to setup wake on lan features.
+ *	SiS900 supports sending WoL events if a correct packet is received,
+ *	but there is no simple way to filter them to only a subset (broadcast,
+ *	multicast, unicast or arp).
+ */
+ 
+static int sis900_set_wol(struct net_device *net_dev, struct ethtool_wolinfo *wol)
+{
+	struct sis900_private *sis_priv = net_dev->priv;
+	long pmctrl_addr = net_dev->base_addr + pmctrl;
+	u32 cfgpmcsr = 0, pmctrl_bits = 0;
+
+	if (wol->wolopts == 0) {
+		pci_read_config_dword(sis_priv->pci_dev, CFGPMCSR, &cfgpmcsr);
+		cfgpmcsr |= ~PME_EN;
+		pci_write_config_dword(sis_priv->pci_dev, CFGPMCSR, cfgpmcsr);
+		outl(pmctrl_bits, pmctrl_addr);
+		if (netif_msg_wol(sis_priv))
+			printk(KERN_DEBUG "%s: Wake on LAN disabled\n", net_dev->name);
+		return 0;
+	}
+
+	if (wol->wolopts & (WAKE_MAGICSECURE | WAKE_UCAST | WAKE_MCAST
+				| WAKE_BCAST | WAKE_ARP))
+		return -EINVAL;
+
+	if (wol->wolopts & WAKE_MAGIC)
+		pmctrl_bits |= MAGICPKT;
+	if (wol->wolopts & WAKE_PHY)
+		pmctrl_bits |= LINKON;
+	
+	outl(pmctrl_bits, pmctrl_addr);
+
+	pci_read_config_dword(sis_priv->pci_dev, CFGPMCSR, &cfgpmcsr);
+	cfgpmcsr |= PME_EN;
+	pci_write_config_dword(sis_priv->pci_dev, CFGPMCSR, cfgpmcsr);
+	if (netif_msg_wol(sis_priv))
+		printk(KERN_DEBUG "%s: Wake on LAN enabled\n", net_dev->name);
+
+	return 0;
+}
+
+static void sis900_get_wol(struct net_device *net_dev, struct ethtool_wolinfo *wol)
+{
+	long pmctrl_addr = net_dev->base_addr + pmctrl;
+	u32 pmctrl_bits;
+
+	pmctrl_bits = inl(pmctrl_addr);
+	if (pmctrl_bits & MAGICPKT)
+		wol->wolopts |= WAKE_MAGIC;
+	if (pmctrl_bits & LINKON)
+		wol->wolopts |= WAKE_PHY;
+
+	wol->supported = (WAKE_PHY | WAKE_MAGIC);
+}
+
 static struct ethtool_ops sis900_ethtool_ops = {
 	.get_drvinfo 	= sis900_get_drvinfo,
 	.get_msglevel	= sis900_get_msglevel,
@@ -2015,6 +2082,8 @@
 	.get_settings	= sis900_get_settings,
 	.set_settings	= sis900_set_settings,
 	.nway_reset	= sis900_nway_reset,
+	.get_wol	= sis900_get_wol,
+	.set_wol	= sis900_set_wol
 };
 
 /**

^ permalink raw reply

* Re: 32 bit (socket layer) ioctl emulation for 64 bit kernels- Question regarding...
From: Arnd Bergmann @ 2005-10-11 11:17 UTC (permalink / raw)
  To: spereira; +Cc: linux-kernel, netdev
In-Reply-To: <3ad486780510110009s2de65e68vf19e283edf997e89@mail.gmail.com>

On Dinsdag 11 Oktober 2005 09:09, spereira wrote:
> If I have understood correctly the following would be the changes I
> would have to make in the kernel...Please correct me if I am wrong.
> 
> It seems to me step (d) would be as you say a little tricky but I
> could attempt it
> depending on the amount of time I have in the project I am on at the moment.
> Proposed modifications...
> a) Struct file_operations(include/linux/fs.h) has a compat_ioctl hook for file
> ioctls. Include a compat_proto_ioctl hook in proto_ops(include/net.h) for
> modular socket ioctls.

Yes, but the hook would be called 'compat_ioctl' by convention, not
'compat_proto_ioctl'.

> b) socket.c has a 'file_operations' type struct socket_file_ops where the
> .compat_ioctl member is currently not used. Define compat_sock_ioctl in
> socket.c and assign to .compat_ioctl member of socket_file_ops
> This is ifdef'd with CONFIG_COMPAT

Yes
 
> c) compat_sock_ioctl will by default call the protocol's ioctl
>  currently supporting the socket interface when handling modular
>  socket ioctls, like so. socket->ops->compat_proto_ioctl(...)
> which in this case is x25_compat_ioctl.

Yes, and return -ENOIOCTLCMD if there is no socket->ops->compat_ioctl()
handler installed. That will cause the current mechanism to be used as
a fallback.

> d)If compat_sock_ioctl has to perform a function similar to
> sock_ioctl(socket.c)
> where in SIOC* commands are handled, then introduce a newly defined
> compat_dev_ioctl that would have stuff like dev_ifsioc that would have
> previously
> been removed from fs/compat_ioctl.c.
> Then the protocol's ioctl (called by default in the step c above) would itself
> default to compat_dev_ioctl ensuring other socket layer
> ioctls are handled by the device layer function, compat_dev_ioctl

I realized that it's even more complicated than this. For the ipv4 and ipv6
protocols, there is also an ioctl operation in struct proto, not only one
in struct proto_ops, so that one would also need a compat_ioctl that can
be called from inet{,6}_ioctl in the default path before calling dev_ioctl.
Similarly, the struct net_device contains a do_ioctl method that would
need a new compat_do_ioctl companion.

Maybe you can leave the current dev_ifsioc in place for now (though
I believe it should go away eventually) and just put the infrastructure in
place to have compat_ioctl functions in struct proto_ops, struct proto and 
struct net_device that are called when !NULL or otherwise return -ENOIOCTLCMD.

	Arnd <><

^ permalink raw reply

* Re: [PATCH] ebtables: Port ebt_[u]log.c to nf[netlink]_log
From: Bart De Schuymer @ 2005-10-11 19:31 UTC (permalink / raw)
  To: Harald Welte
  Cc: Linux Netdev List,
	ebtables-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f
In-Reply-To: <20051007234903.GR4450-5xaKNk1AN7bNqB9Gf7YOJg/oQhhTQFE7QQ4Iyu8u01E@public.gmane.org>

Op za, 08-10-2005 te 01:49 +0200, schreef Harald Welte:
> Hi Bart!
> 
> The patch below is totally untested (though it compiles), and updates
> ebtables to resemble the behaviour that we now have in ipv4 (and ipv6):
> {ip,ip6,eb}tables just tell the nf_log core that they want to log a
> packet, the mechanism (syslog, nfnetlink_log, ...) is actually decided
> by nf_log.
> 
> By default, everything will behave like before.
> 
> Please review, and test that ebt_log and ebt_ulog are still working as
> expected.  Thanks!
> 
> [NETFILTER] ebtables: Port ebt_[u]log.c to nf[netlink]_log
> 
> Since we now have a netfilter core logging API, we port the bridging log
> and ulog watchers to this new API.
> 
> This basically means that if you use the "ebt_log" watcher, it will by
> default log to the system console, but enables a userspace logging daemon
> binds itself to PF_BRIDGE, and take over all logging.
> 
> ebt_ulog also registers itself as logger with nf_log, but any packets
> explicitly send to ebt_ulog will always use the ulog mechanism and not
> handled via the generic logging handler.
> 
> This change resembles the situation that is now present in ipv4.

I seem to be unable to get Davem's current git tree.
This fails miserably: 
cg-clone http://www.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6.git

Your patch won't apply to 2.6.13. At first I thought it was a problem
with evolution or the kernel version, but looking at the source code of
your mail, I see "=20" added here and there...

Any ideas?

cheers,
Bart




-------------------------------------------------------
This SF.Net email is sponsored by:
Power Architecture Resource Center: Free content, downloads, discussions,
and more. http://solutions.newsforge.com/ibmarch.tmpl

^ permalink raw reply

* Re: [PATCH] ebtables: Port ebt_[u]log.c to nf[netlink]_log
From: David S. Miller @ 2005-10-11 19:55 UTC (permalink / raw)
  To: bdschuym-LPO8gxj9N8aZIoH1IeqzKA
  Cc: laforge-Cap9r6Oaw4JrovVCs/uTlw, netdev-u79uwXL29TY76Z2rM5mHXA,
	ebtables-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f
In-Reply-To: <1129059110.5087.8.camel-bi+AKbBUZKY6gyzm1THtWbp2dZbC/Bob@public.gmane.org>

From: Bart De Schuymer <bdschuym-LPO8gxj9N8aZIoH1IeqzKA@public.gmane.org>
Date: Tue, 11 Oct 2005 19:31:50 +0000

> I seem to be unable to get Davem's current git tree.
> This fails miserably: 
> cg-clone http://www.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6.git

I use an "alternates" file, so that Linus's tree's objects get used
and only the truly local changes actually get stored in my tree.

Unfortunately that totally doesn't work with transports such
as rsync.


-------------------------------------------------------
This SF.Net email is sponsored by:
Power Architecture Resource Center: Free content, downloads, discussions,
and more. http://solutions.newsforge.com/ibmarch.tmpl

^ permalink raw reply

* [PATCH] br: fix race on bridge del if
From: Stephen Hemminger @ 2005-10-11 20:33 UTC (permalink / raw)
  To: Ryan Harper, David S. Miller; +Cc: netdev, Chris Wright, Greg KH
In-Reply-To: <20050818214036.GH10593@us.ibm.com>

This fixes the RCU race on bridge delete interface.  Basically,
the network device has to be detached from the bridge in the first
step (pre-RCU), rather than later. At that point, no more bridge traffic
will come in, and the other code will not think that network device
is part of a bridge.

This should also fix the XEN test problems. If there is another
2.6.13-stable, add it as well.

Signed-off-by: Stephen Hemminger <shemminger@osdl.org>

Index: nexgate-test/net/bridge/br_if.c
===================================================================
--- nexgate-test.orig/net/bridge/br_if.c
+++ nexgate-test/net/bridge/br_if.c
@@ -79,7 +79,6 @@ static void destroy_nbp(struct net_bridg
 {
 	struct net_device *dev = p->dev;
 
-	dev->br_port = NULL;
 	p->br = NULL;
 	p->dev = NULL;
 	dev_put(dev);
@@ -100,6 +99,7 @@ static void del_nbp(struct net_bridge_po
 	struct net_bridge *br = p->br;
 	struct net_device *dev = p->dev;
 
+	dev->br_port = NULL;
 	dev_set_promiscuity(dev, -1);
 
 	spin_lock_bh(&br->lock);

^ permalink raw reply

* Re: Re: [PATCH] ebtables: Port ebt_[u]log.c to nf[netlink]_log
From: Bart De Schuymer @ 2005-10-11 20:49 UTC (permalink / raw)
  To: David S. Miller
  Cc: laforge-Cap9r6Oaw4JrovVCs/uTlw, netdev-u79uwXL29TY76Z2rM5mHXA,
	ebtables-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f
In-Reply-To: <20051011.125506.46476570.davem-fT/PcQaiUtIeIZ0/mPfg9Q@public.gmane.org>

Op di, 11-10-2005 te 12:55 -0700, schreef David S. Miller:
> From: Bart De Schuymer <bdschuym-LPO8gxj9N8aZIoH1IeqzKA@public.gmane.org>
> Date: Tue, 11 Oct 2005 19:31:50 +0000
> 
> > I seem to be unable to get Davem's current git tree.
> > This fails miserably: 
> > cg-clone http://www.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6.git
> 
> I use an "alternates" file, so that Linus's tree's objects get used
> and only the truly local changes actually get stored in my tree.
> 
> Unfortunately that totally doesn't work with transports such
> as rsync.

OK, kernel now compiling without the patch. Harald, could you send it as
attachment?

The instructions at the top of http://www.kernel.org/git/ are somewhat
outdated.

cheers,
Bart




-------------------------------------------------------
This SF.Net email is sponsored by:
Power Architecture Resource Center: Free content, downloads, discussions,
and more. http://solutions.newsforge.com/ibmarch.tmpl

^ permalink raw reply

* Re: [PATCH] Add Wake on LAN support to sis900
From: Andrew Morton @ 2005-10-12  3:53 UTC (permalink / raw)
  To: Daniele Venzano; +Cc: jgarzik, netdev
In-Reply-To: <20051006111326.GA3242@renditai.milesteg.arr>

Daniele Venzano <venza@brownhat.org> wrote:
>
> The patch availble below adds support for Wake on LAN to the sis900
> driver. Some register addresses were added to sis900.h and two new
> functions were implemented in sis900.c. WoL status is controlled by
> ethtool.
> Patch is against 2.6.13.
> 
> Comments are welcome, but also consider for inclusion in the -mm series.
> 
> --- ../../trunk/sis900.h	2005-07-17 10:43:23.000000000 +0200
> +++ sis900.h	2005-10-06 12:49:37.000000000 +0200

Please prepare patches in `patch -p1' form.  See
http://www.zip.com.au/~akpm/linux/patches/stuff/tpp.txt.

> ...
> +	/* Detect Wake on Lan support */
> +	ret = inl(CFGPMC & PMESP);
> +	if (netif_msg_probe(sis_priv) && (ret & PME_D3C) == 0)
> +		printk(KERN_INFO "%s: Wake on LAN only available from suspend to RAM.", net_dev->name);
> +

How come?  Why doesn't it work after an ordinary `halt -p'?

> @@ -2015,6 +2082,8 @@
>  	.get_settings	= sis900_get_settings,
>  	.set_settings	= sis900_set_settings,
>  	.nway_reset	= sis900_nway_reset,
> +	.get_wol	= sis900_get_wol,
> +	.set_wol	= sis900_set_wol
>  };

We normally add a comma to the final field so that subsequent patches look
cleaner.

^ permalink raw reply

* Re: [PATCH] ebtables: Port ebt_[u]log.c to nf[netlink]_log
From: Harald Welte @ 2005-10-12  6:27 UTC (permalink / raw)
  To: Bart De Schuymer
  Cc: Linux Netdev List,
	ebtables-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f
In-Reply-To: <1129059110.5087.8.camel-bi+AKbBUZKY6gyzm1THtWbp2dZbC/Bob@public.gmane.org>


[-- Attachment #1.1: Type: text/plain, Size: 1121 bytes --]

On Tue, Oct 11, 2005 at 07:31:50PM +0000, Bart De Schuymer wrote:
> I seem to be unable to get Davem's current git tree.
> This fails miserably: 
> cg-clone http://www.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6.git

Try getting it via rsync, I never have successfully ran cg/git via http.

Also, a recent linus tree should be sufficient, even one of the latest
2.6.14-rc3/rc4 tarballs should be fine.

> Your patch won't apply to 2.6.13. At first I thought it was a problem
> with evolution or the kernel version, but looking at the source code of
> your mail, I see "=20" added here and there...

I've attached it to this mail again.  Since it isn't inline, saving it
as attachment should do fine.

-- 
- Harald Welte <laforge-Cap9r6Oaw4JrovVCs/uTlw@public.gmane.org>                 http://netfilter.org/
============================================================================
  "Fragmentation is like classful addressing -- an interesting early
   architectural error that shows how much experimentation was going
   on while IP was being designed."                    -- Paul Vixie

[-- Attachment #1.2: 81-ebt_ulog-nf_log.patch --]
[-- Type: text/plain, Size: 8941 bytes --]

[NETFILTER] ebtables: Port ebt_[u]log.c to nf[netlink]_log

Since we now have a netfilter core logging API, we port the bridging log
and ulog watchers to this new API.

This basically means that if you use the "ebt_log" watcher, it will by
default log to the system console, but enables a userspace logging daemon
binds itself to PF_BRIDGE, and take over all logging.

ebt_ulog also registers itself as logger with nf_log, but any packets
explicitly send to ebt_ulog will always use the ulog mechanism and not
handled via the generic logging handler.

This change resembles the situation that is now present in ipv4.

Signed-off-by: Harald Welte <laforge-Cap9r6Oaw4JrovVCs/uTlw@public.gmane.org>

---
commit 0dc2bc0656b4b1c5ba3524dadc8fbf36881903b7
tree 0e43d4f7b10f022ff523ea4751546d76d53c57b7
parent 2e64e94fe8e7e4630c9d9e66c437f3ba81e99f78
author Harald Welte <laforge-Cap9r6Oaw4JrovVCs/uTlw@public.gmane.org> Sat, 08 Oct 2005 01:43:49 +0200
committer Harald Welte <laforge-Cap9r6Oaw4JrovVCs/uTlw@public.gmane.org> Sat, 08 Oct 2005 01:43:49 +0200

 net/bridge/netfilter/Kconfig    |    6 +++-
 net/bridge/netfilter/ebt_log.c  |   61 +++++++++++++++++++++++++++++++++------
 net/bridge/netfilter/ebt_ulog.c |   48 +++++++++++++++++++++++++++++--
 3 files changed, 102 insertions(+), 13 deletions(-)

diff --git a/net/bridge/netfilter/Kconfig b/net/bridge/netfilter/Kconfig
--- a/net/bridge/netfilter/Kconfig
+++ b/net/bridge/netfilter/Kconfig
@@ -196,9 +196,13 @@ config BRIDGE_EBT_LOG
 	  To compile it as a module, choose M here.  If unsure, say N.
 
 config BRIDGE_EBT_ULOG
-	tristate "ebt: ulog support"
+	tristate "ebt: ulog support (OBSOLETE)"
 	depends on BRIDGE_NF_EBTABLES
 	help
+	  This option enables the old bridge-specific "ebt_ulog" implementation
+	  which has been obsoleted by the new "nfnetlink_log" code (see
+	  CONFIG_NETFILTER_NETLINK_LOG).
+
 	  This option adds the ulog watcher, that you can use in any rule
 	  in any ebtables table. The packet is passed to a userspace
 	  logging daemon using netlink multicast sockets. This differs
diff --git a/net/bridge/netfilter/ebt_log.c b/net/bridge/netfilter/ebt_log.c
--- a/net/bridge/netfilter/ebt_log.c
+++ b/net/bridge/netfilter/ebt_log.c
@@ -3,6 +3,7 @@
  *
  *	Authors:
  *	Bart De Schuymer <bdschuym-LPO8gxj9N8aZIoH1IeqzKA@public.gmane.org>
+ *	Harald Welte <laforge-Cap9r6Oaw4JrovVCs/uTlw@public.gmane.org>
  *
  *  April, 2002
  *
@@ -10,6 +11,7 @@
 
 #include <linux/netfilter_bridge/ebtables.h>
 #include <linux/netfilter_bridge/ebt_log.h>
+#include <linux/netfilter.h>
 #include <linux/module.h>
 #include <linux/ip.h>
 #include <linux/if_arp.h>
@@ -55,17 +57,19 @@ static void print_MAC(unsigned char *p)
 }
 
 #define myNIPQUAD(a) a[0], a[1], a[2], a[3]
-static void ebt_log(const struct sk_buff *skb, unsigned int hooknr,
-   const struct net_device *in, const struct net_device *out,
-   const void *data, unsigned int datalen)
+static void
+ebt_log_packet(unsigned int pf, unsigned int hooknum,
+   const struct sk_buff *skb, const struct net_device *in,
+   const struct net_device *out, const struct nf_loginfo *loginfo,
+   const char *prefix)
 {
-	struct ebt_log_info *info = (struct ebt_log_info *)data;
 	char level_string[4] = "< >";
+	unsigned int bitmask;
 
-	level_string[1] = '0' + info->loglevel;
+	level_string[1] = '0' + loginfo->u.log.level;
 	spin_lock_bh(&ebt_log_lock);
 	printk(level_string);
-	printk("%s IN=%s OUT=%s ", info->prefix, in ? in->name : "",
+	printk("%s IN=%s OUT=%s ", prefix, in ? in->name : "",
 	   out ? out->name : "");
 
 	printk("MAC source = ");
@@ -75,7 +79,12 @@ static void ebt_log(const struct sk_buff
 
 	printk("proto = 0x%04x", ntohs(eth_hdr(skb)->h_proto));
 
-	if ((info->bitmask & EBT_LOG_IP) && eth_hdr(skb)->h_proto ==
+	if (loginfo->type == NF_LOG_TYPE_LOG)
+		bitmask = loginfo->u.log.logflags;
+	else
+		bitmask = NF_LOG_MASK;
+
+	if ((bitmask & EBT_LOG_IP) && eth_hdr(skb)->h_proto ==
 	   htons(ETH_P_IP)){
 		struct iphdr _iph, *ih;
 
@@ -104,7 +113,7 @@ static void ebt_log(const struct sk_buff
 		goto out;
 	}
 
-	if ((info->bitmask & EBT_LOG_ARP) &&
+	if ((bitmask & EBT_LOG_ARP) &&
 	    ((eth_hdr(skb)->h_proto == htons(ETH_P_ARP)) ||
 	     (eth_hdr(skb)->h_proto == htons(ETH_P_RARP)))) {
 		struct arphdr _arph, *ah;
@@ -144,6 +153,21 @@ static void ebt_log(const struct sk_buff
 out:
 	printk("\n");
 	spin_unlock_bh(&ebt_log_lock);
+
+}
+
+static void ebt_log(const struct sk_buff *skb, unsigned int hooknr,
+   const struct net_device *in, const struct net_device *out,
+   const void *data, unsigned int datalen)
+{
+	struct ebt_log_info *info = (struct ebt_log_info *)data;
+	struct nf_loginfo li;
+
+	li.type = NF_LOG_TYPE_LOG;
+	li.u.log.level = info->loglevel;
+	li.u.log.logflags = info->bitmask;
+
+	nf_log_packet(PF_BRIDGE, hooknr, skb, in, out, &li, info->prefix);
 }
 
 static struct ebt_watcher log =
@@ -154,13 +178,32 @@ static struct ebt_watcher log =
 	.me		= THIS_MODULE,
 };
 
+static struct nf_logger ebt_log_logger = {
+	.name 		= "ebt_log",
+	.logfn		= &ebt_log_packet,
+	.me		= THIS_MODULE,
+};
+
 static int __init init(void)
 {
-	return ebt_register_watcher(&log);
+	int ret;
+
+	ret = ebt_register_watcher(&log);
+	if (ret < 0)
+		return ret;
+	if (nf_log_register(PF_BRIDGE, &ebt_log_logger) < 0) {
+		printk(KERN_WARNING "ebt_log: not logging via system console "
+		       "since somebody else already registered for PF_INET\n");
+		/* wecannot make module load fail here, since otherwise 
+		 * ebtables userspace would abort */
+	}
+
+	return 0;
 }
 
 static void __exit fini(void)
 {
+	nf_log_unregister_logger(&ebt_log_logger);
 	ebt_unregister_watcher(&log);
 }
 
diff --git a/net/bridge/netfilter/ebt_ulog.c b/net/bridge/netfilter/ebt_ulog.c
--- a/net/bridge/netfilter/ebt_ulog.c
+++ b/net/bridge/netfilter/ebt_ulog.c
@@ -3,6 +3,7 @@
  *
  *	Authors:
  *	Bart De Schuymer <bdschuym-LPO8gxj9N8aZIoH1IeqzKA@public.gmane.org>
+ *	Harald Welte <laforge-Cap9r6Oaw4JrovVCs/uTlw@public.gmane.org>
  *
  *  November, 2004
  *
@@ -115,14 +116,13 @@ static struct sk_buff *ulog_alloc_skb(un
 	return skb;
 }
 
-static void ebt_ulog(const struct sk_buff *skb, unsigned int hooknr,
+static void ebt_ulog_packet(unsigned int hooknr, const struct sk_buff *skb,
    const struct net_device *in, const struct net_device *out,
-   const void *data, unsigned int datalen)
+   const struct ebt_ulog_info *uloginfo, const char *prefix)
 {
 	ebt_ulog_packet_msg_t *pm;
 	size_t size, copy_len;
 	struct nlmsghdr *nlh;
-	struct ebt_ulog_info *uloginfo = (struct ebt_ulog_info *)data;
 	unsigned int group = uloginfo->nlgroup;
 	ebt_ulog_buff_t *ub = &ulog_buffers[group];
 	spinlock_t *lock = &ub->lock;
@@ -216,6 +216,39 @@ alloc_failure:
 	goto unlock;
 }
 
+/* this function is registered with the netfilter core */
+static void ebt_log_packet(unsigned int pf, unsigned int hooknum,
+   const struct sk_buff *skb, const struct net_device *in,
+   const struct net_device *out, const struct nf_loginfo *li,
+   const char *prefix)
+{
+	struct ebt_ulog_info loginfo;
+
+	if (!li || li->type != NF_LOG_TYPE_ULOG) {
+		loginfo.nlgroup = EBT_ULOG_DEFAULT_NLGROUP;
+		loginfo.cprange = 0;
+		loginfo.qthreshold = EBT_ULOG_DEFAULT_QTHRESHOLD;
+		loginfo.prefix[0] = '\0';
+	} else {
+		loginfo.nlgroup = li->u.ulog.group;
+		loginfo.cprange = li->u.ulog.copy_len;
+		loginfo.qthreshold = li->u.ulog.qthreshold;
+		strlcpy(loginfo.prefix, prefix, sizeof(loginfo.prefix));
+	}
+
+	ebt_ulog_packet(hooknum, skb, in, out, &loginfo, prefix);
+}
+
+static void ebt_ulog(const struct sk_buff *skb, unsigned int hooknr,
+   const struct net_device *in, const struct net_device *out,
+   const void *data, unsigned int datalen)
+{
+	struct ebt_ulog_info *uloginfo = (struct ebt_ulog_info *)data;
+
+	ebt_ulog_packet(hooknr, skb, in, out, uloginfo, NULL);
+}
+
+
 static int ebt_ulog_check(const char *tablename, unsigned int hookmask,
    const struct ebt_entry *e, void *data, unsigned int datalen)
 {
@@ -240,6 +273,12 @@ static struct ebt_watcher ulog = {
 	.me		= THIS_MODULE,
 };
 
+static struct nf_logger ebt_ulog_logger = {
+	.name		= EBT_ULOG_WATCHER,
+	.logfn		= &ebt_log_packet,
+	.me		= THIS_MODULE,
+};
+
 static int __init init(void)
 {
 	int i, ret = 0;
@@ -265,6 +304,8 @@ static int __init init(void)
 	else if ((ret = ebt_register_watcher(&ulog)))
 		sock_release(ebtulognl->sk_socket);
 
+	nf_log_register(PF_BRIDGE, &ebt_ulog_logger);
+
 	return ret;
 }
 
@@ -273,6 +314,7 @@ static void __exit fini(void)
 	ebt_ulog_buff_t *ub;
 	int i;
 
+	nf_log_unregister_logger(&ebt_ulog_logger);
 	ebt_unregister_watcher(&ulog);
 	for (i = 0; i < EBT_ULOG_MAXNLGROUPS; i++) {
 		ub = &ulog_buffers[i];

[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]

^ permalink raw reply

* Re: Timeline of IPoIB performance
From: Roland Dreier @ 2005-10-12 16:53 UTC (permalink / raw)
  To: Herbert Xu; +Cc: netdev, openib-general
In-Reply-To: <E1EPIxF-0001Cp-00@gondolin.me.apana.org.au>

    Herbert> Try reverting the changeset

    Herbert> 314324121f9b94b2ca657a494cf2b9cb0e4a28cc

    Herbert> which lies between these two points and may be relevant.

Matt, I pulled this out of git for you.  I guess Herbert is suggesting
to patch -R the below against 2.6.12-rc5:

diff --git a/net/ipv4/tcp_input.c b/net/ipv4/tcp_input.c
index 79835a6..5bad504 100644
--- a/net/ipv4/tcp_input.c
+++ b/net/ipv4/tcp_input.c
@@ -4355,16 +4355,7 @@ int tcp_rcv_established(struct sock *sk,
 					goto no_ack;
 			}
 
-			if (eaten) {
-				if (tcp_in_quickack_mode(tp)) {
-					tcp_send_ack(sk);
-				} else {
-					tcp_send_delayed_ack(sk);
-				}
-			} else {
-				__tcp_ack_snd_check(sk, 0);
-			}
-
+			__tcp_ack_snd_check(sk, 0);
 no_ack:
 			if (eaten)
 				__kfree_skb(skb);

^ permalink raw reply related

* Re: [PATCH] Add Wake on LAN support to sis900
From: Daniele Venzano @ 2005-10-12 17:32 UTC (permalink / raw)
  To: Andrew Morton; +Cc: jgarzik, netdev
In-Reply-To: <20051011205304.34bc07ad.akpm@osdl.org>

Il giorno 12/ott/05, alle ore 05:53, Andrew Morton ha scritto:
>> --- ../../trunk/sis900.h    2005-07-17 10:43:23.000000000 +0200
>> +++ sis900.h    2005-10-06 12:49:37.000000000 +0200
>>
>
> Please prepare patches in `patch -p1' form.  See
> http://www.zip.com.au/~akpm/linux/patches/stuff/tpp.txt.
Yes, I did send a corrected patch some days later, when I found out.  
This was the only correction I made there, so you can just trash it.

>> +    /* Detect Wake on Lan support */
>> +    ret = inl(CFGPMC & PMESP);
>> +    if (netif_msg_probe(sis_priv) && (ret & PME_D3C) == 0)
>> +        printk(KERN_INFO "%s: Wake on LAN only available from  
>> suspend to RAM.", net_dev->name);
>> +
>>
>
> How come?  Why doesn't it work after an ordinary `halt -p'?
That register should report, according to the specs, the status of  
the additional power supply needed to keep awake the chip when the  
computer is shut down. Usually there is an additional cable to be  
installed between the NIC and the motherboard, but on laptops or  
embedded chips it's difficult to know.

>> @@ -2015,6 +2082,8 @@
>>      .get_settings    = sis900_get_settings,
>>      .set_settings    = sis900_set_settings,
>>      .nway_reset    = sis900_nway_reset,
>> +    .get_wol    = sis900_get_wol,
>> +    .set_wol    = sis900_set_wol
>>  };
>>
>
> We normally add a comma to the final field so that subsequent  
> patches look
> cleaner.
Will do.

Thanks for the comments.
--
Daniele Venzano
http://www.brownhat.org

^ permalink raw reply

* Re: Timeline of IPoIB performance
From: Matt Leininger @ 2005-10-12 18:28 UTC (permalink / raw)
  To: Roland Dreier; +Cc: netdev, Herbert Xu, openib-general
In-Reply-To: <52mzle7k2i.fsf@cisco.com>

On Wed, 2005-10-12 at 09:53 -0700, Roland Dreier wrote:
>     Herbert> Try reverting the changeset
> 
>     Herbert> 314324121f9b94b2ca657a494cf2b9cb0e4a28cc
> 
>     Herbert> which lies between these two points and may be relevant.
> 
> Matt, I pulled this out of git for you.  I guess Herbert is suggesting
> to patch -R the below against 2.6.12-rc5:

I applied your patch suggest by Herbert:

http://www.mail-archive.com/openib-general%40openib.org/msg11415.html

to my 2.6.12-rc5 tree and IPoIB performance improved back to the ~475
MB/s range for my EM64T system.  The data is below.

I'm building/testing 2.6.14-rc4 with and without this patch now.


All benchmarks are with RHEL4 x86_64 with HCA FW v4.7.0
dual EM64T 3.2 GHz PCIe IB HCA (memfull)

Kernel           OpenIB    msi_x  netperf (MB/s)  
2.6.14-rc3      in-kernel    1     374 
2.6.13.2        svn3627      1     386 
2.6.13.2        in-kernel    1     394 
2.6.12.5-lustre in-kernel    1     399  
2.6.12.5        in-kernel    1     402 
2.6.12          in-kernel    1     406 
2.6.12-rc6      in-kernel    1     407
2.6.12-rc5      in-kernel    1     405                        <<<<
2.6.12-rc5                                                    <<<<
 - remove changeset 314324121f9b94b2ca657a494cf2b9cb0e4a28cc  <<<<
                in-kernel    1     474                        <<<<
2.6.12-rc4      in-kernel    1     470 
2.6.12-rc3      in-kernel    1     466 
2.6.12-rc2      in-kernel    1     469 
2.6.12-rc1      in-kernel    1     466
2.6.11          in-kernel    1     464 
2.6.11          svn3687      1     464 
2.6.9-11.ELsmp  svn3513      1     425  (Woody's results, 3.6Ghz EM64T) 

  - Matt

^ permalink raw reply

* Re: [PATCH] ebtables: Port ebt_[u]log.c to nf[netlink]_log
From: Ian McDonald @ 2005-10-12 20:10 UTC (permalink / raw)
  To: Harald Welte
  Cc: Bart De Schuymer, Linux Netdev List,
	ebtables-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f
In-Reply-To: <20051012062745.GB4237-d6usTx1WJblOCgDDqY8e12D2FQJk+8+b@public.gmane.org>

On 12/10/05, Harald Welte <laforge-Cap9r6Oaw4JrovVCs/uTlw@public.gmane.org> wrote:
> On Tue, Oct 11, 2005 at 07:31:50PM +0000, Bart De Schuymer wrote:
> > I seem to be unable to get Davem's current git tree.
> > This fails miserably:
> > cg-clone http://www.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6.git
>
> Try getting it via rsync, I never have successfully ran cg/git via http.
>
If you want to keep using a git tree have a look at a page I put together:
http://wlug.org.nz/KernelDevelopmentWithGit

Ian


-------------------------------------------------------
This SF.Net email is sponsored by:
Power Architecture Resource Center: Free content, downloads, discussions,
and more. http://solutions.newsforge.com/ibmarch.tmpl

^ permalink raw reply

* Re: [PATCH] br: fix race on bridge del if
From: David S. Miller @ 2005-10-12 22:10 UTC (permalink / raw)
  To: shemminger; +Cc: ryanh, netdev, chrisw, greg
In-Reply-To: <20051011133328.26db65d7@localhost.localdomain>

From: Stephen Hemminger <shemminger@osdl.org>
Date: Tue, 11 Oct 2005 13:33:28 -0700

> This fixes the RCU race on bridge delete interface.  Basically,
> the network device has to be detached from the bridge in the first
> step (pre-RCU), rather than later. At that point, no more bridge traffic
> will come in, and the other code will not think that network device
> is part of a bridge.
> 
> This should also fix the XEN test problems. If there is another
> 2.6.13-stable, add it as well.
> 
> Signed-off-by: Stephen Hemminger <shemminger@osdl.org>

Applied, thanks Stephen.

^ permalink raw reply

* Re: [ANNOUNCE] iproute2 version (050929)
From: Stephen Hemminger @ 2005-10-12 22:32 UTC (permalink / raw)
  To: hadi; +Cc: netdev, lartc, Krzysztof Oledzki
In-Reply-To: <1128990692.6353.14.camel@localhost.localdomain>

On Mon, 10 Oct 2005 20:31:31 -0400
jamal <hadi@cyberus.ca> wrote:

> On Mon, 2005-10-10 at 16:16 -0700, Stephen Hemminger wrote:
> 
> > Look like the -batch code that keeps the RTNL handle open was
> > breaking this.  The patch shows the general idea, but it still has
> > problems because I think it would still not work if used in
> > -batch situation.
> 
> I see what you mean.
> You definitely need at least one extra socket for deleting
> in the flush_rule(). Something like the attached, untested,
> uncompiled.
> 
> 
> Krzysztof, if you have time please try the attached patch?
> 
> cheers,
> jamal

applied to iproute2 cvs

-- 
Stephen Hemminger <shemminger@osdl.org>
OSDL http://developer.osdl.org/~shemminger

^ permalink raw reply

* Re: Timeline of IPoIB performance
From: Matt Leininger @ 2005-10-13  1:24 UTC (permalink / raw)
  To: Roland Dreier; +Cc: netdev, Herbert Xu, openib-general
In-Reply-To: <1129141706.13945.509.camel@localhost>

On Wed, 2005-10-12 at 11:28 -0700, Matt Leininger wrote:
> On Wed, 2005-10-12 at 09:53 -0700, Roland Dreier wrote:
> >     Herbert> Try reverting the changeset
> > 
> >     Herbert> 314324121f9b94b2ca657a494cf2b9cb0e4a28cc
> > 
> >     Herbert> which lies between these two points and may be relevant.
> > 
> > Matt, I pulled this out of git for you.  I guess Herbert is suggesting
> > to patch -R the below against 2.6.12-rc5:

> I applied your patch suggest by Herbert:
> 
> http://www.mail-archive.com/openib-general%40openib.org/msg11415.html
> 
  I backed out this patch out of a few other kernels and always see a
performance improvement.  This gets back ~50-60 MB/s of the 90-100 MB/s
drop off in IPoIB performance.   

  Is it still worth testing the TSO patches that Herbert suggested for
some of the 2.6.13-rc kernels?
 
  Thanks,

   - Matt



All benchmarks are with RHEL4 x86_64 with HCA FW v4.7.0
dual EM64T 3.2 GHz PCIe IB HCA (memfull)

Kernel           OpenIB    msi_x  netperf (MB/s)  
2.6.14-rc4      in-kernel    1     434  (backed out patch)
2.6.14-rc4      in-kernel    1     385 

2.6.13.2        svn3627      1     446  (backed out patch)
2.6.13.2        svn3627      1     386 
2.6.13.2        in-kernel    1     394 

2.6.12.5        in-kernel    1     464  (backed out patch)
2.6.12.5        in-kernel    1     402 

2.6.12-rc6      in-kernel    1     470  (backed out patch) 
2.6.12-rc6      in-kernel    1     407

2.6.12-rc5      in-kernel    1     474 (backed out patch)
2.6.12-rc5      in-kernel    1     405 


2.6.9-11.ELsmp  svn3513      1     425  (Woody's results, 3.6Ghz EM64T) 

^ permalink raw reply

* Re: Timeline of IPoIB performance
From: Herbert Xu @ 2005-10-13  1:48 UTC (permalink / raw)
  To: Matt Leininger; +Cc: netdev, openib-general
In-Reply-To: <1129166672.13948.530.camel@localhost>

On Wed, Oct 12, 2005 at 06:24:32PM -0700, Matt Leininger wrote:
> 
>   Is it still worth testing the TSO patches that Herbert suggested for
> some of the 2.6.13-rc kernels?

If you're still seeing a performance regression compared to 
2.6.12-rc4, then yes (According to the figures in your message
there does seem to be a bit of loss after the release of 2.6.12).

The patch you reverted may degrade the performance on the receiver.
The TSO patches may be causing some degradation on your sender.

Cheers,
-- 
Visit Openswan at http://www.openswan.org/
Email: Herbert Xu ~{PmV>HI~} <herbert@gondor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt

^ permalink raw reply

* [PATCH] 2.6.14-rc4: wider use of for_each_*cpu() in net
From: hawkes @ 2005-10-13 19:01 UTC (permalink / raw)
  To: netdev, linux-kernel; +Cc: hawkes

In 'net' change the explicit use of for-loops and NR_CPUS into the
general for_each_cpu() or for_each_online_cpu() constructs, as
appropriate.  This widens the scope of potential future optimizations
of the general constructs, as well as takes advantage of the existing
optimizations of first_cpu() and next_cpu(), which is advantageous
when the true CPU count is much smaller than NR_CPUS.

Signed-off-by: John Hawkes <hawkes@sgi.com>


Index: linux/net/core/neighbour.c
===================================================================
--- linux.orig/net/core/neighbour.c	2005-10-13 09:29:54.000000000 -0700
+++ linux/net/core/neighbour.c	2005-10-13 09:30:31.000000000 -0700
@@ -1641,12 +1641,9 @@
 
 		memset(&ndst, 0, sizeof(ndst));
 
-		for (cpu = 0; cpu < NR_CPUS; cpu++) {
+		for_each_cpu(cpu) {
 			struct neigh_statistics	*st;
 
-			if (!cpu_possible(cpu))
-				continue;
-
 			st = per_cpu_ptr(tbl->stats, cpu);
 			ndst.ndts_allocs		+= st->allocs;
 			ndst.ndts_destroys		+= st->destroys;
Index: linux/net/core/pktgen.c
===================================================================
--- linux.orig/net/core/pktgen.c	2005-10-13 09:29:54.000000000 -0700
+++ linux/net/core/pktgen.c	2005-10-13 09:30:31.000000000 -0700
@@ -3065,12 +3065,9 @@
 	/* Register us to receive netdevice events */
 	register_netdevice_notifier(&pktgen_notifier_block);
         
-	for (cpu = 0; cpu < NR_CPUS ; cpu++) {
+	for_each_online_cpu(cpu) {
 		char buf[30];
 
-		if (!cpu_online(cpu))
-			continue;
-
                 sprintf(buf, "kpktgend_%i", cpu);
                 pktgen_create_thread(buf, cpu);
         }
Index: linux/net/ipv4/icmp.c
===================================================================
--- linux.orig/net/ipv4/icmp.c	2005-10-13 09:29:54.000000000 -0700
+++ linux/net/ipv4/icmp.c	2005-10-13 09:30:31.000000000 -0700
@@ -1108,12 +1108,9 @@
 	struct inet_sock *inet;
 	int i;
 
-	for (i = 0; i < NR_CPUS; i++) {
+	for_each_cpu(i) {
 		int err;
 
-		if (!cpu_possible(i))
-			continue;
-
 		err = sock_create_kern(PF_INET, SOCK_RAW, IPPROTO_ICMP,
 				       &per_cpu(__icmp_socket, i));
 
Index: linux/net/ipv4/proc.c
===================================================================
--- linux.orig/net/ipv4/proc.c	2005-10-13 09:29:54.000000000 -0700
+++ linux/net/ipv4/proc.c	2005-10-13 09:30:31.000000000 -0700
@@ -90,9 +90,7 @@
 	unsigned long res = 0;
 	int i;
 
-	for (i = 0; i < NR_CPUS; i++) {
-		if (!cpu_possible(i))
-			continue;
+	for_each_cpu(i) {
 		res += *(((unsigned long *) per_cpu_ptr(mib[0], i)) + offt);
 		res += *(((unsigned long *) per_cpu_ptr(mib[1], i)) + offt);
 	}
Index: linux/net/ipv6/proc.c
===================================================================
--- linux.orig/net/ipv6/proc.c	2005-10-13 09:29:54.000000000 -0700
+++ linux/net/ipv6/proc.c	2005-10-13 09:30:31.000000000 -0700
@@ -140,9 +140,7 @@
         unsigned long res = 0;
         int i;
  
-        for (i = 0; i < NR_CPUS; i++) {
-                if (!cpu_possible(i))
-                        continue;
+        for_each_cpu(i) {
                 res += *(((unsigned long *)per_cpu_ptr(mib[0], i)) + offt);
                 res += *(((unsigned long *)per_cpu_ptr(mib[1], i)) + offt);
         }
Index: linux/net/ipv6/icmp.c
===================================================================
--- linux.orig/net/ipv6/icmp.c	2005-10-13 09:29:54.000000000 -0700
+++ linux/net/ipv6/icmp.c	2005-10-13 09:30:31.000000000 -0700
@@ -700,10 +700,7 @@
 	struct sock *sk;
 	int err, i, j;
 
-	for (i = 0; i < NR_CPUS; i++) {
-		if (!cpu_possible(i))
-			continue;
-
+	for_each_cpu(i) {
 		err = sock_create_kern(PF_INET6, SOCK_RAW, IPPROTO_ICMPV6,
 				       &per_cpu(__icmpv6_socket, i));
 		if (err < 0) {
@@ -749,9 +746,7 @@
 {
 	int i;
 
-	for (i = 0; i < NR_CPUS; i++) {
-		if (!cpu_possible(i))
-			continue;
+	for_each_cpu(i) {
 		sock_release(per_cpu(__icmpv6_socket, i));
 	}
 	inet6_del_protocol(&icmpv6_protocol, IPPROTO_ICMPV6);
Index: linux/net/sctp/proc.c
===================================================================
--- linux.orig/net/sctp/proc.c	2005-10-13 09:29:54.000000000 -0700
+++ linux/net/sctp/proc.c	2005-10-13 09:30:31.000000000 -0700
@@ -69,9 +69,7 @@
 	unsigned long res = 0;
 	int i;
 
-	for (i = 0; i < NR_CPUS; i++) {
-		if (!cpu_possible(i))
-			continue;
+	for_each_cpu(i) {
 		res +=
 		    *((unsigned long *) (((void *) per_cpu_ptr(mib[0], i)) +
 					 sizeof (unsigned long) * nr));

^ permalink raw reply

* [PATCH 02/14] Big kfree NULL check cleanup - drivers/net
From: Jesper Juhl @ 2005-10-13 19:22 UTC (permalink / raw)
  To: linux-kernel
  Cc: Andrew Morton, David S. Miller, Jes Sorensen, Matt Porter,
	Michael Chan, linux.nics, hans, Santiago Leon, Jean Tourrilhes,
	Paul Mackerras, Michael Hipp, Jes Sorensen, Carsten Langgaard,
	Jeff Garzik, Benjamin Reed, Jouni Malinen, prism54-private,
	netdev, Stuart Cheshire, g4klx, Alan Cox, Jesper Juhl

This is the drivers/net/ part of the big kfree cleanup patch.

Remove pointless checks for NULL prior to calling kfree() in drivers/net/.


Sorry about the long Cc: list, but I wanted to make sure I included everyone
who's code I've changed with this patch.


Signed-off-by: Jesper Juhl <jesper.juhl@gmail.com>
---

Please see the initial announcement mail on LKML with subject
"[PATCH 00/14] Big kfree NULL check cleanup"
for additional details.

 drivers/net/acenic.c                       |    6 +--
 drivers/net/au1000_eth.c                   |    6 +--
 drivers/net/b44.c                          |   12 ++-----
 drivers/net/bmac.c                         |    6 +--
 drivers/net/bnx2.c                         |   12 ++-----
 drivers/net/e1000/e1000_ethtool.c          |    7 +---
 drivers/net/hamradio/mkiss.c               |    6 +--
 drivers/net/ibmveth.c                      |   19 +++--------
 drivers/net/irda/donauboe.c                |    6 +--
 drivers/net/irda/irda-usb.c                |    6 +--
 drivers/net/irda/irport.c                  |    3 -
 drivers/net/irda/sir_dev.c                 |    3 -
 drivers/net/irda/vlsi_ir.c                 |    3 -
 drivers/net/mace.c                         |    6 +--
 drivers/net/ni65.c                         |    9 +----
 drivers/net/rrunner.c                      |    6 +--
 drivers/net/s2io.c                         |    3 -
 drivers/net/saa9730.c                      |    8 +---
 drivers/net/sb1250-mac.c                   |   12 +------
 drivers/net/tg3.c                          |    6 +--
 drivers/net/tulip/de2104x.c                |    6 +--
 drivers/net/tulip/tulip_core.c             |    6 +--
 drivers/net/via-velocity.c                 |    6 +--
 drivers/net/wireless/airo.c                |   48 +++++++++++------------------
 drivers/net/wireless/airo_cs.c             |    4 --
 drivers/net/wireless/atmel.c               |    6 +--
 drivers/net/wireless/atmel_cs.c            |    3 -
 drivers/net/wireless/hostap/hostap_ioctl.c |    9 +----
 drivers/net/wireless/prism54/islpci_dev.c  |    3 -
 drivers/net/wireless/prism54/oid_mgt.c     |    9 ++---
 drivers/net/wireless/strip.c               |   38 +++++++---------------
 include/net/ax25.h                         |    3 -
 include/net/netrom.h                       |    3 -
 33 files changed, 97 insertions(+), 192 deletions(-)

--- linux-2.6.14-rc4-orig/drivers/net/irda/vlsi_ir.c	2005-10-11 22:41:11.000000000 +0200
+++ linux-2.6.14-rc4/drivers/net/irda/vlsi_ir.c	2005-10-12 15:43:54.000000000 +0200
@@ -473,8 +473,7 @@ static int vlsi_free_ring(struct vlsi_ri
 		rd_set_addr_status(rd, 0, 0);
 		if (busaddr)
 			pci_unmap_single(r->pdev, busaddr, r->len, r->dir);
-		if (rd->buf)
-			kfree(rd->buf);
+		kfree(rd->buf);
 	}
 	kfree(r);
 	return 0;
--- linux-2.6.14-rc4-orig/drivers/net/irda/donauboe.c	2005-08-29 01:41:01.000000000 +0200
+++ linux-2.6.14-rc4/drivers/net/irda/donauboe.c	2005-10-12 15:45:19.000000000 +0200
@@ -1695,11 +1695,9 @@ toshoboe_open (struct pci_dev *pci_dev, 
 
 freebufs:
   for (i = 0; i < TX_SLOTS; ++i)
-    if (self->tx_bufs[i])
-      kfree (self->tx_bufs[i]);
+    kfree (self->tx_bufs[i]);
   for (i = 0; i < RX_SLOTS; ++i)
-    if (self->rx_bufs[i])
-      kfree (self->rx_bufs[i]);
+    kfree (self->rx_bufs[i]);
   kfree(self->ringbuf);
 
 freeregion:
--- linux-2.6.14-rc4-orig/drivers/net/irda/irda-usb.c	2005-10-11 22:41:11.000000000 +0200
+++ linux-2.6.14-rc4/drivers/net/irda/irda-usb.c	2005-10-12 15:45:55.000000000 +0200
@@ -1168,10 +1168,8 @@ static inline void irda_usb_close(struct
 	unregister_netdev(self->netdev);
 
 	/* Remove the speed buffer */
-	if (self->speed_buff != NULL) {
-		kfree(self->speed_buff);
-		self->speed_buff = NULL;
-	}
+	kfree(self->speed_buff);
+	self->speed_buff = NULL;
 }
 
 /********************** USB CONFIG SUBROUTINES **********************/
--- linux-2.6.14-rc4-orig/drivers/net/irda/sir_dev.c	2005-08-29 01:41:01.000000000 +0200
+++ linux-2.6.14-rc4/drivers/net/irda/sir_dev.c	2005-10-12 15:46:45.000000000 +0200
@@ -490,8 +490,7 @@ static void sirdev_free_buffers(struct s
 {
 	if (dev->rx_buff.skb)
 		kfree_skb(dev->rx_buff.skb);
-	if (dev->tx_buff.head)
-		kfree(dev->tx_buff.head);
+	kfree(dev->tx_buff.head);
 	dev->rx_buff.head = dev->tx_buff.head = NULL;
 	dev->rx_buff.skb = NULL;
 }
--- linux-2.6.14-rc4-orig/drivers/net/irda/irport.c	2005-08-29 01:41:01.000000000 +0200
+++ linux-2.6.14-rc4/drivers/net/irda/irport.c	2005-10-12 15:47:03.000000000 +0200
@@ -235,8 +235,7 @@ static int irport_close(struct irport_cb
 		   __FUNCTION__, self->io.sir_base);
 	release_region(self->io.sir_base, self->io.sir_ext);
 
-	if (self->tx_buff.head)
-		kfree(self->tx_buff.head);
+	kfree(self->tx_buff.head);
 	
 	if (self->rx_buff.skb)
 		kfree_skb(self->rx_buff.skb);
--- linux-2.6.14-rc4-orig/drivers/net/b44.c	2005-08-29 01:41:01.000000000 +0200
+++ linux-2.6.14-rc4/drivers/net/b44.c	2005-10-12 15:47:33.000000000 +0200
@@ -1076,14 +1076,10 @@ static void b44_init_rings(struct b44 *b
  */
 static void b44_free_consistent(struct b44 *bp)
 {
-	if (bp->rx_buffers) {
-		kfree(bp->rx_buffers);
-		bp->rx_buffers = NULL;
-	}
-	if (bp->tx_buffers) {
-		kfree(bp->tx_buffers);
-		bp->tx_buffers = NULL;
-	}
+	kfree(bp->rx_buffers);
+	bp->rx_buffers = NULL;
+	kfree(bp->tx_buffers);
+	bp->tx_buffers = NULL;
 	if (bp->rx_ring) {
 		pci_free_consistent(bp->pdev, DMA_TABLE_BYTES,
 				    bp->rx_ring, bp->rx_ring_dma);
--- linux-2.6.14-rc4-orig/drivers/net/e1000/e1000_ethtool.c	2005-08-29 01:41:01.000000000 +0200
+++ linux-2.6.14-rc4/drivers/net/e1000/e1000_ethtool.c	2005-10-12 15:48:04.000000000 +0200
@@ -930,11 +930,8 @@ e1000_free_desc_rings(struct e1000_adapt
 	if(rxdr->desc)
 		pci_free_consistent(pdev, rxdr->size, rxdr->desc, rxdr->dma);
 
-	if(txdr->buffer_info)
-		kfree(txdr->buffer_info);
-	if(rxdr->buffer_info)
-		kfree(rxdr->buffer_info);
-
+	kfree(txdr->buffer_info);
+	kfree(rxdr->buffer_info);
 	return;
 }
 
--- linux-2.6.14-rc4-orig/drivers/net/tg3.c	2005-10-11 22:41:11.000000000 +0200
+++ linux-2.6.14-rc4/drivers/net/tg3.c	2005-10-12 15:48:37.000000000 +0200
@@ -3905,10 +3905,8 @@ static void tg3_init_rings(struct tg3 *t
  */
 static void tg3_free_consistent(struct tg3 *tp)
 {
-	if (tp->rx_std_buffers) {
-		kfree(tp->rx_std_buffers);
-		tp->rx_std_buffers = NULL;
-	}
+	kfree(tp->rx_std_buffers);
+	tp->rx_std_buffers = NULL;
 	if (tp->rx_std) {
 		pci_free_consistent(tp->pdev, TG3_RX_RING_BYTES,
 				    tp->rx_std, tp->rx_std_mapping);
--- linux-2.6.14-rc4-orig/drivers/net/tulip/tulip_core.c	2005-10-11 22:41:11.000000000 +0200
+++ linux-2.6.14-rc4/drivers/net/tulip/tulip_core.c	2005-10-12 15:48:58.000000000 +0200
@@ -1727,8 +1727,7 @@ err_out_free_ring:
 			     tp->rx_ring, tp->rx_ring_dma);
 
 err_out_mtable:
-	if (tp->mtable)
-		kfree (tp->mtable);
+	kfree (tp->mtable);
 	pci_iounmap(pdev, ioaddr);
 
 err_out_free_res:
@@ -1806,8 +1805,7 @@ static void __devexit tulip_remove_one (
 			     sizeof (struct tulip_rx_desc) * RX_RING_SIZE +
 			     sizeof (struct tulip_tx_desc) * TX_RING_SIZE,
 			     tp->rx_ring, tp->rx_ring_dma);
-	if (tp->mtable)
-		kfree (tp->mtable);
+	kfree (tp->mtable);
 	pci_iounmap(pdev, tp->base_addr);
 	free_netdev (dev);
 	pci_release_regions (pdev);
--- linux-2.6.14-rc4-orig/drivers/net/tulip/de2104x.c	2005-10-11 22:41:11.000000000 +0200
+++ linux-2.6.14-rc4/drivers/net/tulip/de2104x.c	2005-10-12 15:49:20.000000000 +0200
@@ -2071,8 +2071,7 @@ static int __init de_init_one (struct pc
 	return 0;
 
 err_out_iomap:
-	if (de->ee_data)
-		kfree(de->ee_data);
+	kfree(de->ee_data);
 	iounmap(regs);
 err_out_res:
 	pci_release_regions(pdev);
@@ -2091,8 +2090,7 @@ static void __exit de_remove_one (struct
 	if (!dev)
 		BUG();
 	unregister_netdev(dev);
-	if (de->ee_data)
-		kfree(de->ee_data);
+	kfree(de->ee_data);
 	iounmap(de->regs);
 	pci_release_regions(pdev);
 	pci_disable_device(pdev);
--- linux-2.6.14-rc4-orig/drivers/net/au1000_eth.c	2005-08-29 01:41:01.000000000 +0200
+++ linux-2.6.14-rc4/drivers/net/au1000_eth.c	2005-10-12 15:49:37.000000000 +0200
@@ -1609,8 +1609,7 @@ err_out:
 	/* here we should have a valid dev plus aup-> register addresses
 	 * so we can reset the mac properly.*/
 	reset_mac(dev);
-	if (aup->mii)
-		kfree(aup->mii);
+	kfree(aup->mii);
 	for (i = 0; i < NUM_RX_DMA; i++) {
 		if (aup->rx_db_inuse[i])
 			ReleaseDB(aup, aup->rx_db_inuse[i]);
@@ -1809,8 +1808,7 @@ static void __exit au1000_cleanup_module
 		if (dev) {
 			aup = (struct au1000_private *) dev->priv;
 			unregister_netdev(dev);
-			if (aup->mii)
-				kfree(aup->mii);
+			kfree(aup->mii);
 			for (j = 0; j < NUM_RX_DMA; j++) {
 				if (aup->rx_db_inuse[j])
 					ReleaseDB(aup, aup->rx_db_inuse[j]);
--- linux-2.6.14-rc4-orig/drivers/net/sb1250-mac.c	2005-08-29 01:41:01.000000000 +0200
+++ linux-2.6.14-rc4/drivers/net/sb1250-mac.c	2005-10-12 15:50:29.000000000 +0200
@@ -1426,15 +1426,9 @@ static int sbmac_initctx(struct sbmac_so
 
 static void sbdma_uninitctx(struct sbmacdma_s *d)
 {
-	if (d->sbdma_dscrtable) {
-		kfree(d->sbdma_dscrtable);
-		d->sbdma_dscrtable = NULL;
-	}
-	
-	if (d->sbdma_ctxtable) {
-		kfree(d->sbdma_ctxtable);
-		d->sbdma_ctxtable = NULL;
-	}
+	kfree(d->sbdma_dscrtable);
+	kfree(d->sbdma_ctxtable);
+	d->sbdma_dscrtable = d->sbdma_ctxtable = NULL;
 }
 
 
--- linux-2.6.14-rc4-orig/drivers/net/hamradio/mkiss.c	2005-10-11 22:41:11.000000000 +0200
+++ linux-2.6.14-rc4/drivers/net/hamradio/mkiss.c	2005-10-12 15:50:51.000000000 +0200
@@ -352,10 +352,8 @@ static void ax_changedmtu(struct mkiss *
 		       "MTU change cancelled.\n",
 		       ax->dev->name);
 		dev->mtu = ax->mtu;
-		if (xbuff != NULL)
-			kfree(xbuff);
-		if (rbuff != NULL)
-			kfree(rbuff);
+		kfree(xbuff);
+		kfree(rbuff);
 		return;
 	}
 
--- linux-2.6.14-rc4-orig/drivers/net/acenic.c	2005-08-29 01:41:01.000000000 +0200
+++ linux-2.6.14-rc4/drivers/net/acenic.c	2005-10-12 15:51:18.000000000 +0200
@@ -871,10 +871,8 @@ static void ace_init_cleanup(struct net_
 	if (ap->info)
 		pci_free_consistent(ap->pdev, sizeof(struct ace_info),
 				    ap->info, ap->info_dma);
-	if (ap->skb)
-		kfree(ap->skb);
-	if (ap->trace_buf)
-		kfree(ap->trace_buf);
+	kfree(ap->skb);
+	kfree(ap->trace_buf);
 
 	if (dev->irq)
 		free_irq(dev->irq, dev);
--- linux-2.6.14-rc4-orig/drivers/net/bmac.c	2005-10-11 22:41:10.000000000 +0200
+++ linux-2.6.14-rc4/drivers/net/bmac.c	2005-10-12 15:51:48.000000000 +0200
@@ -1689,10 +1689,8 @@ static void __exit bmac_exit(void)
 {
 	macio_unregister_driver(&bmac_driver);
 
-	if (bmac_emergency_rxbuf != NULL) {
-		kfree(bmac_emergency_rxbuf);
-		bmac_emergency_rxbuf = NULL;
-	}
+	kfree(bmac_emergency_rxbuf);
+	bmac_emergency_rxbuf = NULL;
 }
 
 MODULE_AUTHOR("Randy Gobbel/Paul Mackerras");
--- linux-2.6.14-rc4-orig/drivers/net/bnx2.c	2005-10-11 22:41:10.000000000 +0200
+++ linux-2.6.14-rc4/drivers/net/bnx2.c	2005-10-12 15:52:16.000000000 +0200
@@ -314,20 +314,16 @@ bnx2_free_mem(struct bnx2 *bp)
 				    bp->tx_desc_ring, bp->tx_desc_mapping);
 		bp->tx_desc_ring = NULL;
 	}
-	if (bp->tx_buf_ring) {
-		kfree(bp->tx_buf_ring);
-		bp->tx_buf_ring = NULL;
-	}
+	kfree(bp->tx_buf_ring);
+	bp->tx_buf_ring = NULL;
 	if (bp->rx_desc_ring) {
 		pci_free_consistent(bp->pdev,
 				    sizeof(struct rx_bd) * RX_DESC_CNT,
 				    bp->rx_desc_ring, bp->rx_desc_mapping);
 		bp->rx_desc_ring = NULL;
 	}
-	if (bp->rx_buf_ring) {
-		kfree(bp->rx_buf_ring);
-		bp->rx_buf_ring = NULL;
-	}
+	kfree(bp->rx_buf_ring);
+	bp->rx_buf_ring = NULL;
 }
 
 static int
--- linux-2.6.14-rc4-orig/drivers/net/saa9730.c	2005-08-29 01:41:01.000000000 +0200
+++ linux-2.6.14-rc4/drivers/net/saa9730.c	2005-10-12 15:53:22.000000000 +0200
@@ -997,10 +997,7 @@ static void __devexit saa9730_remove_one
 
         if (dev) {
                 unregister_netdev(dev);
-
-		if (dev->priv)
-			kfree(dev->priv);
-
+		kfree(dev->priv);
                 free_netdev(dev);
                 pci_release_regions(pdev);
                 pci_disable_device(pdev);
@@ -1096,8 +1093,7 @@ static int lan_saa9730_init(struct net_d
 	return 0;
 
  out:
-	if (dev->priv)
-		kfree(dev->priv);
+	kfree(dev->priv);
 	return ret;
 }
 
--- linux-2.6.14-rc4-orig/drivers/net/mace.c	2005-08-29 01:41:01.000000000 +0200
+++ linux-2.6.14-rc4/drivers/net/mace.c	2005-10-12 15:53:41.000000000 +0200
@@ -1035,10 +1035,8 @@ static void __exit mace_cleanup(void)
 {
 	macio_unregister_driver(&mace_driver);
 
-	if (dummy_buf) {
-		kfree(dummy_buf);
-		dummy_buf = NULL;
-	}
+	kfree(dummy_buf);
+	dummy_buf = NULL;
 }
 
 MODULE_AUTHOR("Paul Mackerras");
--- linux-2.6.14-rc4-orig/drivers/net/ni65.c	2005-08-29 01:41:01.000000000 +0200
+++ linux-2.6.14-rc4/drivers/net/ni65.c	2005-10-12 15:55:01.000000000 +0200
@@ -696,8 +696,7 @@ static void ni65_free_buffer(struct priv
 		return;
 
 	for(i=0;i<TMDNUM;i++) {
-		if(p->tmdbounce[i])
-			kfree(p->tmdbounce[i]);
+		kfree(p->tmdbounce[i]);
 #ifdef XMT_VIA_SKB
 		if(p->tmd_skb[i])
 			dev_kfree_skb(p->tmd_skb[i]);
@@ -710,12 +709,10 @@ static void ni65_free_buffer(struct priv
 		if(p->recv_skb[i])
 			dev_kfree_skb(p->recv_skb[i]);
 #else
-		if(p->recvbounce[i])
-			kfree(p->recvbounce[i]);
+		kfree(p->recvbounce[i]);
 #endif
 	}
-	if(p->self)
-		kfree(p->self);
+	kfree(p->self);
 }
 
 
--- linux-2.6.14-rc4-orig/drivers/net/s2io.c	2005-10-11 22:41:11.000000000 +0200
+++ linux-2.6.14-rc4/drivers/net/s2io.c	2005-10-12 15:55:30.000000000 +0200
@@ -701,8 +701,7 @@ static void free_shared_mem(struct s2io_
 			}
 			kfree(mac_control->rings[i].ba[j]);
 		}
-		if (mac_control->rings[i].ba)
-			kfree(mac_control->rings[i].ba);
+		kfree(mac_control->rings[i].ba);
 	}
 #endif
 
--- linux-2.6.14-rc4-orig/drivers/net/wireless/atmel_cs.c	2005-08-29 01:41:01.000000000 +0200
+++ linux-2.6.14-rc4/drivers/net/wireless/atmel_cs.c	2005-10-12 16:01:15.000000000 +0200
@@ -259,8 +259,7 @@ static void atmel_detach(dev_link_t *lin
 
 	/* Unlink device structure, free pieces */
 	*linkp = link->next;
-	if (link->priv)
-		kfree(link->priv);
+	kfree(link->priv);
 	kfree(link);
 }
 
--- linux-2.6.14-rc4-orig/drivers/net/wireless/airo_cs.c	2005-08-29 01:41:01.000000000 +0200
+++ linux-2.6.14-rc4/drivers/net/wireless/airo_cs.c	2005-10-12 16:01:27.000000000 +0200
@@ -258,9 +258,7 @@ static void airo_detach(dev_link_t *link
 	
 	/* Unlink device structure, free pieces */
 	*linkp = link->next;
-	if (link->priv) {
-		kfree(link->priv);
-	}
+	kfree(link->priv);
 	kfree(link);
 	
 } /* airo_detach */
--- linux-2.6.14-rc4-orig/drivers/net/wireless/airo.c	2005-10-11 22:41:11.000000000 +0200
+++ linux-2.6.14-rc4/drivers/net/wireless/airo.c	2005-10-12 16:10:37.000000000 +0200
@@ -2387,14 +2387,10 @@ void stop_airo_card( struct net_device *
 			dev_kfree_skb(skb);
 	}
 
-	if (ai->flash)
-		kfree(ai->flash);
-	if (ai->rssi)
-		kfree(ai->rssi);
-	if (ai->APList)
-		kfree(ai->APList);
-	if (ai->SSID)
-		kfree(ai->SSID);
+	kfree(ai->flash);
+	kfree(ai->rssi);
+	kfree(ai->APList);
+	kfree(ai->SSID);
 	if (freeres) {
 		/* PCMCIA frees this stuff, so only for PCI and ISA */
 	        release_region( dev->base_addr, 64 );
@@ -3637,10 +3633,8 @@ static u16 setup_card(struct airo_info *
 	int rc;
 
 	memset( &mySsid, 0, sizeof( mySsid ) );
-	if (ai->flash) {
-		kfree (ai->flash);
-		ai->flash = NULL;
-	}
+	kfree (ai->flash);
+	ai->flash = NULL;
 
 	/* The NOP is the first step in getting the card going */
 	cmd.cmd = NOP;
@@ -3677,14 +3671,10 @@ static u16 setup_card(struct airo_info *
 		tdsRssiRid rssi_rid;
 		CapabilityRid cap_rid;
 
-		if (ai->APList) {
-			kfree(ai->APList);
-			ai->APList = NULL;
-		}
-		if (ai->SSID) {
-			kfree(ai->SSID);
-			ai->SSID = NULL;
-		}
+		kfree(ai->APList);
+		ai->APList = NULL;
+		kfree(ai->SSID);
+		ai->SSID = NULL;
 		// general configuration (read/modify/write)
 		status = readConfigRid(ai, lock);
 		if ( status != SUCCESS ) return ERROR;
@@ -3698,10 +3688,8 @@ static u16 setup_card(struct airo_info *
 				memcpy(ai->rssi, (u8*)&rssi_rid + 2, 512); /* Skip RID length member */
 		}
 		else {
-			if (ai->rssi) {
-				kfree(ai->rssi);
-				ai->rssi = NULL;
-			}
+			kfree(ai->rssi);
+			ai->rssi = NULL;
 			if (cap_rid.softCap & 8)
 				ai->config.rmode |= RXMODE_NORMALIZED_RSSI;
 			else
@@ -5380,11 +5368,13 @@ static int proc_BSSList_open( struct ino
 
 static int proc_close( struct inode *inode, struct file *file )
 {
-	struct proc_data *data = (struct proc_data *)file->private_data;
-	if ( data->on_close != NULL ) data->on_close( inode, file );
-	if ( data->rbuffer ) kfree( data->rbuffer );
-	if ( data->wbuffer ) kfree( data->wbuffer );
-	kfree( data );
+	struct proc_data *data = file->private_data;
+
+	if (data->on_close != NULL)
+		data->on_close(inode, file);
+	kfree(data->rbuffer);
+	kfree(data->wbuffer);
+	kfree(data);
 	return 0;
 }
 
--- linux-2.6.14-rc4-orig/drivers/net/wireless/strip.c	2005-10-11 22:41:12.000000000 +0200
+++ linux-2.6.14-rc4/drivers/net/wireless/strip.c	2005-10-12 16:11:41.000000000 +0200
@@ -860,12 +860,9 @@ static int allocate_buffers(struct strip
 		strip_info->mtu = dev->mtu = mtu;
 		return (1);
 	}
-	if (r)
-		kfree(r);
-	if (s)
-		kfree(s);
-	if (t)
-		kfree(t);
+	kfree(r);
+	kfree(s);
+	kfree(t);
 	return (0);
 }
 
@@ -922,13 +919,9 @@ static int strip_change_mtu(struct net_d
 	printk(KERN_NOTICE "%s: strip MTU changed fom %d to %d.\n",
 	       strip_info->dev->name, old_mtu, strip_info->mtu);
 
-	if (orbuff)
-		kfree(orbuff);
-	if (osbuff)
-		kfree(osbuff);
-	if (otbuff)
-		kfree(otbuff);
-
+	kfree(orbuff);
+	kfree(osbuff);
+	kfree(otbuff);
 	return 0;
 }
 
@@ -2498,18 +2491,13 @@ static int strip_close_low(struct net_de
 	/*
 	 * Free all STRIP frame buffers.
 	 */
-	if (strip_info->rx_buff) {
-		kfree(strip_info->rx_buff);
-		strip_info->rx_buff = NULL;
-	}
-	if (strip_info->sx_buff) {
-		kfree(strip_info->sx_buff);
-		strip_info->sx_buff = NULL;
-	}
-	if (strip_info->tx_buff) {
-		kfree(strip_info->tx_buff);
-		strip_info->tx_buff = NULL;
-	}
+	kfree(strip_info->rx_buff);
+	strip_info->rx_buff = NULL;
+	kfree(strip_info->sx_buff);
+	strip_info->sx_buff = NULL;
+	kfree(strip_info->tx_buff);
+	strip_info->tx_buff = NULL;
+
 	del_timer(&strip_info->idle_timer);
 	return 0;
 }
--- linux-2.6.14-rc4-orig/drivers/net/wireless/hostap/hostap_ioctl.c	2005-10-11 22:41:12.000000000 +0200
+++ linux-2.6.14-rc4/drivers/net/wireless/hostap/hostap_ioctl.c	2005-10-12 16:13:42.000000000 +0200
@@ -551,7 +551,6 @@ static int prism2_ioctl_giwaplist(struct
 
 	kfree(addr);
 	kfree(qual);
-
 	return 0;
 }
 
@@ -3088,9 +3087,7 @@ static int prism2_ioctl_priv_download(lo
 	ret = local->func->download(local, param);
 
  out:
-	if (param != NULL)
-		kfree(param);
-
+	kfree(param);
 	return ret;
 }
 #endif /* PRISM2_DOWNLOAD_SUPPORT */
@@ -3897,9 +3894,7 @@ static int prism2_ioctl_priv_hostapd(loc
 	}
 
  out:
-	if (param != NULL)
-		kfree(param);
-
+	kfree(param);
 	return ret;
 }
 
--- linux-2.6.14-rc4-orig/drivers/net/wireless/atmel.c	2005-10-11 22:41:11.000000000 +0200
+++ linux-2.6.14-rc4/drivers/net/wireless/atmel.c	2005-10-12 16:14:10.000000000 +0200
@@ -1653,8 +1653,7 @@ void stop_atmel_card(struct net_device *
 	unregister_netdev(dev);
 	remove_proc_entry("driver/atmel", NULL);
 	free_irq(dev->irq, dev);
-	if (priv->firmware)
-		kfree(priv->firmware);
+	kfree(priv->firmware);
 	if (freeres) {
 		/* PCMCIA frees this stuff, so only for PCI */
 	        release_region(dev->base_addr, 64);
@@ -2450,8 +2449,7 @@ static int atmel_ioctl(struct net_device
 			break;
 		}
 
-		if (priv->firmware)
-			kfree(priv->firmware);
+		kfree(priv->firmware);
 		
 		priv->firmware = new_firmware;
 		priv->firmware_length = com.len;
--- linux-2.6.14-rc4-orig/drivers/net/wireless/prism54/islpci_dev.c	2005-10-11 22:41:12.000000000 +0200
+++ linux-2.6.14-rc4/drivers/net/wireless/prism54/islpci_dev.c	2005-10-12 16:14:19.000000000 +0200
@@ -756,8 +756,7 @@ islpci_free_memory(islpci_private *priv)
 			pci_unmap_single(priv->pdev, buf->pci_addr,
 					 buf->size, PCI_DMA_FROMDEVICE);
 		buf->pci_addr = 0;
-		if (buf->mem)
-			kfree(buf->mem);
+		kfree(buf->mem);
 		buf->size = 0;
 		buf->mem = NULL;
         }
--- linux-2.6.14-rc4-orig/drivers/net/wireless/prism54/oid_mgt.c	2005-08-29 01:41:01.000000000 +0200
+++ linux-2.6.14-rc4/drivers/net/wireless/prism54/oid_mgt.c	2005-10-12 16:15:05.000000000 +0200
@@ -268,11 +268,10 @@ mgt_clean(islpci_private *priv)
 
 	if (!priv->mib)
 		return;
-	for (i = 0; i < OID_NUM_LAST; i++)
-		if (priv->mib[i]) {
-			kfree(priv->mib[i]);
-			priv->mib[i] = NULL;
-		}
+	for (i = 0; i < OID_NUM_LAST; i++) {
+		kfree(priv->mib[i]);
+		priv->mib[i] = NULL;
+	}
 	kfree(priv->mib);
 	priv->mib = NULL;
 }
--- linux-2.6.14-rc4-orig/drivers/net/via-velocity.c	2005-08-29 01:41:01.000000000 +0200
+++ linux-2.6.14-rc4/drivers/net/via-velocity.c	2005-10-12 16:16:00.000000000 +0200
@@ -1212,10 +1212,8 @@ static void velocity_free_td_ring(struct
 			velocity_free_td_ring_entry(vptr, j, i);
 
 		}
-		if (vptr->td_infos[j]) {
-			kfree(vptr->td_infos[j]);
-			vptr->td_infos[j] = NULL;
-		}
+		kfree(vptr->td_infos[j]);
+		vptr->td_infos[j] = NULL;
 	}
 }
 
--- linux-2.6.14-rc4-orig/drivers/net/rrunner.c	2005-10-11 22:41:11.000000000 +0200
+++ linux-2.6.14-rc4/drivers/net/rrunner.c	2005-10-12 16:16:19.000000000 +0200
@@ -1710,10 +1710,8 @@ static int rr_ioctl(struct net_device *d
 			error = -EFAULT;
 		}
 	wf_out:
-		if (oldimage)
-			kfree(oldimage);
-		if (image)
-			kfree(image);
+		kfree(oldimage);
+		kfree(image);
 		return error;
 		
 	case SIOCRRID:
--- linux-2.6.14-rc4-orig/drivers/net/ibmveth.c	2005-10-11 22:41:11.000000000 +0200
+++ linux-2.6.14-rc4/drivers/net/ibmveth.c	2005-10-12 16:17:22.000000000 +0200
@@ -293,10 +293,8 @@ static void ibmveth_free_buffer_pool(str
 {
 	int i;
 
-	if(pool->free_map) {
-		kfree(pool->free_map);
-		pool->free_map  = NULL;
-	}
+	kfree(pool->free_map);
+	pool->free_map = NULL;
 
 	if(pool->skbuff && pool->dma_addr) {
 		for(i = 0; i < pool->size; ++i) {
@@ -312,15 +310,10 @@ static void ibmveth_free_buffer_pool(str
 		}
 	}
 
-	if(pool->dma_addr) {
-		kfree(pool->dma_addr);
-		pool->dma_addr = NULL;
-	}
-
-	if(pool->skbuff) {
-		kfree(pool->skbuff);
-		pool->skbuff = NULL;
-	}
+	kfree(pool->dma_addr);
+	pool->dma_addr = NULL;
+	kfree(pool->skbuff);
+	pool->skbuff = NULL;
 }
 
 /* remove a buffer from a pool */
--- linux-2.6.14-rc4-orig/include/net/ax25.h	2005-10-11 22:41:32.000000000 +0200
+++ linux-2.6.14-rc4/include/net/ax25.h	2005-10-13 11:23:56.000000000 +0200
@@ -237,8 +237,7 @@ typedef struct ax25_cb {
 static __inline__ void ax25_cb_put(ax25_cb *ax25)
 {
 	if (atomic_dec_and_test(&ax25->refcount)) {
-		if (ax25->digipeat)
-			kfree(ax25->digipeat);
+		kfree(ax25->digipeat);
 		kfree(ax25);
 	}
 }
--- linux-2.6.14-rc4-orig/include/net/netrom.h	2005-10-11 22:41:32.000000000 +0200
+++ linux-2.6.14-rc4/include/net/netrom.h	2005-10-13 11:24:09.000000000 +0200
@@ -136,8 +136,7 @@ static __inline__ void nr_node_put(struc
 static __inline__ void nr_neigh_put(struct nr_neigh *nr_neigh)
 {
 	if (atomic_dec_and_test(&nr_neigh->refcount)) {
-		if (nr_neigh->digipeat != NULL)
-			kfree(nr_neigh->digipeat);
+		kfree(nr_neigh->digipeat);
 		kfree(nr_neigh);
 	}
 }

^ permalink raw reply

* [PATCH 01/14] Big kfree NULL check cleanup - net
From: Jesper Juhl @ 2005-10-13 19:25 UTC (permalink / raw)
  To: linux-kernel
  Cc: Andrew Morton, netdev, David S. Miller, Hideaki YOSHIFUJI,
	Arnaldo Carvalho de Melo, Ralf Baechle, Greg Kroah-Hartman, dccp,
	Patrick Caulfield, Jean Tourrilhes, Sridhar Samudrala,
	Andy Adamson, J. Bruce Fields, Nenad Corbic, Alexey Kuznetsov,
	Jesper Juhl

This is the net/ part of the big kfree cleanup patch.

Remove pointless checks for NULL prior to calling kfree() in net/.


Sorry about the long Cc: list, but I wanted to make sure I included everyone
who's code I've changed with this patch.


Signed-off-by: Jesper Juhl <jesper.juhl@gmail.com>
---

Please see the initial announcement mail on LKML with subject
"[PATCH 00/14] Big kfree NULL check cleanup"
for additional details.

 net/802/p8023.c                        |    3 +--
 net/ax25/af_ax25.c                     |    6 ++----
 net/ax25/ax25_in.c                     |    6 ++----
 net/ax25/ax25_route.c                  |   19 ++++++-------------
 net/bluetooth/hidp/core.c              |    4 +---
 net/core/dev_mcast.c                   |    3 +--
 net/core/sock.c                        |    3 +--
 net/dccp/ipv4.c                        |    6 ++----
 net/dccp/proto.c                       |    3 +--
 net/decnet/dn_table.c                  |   16 +++++++---------
 net/ethernet/pe2.c                     |    3 +--
 net/ipv4/af_inet.c                     |    3 +--
 net/ipv4/fib_frontend.c                |    3 +--
 net/ipv4/ip_options.c                  |    3 +--
 net/ipv4/ip_output.c                   |   12 ++++--------
 net/ipv4/ip_sockglue.c                 |   12 ++++--------
 net/ipv4/ipvs/ip_vs_app.c              |    6 ++----
 net/ipv4/multipath_wrandom.c           |   10 +++-------
 net/ipv4/netfilter/ip_nat_snmp_basic.c |    3 +--
 net/ipv4/tcp_ipv4.c                    |    3 +--
 net/ipv6/addrconf.c                    |    3 +--
 net/ipv6/ip6_output.c                  |   15 +++++----------
 net/ipv6/ip6_tunnel.c                  |    6 ++----
 net/ipv6/ipcomp6.c                     |    3 +--
 net/ipv6/ipv6_sockglue.c               |    3 +--
 net/irda/discovery.c                   |    3 +--
 net/irda/irias_object.c                |   16 ++++++----------
 net/rose/rose_route.c                  |    6 ++----
 net/sched/cls_fw.c                     |    3 +--
 net/sched/cls_route.c                  |    3 +--
 net/sched/cls_rsvp.h                   |    3 +--
 net/sched/cls_tcindex.c                |    9 +++------
 net/sched/cls_u32.c                    |    4 ++--
 net/sched/em_meta.c                    |    3 +--
 net/sched/sch_gred.c                   |    9 +++------
 net/sctp/associola.c                   |    4 +---
 net/sctp/sm_make_chunk.c               |    6 ++----
 net/sunrpc/auth_gss/gss_krb5_seal.c    |    2 +-
 net/sunrpc/auth_gss/gss_krb5_unseal.c  |    2 +-
 net/sunrpc/auth_gss/gss_mech_switch.c  |    3 +--
 net/sunrpc/auth_gss/gss_spkm3_seal.c   |    3 +--
 net/sunrpc/auth_gss/gss_spkm3_token.c  |    3 +--
 net/sunrpc/auth_gss/gss_spkm3_unseal.c |    6 ++----
 net/sunrpc/svc.c                       |    9 +++------
 net/sunrpc/xdr.c                       |    3 +--
 net/wanrouter/af_wanpipe.c             |   20 +++++++-------------
 net/wanrouter/wanmain.c                |   12 ++++--------
 net/xfrm/xfrm_state.c                  |   12 ++++--------
 48 files changed, 103 insertions(+), 198 deletions(-)

--- linux-2.6.14-rc4-orig/net/802/p8023.c	2005-10-11 22:41:32.000000000 +0200
+++ linux-2.6.14-rc4/net/802/p8023.c	2005-10-13 11:24:33.000000000 +0200
@@ -54,8 +54,7 @@ struct datalink_proto *make_8023_client(
  */
 void destroy_8023_client(struct datalink_proto *dl)
 {
-	if (dl)
-		kfree(dl);
+	kfree(dl);
 }
 
 EXPORT_SYMBOL(destroy_8023_client);
--- linux-2.6.14-rc4-orig/net/ax25/ax25_in.c	2005-10-11 22:41:32.000000000 +0200
+++ linux-2.6.14-rc4/net/ax25/ax25_in.c	2005-10-13 11:25:12.000000000 +0200
@@ -401,10 +401,8 @@ static int ax25_rcv(struct sk_buff *skb,
 	}
 
 	if (dp.ndigi == 0) {
-		if (ax25->digipeat != NULL) {
-			kfree(ax25->digipeat);
-			ax25->digipeat = NULL;
-		}
+		kfree(ax25->digipeat);
+		ax25->digipeat = NULL;
 	} else {
 		/* Reverse the source SABM's path */
 		memcpy(ax25->digipeat, &reverse_dp, sizeof(ax25_digi));
--- linux-2.6.14-rc4-orig/net/ax25/af_ax25.c	2005-10-11 22:41:32.000000000 +0200
+++ linux-2.6.14-rc4/net/ax25/af_ax25.c	2005-10-13 11:25:40.000000000 +0200
@@ -1138,10 +1138,8 @@ static int ax25_connect(struct socket *s
 	sk->sk_state   = TCP_CLOSE;
 	sock->state = SS_UNCONNECTED;
 
-	if (ax25->digipeat != NULL) {
-		kfree(ax25->digipeat);
-		ax25->digipeat = NULL;
-	}
+	kfree(ax25->digipeat);
+	ax25->digipeat = NULL;
 
 	/*
 	 *	Handle digi-peaters to be used.
--- linux-2.6.14-rc4-orig/net/ax25/ax25_route.c	2005-10-11 22:41:32.000000000 +0200
+++ linux-2.6.14-rc4/net/ax25/ax25_route.c	2005-10-13 11:26:29.000000000 +0200
@@ -54,15 +54,13 @@ void ax25_rt_device_down(struct net_devi
 		if (s->dev == dev) {
 			if (ax25_route_list == s) {
 				ax25_route_list = s->next;
-				if (s->digipeat != NULL)
-					kfree(s->digipeat);
+				kfree(s->digipeat);
 				kfree(s);
 			} else {
 				for (t = ax25_route_list; t != NULL; t = t->next) {
 					if (t->next == s) {
 						t->next = s->next;
-						if (s->digipeat != NULL)
-							kfree(s->digipeat);
+						kfree(s->digipeat);
 						kfree(s);
 						break;
 					}
@@ -90,10 +88,8 @@ static int ax25_rt_add(struct ax25_route
 	while (ax25_rt != NULL) {
 		if (ax25cmp(&ax25_rt->callsign, &route->dest_addr) == 0 &&
 		            ax25_rt->dev == ax25_dev->dev) {
-			if (ax25_rt->digipeat != NULL) {
-				kfree(ax25_rt->digipeat);
-				ax25_rt->digipeat = NULL;
-			}
+			kfree(ax25_rt->digipeat);
+			ax25_rt->digipeat = NULL;
 			if (route->digi_count != 0) {
 				if ((ax25_rt->digipeat = kmalloc(sizeof(ax25_digi), GFP_ATOMIC)) == NULL) {
 					write_unlock(&ax25_route_lock);
@@ -145,8 +141,7 @@ static int ax25_rt_add(struct ax25_route
 static void ax25_rt_destroy(ax25_route *ax25_rt)
 {
 	if (atomic_read(&ax25_rt->ref) == 0) {
-		if (ax25_rt->digipeat != NULL)
-			kfree(ax25_rt->digipeat);
+		kfree(ax25_rt->digipeat);
 		kfree(ax25_rt);
 		return;
 	}
@@ -530,9 +525,7 @@ void __exit ax25_rt_free(void)
 		s       = ax25_rt;
 		ax25_rt = ax25_rt->next;
 
-		if (s->digipeat != NULL)
-			kfree(s->digipeat);
-
+		kfree(s->digipeat);
 		kfree(s);
 	}
 	write_unlock(&ax25_route_lock);
--- linux-2.6.14-rc4-orig/net/dccp/ipv4.c	2005-10-11 22:41:33.000000000 +0200
+++ linux-2.6.14-rc4/net/dccp/ipv4.c	2005-10-13 11:26:46.000000000 +0200
@@ -1287,10 +1287,8 @@ static int dccp_v4_destroy_sock(struct s
 	if (inet_csk(sk)->icsk_bind_hash != NULL)
 		inet_put_port(&dccp_hashinfo, sk);
 
-	if (dp->dccps_service_list != NULL) {
-		kfree(dp->dccps_service_list);
-		dp->dccps_service_list = NULL;
-	}
+	kfree(dp->dccps_service_list);
+	dp->dccps_service_list = NULL;
 
 	ccid_hc_rx_exit(dp->dccps_hc_rx_ccid, sk);
 	ccid_hc_tx_exit(dp->dccps_hc_tx_ccid, sk);
--- linux-2.6.14-rc4-orig/net/dccp/proto.c	2005-10-11 22:41:33.000000000 +0200
+++ linux-2.6.14-rc4/net/dccp/proto.c	2005-10-13 11:27:02.000000000 +0200
@@ -238,8 +238,7 @@ static int dccp_setsockopt_service(struc
 	lock_sock(sk);
 	dp->dccps_service = service;
 
-	if (dp->dccps_service_list != NULL)
-		kfree(dp->dccps_service_list);
+	kfree(dp->dccps_service_list);
 
 	dp->dccps_service_list = sl;
 	release_sock(sk);
--- linux-2.6.14-rc4-orig/net/core/sock.c	2005-10-11 22:41:33.000000000 +0200
+++ linux-2.6.14-rc4/net/core/sock.c	2005-10-13 11:27:43.000000000 +0200
@@ -1242,8 +1242,7 @@ static void sock_def_write_space(struct 
 
 static void sock_def_destruct(struct sock *sk)
 {
-	if (sk->sk_protinfo)
-		kfree(sk->sk_protinfo);
+	kfree(sk->sk_protinfo);
 }
 
 void sk_send_sigurg(struct sock *sk)
--- linux-2.6.14-rc4-orig/net/core/dev_mcast.c	2005-08-29 01:41:01.000000000 +0200
+++ linux-2.6.14-rc4/net/core/dev_mcast.c	2005-10-13 11:27:54.000000000 +0200
@@ -194,8 +194,7 @@ int dev_mc_add(struct net_device *dev, v
 
 done:
 	spin_unlock_bh(&dev->xmit_lock);
-	if (dmi1)
-		kfree(dmi1);
+	kfree(dmi1);
 	return err;
 }
 
--- linux-2.6.14-rc4-orig/net/ipv4/ipvs/ip_vs_app.c	2005-10-11 22:41:33.000000000 +0200
+++ linux-2.6.14-rc4/net/ipv4/ipvs/ip_vs_app.c	2005-10-13 11:28:10.000000000 +0200
@@ -110,8 +110,7 @@ ip_vs_app_inc_new(struct ip_vs_app *app,
 	return 0;
 
   out:
-	if (inc->timeout_table)
-		kfree(inc->timeout_table);
+	kfree(inc->timeout_table);
 	kfree(inc);
 	return ret;
 }
@@ -136,8 +135,7 @@ ip_vs_app_inc_release(struct ip_vs_app *
 
 	list_del(&inc->a_list);
 
-	if (inc->timeout_table != NULL)
-		kfree(inc->timeout_table);
+	kfree(inc->timeout_table);
 	kfree(inc);
 }
 
--- linux-2.6.14-rc4-orig/net/ipv4/ip_output.c	2005-10-11 22:41:33.000000000 +0200
+++ linux-2.6.14-rc4/net/ipv4/ip_output.c	2005-10-13 11:28:50.000000000 +0200
@@ -1189,10 +1189,8 @@ int ip_push_pending_frames(struct sock *
 
 out:
 	inet->cork.flags &= ~IPCORK_OPT;
-	if (inet->cork.opt) {
-		kfree(inet->cork.opt);
-		inet->cork.opt = NULL;
-	}
+	kfree(inet->cork.opt);
+	inet->cork.opt = NULL;
 	if (inet->cork.rt) {
 		ip_rt_put(inet->cork.rt);
 		inet->cork.rt = NULL;
@@ -1216,10 +1214,8 @@ void ip_flush_pending_frames(struct sock
 		kfree_skb(skb);
 
 	inet->cork.flags &= ~IPCORK_OPT;
-	if (inet->cork.opt) {
-		kfree(inet->cork.opt);
-		inet->cork.opt = NULL;
-	}
+	kfree(inet->cork.opt);
+	inet->cork.opt = NULL;
 	if (inet->cork.rt) {
 		ip_rt_put(inet->cork.rt);
 		inet->cork.rt = NULL;
--- linux-2.6.14-rc4-orig/net/ipv4/tcp_ipv4.c	2005-10-11 22:41:34.000000000 +0200
+++ linux-2.6.14-rc4/net/ipv4/tcp_ipv4.c	2005-10-13 11:29:19.000000000 +0200
@@ -825,8 +825,7 @@ out:
  */
 static void tcp_v4_reqsk_destructor(struct request_sock *req)
 {
-	if (inet_rsk(req)->opt)
-		kfree(inet_rsk(req)->opt);
+	kfree(inet_rsk(req)->opt);
 }
 
 static inline void syn_flood_warning(struct sk_buff *skb)
--- linux-2.6.14-rc4-orig/net/ipv4/ip_sockglue.c	2005-10-11 22:41:33.000000000 +0200
+++ linux-2.6.14-rc4/net/ipv4/ip_sockglue.c	2005-10-13 11:29:53.000000000 +0200
@@ -202,8 +202,7 @@ int ip_ra_control(struct sock *sk, unsig
 		if (ra->sk == sk) {
 			if (on) {
 				write_unlock_bh(&ip_ra_lock);
-				if (new_ra)
-					kfree(new_ra);
+				kfree(new_ra);
 				return -EADDRINUSE;
 			}
 			*rap = ra->next;
@@ -446,8 +445,7 @@ int ip_setsockopt(struct sock *sk, int l
 #endif
 			}
 			opt = xchg(&inet->opt, opt);
-			if (opt)
-				kfree(opt);
+			kfree(opt);
 			break;
 		}
 		case IP_PKTINFO:
@@ -828,10 +826,8 @@ int ip_setsockopt(struct sock *sk, int l
 
 			err = ip_mc_msfilter(sk, msf, ifindex);
 mc_msf_out:
-			if (msf)
-				kfree(msf);
-			if (gsf)
-				kfree(gsf);
+			kfree(msf);
+			kfree(gsf);
 			break;
 		}
 		case IP_ROUTER_ALERT:	
--- linux-2.6.14-rc4-orig/net/ipv4/netfilter/ip_nat_snmp_basic.c	2005-10-11 22:41:33.000000000 +0200
+++ linux-2.6.14-rc4/net/ipv4/netfilter/ip_nat_snmp_basic.c	2005-10-13 11:31:09.000000000 +0200
@@ -1161,8 +1161,7 @@ static int snmp_parse_mangle(unsigned ch
 		
 		if (!snmp_object_decode(&ctx, obj)) {
 			if (*obj) {
-				if ((*obj)->id)
-					kfree((*obj)->id);
+				kfree((*obj)->id);
 				kfree(*obj);
 			}	
 			kfree(obj);
--- linux-2.6.14-rc4-orig/net/ipv4/multipath_wrandom.c	2005-08-29 01:41:01.000000000 +0200
+++ linux-2.6.14-rc4/net/ipv4/multipath_wrandom.c	2005-10-13 11:31:46.000000000 +0200
@@ -207,16 +207,12 @@ static void wrandom_select_route(const s
 			decision = mpc->rt;
 
 		last_power = mpc->power;
-		if (last_mpc)
-			kfree(last_mpc);
-
+		kfree(last_mpc);
 		last_mpc = mpc;
 	}
 
-	if (last_mpc) {
-		/* concurrent __multipath_flush may lead to !last_mpc */
-		kfree(last_mpc);
-	}
+	/* concurrent __multipath_flush may lead to !last_mpc */
+	kfree(last_mpc);
 
 	decision->u.dst.__use++;
 	*rp = decision;
--- linux-2.6.14-rc4-orig/net/ipv4/af_inet.c	2005-10-11 22:41:33.000000000 +0200
+++ linux-2.6.14-rc4/net/ipv4/af_inet.c	2005-10-13 11:31:54.000000000 +0200
@@ -147,8 +147,7 @@ void inet_sock_destruct(struct sock *sk)
 	BUG_TRAP(!sk->sk_wmem_queued);
 	BUG_TRAP(!sk->sk_forward_alloc);
 
-	if (inet->opt)
-		kfree(inet->opt);
+	kfree(inet->opt);
 	dst_release(sk->sk_dst_cache);
 	sk_refcnt_debug_dec(sk);
 }
--- linux-2.6.14-rc4-orig/net/ipv4/ip_options.c	2005-10-11 22:41:33.000000000 +0200
+++ linux-2.6.14-rc4/net/ipv4/ip_options.c	2005-10-13 11:32:07.000000000 +0200
@@ -510,8 +510,7 @@ static int ip_options_get_finish(struct 
 		kfree(opt);
 		return -EINVAL;
 	}
-	if (*optp)
-		kfree(*optp);
+	kfree(*optp);
 	*optp = opt;
 	return 0;
 }
--- linux-2.6.14-rc4-orig/net/ipv4/fib_frontend.c	2005-10-11 22:41:33.000000000 +0200
+++ linux-2.6.14-rc4/net/ipv4/fib_frontend.c	2005-10-13 11:32:16.000000000 +0200
@@ -266,8 +266,7 @@ int ip_rt_ioctl(unsigned int cmd, void _
 				if (tb)
 					err = tb->tb_insert(tb, &req.rtm, &rta, &req.nlh, NULL);
 			}
-			if (rta.rta_mx)
-				kfree(rta.rta_mx);
+			kfree(rta.rta_mx);
 		}
 		rtnl_unlock();
 		return err;
--- linux-2.6.14-rc4-orig/net/ipv6/ipv6_sockglue.c	2005-10-11 22:41:34.000000000 +0200
+++ linux-2.6.14-rc4/net/ipv6/ipv6_sockglue.c	2005-10-13 11:32:36.000000000 +0200
@@ -80,8 +80,7 @@ int ip6_ra_control(struct sock *sk, int 
 		if (ra->sk == sk) {
 			if (sel>=0) {
 				write_unlock_bh(&ip6_ra_lock);
-				if (new_ra)
-					kfree(new_ra);
+				kfree(new_ra);
 				return -EADDRINUSE;
 			}
 
--- linux-2.6.14-rc4-orig/net/ipv6/addrconf.c	2005-10-11 22:41:34.000000000 +0200
+++ linux-2.6.14-rc4/net/ipv6/addrconf.c	2005-10-13 11:33:03.000000000 +0200
@@ -2954,8 +2954,7 @@ static int inet6_fill_ifinfo(struct sk_b
 
 nlmsg_failure:
 rtattr_failure:
-	if (array)
-		kfree(array);
+	kfree(array);
 	skb_trim(skb, b - skb->data);
 	return -1;
 }
--- linux-2.6.14-rc4-orig/net/ipv6/ipcomp6.c	2005-10-11 22:41:34.000000000 +0200
+++ linux-2.6.14-rc4/net/ipv6/ipcomp6.c	2005-10-13 11:33:13.000000000 +0200
@@ -130,8 +130,7 @@ static int ipcomp6_input(struct xfrm_sta
 out_put_cpu:
 	put_cpu();
 out:
-	if (tmp_hdr)
-		kfree(tmp_hdr);
+	kfree(tmp_hdr);
 	if (err)
 		goto error_out;
 	return nexthdr;
--- linux-2.6.14-rc4-orig/net/ipv6/ip6_output.c	2005-10-11 22:41:34.000000000 +0200
+++ linux-2.6.14-rc4/net/ipv6/ip6_output.c	2005-10-13 11:33:50.000000000 +0200
@@ -586,8 +586,7 @@ static int ip6_fragment(struct sk_buff *
 			skb->next = NULL;
 		}
 
-		if (tmp_hdr)
-			kfree(tmp_hdr);
+		kfree(tmp_hdr);
 
 		if (err == 0) {
 			IP6_INC_STATS(IPSTATS_MIB_FRAGOKS);
@@ -1117,10 +1116,8 @@ int ip6_push_pending_frames(struct sock 
 
 out:
 	inet->cork.flags &= ~IPCORK_OPT;
-	if (np->cork.opt) {
-		kfree(np->cork.opt);
-		np->cork.opt = NULL;
-	}
+	kfree(np->cork.opt);
+	np->cork.opt = NULL;
 	if (np->cork.rt) {
 		dst_release(&np->cork.rt->u.dst);
 		np->cork.rt = NULL;
@@ -1145,10 +1142,8 @@ void ip6_flush_pending_frames(struct soc
 
 	inet->cork.flags &= ~IPCORK_OPT;
 
-	if (np->cork.opt) {
-		kfree(np->cork.opt);
-		np->cork.opt = NULL;
-	}
+	kfree(np->cork.opt);
+	np->cork.opt = NULL;
 	if (np->cork.rt) {
 		dst_release(&np->cork.rt->u.dst);
 		np->cork.rt = NULL;
--- linux-2.6.14-rc4-orig/net/ipv6/ip6_tunnel.c	2005-10-11 22:41:34.000000000 +0200
+++ linux-2.6.14-rc4/net/ipv6/ip6_tunnel.c	2005-10-13 11:34:06.000000000 +0200
@@ -756,8 +756,7 @@ ip6ip6_tnl_xmit(struct sk_buff *skb, str
 	}
 	ip6_tnl_dst_store(t, dst);
 
-	if (opt)
-		kfree(opt);
+	kfree(opt);
 
 	t->recursion--;
 	return 0;
@@ -766,8 +765,7 @@ tx_err_link_failure:
 	dst_link_failure(skb);
 tx_err_dst_release:
 	dst_release(dst);
-	if (opt)
-		kfree(opt);
+	kfree(opt);
 tx_err:
 	stats->tx_errors++;
 	stats->tx_dropped++;
--- linux-2.6.14-rc4-orig/net/irda/discovery.c	2005-08-29 01:41:01.000000000 +0200
+++ linux-2.6.14-rc4/net/irda/discovery.c	2005-10-13 11:34:26.000000000 +0200
@@ -194,8 +194,7 @@ void irlmp_expire_discoveries(hashbin_t 
 
 			/* Remove it from the log */
 			curr = hashbin_remove_this(log, (irda_queue_t *) curr);
-			if (curr)
-				kfree(curr);
+			kfree(curr);
 		}
 	}
 
--- linux-2.6.14-rc4-orig/net/irda/irias_object.c	2005-08-29 01:41:01.000000000 +0200
+++ linux-2.6.14-rc4/net/irda/irias_object.c	2005-10-13 11:35:29.000000000 +0200
@@ -122,8 +122,7 @@ static void __irias_delete_attrib(struct
 	IRDA_ASSERT(attrib != NULL, return;);
 	IRDA_ASSERT(attrib->magic == IAS_ATTRIB_MAGIC, return;);
 
-	if (attrib->name)
-		kfree(attrib->name);
+	kfree(attrib->name);
 
 	irias_delete_value(attrib->value);
 	attrib->magic = ~IAS_ATTRIB_MAGIC;
@@ -136,8 +135,7 @@ void __irias_delete_object(struct ias_ob
 	IRDA_ASSERT(obj != NULL, return;);
 	IRDA_ASSERT(obj->magic == IAS_OBJECT_MAGIC, return;);
 
-	if (obj->name)
-		kfree(obj->name);
+	kfree(obj->name);
 
 	hashbin_delete(obj->attribs, (FREE_FUNC) __irias_delete_attrib);
 
@@ -562,14 +560,12 @@ void irias_delete_value(struct ias_value
 		/* No need to deallocate */
 		break;
 	case IAS_STRING:
-		/* If string, deallocate string */
-		if (value->t.string != NULL)
-			kfree(value->t.string);
+		/* Deallocate string */
+		kfree(value->t.string);
 		break;
 	case IAS_OCT_SEQ:
-		/* If byte stream, deallocate byte stream */
-		 if (value->t.oct_seq != NULL)
-			 kfree(value->t.oct_seq);
+		/* Deallocate byte stream */
+		 kfree(value->t.oct_seq);
 		 break;
 	default:
 		IRDA_DEBUG(0, "%s(), Unknown value type!\n", __FUNCTION__);
--- linux-2.6.14-rc4-orig/net/sctp/sm_make_chunk.c	2005-10-11 22:41:35.000000000 +0200
+++ linux-2.6.14-rc4/net/sctp/sm_make_chunk.c	2005-10-13 11:35:50.000000000 +0200
@@ -254,8 +254,7 @@ struct sctp_chunk *sctp_make_init(const 
 	aiparam.adaption_ind = htonl(sp->adaption_ind);
 	sctp_addto_chunk(retval, sizeof(aiparam), &aiparam);
 nodata:
-	if (addrs.v)
-		kfree(addrs.v);
+	kfree(addrs.v);
 	return retval;
 }
 
@@ -347,8 +346,7 @@ struct sctp_chunk *sctp_make_init_ack(co
 nomem_chunk:
 	kfree(cookie);
 nomem_cookie:
-	if (addrs.v)
-		kfree(addrs.v);
+	kfree(addrs.v);
 	return retval;
 }
 
--- linux-2.6.14-rc4-orig/net/sctp/associola.c	2005-10-11 22:41:35.000000000 +0200
+++ linux-2.6.14-rc4/net/sctp/associola.c	2005-10-13 11:36:05.000000000 +0200
@@ -344,9 +344,7 @@ void sctp_association_free(struct sctp_a
 	}
 
 	/* Free peer's cached cookie. */
-	if (asoc->peer.cookie) {
-		kfree(asoc->peer.cookie);
-	}
+	kfree(asoc->peer.cookie);
 
 	/* Release the transport structures. */
 	list_for_each_safe(pos, temp, &asoc->peer.transport_addr_list) {
--- linux-2.6.14-rc4-orig/net/rose/rose_route.c	2005-10-11 22:41:34.000000000 +0200
+++ linux-2.6.14-rc4/net/rose/rose_route.c	2005-10-13 11:36:35.000000000 +0200
@@ -240,8 +240,7 @@ static void rose_remove_neigh(struct ros
 	if ((s = rose_neigh_list) == rose_neigh) {
 		rose_neigh_list = rose_neigh->next;
 		spin_unlock_bh(&rose_neigh_list_lock);
-		if (rose_neigh->digipeat != NULL)
-			kfree(rose_neigh->digipeat);
+		kfree(rose_neigh->digipeat);
 		kfree(rose_neigh);
 		return;
 	}
@@ -250,8 +249,7 @@ static void rose_remove_neigh(struct ros
 		if (s->next == rose_neigh) {
 			s->next = rose_neigh->next;
 			spin_unlock_bh(&rose_neigh_list_lock);
-			if (rose_neigh->digipeat != NULL)
-				kfree(rose_neigh->digipeat);
+			kfree(rose_neigh->digipeat);
 			kfree(rose_neigh);
 			return;
 		}
--- linux-2.6.14-rc4-orig/net/xfrm/xfrm_state.c	2005-08-29 01:41:01.000000000 +0200
+++ linux-2.6.14-rc4/net/xfrm/xfrm_state.c	2005-10-13 11:36:55.000000000 +0200
@@ -62,14 +62,10 @@ static void xfrm_state_gc_destroy(struct
 {
 	if (del_timer(&x->timer))
 		BUG();
-	if (x->aalg)
-		kfree(x->aalg);
-	if (x->ealg)
-		kfree(x->ealg);
-	if (x->calg)
-		kfree(x->calg);
-	if (x->encap)
-		kfree(x->encap);
+	kfree(x->aalg);
+	kfree(x->ealg);
+	kfree(x->calg);
+	kfree(x->encap);
 	if (x->type) {
 		x->type->destructor(x);
 		xfrm_put_type(x->type);
--- linux-2.6.14-rc4-orig/net/sched/cls_tcindex.c	2005-08-29 01:41:01.000000000 +0200
+++ linux-2.6.14-rc4/net/sched/cls_tcindex.c	2005-10-13 11:37:16.000000000 +0200
@@ -194,8 +194,7 @@ found:
 	}
 	tcf_unbind_filter(tp, &r->res);
 	tcf_exts_destroy(tp, &r->exts);
-	if (f)
-		kfree(f);
+	kfree(f);
 	return 0;
 }
 
@@ -442,10 +441,8 @@ static void tcindex_destroy(struct tcf_p
 	walker.skip = 0;
 	walker.fn = &tcindex_destroy_element;
 	tcindex_walk(tp,&walker);
-	if (p->perfect)
-		kfree(p->perfect);
-	if (p->h)
-		kfree(p->h);
+	kfree(p->perfect);
+	kfree(p->h);
 	kfree(p);
 	tp->root = NULL;
 }
--- linux-2.6.14-rc4-orig/net/sched/sch_gred.c	2005-08-29 01:41:01.000000000 +0200
+++ linux-2.6.14-rc4/net/sched/sch_gred.c	2005-10-13 11:37:41.000000000 +0200
@@ -580,8 +580,7 @@ static int gred_dump(struct Qdisc *sch, 
 	return skb->len;
 
 rtattr_failure:
-	if (opt)
-		kfree(opt);
+	kfree(opt);
 	DPRINTK("gred_dump: FAILURE!!!!\n");
 
 /* also free the opt struct here */
@@ -594,10 +593,8 @@ static void gred_destroy(struct Qdisc *s
 	struct gred_sched *table = qdisc_priv(sch);
 	int i;
 
-	for (i = 0;i < table->DPs; i++) {
-		if (table->tab[i])
-			kfree(table->tab[i]);
-	}
+	for (i = 0;i < table->DPs; i++)
+		kfree(table->tab[i]);
 }
 
 static struct Qdisc_ops gred_qdisc_ops = {
--- linux-2.6.14-rc4-orig/net/sched/em_meta.c	2005-10-11 22:41:34.000000000 +0200
+++ linux-2.6.14-rc4/net/sched/em_meta.c	2005-10-13 11:38:28.000000000 +0200
@@ -561,8 +561,7 @@ static int meta_var_change(struct meta_v
 
 static void meta_var_destroy(struct meta_value *v)
 {
-	if (v->val)
-		kfree((void *) v->val);
+	kfree((void *) v->val);
 }
 
 static void meta_var_apply_extras(struct meta_value *v,
--- linux-2.6.14-rc4-orig/net/sched/cls_u32.c	2005-08-29 01:41:01.000000000 +0200
+++ linux-2.6.14-rc4/net/sched/cls_u32.c	2005-10-13 11:39:35.000000000 +0200
@@ -347,7 +347,7 @@ static int u32_destroy_key(struct tcf_pr
 	if (n->ht_down)
 		n->ht_down->refcnt--;
 #ifdef CONFIG_CLS_U32_PERF
-	if (n && (NULL != n->pf))
+	if (n)
 		kfree(n->pf);
 #endif
 	kfree(n);
@@ -680,7 +680,7 @@ static int u32_change(struct tcf_proto *
 		return 0;
 	}
 #ifdef CONFIG_CLS_U32_PERF
-	if (n && (NULL != n->pf))
+	if (n)
 		kfree(n->pf);
 #endif
 	kfree(n);
--- linux-2.6.14-rc4-orig/net/sched/cls_fw.c	2005-08-29 01:41:01.000000000 +0200
+++ linux-2.6.14-rc4/net/sched/cls_fw.c	2005-10-13 11:39:47.000000000 +0200
@@ -298,8 +298,7 @@ static int fw_change(struct tcf_proto *t
 	return 0;
 
 errout:
-	if (f)
-		kfree(f);
+	kfree(f);
 	return err;
 }
 
--- linux-2.6.14-rc4-orig/net/sched/cls_rsvp.h	2005-08-29 01:41:01.000000000 +0200
+++ linux-2.6.14-rc4/net/sched/cls_rsvp.h	2005-10-13 11:39:57.000000000 +0200
@@ -555,8 +555,7 @@ insert:
 	goto insert;
 
 errout:
-	if (f)
-		kfree(f);
+	kfree(f);
 errout2:
 	tcf_exts_destroy(tp, &e);
 	return err;
--- linux-2.6.14-rc4-orig/net/sched/cls_route.c	2005-08-29 01:41:01.000000000 +0200
+++ linux-2.6.14-rc4/net/sched/cls_route.c	2005-10-13 11:40:07.000000000 +0200
@@ -525,8 +525,7 @@ reinsert:
 	return 0;
 
 errout:
-	if (f)
-		kfree(f);
+	kfree(f);
 	return err;
 }
 
--- linux-2.6.14-rc4-orig/net/ethernet/pe2.c	2005-08-29 01:41:01.000000000 +0200
+++ linux-2.6.14-rc4/net/ethernet/pe2.c	2005-10-13 11:40:15.000000000 +0200
@@ -32,8 +32,7 @@ struct datalink_proto *make_EII_client(v
 
 void destroy_EII_client(struct datalink_proto *dl)
 {
-	if (dl)
-		kfree(dl);
+	kfree(dl);
 }
 
 EXPORT_SYMBOL(destroy_EII_client);
--- linux-2.6.14-rc4-orig/net/decnet/dn_table.c	2005-10-11 22:41:33.000000000 +0200
+++ linux-2.6.14-rc4/net/decnet/dn_table.c	2005-10-13 11:41:34.000000000 +0200
@@ -784,16 +784,14 @@ struct dn_fib_table *dn_fib_get_table(in
 
 static void dn_fib_del_tree(int n)
 {
-        struct dn_fib_table *t;
+	struct dn_fib_table *t;
 
-        write_lock(&dn_fib_tables_lock);
-        t = dn_fib_tables[n];
-        dn_fib_tables[n] = NULL;
-        write_unlock(&dn_fib_tables_lock);
-
-        if (t) {
-                kfree(t);
-        }
+	write_lock(&dn_fib_tables_lock);
+	t = dn_fib_tables[n];
+	dn_fib_tables[n] = NULL;
+	write_unlock(&dn_fib_tables_lock);
+
+	kfree(t);
 }
 
 struct dn_fib_table *dn_fib_empty_table(void)
--- linux-2.6.14-rc4-orig/net/wanrouter/wanmain.c	2005-08-29 01:41:01.000000000 +0200
+++ linux-2.6.14-rc4/net/wanrouter/wanmain.c	2005-10-13 11:42:22.000000000 +0200
@@ -714,10 +714,8 @@ static int wanrouter_device_new_if(struc
 	}
 
 	/* This code has moved from del_if() function */
-	if (dev->priv) {
-		kfree(dev->priv);
-		dev->priv = NULL;
-	}
+	kfree(dev->priv);
+	dev->priv = NULL;
 
 #ifdef CONFIG_WANPIPE_MULTPPP
 	if (cnf->config_id == WANCONFIG_MPPP)
@@ -851,10 +849,8 @@ static int wanrouter_delete_interface(st
 
 	/* Due to new interface linking method using dev->priv,
 	 * this code has moved from del_if() function.*/
-	if (dev->priv){
-		kfree(dev->priv);
-		dev->priv=NULL;
-	}
+	kfree(dev->priv);
+	dev->priv=NULL;
 
 	unregister_netdev(dev);
 
--- linux-2.6.14-rc4-orig/net/wanrouter/af_wanpipe.c	2005-10-11 22:41:35.000000000 +0200
+++ linux-2.6.14-rc4/net/wanrouter/af_wanpipe.c	2005-10-13 11:43:14.000000000 +0200
@@ -1099,7 +1099,7 @@ static void release_driver(struct sock *
 	sock_reset_flag(sk, SOCK_ZAPPED);
 	wp = wp_sk(sk);
 
-	if (wp && wp->mbox) {
+	if (wp) {
 		kfree(wp->mbox);
 		wp->mbox = NULL;
 	}
@@ -1186,10 +1186,8 @@ static void wanpipe_kill_sock_timer (uns
 		return;
 	}
 
-	if (wp_sk(sk)) {
-		kfree(wp_sk(sk));
-		wp_sk(sk) = NULL;
-	}
+	kfree(wp_sk(sk));
+	wp_sk(sk) = NULL;
 
 	if (atomic_read(&sk->sk_refcnt) != 1) {
 		atomic_set(&sk->sk_refcnt, 1);
@@ -1219,10 +1217,8 @@ static void wanpipe_kill_sock_accept (st
 	sk->sk_socket = NULL;
 
 
-	if (wp_sk(sk)) {
-		kfree(wp_sk(sk));
-		wp_sk(sk) = NULL;
-	}
+	kfree(wp_sk(sk));
+	wp_sk(sk) = NULL;
 
 	if (atomic_read(&sk->sk_refcnt) != 1) {
 		atomic_set(&sk->sk_refcnt, 1);
@@ -1243,10 +1239,8 @@ static void wanpipe_kill_sock_irq (struc
 
 	sk->sk_socket = NULL;
 
-	if (wp_sk(sk)) {
-		kfree(wp_sk(sk));
-		wp_sk(sk) = NULL;
-	}
+	kfree(wp_sk(sk));
+	wp_sk(sk) = NULL;
 
 	if (atomic_read(&sk->sk_refcnt) != 1) {
 		atomic_set(&sk->sk_refcnt, 1);
--- linux-2.6.14-rc4-orig/net/sunrpc/svc.c	2005-08-29 01:41:01.000000000 +0200
+++ linux-2.6.14-rc4/net/sunrpc/svc.c	2005-10-13 11:45:43.000000000 +0200
@@ -196,12 +196,9 @@ svc_exit_thread(struct svc_rqst *rqstp)
 	struct svc_serv	*serv = rqstp->rq_server;
 
 	svc_release_buffer(rqstp);
-	if (rqstp->rq_resp)
-		kfree(rqstp->rq_resp);
-	if (rqstp->rq_argp)
-		kfree(rqstp->rq_argp);
-	if (rqstp->rq_auth_data)
-		kfree(rqstp->rq_auth_data);
+	kfree(rqstp->rq_resp);
+	kfree(rqstp->rq_argp);
+	kfree(rqstp->rq_auth_data);
 	kfree(rqstp);
 
 	/* Release the server */
--- linux-2.6.14-rc4-orig/net/sunrpc/xdr.c	2005-08-29 01:41:01.000000000 +0200
+++ linux-2.6.14-rc4/net/sunrpc/xdr.c	2005-10-13 11:46:15.000000000 +0200
@@ -1167,8 +1167,7 @@ xdr_xcode_array2(struct xdr_buf *buf, un
 	err = 0;
 
 out:
-	if (elem)
-		kfree(elem);
+	kfree(elem);
 	if (ppages)
 		kunmap(*ppages);
 	return err;
--- linux-2.6.14-rc4-orig/net/sunrpc/auth_gss/gss_mech_switch.c	2005-08-29 01:41:01.000000000 +0200
+++ linux-2.6.14-rc4/net/sunrpc/auth_gss/gss_mech_switch.c	2005-10-13 11:46:26.000000000 +0200
@@ -61,8 +61,7 @@ gss_mech_free(struct gss_api_mech *gm)
 
 	for (i = 0; i < gm->gm_pf_num; i++) {
 		pf = &gm->gm_pfs[i];
-		if (pf->auth_domain_name)
-			kfree(pf->auth_domain_name);
+		kfree(pf->auth_domain_name);
 		pf->auth_domain_name = NULL;
 	}
 }
--- linux-2.6.14-rc4-orig/net/sunrpc/auth_gss/gss_spkm3_seal.c	2005-08-29 01:41:01.000000000 +0200
+++ linux-2.6.14-rc4/net/sunrpc/auth_gss/gss_spkm3_seal.c	2005-10-13 11:46:33.000000000 +0200
@@ -124,8 +124,7 @@ spkm3_make_token(struct spkm3_ctx *ctx, 
 
 	return  GSS_S_COMPLETE;
 out_err:
-	if (md5cksum.data) 
-		kfree(md5cksum.data);
+	kfree(md5cksum.data);
 	token->data = NULL;
 	token->len = 0;
 	return GSS_S_FAILURE;
--- linux-2.6.14-rc4-orig/net/sunrpc/auth_gss/gss_krb5_seal.c	2005-08-29 01:41:01.000000000 +0200
+++ linux-2.6.14-rc4/net/sunrpc/auth_gss/gss_krb5_seal.c	2005-10-13 11:46:51.000000000 +0200
@@ -171,6 +171,6 @@ krb5_make_token(struct krb5_ctx *ctx, in
 
 	return ((ctx->endtime < now) ? GSS_S_CONTEXT_EXPIRED : GSS_S_COMPLETE);
 out_err:
-	if (md5cksum.data) kfree(md5cksum.data);
+	kfree(md5cksum.data);
 	return GSS_S_FAILURE;
 }
--- linux-2.6.14-rc4-orig/net/sunrpc/auth_gss/gss_spkm3_token.c	2005-08-29 01:41:01.000000000 +0200
+++ linux-2.6.14-rc4/net/sunrpc/auth_gss/gss_spkm3_token.c	2005-10-13 11:47:01.000000000 +0200
@@ -259,8 +259,7 @@ spkm3_verify_mic_token(unsigned char **t
 
 	ret = GSS_S_COMPLETE;
 out:
-	if (spkm3_ctx_id.data)
-		kfree(spkm3_ctx_id.data);
+	kfree(spkm3_ctx_id.data);
 	return ret;
 }
 
--- linux-2.6.14-rc4-orig/net/sunrpc/auth_gss/gss_spkm3_unseal.c	2005-08-29 01:41:01.000000000 +0200
+++ linux-2.6.14-rc4/net/sunrpc/auth_gss/gss_spkm3_unseal.c	2005-10-13 11:47:12.000000000 +0200
@@ -120,9 +120,7 @@ spkm3_read_token(struct spkm3_ctx *ctx,
 	/* XXX: need to add expiration and sequencing */
 	ret = GSS_S_COMPLETE;
 out:
-	if (md5cksum.data) 
-		kfree(md5cksum.data);
-	if (wire_cksum.data) 
-		kfree(wire_cksum.data);
+	kfree(md5cksum.data);
+	kfree(wire_cksum.data);
 	return ret;
 }
--- linux-2.6.14-rc4-orig/net/sunrpc/auth_gss/gss_krb5_unseal.c	2005-08-29 01:41:01.000000000 +0200
+++ linux-2.6.14-rc4/net/sunrpc/auth_gss/gss_krb5_unseal.c	2005-10-13 11:47:19.000000000 +0200
@@ -197,6 +197,6 @@ krb5_read_token(struct krb5_ctx *ctx,
 
 	ret = GSS_S_COMPLETE;
 out:
-	if (md5cksum.data) kfree(md5cksum.data);
+	kfree(md5cksum.data);
 	return ret;
 }
--- linux-2.6.14-rc4-orig/net/bluetooth/hidp/core.c	2005-08-29 01:41:01.000000000 +0200
+++ linux-2.6.14-rc4/net/bluetooth/hidp/core.c	2005-10-13 11:47:49.000000000 +0200
@@ -657,9 +657,7 @@ unlink:
 failed:
 	up_write(&hidp_session_sem);
 
-	if (session->input)
-		kfree(session->input);
-
+	kfree(session->input);
 	kfree(session);
 	return err;
 }

^ permalink raw reply

* Kconfig Dependencies for CONFIG_NET_CLS_RSVP6
From: Frank Sorenson @ 2005-10-14  6:37 UTC (permalink / raw)
  To: LKML, netdev

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

I noticed that I can still select "Special RSVP classifier for IPv6"
even if "The IPv6 protocol" isn't selected.  Should CONFIG_NET_CLS_RSVP6
depend on or select IPV6?

Currently:
Depends on: NET && NET_CLS && NET_QOS


Thanks,
Frank
- --
Frank Sorenson - KD7TZK
Systems Manager, Computer Science Department
Brigham Young University
frank@tuxrocks.com
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (GNU/Linux)
Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org

iD8DBQFDT1JHaI0dwg4A47wRAhgRAJ0WKH6/S1DjKKRZDSwiLOpIMYJ8cgCgyIld
xXUJRsvCO1TJsCfpSCMj7/A=
=gqzH
-----END PGP SIGNATURE-----

^ permalink raw reply

* Re: Kconfig Dependencies for CONFIG_NET_CLS_RSVP6
From: David S. Miller @ 2005-10-14  6:59 UTC (permalink / raw)
  To: frank; +Cc: linux-kernel, netdev
In-Reply-To: <434F5247.2040007@tuxrocks.com>

From: Frank Sorenson <frank@tuxrocks.com>
Date: Fri, 14 Oct 2005 00:37:59 -0600

> I noticed that I can still select "Special RSVP classifier for IPv6"
> even if "The IPv6 protocol" isn't selected.  Should CONFIG_NET_CLS_RSVP6
> depend on or select IPV6?
> 
> Currently:
> Depends on: NET && NET_CLS && NET_QOS

It doesn't need the ipv6 stack at all, it's just a classifier
that looks at packet headers and makes decisions.

^ permalink raw reply

* Re: Kconfig Dependencies for CONFIG_NET_CLS_RSVP6
From: Frank Sorenson @ 2005-10-14  7:07 UTC (permalink / raw)
  To: David S. Miller; +Cc: linux-kernel, netdev
In-Reply-To: <20051013.235907.66789139.davem@davemloft.net>

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

David S. Miller wrote:
> From: Frank Sorenson <frank@tuxrocks.com>
> Date: Fri, 14 Oct 2005 00:37:59 -0600
> 
> 
>>I noticed that I can still select "Special RSVP classifier for IPv6"
>>even if "The IPv6 protocol" isn't selected.  Should CONFIG_NET_CLS_RSVP6
>>depend on or select IPV6?
>>
>>Currently:
>>Depends on: NET && NET_CLS && NET_QOS
> 
> 
> It doesn't need the ipv6 stack at all, it's just a classifier
> that looks at packet headers and makes decisions.

Okay, I suppose that makes more sense now.  I just wanted to check it
through, since I figured I'd turned off everything related to IPv6 :)

Thanks for explaining,

Frank
- --
Frank Sorenson - KD7TZK
Systems Manager, Computer Science Department
Brigham Young University
frank@tuxrocks.com
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (GNU/Linux)
Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org

iD8DBQFDT1lAaI0dwg4A47wRAuXVAKCWBcZj3OTK8wLZInGE7eIegtrBeACg7GOt
gM0finkJL0tRmXm9685vS10=
=8M+k
-----END PGP SIGNATURE-----

^ permalink raw reply


This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox