Netdev List
 help / color / mirror / Atom feed
* [-mm patch] let only ACX_PCI/ACX_USB be user-visible and select ACX accordingly
From: Adrian Bunk @ 2006-02-05  5:02 UTC (permalink / raw)
  To: Denis Vlasenko
  Cc: John W. Linville, Gabriel C., da.crew, linux-kernel, netdev
In-Reply-To: <200602010857.04964.vda@ilport.com.ua>

On Wed, Feb 01, 2006 at 08:57:04AM +0200, Denis Vlasenko wrote:
> On Wednesday 01 February 2006 00:16, Adrian Bunk wrote:
> > > > > CONFIG_ACX=y
> > > > > # CONFIG_ACX_PCI is not set
> > > > > # CONFIG_ACX_USB is not set
> > > > > 
> > > > > This won't fly. You must select at least one.
> > > > > 
> > > > > Attached patch will check for this and #error out.
> > > > > Andrew, do not apply to -mm, I'll send you bigger update today.
> > > > 
> > > > Is there any way to move this into a Kconfig file?  That seems nicer
> > > > than having #ifdefs in source code to check for a configuration error.
> > > 
> > > Can't think of any at the moment.
> > 
> > There are two possible solutions ("offer" means "is user visible"):
> > - only offer ACX and always build ACX_PCI/ACX_USB depending on the
> >   availability of PCI/USB
> > - only offer ACX_PCI and ACX_USB which select ACX
> > 
> > If you tell me which you prefer I can send a patch.
> 
> Second one sounds okay to me.

The patch is below.

I've promised a bit too much, there's one small problem in this patch:

If the user says y to one option and m to the other, the driver is built 
statically supporting both.

Unfortunately, I don't see any reasonable way to implement this better 
(but I do still prefer this solution over the #error).

> vda

cu
Adrian


<--  snip  -->


Let only ACX_PCI/ACX_USB be user-visible and select ACX accordingly.


Signed-off-by: Adrian Bunk <bunk@stusta.de>

---

 drivers/net/wireless/tiacx/Kconfig      |   43 +++++++++++++-----------
 drivers/net/wireless/tiacx/Makefile     |    4 +-
 drivers/net/wireless/tiacx/acx_struct.h |   12 ++----
 drivers/net/wireless/tiacx/common.c     |    8 ++--
 4 files changed, 34 insertions(+), 33 deletions(-)


--- linux-2.6.16-rc1-mm5-full/drivers/net/wireless/tiacx/Kconfig.old	2006-02-05 03:48:32.000000000 +0100
+++ linux-2.6.16-rc1-mm5-full/drivers/net/wireless/tiacx/Kconfig	2006-02-05 05:31:54.000000000 +0100
@@ -1,25 +1,18 @@
 config ACX
-	tristate "TI acx100/acx111 802.11b/g wireless chipsets"
-	depends on NET_RADIO && EXPERIMENTAL && (USB || PCI)
+	tristate
 	select FW_LOADER
+
+config ACX_PCI
+	tristate "TI acx100/acx111 802.11b/g PCI wireless chipsets"
+	depends on NET_RADIO && EXPERIMENTAL && PCI && (USB || ACX_USB=n)
+	select ACX
+	select ACX_PCI_BOOL
 	---help---
-	A driver for 802.11b/g wireless cards based on
-	Texas Instruments acx100 and acx111 chipsets.
+	Include support for PCI and CardBus 802.11b/g wireless cards
+	based on Texas Instruments acx100 and acx111 chipsets.
 
 	This driver supports Host AP mode that allows
 	your computer to act as an IEEE 802.11 access point.
-	This driver is new and experimental.
-
-	Texas Instruments did not take part in development of this driver
-	in any way, shape or form.
-
-	The driver can be compiled as a module and will be named "acx".
-
-config ACX_PCI
-	bool "TI acx100/acx111 802.11b/g PCI"
-	depends on ACX && PCI
-	---help---
-	Include PCI and CardBus support in acx.
 
 	acx chipsets need their firmware loaded at startup.
 	You will need to provide a firmware image via hotplug.
@@ -44,11 +37,20 @@
 	Firmware files are not covered by GPL and are not distributed
 	with this driver for legal reasons.
 
+config ACX_PCI_BOOL
+	bool
+
 config ACX_USB
-	bool "TI acx100/acx111 802.11b/g USB"
-	depends on ACX && (USB=y || USB=ACX)
+	tristate "TI acx100/acx111 802.11b/g USB wireless chipsets"
+	depends on NET_RADIO && EXPERIMENTAL && USB
+	select ACX
+	select ACX_USB_BOOL
 	---help---
-	Include USB support in acx.
+	Include support for USB 802.11b/g wireless cards
+	based on Texas Instruments acx100 and acx111 chipsets.
+
+	This driver supports Host AP mode that allows
+	your computer to act as an IEEE 802.11 access point.
 
 	There is only one currently known device in this category,
 	D-Link DWL-120+, but newer devices seem to be on the horizon.
@@ -61,3 +63,6 @@
 
 	Firmware files are not covered by GPL and are not distributed
 	with this driver for legal reasons.
+
+config ACX_USB_BOOL
+	bool
--- linux-2.6.16-rc1-mm5-full/drivers/net/wireless/tiacx/Makefile.old	2006-02-05 05:25:03.000000000 +0100
+++ linux-2.6.16-rc1-mm5-full/drivers/net/wireless/tiacx/Makefile	2006-02-05 05:25:17.000000000 +0100
@@ -1,6 +1,6 @@
 obj-$(CONFIG_ACX) += acx.o
 
-acx-obj-$(CONFIG_ACX_PCI) += pci.o
-acx-obj-$(CONFIG_ACX_USB) += usb.o
+acx-obj-$(CONFIG_ACX_PCI_BOOL) += pci.o
+acx-obj-$(CONFIG_ACX_USB_BOOL) += usb.o
 
 acx-objs := wlan.o conv.o ioctl.o common.o $(acx-obj-y)
--- linux-2.6.16-rc1-mm5-full/drivers/net/wireless/tiacx/acx_struct.h.old	2006-02-05 05:37:13.000000000 +0100
+++ linux-2.6.16-rc1-mm5-full/drivers/net/wireless/tiacx/acx_struct.h	2006-02-05 05:37:35.000000000 +0100
@@ -105,12 +105,8 @@
 #define DEVTYPE_PCI		0
 #define DEVTYPE_USB		1
 
-#if !defined(CONFIG_ACX_PCI) && !defined(CONFIG_ACX_USB)
-#error Driver must include PCI and/or USB support. You selected neither.
-#endif
-
-#if defined(CONFIG_ACX_PCI)
- #if !defined(CONFIG_ACX_USB)
+#if defined(CONFIG_ACX_PCI_BOOL)
+ #if !defined(CONFIG_ACX_USB_BOOL)
   #define IS_PCI(adev)	1
  #else
   #define IS_PCI(adev)	((adev)->dev_type == DEVTYPE_PCI)
@@ -119,8 +115,8 @@
  #define IS_PCI(adev)	0
 #endif
 
-#if defined(CONFIG_ACX_USB)
- #if !defined(CONFIG_ACX_PCI)
+#if defined(CONFIG_ACX_USB_BOOL)
+ #if !defined(CONFIG_ACX_PCI_BOOL)
   #define IS_USB(adev)	1
  #else
   #define IS_USB(adev)	((adev)->dev_type == DEVTYPE_USB)
--- linux-2.6.16-rc1-mm5-full/drivers/net/wireless/tiacx/common.c.old	2006-02-05 05:37:44.000000000 +0100
+++ linux-2.6.16-rc1-mm5-full/drivers/net/wireless/tiacx/common.c	2006-02-05 05:38:58.000000000 +0100
@@ -6853,12 +6853,12 @@
 		"recommended, visit http://acx100.sf.net in case "
 		"of further questions/discussion\n");
 
-#if defined(CONFIG_ACX_PCI)
+#if defined(CONFIG_ACX_PCI_BOOL)
 	r1 = acxpci_e_init_module();
 #else
 	r1 = -EINVAL;
 #endif
-#if defined(CONFIG_ACX_USB)
+#if defined(CONFIG_ACX_USB_BOOL)
 	r2 = acxusb_e_init_module();
 #else
 	r2 = -EINVAL;
@@ -6872,10 +6872,10 @@
 static void __exit
 acx_e_cleanup_module(void)
 {
-#if defined(CONFIG_ACX_PCI)
+#if defined(CONFIG_ACX_PCI_BOOL)
 	acxpci_e_cleanup_module();
 #endif
-#if defined(CONFIG_ACX_USB)
+#if defined(CONFIG_ACX_USB_BOOL)
 	acxusb_e_cleanup_module();
 #endif
 }

^ permalink raw reply

* [2.6 patch] let IPW2{1,2}00 select IEEE80211
From: Adrian Bunk @ 2006-02-05 15:13 UTC (permalink / raw)
  To: yi.zhu, jketreno; +Cc: linville, netdev, linux-kernel, Jan Niehusmann

From: Jan Niehusmann <jan@gondor.com>

This patch makes the IPW2100 and IPW2200 options available in
the configuration menu even if IEEE80211 has not been selected before.
This behaviour is more intuitive for people which are not familiar with
the driver internals.
The suggestion for this change was made by Alejandro Bonilla Beeche.

Signed-off-by: Jan Niehusmann <jan@gondor.com>
Signed-off-by: Adrian Bunk <bunk@stusta.de>

---

This patch was sent by Jan Niehusmann on:
- 13 Nov 2005

--- a/drivers/net/wireless/Kconfig
+++ b/drivers/net/wireless/Kconfig
@@ -139,8 +139,9 @@ comment "Wireless 802.11b ISA/PCI cards 
 
 config IPW2100
 	tristate "Intel PRO/Wireless 2100 Network Connection"
-	depends on NET_RADIO && PCI && IEEE80211
+	depends on NET_RADIO && PCI
 	select FW_LOADER
+	select IEEE80211
 	---help---
           A driver for the Intel PRO/Wireless 2100 Network 
 	  Connection 802.11b wireless network adapter.
@@ -192,8 +193,9 @@ config IPW_DEBUG
 
 config IPW2200
 	tristate "Intel PRO/Wireless 2200BG and 2915ABG Network Connection"
-	depends on NET_RADIO && IEEE80211 && PCI
+	depends on NET_RADIO && PCI
 	select FW_LOADER
+	select IEEE80211
 	---help---
           A driver for the Intel PRO/Wireless 2200BG and 2915ABG Network
 	  Connection adapters. 
 

^ permalink raw reply

* [PATCH] acx: Transform semaphore to mutex
From: Carlos Martín @ 2006-02-05 15:56 UTC (permalink / raw)
  To: acx100-devel; +Cc: netdev


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

Hi,

 The attached patch transform the semaphore to a mutex. That's how we use it, 
it's faster and makes the binary smaller. It also deletes the semaphore debug 
functions because I the kernel takes care of that now. Just yell if I've 
misunderstood.

   text    data     bss     dec     hex filename
 113475    1520      20  115015   1c147 acx.ko-sem
 111033    1520      20  112573   1b7bd acx.ko

This only works for newer kernels, so I suppose it could be kept as an 
into-mainline patch. People with newer kernels probably want this patch.

   cmn
-- 
Carlos Martín       http://www.cmartin.tk

"Erdbeben? Sicherlich etwas, das mit Erdberen zu tun hat." -- me, paraphrased

[-- Attachment #1.2: acx-sem-to-mutex.patch --]
[-- Type: text/x-diff, Size: 4615 bytes --]

diff --git a/acx_func.h b/acx_func.h
index a8e2482..239698b 100644
--- a/acx_func.h
+++ b/acx_func.h
@@ -307,27 +307,18 @@ acx_unlock_helper(acx_device_t *adev, un
 	acx_unlock_debug(adev, where);
 	spin_unlock_irqrestore(&adev->lock, *fp);
 }
-static inline void
-acx_down_helper(acx_device_t *adev, const char* where)
-{
-	acx_down_debug(adev, where);
-}
-static inline void
-acx_up_helper(acx_device_t *adev, const char* where)
-{
-	acx_up_debug(adev, where);
-}
+
 #define acx_lock(adev, flags)	acx_lock_helper(adev, &(flags), __FILE__ ":" STRING(__LINE__))
 #define acx_unlock(adev, flags)	acx_unlock_helper(adev, &(flags), __FILE__ ":" STRING(__LINE__))
-#define acx_sem_lock(adev)	acx_down_helper(adev, __FILE__ ":" STRING(__LINE__))
-#define acx_sem_unlock(adev)	acx_up_helper(adev, __FILE__ ":" STRING(__LINE__))
+#define acx_sem_lock(adev)	mutex_lock(&(adev)->mutex)
+#define acx_sem_unlock(adev)    mutex_unlock(&(adev)->mutex)
 
 #elif defined(DO_LOCKING)
 
 #define acx_lock(adev, flags)	spin_lock_irqsave(&adev->lock, flags)
 #define acx_unlock(adev, flags)	spin_unlock_irqrestore(&adev->lock, flags)
-#define acx_sem_lock(adev)	down(&adev->sem)
-#define acx_sem_unlock(adev)	up(&adev->sem)
+#define acx_sem_lock(adev)	mutex_lock(&(adev)->mutex)
+#define acx_sem_unlock(adev)	mutex_unlock(&(adev)->mutex)
 #define acx_lock_unhold()	((void)0)
 #define acx_sem_unhold()	((void)0)
 
diff --git a/acx_struct.h b/acx_struct.h
index 0bd18c4..65d6cf5 100644
--- a/acx_struct.h
+++ b/acx_struct.h
@@ -1142,7 +1142,7 @@ struct acx_device {
 	/* FIXME: try to convert semaphore to more efficient mutex according
 	   to Ingo Molnar's docs (but not before driver is in mainline or
 		 pre-mutex Linux 2.6.10 is very outdated). */
-	struct semaphore	sem;
+	struct mutex	mutex;
 	spinlock_t		lock;
 #if defined(PARANOID_LOCKING) /* Lock debugging */
 	const char		*last_sem;
diff --git a/common.c b/common.c
index 70e8afc..c019cef 100644
--- a/common.c
+++ b/common.c
@@ -189,59 +189,7 @@ acx_unlock_debug(acx_device_t *adev, con
 		}
 	}
 }
-void
-acx_down_debug(acx_device_t *adev, const char* where)
-{
-	int sem_count;
-	unsigned long timeout = jiffies + 5*HZ;
-
-	where = sanitize_str(where);
 
-	for (;;) {
-		sem_count = atomic_read(&adev->sem.count);
-		if (sem_count) break;
-		if (time_after(jiffies, timeout))
-			break;
-		msleep(5);
-	}
-	if (!sem_count) {
-		printk(KERN_EMERG "D STATE at %s! last sem at %s\n",
-			where, adev->last_sem);
-		dump_stack();
-	}
-	adev->last_sem = where;
-	adev->sem_time = jiffies;
-	down(&adev->sem);
-	if (acx_debug & L_LOCK) {
-		printk("%s: sem_down %d -> %d\n",
-			where, sem_count, atomic_read(&adev->sem.count));
-	}
-}
-void
-acx_up_debug(acx_device_t *adev, const char* where)
-{
-	int sem_count = atomic_read(&adev->sem.count);
-	if (sem_count) {
-		where = sanitize_str(where);
-		printk(KERN_EMERG "STRAY UP at %s! sem.count=%d\n", where, sem_count);
-		dump_stack();
-	}
-	if (acx_debug & L_LOCK) {
-		unsigned long diff = jiffies - adev->sem_time;
-		if (diff > max_sem_time) {
-			where = sanitize_str(where);
-			printk("max sem hold time %ld jiffies from %s "
-				"to %s\n", diff, adev->last_sem, where);
-			max_sem_time = diff;
-		}
-	}
-	up(&adev->sem);
-	if (acx_debug & L_LOCK) {
-		where = sanitize_str(where);
-		printk("%s: sem_up %d -> %d\n",
-			where, sem_count, atomic_read(&adev->sem.count));
-	}
-}
 #endif /* PARANOID_LOCKING */
 
 
diff --git a/pci.c b/pci.c
index 910155f..a390606 100644
--- a/pci.c
+++ b/pci.c
@@ -1617,7 +1617,7 @@ acxpci_e_probe(struct pci_dev *pdev, con
 	adev = ndev2adev(ndev);
 	spin_lock_init(&adev->lock);	/* initial state: unlocked */
 	/* We do not start with downed sem: we want PARANOID_LOCKING to work */
-	sema_init(&adev->sem, 1);	/* initial state: 1 (upped) */
+	mutex_init(&adev->mutex);	/* initial state: 1 (upped) */
 	/* since nobody can see new netdev yet, we can as well
 	** just _presume_ that we're under sem (instead of actually taking it): */
 	/* acx_sem_lock(adev); */
diff --git a/usb.c b/usb.c
index 3183743..cd610e4 100644
--- a/usb.c
+++ b/usb.c
@@ -869,7 +869,7 @@ acxusb_e_probe(struct usb_interface *int
 
 	adev->usbdev = usbdev;
 	spin_lock_init(&adev->lock);    /* initial state: unlocked */
-	sema_init(&adev->sem, 1);       /* initial state: 1 (upped) */
+	mutex_init(&adev->mutex);       /* initial state: 1 (upped) */
 
 	/* Check that this is really the hardware we know about.
 	** If not sure, at least notify the user that he

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

^ permalink raw reply related

* Re: open bugzilla reports
From: Pavel Machek @ 2006-02-05 21:09 UTC (permalink / raw)
  To: Martin J. Bligh, akpm, linux-kernel, video4linux-list,
	linux-fbdev-devel, linux-fsdevel, linux1394-devel, netdev,
	linux-ide, linux-scsi, linux-usb-devel
In-Reply-To: <20060204231425.GA24887@flint.arm.linux.org.uk>

On So 04-02-06 23:14:26, Russell King wrote:
> On Sat, Feb 04, 2006 at 08:47:29AM -0800, Martin J. Bligh wrote:
> > 
> > > > [Bug 5958] CF bluetooth card oopses machine when
> > > > 	http://bugzilla.kernel.org/show_bug.cgi?id=5958
> > > 
> > > This isn't a serial bug - it's a bluetooth ldisc bug.  I reported it
> > > to the bluetooth folk back when it first got raised by Pavel.  However,
> > > they seem to be completely disinterested in fixing it.
> > > 
> > > Unfortunately, there isn't a category for bt crap in bugzilla, otherwise
> > > I'd reassign it.  Please kick the bt folk.
> > 
> > Stick it under Drivers/Other if you want ...
> 
> It _is_ under Networking/Other, yet akpm still thinks it's a serial
> bug.  I'm not sure why though, I've fully explained why it isn't
> a serial problem in the bug comments.
> 
> akpm is buggy and needs fixing.  Where do I file this bug? 8)

It would be nice to create Networking/Bluetooth category, so there's
logical place to file such bugs under...
								Pavel
-- 
Thanks, Sharp!

^ permalink raw reply

* [PATCH][RFC] Shrink ip_vs_*.c includes
From: Roberto Nibali @ 2006-02-06  0:48 UTC (permalink / raw)
  To: netdev, lvs-users, Horms

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

Hello,

This patch against the latest GIT HEAD reduces the includes to the 
necessary ones. I've compile-tested it against following (and s/y/m/) 
configuration on x86:

CONFIG_IP_VS=y
CONFIG_IP_VS_DEBUG=y
CONFIG_IP_VS_TAB_BITS=12
CONFIG_IP_VS_PROTO_TCP=y
CONFIG_IP_VS_PROTO_UDP=y
CONFIG_IP_VS_PROTO_ESP=y
CONFIG_IP_VS_PROTO_AH=y
CONFIG_IP_VS_RR=y
CONFIG_IP_VS_WRR=y
CONFIG_IP_VS_LC=y
CONFIG_IP_VS_WLC=y
CONFIG_IP_VS_LBLC=y
CONFIG_IP_VS_LBLCR=y
CONFIG_IP_VS_DH=y
CONFIG_IP_VS_SH=y
CONFIG_IP_VS_SED=y
CONFIG_IP_VS_NQ=y
CONFIG_IP_VS_FTP=y

Please consider applying (but test it first on your local tree since we 
don't want stupid breakage resulting from such changes).

Alternatively/additionally I could envision a patch on top of this one 
that completely removes the includes from the ../net/ipv4/ipvs/*.c 
except the ../include/net/ip_vs.h, which would carry all the needed 
header includes.

Signed-off-by: Roberto Nibali <ratz@drugphish.ch>

Best regards,
Roberto Nibali, ratz
-- 
echo 
'[q]sa[ln0=aln256%Pln256/snlbx]sb3135071790101768542287578439snlbxq' | dc

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

diff --git a/net/ipv4/ipvs/ip_vs_app.c b/net/ipv4/ipvs/ip_vs_app.c
index 9b176a9..9f5676b 100644
--- a/net/ipv4/ipvs/ip_vs_app.c
+++ b/net/ipv4/ipvs/ip_vs_app.c
@@ -20,17 +20,9 @@
  *
  */
 
-#include <linux/module.h>
-#include <linux/kernel.h>
 #include <linux/skbuff.h>
-#include <linux/in.h>
-#include <linux/ip.h>
-#include <net/protocol.h>
 #include <net/tcp.h>
-#include <asm/system.h>
-#include <linux/stat.h>
 #include <linux/proc_fs.h>
-#include <linux/seq_file.h>
 
 #include <net/ip_vs.h>
 
diff --git a/net/ipv4/ipvs/ip_vs_conn.c b/net/ipv4/ipvs/ip_vs_conn.c
index 87b8381..b3e8dc5 100644
--- a/net/ipv4/ipvs/ip_vs_conn.c
+++ b/net/ipv4/ipvs/ip_vs_conn.c
@@ -24,14 +24,11 @@
  *
  */
 
-#include <linux/interrupt.h>
 #include <linux/in.h>
 #include <linux/net.h>
-#include <linux/kernel.h>
-#include <linux/module.h>
+#include <linux/slab.h>
 #include <linux/vmalloc.h>
-#include <linux/proc_fs.h>		/* for proc_net_* */
-#include <linux/seq_file.h>
+#include <linux/proc_fs.h>
 #include <linux/jhash.h>
 #include <linux/random.h>
 
diff --git a/net/ipv4/ipvs/ip_vs_core.c b/net/ipv4/ipvs/ip_vs_core.c
index 3f47ad8..927fbc0 100644
--- a/net/ipv4/ipvs/ip_vs_core.c
+++ b/net/ipv4/ipvs/ip_vs_core.c
@@ -26,19 +26,13 @@
  *
  */
 
-#include <linux/module.h>
-#include <linux/kernel.h>
-#include <linux/ip.h>
 #include <linux/tcp.h>
 #include <linux/icmp.h>
 
 #include <net/ip.h>
-#include <net/tcp.h>
-#include <net/udp.h>
 #include <net/icmp.h>                   /* for icmp_send */
-#include <net/route.h>
+#include <net/route.h>			/* for inet_addr_type */
 
-#include <linux/netfilter.h>
 #include <linux/netfilter_ipv4.h>
 
 #include <net/ip_vs.h>
diff --git a/net/ipv4/ipvs/ip_vs_ctl.c b/net/ipv4/ipvs/ip_vs_ctl.c
index 7f0288b..a130c5f 100644
--- a/net/ipv4/ipvs/ip_vs_ctl.c
+++ b/net/ipv4/ipvs/ip_vs_ctl.c
@@ -20,26 +20,14 @@
  *
  */
 
-#include <linux/module.h>
-#include <linux/init.h>
-#include <linux/types.h>
-#include <linux/capability.h>
-#include <linux/fs.h>
-#include <linux/sysctl.h>
 #include <linux/proc_fs.h>
-#include <linux/workqueue.h>
-#include <linux/swap.h>
-#include <linux/proc_fs.h>
-#include <linux/seq_file.h>
-
-#include <linux/netfilter.h>
 #include <linux/netfilter_ipv4.h>
 
 #include <net/ip.h>
 #include <net/route.h>
 #include <net/sock.h>
 
-#include <asm/uaccess.h>
+//#include <asm/uaccess.h>
 
 #include <net/ip_vs.h>
 
diff --git a/net/ipv4/ipvs/ip_vs_dh.c b/net/ipv4/ipvs/ip_vs_dh.c
index 9fee19c..e40998c 100644
--- a/net/ipv4/ipvs/ip_vs_dh.c
+++ b/net/ipv4/ipvs/ip_vs_dh.c
@@ -38,8 +38,6 @@
  */
 
 #include <linux/ip.h>
-#include <linux/module.h>
-#include <linux/kernel.h>
 #include <linux/skbuff.h>
 
 #include <net/ip_vs.h>
diff --git a/net/ipv4/ipvs/ip_vs_est.c b/net/ipv4/ipvs/ip_vs_est.c
index c453e1e..ce3d3c3 100644
--- a/net/ipv4/ipvs/ip_vs_est.c
+++ b/net/ipv4/ipvs/ip_vs_est.c
@@ -13,12 +13,8 @@
  * Changes:
  *
  */
-#include <linux/config.h>
-#include <linux/kernel.h>
 #include <linux/jiffies.h>
 #include <linux/slab.h>
-#include <linux/types.h>
-#include <linux/interrupt.h>
 
 #include <net/ip_vs.h>
 
diff --git a/net/ipv4/ipvs/ip_vs_ftp.c b/net/ipv4/ipvs/ip_vs_ftp.c
index a19a33c..ab730b1 100644
--- a/net/ipv4/ipvs/ip_vs_ftp.c
+++ b/net/ipv4/ipvs/ip_vs_ftp.c
@@ -24,13 +24,7 @@
  *
  */
 
-#include <linux/module.h>
-#include <linux/moduleparam.h>
-#include <linux/kernel.h>
 #include <linux/skbuff.h>
-#include <linux/in.h>
-#include <linux/ip.h>
-#include <net/protocol.h>
 #include <net/tcp.h>
 
 #include <net/ip_vs.h>
diff --git a/net/ipv4/ipvs/ip_vs_lblc.c b/net/ipv4/ipvs/ip_vs_lblc.c
index 6e5cb92..ae51ae8 100644
--- a/net/ipv4/ipvs/ip_vs_lblc.c
+++ b/net/ipv4/ipvs/ip_vs_lblc.c
@@ -42,14 +42,8 @@
  */
 
 #include <linux/ip.h>
-#include <linux/module.h>
-#include <linux/kernel.h>
 #include <linux/skbuff.h>
 
-/* for sysctl */
-#include <linux/fs.h>
-#include <linux/sysctl.h>
-
 #include <net/ip_vs.h>
 
 
diff --git a/net/ipv4/ipvs/ip_vs_lblcr.c b/net/ipv4/ipvs/ip_vs_lblcr.c
index 32ba37b..ebe05a8 100644
--- a/net/ipv4/ipvs/ip_vs_lblcr.c
+++ b/net/ipv4/ipvs/ip_vs_lblcr.c
@@ -40,16 +40,8 @@
  */
 
 #include <linux/ip.h>
-#include <linux/module.h>
-#include <linux/kernel.h>
 #include <linux/skbuff.h>
 
-/* for sysctl */
-#include <linux/fs.h>
-#include <linux/sysctl.h>
-/* for proc_net_create/proc_net_remove */
-#include <linux/proc_fs.h>
-
 #include <net/ip_vs.h>
 
 
diff --git a/net/ipv4/ipvs/ip_vs_lc.c b/net/ipv4/ipvs/ip_vs_lc.c
index d88fef9..db63c0f 100644
--- a/net/ipv4/ipvs/ip_vs_lc.c
+++ b/net/ipv4/ipvs/ip_vs_lc.c
@@ -17,7 +17,6 @@
  */
 
 #include <linux/module.h>
-#include <linux/kernel.h>
 
 #include <net/ip_vs.h>
 
diff --git a/net/ipv4/ipvs/ip_vs_nq.c b/net/ipv4/ipvs/ip_vs_nq.c
index bc2a9e5..f1b4341 100644
--- a/net/ipv4/ipvs/ip_vs_nq.c
+++ b/net/ipv4/ipvs/ip_vs_nq.c
@@ -34,7 +34,6 @@
  */
 
 #include <linux/module.h>
-#include <linux/kernel.h>
 
 #include <net/ip_vs.h>
 
diff --git a/net/ipv4/ipvs/ip_vs_proto.c b/net/ipv4/ipvs/ip_vs_proto.c
index 867d4e9..9084338 100644
--- a/net/ipv4/ipvs/ip_vs_proto.c
+++ b/net/ipv4/ipvs/ip_vs_proto.c
@@ -15,17 +15,8 @@
  *
  */
 
-#include <linux/module.h>
-#include <linux/kernel.h>
 #include <linux/skbuff.h>
-#include <linux/in.h>
-#include <linux/ip.h>
-#include <net/protocol.h>
 #include <net/tcp.h>
-#include <net/udp.h>
-#include <asm/system.h>
-#include <linux/stat.h>
-#include <linux/proc_fs.h>
 
 #include <net/ip_vs.h>
 
diff --git a/net/ipv4/ipvs/ip_vs_proto_ah.c b/net/ipv4/ipvs/ip_vs_proto_ah.c
index 8b0505b..cb95f58 100644
--- a/net/ipv4/ipvs/ip_vs_proto_ah.c
+++ b/net/ipv4/ipvs/ip_vs_proto_ah.c
@@ -14,9 +14,6 @@
 
 #include <linux/in.h>
 #include <linux/ip.h>
-#include <linux/module.h>
-#include <linux/kernel.h>
-#include <linux/netfilter.h>
 #include <linux/netfilter_ipv4.h>
 
 #include <net/ip_vs.h>
diff --git a/net/ipv4/ipvs/ip_vs_proto_esp.c b/net/ipv4/ipvs/ip_vs_proto_esp.c
index c36ccf0..bcbad11 100644
--- a/net/ipv4/ipvs/ip_vs_proto_esp.c
+++ b/net/ipv4/ipvs/ip_vs_proto_esp.c
@@ -14,9 +14,6 @@
 
 #include <linux/in.h>
 #include <linux/ip.h>
-#include <linux/module.h>
-#include <linux/kernel.h>
-#include <linux/netfilter.h>
 #include <linux/netfilter_ipv4.h>
 
 #include <net/ip_vs.h>
diff --git a/net/ipv4/ipvs/ip_vs_proto_tcp.c b/net/ipv4/ipvs/ip_vs_proto_tcp.c
index bc28b11..deb98e7 100644
--- a/net/ipv4/ipvs/ip_vs_proto_tcp.c
+++ b/net/ipv4/ipvs/ip_vs_proto_tcp.c
@@ -15,11 +15,7 @@
  *
  */
 
-#include <linux/kernel.h>
-#include <linux/ip.h>
-#include <linux/tcp.h>                  /* for tcphdr */
-#include <net/ip.h>
-#include <net/tcp.h>                    /* for csum_tcpudp_magic */
+#include <net/tcp.h>
 #include <linux/netfilter_ipv4.h>
 
 #include <net/ip_vs.h>
diff --git a/net/ipv4/ipvs/ip_vs_proto_udp.c b/net/ipv4/ipvs/ip_vs_proto_udp.c
index 89d9175..7ffd5c2 100644
--- a/net/ipv4/ipvs/ip_vs_proto_udp.c
+++ b/net/ipv4/ipvs/ip_vs_proto_udp.c
@@ -17,9 +17,8 @@
 
 #include <linux/in.h>
 #include <linux/ip.h>
-#include <linux/kernel.h>
-#include <linux/netfilter_ipv4.h>
 #include <linux/udp.h>
+#include <linux/netfilter_ipv4.h>
 
 #include <net/ip_vs.h>
 
diff --git a/net/ipv4/ipvs/ip_vs_rr.c b/net/ipv4/ipvs/ip_vs_rr.c
index b23bab2..00ebed8 100644
--- a/net/ipv4/ipvs/ip_vs_rr.c
+++ b/net/ipv4/ipvs/ip_vs_rr.c
@@ -22,7 +22,6 @@
  */
 
 #include <linux/module.h>
-#include <linux/kernel.h>
 
 #include <net/ip_vs.h>
 
diff --git a/net/ipv4/ipvs/ip_vs_sched.c b/net/ipv4/ipvs/ip_vs_sched.c
index 8bc42b7..8abc2e9 100644
--- a/net/ipv4/ipvs/ip_vs_sched.c
+++ b/net/ipv4/ipvs/ip_vs_sched.c
@@ -20,11 +20,6 @@
  */
 
 #include <linux/module.h>
-#include <linux/sched.h>
-#include <linux/spinlock.h>
-#include <linux/interrupt.h>
-#include <asm/string.h>
-#include <linux/kmod.h>
 
 #include <net/ip_vs.h>
 
diff --git a/net/ipv4/ipvs/ip_vs_sed.c b/net/ipv4/ipvs/ip_vs_sed.c
index ff366f7..8269e6c 100644
--- a/net/ipv4/ipvs/ip_vs_sed.c
+++ b/net/ipv4/ipvs/ip_vs_sed.c
@@ -38,7 +38,6 @@
  */
 
 #include <linux/module.h>
-#include <linux/kernel.h>
 
 #include <net/ip_vs.h>
 
diff --git a/net/ipv4/ipvs/ip_vs_sh.c b/net/ipv4/ipvs/ip_vs_sh.c
index 7775e6c..878c63f 100644
--- a/net/ipv4/ipvs/ip_vs_sh.c
+++ b/net/ipv4/ipvs/ip_vs_sh.c
@@ -35,8 +35,6 @@
  */
 
 #include <linux/ip.h>
-#include <linux/module.h>
-#include <linux/kernel.h>
 #include <linux/skbuff.h>
 
 #include <net/ip_vs.h>
diff --git a/net/ipv4/ipvs/ip_vs_sync.c b/net/ipv4/ipvs/ip_vs_sync.c
index 1bca714..8d2dba4 100644
--- a/net/ipv4/ipvs/ip_vs_sync.c
+++ b/net/ipv4/ipvs/ip_vs_sync.c
@@ -19,20 +19,13 @@
  *	Justin Ossevoort	:	Fix endian problem on sync message size.
  */
 
-#include <linux/module.h>
-#include <linux/slab.h>
 #include <linux/inetdevice.h>
-#include <linux/net.h>
-#include <linux/completion.h>
 #include <linux/delay.h>
-#include <linux/skbuff.h>
-#include <linux/in.h>
 #include <linux/igmp.h>                 /* for ip_mc_join_group */
 #include <linux/udp.h>
+#include <linux/sched.h>
 
 #include <net/ip.h>
-#include <net/sock.h>
-#include <asm/uaccess.h>                /* for get_fs and set_fs */
 
 #include <net/ip_vs.h>
 
diff --git a/net/ipv4/ipvs/ip_vs_wlc.c b/net/ipv4/ipvs/ip_vs_wlc.c
index 8a9d913..6d90a7c 100644
--- a/net/ipv4/ipvs/ip_vs_wlc.c
+++ b/net/ipv4/ipvs/ip_vs_wlc.c
@@ -22,7 +22,6 @@
  */
 
 #include <linux/module.h>
-#include <linux/kernel.h>
 
 #include <net/ip_vs.h>
 
diff --git a/net/ipv4/ipvs/ip_vs_wrr.c b/net/ipv4/ipvs/ip_vs_wrr.c
index 749fa04..bfcd5fb 100644
--- a/net/ipv4/ipvs/ip_vs_wrr.c
+++ b/net/ipv4/ipvs/ip_vs_wrr.c
@@ -21,7 +21,6 @@
  */
 
 #include <linux/module.h>
-#include <linux/kernel.h>
 
 #include <net/ip_vs.h>
 
diff --git a/net/ipv4/ipvs/ip_vs_xmit.c b/net/ipv4/ipvs/ip_vs_xmit.c
index 52c12e9..19d85e3 100644
--- a/net/ipv4/ipvs/ip_vs_xmit.c
+++ b/net/ipv4/ipvs/ip_vs_xmit.c
@@ -15,14 +15,9 @@
  *
  */
 
-#include <linux/kernel.h>
-#include <linux/ip.h>
-#include <linux/tcp.h>                  /* for tcphdr */
-#include <net/tcp.h>                    /* for csum_tcpudp_magic */
-#include <net/udp.h>
+#include <net/ip.h>
 #include <net/icmp.h>                   /* for icmp_send */
 #include <net/route.h>                  /* for ip_route_output */
-#include <linux/netfilter.h>
 #include <linux/netfilter_ipv4.h>
 
 #include <net/ip_vs.h>

[-- Attachment #3: Type: text/plain, Size: 0 bytes --]



^ permalink raw reply related

* Re: [2.6 patch] wrong firmware location in IPW2100 Kconfig entry
From: Zhu Yi @ 2006-02-06  7:02 UTC (permalink / raw)
  To: Adrian Bunk; +Cc: linville, netdev, Jesper Juhl, linux-kernel, jketreno
In-Reply-To: <20060131161124.GA3986@stusta.de>

On Tue, 2006-01-31 at 17:11 +0100, Adrian Bunk wrote:
> From: Jesper Juhl <jesper.juhl@gmail.com>
> 
> Firmware should go into /lib/firmware, not /etc/firmware.
> 
> Found by Alejandro Bonilla.
> 
> 
> Signed-off-by: Jesper Juhl <jesper.juhl@gmail.com>
> Signed-off-by: Adrian Bunk <bunk@stusta.de>

Acked-by: Zhu Yi <yi.zhu@intel.com>

Thanks,
-yi

^ permalink raw reply

* Re: [2.6 patch] let IPW2{1,2}00 select IEEE80211
From: Zhu Yi @ 2006-02-06  7:02 UTC (permalink / raw)
  To: Adrian Bunk; +Cc: jketreno, linville, netdev, linux-kernel, Jan Niehusmann
In-Reply-To: <20060205151322.GE5271@stusta.de>

On Sun, 2006-02-05 at 16:13 +0100, Adrian Bunk wrote:
> From: Jan Niehusmann <jan@gondor.com>
> 
> This patch makes the IPW2100 and IPW2200 options available in
> the configuration menu even if IEEE80211 has not been selected before.
> This behaviour is more intuitive for people which are not familiar with
> the driver internals.
> The suggestion for this change was made by Alejandro Bonilla Beeche.
> 
> Signed-off-by: Jan Niehusmann <jan@gondor.com>
> Signed-off-by: Adrian Bunk <bunk@stusta.de>

Acked-by: Zhu Yi <yi.zhu@intel.com>

Thanks,
-yi

^ permalink raw reply

* Re: [PATCH] acx: Transform semaphore to mutex
From: Denis Vlasenko @ 2006-02-06  7:04 UTC (permalink / raw)
  To: acx100-devel; +Cc: Carlos Martín, netdev
In-Reply-To: <200602051656.57214.carlos@cmartin.tk>

On Sunday 05 February 2006 17:56, Carlos Martín wrote:
> Hi,
> 
>  The attached patch transform the semaphore to a mutex. That's how we use it, 
> it's faster and makes the binary smaller. It also deletes the semaphore debug 
> functions because I the kernel takes care of that now. Just yell if I've 
> misunderstood.
> 
>    text    data     bss     dec     hex filename
>  113475    1520      20  115015   1c147 acx.ko-sem
>  111033    1520      20  112573   1b7bd acx.ko
> 
> This only works for newer kernels, so I suppose it could be kept as an 
> into-mainline patch. People with newer kernels probably want this patch.

http://195.66.192.167/linux/acx_patches/acx-sem-to-mutex.patch

Thanks!
--
vda


-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid\x103432&bid#0486&dat\x121642

^ permalink raw reply

* Re: [PATCH][RFC] Shrink ip_vs_*.c includes
From: Horms @ 2006-02-06  9:13 UTC (permalink / raw)
  To: Roberto Nibali; +Cc: LinuxVirtualServer.org users mailing list., netdev
In-Reply-To: <43E69CE1.2030204@drugphish.ch>

On Mon, Feb 06, 2006 at 01:48:33AM +0100, Roberto Nibali wrote:
> Hello,
> 
> This patch against the latest GIT HEAD reduces the includes to the 
> necessary ones. I've compile-tested it against following (and s/y/m/) 
> configuration on x86:
> 
> CONFIG_IP_VS=y
> CONFIG_IP_VS_DEBUG=y
> CONFIG_IP_VS_TAB_BITS=12
> CONFIG_IP_VS_PROTO_TCP=y
> CONFIG_IP_VS_PROTO_UDP=y
> CONFIG_IP_VS_PROTO_ESP=y
> CONFIG_IP_VS_PROTO_AH=y
> CONFIG_IP_VS_RR=y
> CONFIG_IP_VS_WRR=y
> CONFIG_IP_VS_LC=y
> CONFIG_IP_VS_WLC=y
> CONFIG_IP_VS_LBLC=y
> CONFIG_IP_VS_LBLCR=y
> CONFIG_IP_VS_DH=y
> CONFIG_IP_VS_SH=y
> CONFIG_IP_VS_SED=y
> CONFIG_IP_VS_NQ=y
> CONFIG_IP_VS_FTP=y
> 
> Please consider applying (but test it first on your local tree since we 
> don't want stupid breakage resulting from such changes).
> 
> Alternatively/additionally I could envision a patch on top of this one 
> that completely removes the includes from the ../net/ipv4/ipvs/*.c 
> except the ../include/net/ip_vs.h, which would carry all the needed 
> header includes.

Hi Rats, 

I'm all for this patch, but I get horrible breakage with the following
config (I can give the rest if you need it).

CONFIG_IP_VS=m
# CONFIG_IP_VS_DEBUG is not set
CONFIG_IP_VS_TAB_BITS=12
CONFIG_IP_VS_PROTO_TCP=y
CONFIG_IP_VS_PROTO_UDP=y
CONFIG_IP_VS_PROTO_ESP=y
CONFIG_IP_VS_PROTO_AH=y
CONFIG_IP_VS_RR=m
CONFIG_IP_VS_WRR=m
CONFIG_IP_VS_LC=m
CONFIG_IP_VS_WLC=m
CONFIG_IP_VS_LBLC=m
CONFIG_IP_VS_LBLCR=m
CONFIG_IP_VS_DH=m
CONFIG_IP_VS_SH=m
CONFIG_IP_VS_SED=m
CONFIG_IP_VS_NQ=m
CONFIG_IP_VS_FTP=m

# make
  CHK     include/linux/version.h
  CHK     include/linux/compile.h
  CHK     usr/initramfs_list
  CC [M]  net/ipv4/ipvs/ip_vs_conn.o
net/ipv4/ipvs/ip_vs_conn.c: In function 'ip_vs_conn_array':
net/ipv4/ipvs/ip_vs_conn.c:672: error: dereferencing pointer to incomplete type
net/ipv4/ipvs/ip_vs_conn.c: In function 'ip_vs_conn_seq_start':
net/ipv4/ipvs/ip_vs_conn.c:684: error: dereferencing pointer to incomplete type
net/ipv4/ipvs/ip_vs_conn.c:685: error: 'SEQ_START_TOKEN' undeclared (first use in this function)
net/ipv4/ipvs/ip_vs_conn.c:685: error: (Each undeclared identifier is reported only once
net/ipv4/ipvs/ip_vs_conn.c:685: error: for each function it appears in.)
net/ipv4/ipvs/ip_vs_conn.c: In function 'ip_vs_conn_seq_next':
net/ipv4/ipvs/ip_vs_conn.c:691: error: dereferencing pointer to incomplete type
net/ipv4/ipvs/ip_vs_conn.c:695: error: 'SEQ_START_TOKEN' undeclared (first use in this function)
net/ipv4/ipvs/ip_vs_conn.c:708: error: dereferencing pointer to incomplete type
net/ipv4/ipvs/ip_vs_conn.c:713: error: dereferencing pointer to incomplete type
net/ipv4/ipvs/ip_vs_conn.c: In function 'ip_vs_conn_seq_stop':
net/ipv4/ipvs/ip_vs_conn.c:719: error: dereferencing pointer to incomplete type
net/ipv4/ipvs/ip_vs_conn.c: In function 'ip_vs_conn_seq_show':
net/ipv4/ipvs/ip_vs_conn.c:728: error: 'SEQ_START_TOKEN' undeclared (first use in this function)
net/ipv4/ipvs/ip_vs_conn.c:729: warning: implicit declaration of function 'seq_puts'
net/ipv4/ipvs/ip_vs_conn.c:734: warning: implicit declaration of function 'seq_printf'
net/ipv4/ipvs/ip_vs_conn.c: At top level:
net/ipv4/ipvs/ip_vs_conn.c:746: error: variable 'ip_vs_conn_seq_ops' has initializer but incomplete type
net/ipv4/ipvs/ip_vs_conn.c:747: error: unknown field 'start' specified in initializer
net/ipv4/ipvs/ip_vs_conn.c:747: warning: excess elements in struct initializer
net/ipv4/ipvs/ip_vs_conn.c:747: warning: (near initialization for 'ip_vs_conn_seq_ops')
net/ipv4/ipvs/ip_vs_conn.c:748: error: unknown field 'next' specified in initializer
net/ipv4/ipvs/ip_vs_conn.c:748: warning: excess elements in struct initializer
net/ipv4/ipvs/ip_vs_conn.c:748: warning: (near initialization for 'ip_vs_conn_seq_ops')
net/ipv4/ipvs/ip_vs_conn.c:749: error: unknown field 'stop' specified in initializer
net/ipv4/ipvs/ip_vs_conn.c:749: warning: excess elements in struct initializer
net/ipv4/ipvs/ip_vs_conn.c:749: warning: (near initialization for 'ip_vs_conn_seq_ops')
net/ipv4/ipvs/ip_vs_conn.c:750: error: unknown field 'show' specified in initializer
net/ipv4/ipvs/ip_vs_conn.c:750: warning: excess elements in struct initializer
net/ipv4/ipvs/ip_vs_conn.c:750: warning: (near initialization for 'ip_vs_conn_seq_ops')
net/ipv4/ipvs/ip_vs_conn.c: In function 'ip_vs_conn_open':
net/ipv4/ipvs/ip_vs_conn.c:755: warning: implicit declaration of function 'seq_open'
net/ipv4/ipvs/ip_vs_conn.c: At top level:
net/ipv4/ipvs/ip_vs_conn.c:759: error: 'THIS_MODULE' undeclared here (not in a function)
net/ipv4/ipvs/ip_vs_conn.c:761: error: 'seq_read' undeclared here (not in a function)
net/ipv4/ipvs/ip_vs_conn.c:762: error: 'seq_lseek' undeclared here (not in a function)
net/ipv4/ipvs/ip_vs_conn.c:763: error: 'seq_release' undeclared here (not in a function)
make[3]: *** [net/ipv4/ipvs/ip_vs_conn.o] Error 1
make[2]: *** [net/ipv4/ipvs] Error 2
make[1]: *** [net/ipv4] Error 2
make: *** [net] Error 2

-- 
Horms

^ permalink raw reply

* Re: [PATCH][RFC] Shrink ip_vs_*.c includes
From: Roberto Nibali @ 2006-02-06  9:26 UTC (permalink / raw)
  To: Roberto Nibali, netdev, lvs-users
In-Reply-To: <20060206091319.GH27206@verge.net.au>

> Hi Rats, 
> 
> I'm all for this patch, but I get horrible breakage with the following
> config (I can give the rest if you need it).

Darn!

> CONFIG_IP_VS=m
> # CONFIG_IP_VS_DEBUG is not set
> CONFIG_IP_VS_TAB_BITS=12
> CONFIG_IP_VS_PROTO_TCP=y
> CONFIG_IP_VS_PROTO_UDP=y
> CONFIG_IP_VS_PROTO_ESP=y
> CONFIG_IP_VS_PROTO_AH=y
> CONFIG_IP_VS_RR=m
> CONFIG_IP_VS_WRR=m
> CONFIG_IP_VS_LC=m
> CONFIG_IP_VS_WLC=m
> CONFIG_IP_VS_LBLC=m
> CONFIG_IP_VS_LBLCR=m
> CONFIG_IP_VS_DH=m
> CONFIG_IP_VS_SH=m
> CONFIG_IP_VS_SED=m
> CONFIG_IP_VS_NQ=m
> CONFIG_IP_VS_FTP=m

Ok, this is m/y mixed. Haven't tried it yet.

> # make
>   CHK     include/linux/version.h
>   CHK     include/linux/compile.h
>   CHK     usr/initramfs_list
>   CC [M]  net/ipv4/ipvs/ip_vs_conn.o
> net/ipv4/ipvs/ip_vs_conn.c: In function 'ip_vs_conn_array':
> net/ipv4/ipvs/ip_vs_conn.c:672: error: dereferencing pointer to incomplete type
> net/ipv4/ipvs/ip_vs_conn.c: In function 'ip_vs_conn_seq_start':
> net/ipv4/ipvs/ip_vs_conn.c:684: error: dereferencing pointer to incomplete type
> net/ipv4/ipvs/ip_vs_conn.c:685: error: 'SEQ_START_TOKEN' undeclared (first use in this function)
> net/ipv4/ipvs/ip_vs_conn.c:685: error: (Each undeclared identifier is reported only once
> net/ipv4/ipvs/ip_vs_conn.c:685: error: for each function it appears in.)
> net/ipv4/ipvs/ip_vs_conn.c: In function 'ip_vs_conn_seq_next':
> net/ipv4/ipvs/ip_vs_conn.c:691: error: dereferencing pointer to incomplete type
> net/ipv4/ipvs/ip_vs_conn.c:695: error: 'SEQ_START_TOKEN' undeclared (first use in this function)
> net/ipv4/ipvs/ip_vs_conn.c:708: error: dereferencing pointer to incomplete type
> net/ipv4/ipvs/ip_vs_conn.c:713: error: dereferencing pointer to incomplete type
> net/ipv4/ipvs/ip_vs_conn.c: In function 'ip_vs_conn_seq_stop':
> net/ipv4/ipvs/ip_vs_conn.c:719: error: dereferencing pointer to incomplete type
> net/ipv4/ipvs/ip_vs_conn.c: In function 'ip_vs_conn_seq_show':
> net/ipv4/ipvs/ip_vs_conn.c:728: error: 'SEQ_START_TOKEN' undeclared (first use in this function)
> net/ipv4/ipvs/ip_vs_conn.c:729: warning: implicit declaration of function 'seq_puts'
> net/ipv4/ipvs/ip_vs_conn.c:734: warning: implicit declaration of function 'seq_printf'
> net/ipv4/ipvs/ip_vs_conn.c: At top level:
> net/ipv4/ipvs/ip_vs_conn.c:746: error: variable 'ip_vs_conn_seq_ops' has initializer but incomplete type
> net/ipv4/ipvs/ip_vs_conn.c:747: error: unknown field 'start' specified in initializer
> net/ipv4/ipvs/ip_vs_conn.c:747: warning: excess elements in struct initializer
> net/ipv4/ipvs/ip_vs_conn.c:747: warning: (near initialization for 'ip_vs_conn_seq_ops')
> net/ipv4/ipvs/ip_vs_conn.c:748: error: unknown field 'next' specified in initializer
> net/ipv4/ipvs/ip_vs_conn.c:748: warning: excess elements in struct initializer
> net/ipv4/ipvs/ip_vs_conn.c:748: warning: (near initialization for 'ip_vs_conn_seq_ops')
> net/ipv4/ipvs/ip_vs_conn.c:749: error: unknown field 'stop' specified in initializer
> net/ipv4/ipvs/ip_vs_conn.c:749: warning: excess elements in struct initializer
> net/ipv4/ipvs/ip_vs_conn.c:749: warning: (near initialization for 'ip_vs_conn_seq_ops')
> net/ipv4/ipvs/ip_vs_conn.c:750: error: unknown field 'show' specified in initializer
> net/ipv4/ipvs/ip_vs_conn.c:750: warning: excess elements in struct initializer
> net/ipv4/ipvs/ip_vs_conn.c:750: warning: (near initialization for 'ip_vs_conn_seq_ops')
> net/ipv4/ipvs/ip_vs_conn.c: In function 'ip_vs_conn_open':
> net/ipv4/ipvs/ip_vs_conn.c:755: warning: implicit declaration of function 'seq_open'
> net/ipv4/ipvs/ip_vs_conn.c: At top level:
> net/ipv4/ipvs/ip_vs_conn.c:759: error: 'THIS_MODULE' undeclared here (not in a function)
> net/ipv4/ipvs/ip_vs_conn.c:761: error: 'seq_read' undeclared here (not in a function)
> net/ipv4/ipvs/ip_vs_conn.c:762: error: 'seq_lseek' undeclared here (not in a function)
> net/ipv4/ipvs/ip_vs_conn.c:763: error: 'seq_release' undeclared here (not in a function)
> make[3]: *** [net/ipv4/ipvs/ip_vs_conn.o] Error 1
> make[2]: *** [net/ipv4/ipvs] Error 2
> make[1]: *** [net/ipv4] Error 2
> make: *** [net] Error 2
> 

I'll reproduce it with your config. I didn't think of trying it with
mixed y/m settings. Following include is missing then:

#include <linux/seq_file.h>

Or do you think we could put all the needed includes into ip_vs.h and
simply be done with it?

Best regards,
Roberto Nibali, ratz
-- 
-------------------------------------------------------------
addr://Kasinostrasse 30, CH-5001 Aarau tel://++41 62 823 9355
http://www.terreactive.com             fax://++41 62 823 9356
-------------------------------------------------------------
10 Jahre Kompetenz in IT-Sicherheit.              1996 - 2006
Wir sichern Ihren Erfolg.                      terreActive AG
-------------------------------------------------------------

^ permalink raw reply

* Re: [PATCH][RFC] Shrink ip_vs_*.c includes
From: Horms @ 2006-02-06 10:09 UTC (permalink / raw)
  To: lvs-users; +Cc: netdev
In-Reply-To: <43E7163D.7080506@tac.ch>

In gmane.comp.linux.lvs.user Roberto Nibali <ratz@tac.ch> wrote:
>> Hi Rats, 
>> 
>> I'm all for this patch, but I get horrible breakage with the following
>> config (I can give the rest if you need it).
> 
> Darn!
> 
>> CONFIG_IP_VS=m
>> # CONFIG_IP_VS_DEBUG is not set
>> CONFIG_IP_VS_TAB_BITS=12
>> CONFIG_IP_VS_PROTO_TCP=y
>> CONFIG_IP_VS_PROTO_UDP=y
>> CONFIG_IP_VS_PROTO_ESP=y
>> CONFIG_IP_VS_PROTO_AH=y
>> CONFIG_IP_VS_RR=m
>> CONFIG_IP_VS_WRR=m
>> CONFIG_IP_VS_LC=m
>> CONFIG_IP_VS_WLC=m
>> CONFIG_IP_VS_LBLC=m
>> CONFIG_IP_VS_LBLCR=m
>> CONFIG_IP_VS_DH=m
>> CONFIG_IP_VS_SH=m
>> CONFIG_IP_VS_SED=m
>> CONFIG_IP_VS_NQ=m
>> CONFIG_IP_VS_FTP=m
> 
> Ok, this is m/y mixed. Haven't tried it yet.

Actually, I think that its completely modular.

[snip]

> I'll reproduce it with your config. I didn't think of trying it with
> mixed y/m settings. Following include is missing then:
> 
> #include <linux/seq_file.h>

Thanks, I found that linux/module.h was also needed.
After putting those two back into ip_vs_conn.c the build went 
find. I also tried a few other combinations, all on ia64, without issue.
My diff is below. Could you recheck it?

> Or do you think we could put all the needed includes into ip_vs.h and
> simply be done with it?

I spoke breifly with Dave about this, and he isn't very keen on it.
The problem with that approach, is that while its less work to
maintain the headers by hand, it will likely result in uneeded
includes in some cases. So all of LVS will get built when
a given header is touched, where perhaps only half of it needed
to be built. So with that in mind, could you continue in the vein of
your original patch?

-- 
Horms

Hello,

This patch against the latest GIT HEAD reduces the includes to the
necessary ones. I've compile-tested it against following (and s/y/m/)
configuration on x86:

CONFIG_IP_VS=y
CONFIG_IP_VS_DEBUG=y
CONFIG_IP_VS_TAB_BITS=12
CONFIG_IP_VS_PROTO_TCP=y
CONFIG_IP_VS_PROTO_UDP=y
CONFIG_IP_VS_PROTO_ESP=y
CONFIG_IP_VS_PROTO_AH=y
CONFIG_IP_VS_RR=y
CONFIG_IP_VS_WRR=y
CONFIG_IP_VS_LC=y
CONFIG_IP_VS_WLC=y
CONFIG_IP_VS_LBLC=y
CONFIG_IP_VS_LBLCR=y
CONFIG_IP_VS_DH=y
CONFIG_IP_VS_SH=y
CONFIG_IP_VS_SED=y
CONFIG_IP_VS_NQ=y
CONFIG_IP_VS_FTP=y

Please consider applying (but test it first on your local tree since we
don't want stupid breakage resulting from such changes).

Alternatively/additionally I could envision a patch on top of this one
that completely removes the includes from the ../net/ipv4/ipvs/*.c
except the ../include/net/ip_vs.h, which would carry all the needed
header includes.

Signed-off-by: Roberto Nibali <ratz@drugphish.ch>
Signed-off-by: Horms <horms@verge.net.au>


diff --git a/net/ipv4/ipvs/ip_vs_app.c b/net/ipv4/ipvs/ip_vs_app.c
index 9b176a9..9f5676b 100644
--- a/net/ipv4/ipvs/ip_vs_app.c
+++ b/net/ipv4/ipvs/ip_vs_app.c
@@ -20,17 +20,9 @@
  *
  */
 
-#include <linux/module.h>
-#include <linux/kernel.h>
 #include <linux/skbuff.h>
-#include <linux/in.h>
-#include <linux/ip.h>
-#include <net/protocol.h>
 #include <net/tcp.h>
-#include <asm/system.h>
-#include <linux/stat.h>
 #include <linux/proc_fs.h>
-#include <linux/seq_file.h>
 
 #include <net/ip_vs.h>
 
diff --git a/net/ipv4/ipvs/ip_vs_conn.c b/net/ipv4/ipvs/ip_vs_conn.c
index 87b8381..157b9ad 100644
--- a/net/ipv4/ipvs/ip_vs_conn.c
+++ b/net/ipv4/ipvs/ip_vs_conn.c
@@ -24,13 +24,12 @@
  *
  */
 
-#include <linux/interrupt.h>
 #include <linux/in.h>
 #include <linux/net.h>
-#include <linux/kernel.h>
 #include <linux/module.h>
+#include <linux/slab.h>
 #include <linux/vmalloc.h>
-#include <linux/proc_fs.h>		/* for proc_net_* */
+#include <linux/proc_fs.h>
 #include <linux/seq_file.h>
 #include <linux/jhash.h>
 #include <linux/random.h>
diff --git a/net/ipv4/ipvs/ip_vs_core.c b/net/ipv4/ipvs/ip_vs_core.c
index 3f47ad8..927fbc0 100644
--- a/net/ipv4/ipvs/ip_vs_core.c
+++ b/net/ipv4/ipvs/ip_vs_core.c
@@ -26,19 +26,13 @@
  *
  */
 
-#include <linux/module.h>
-#include <linux/kernel.h>
-#include <linux/ip.h>
 #include <linux/tcp.h>
 #include <linux/icmp.h>
 
 #include <net/ip.h>
-#include <net/tcp.h>
-#include <net/udp.h>
 #include <net/icmp.h>                   /* for icmp_send */
-#include <net/route.h>
+#include <net/route.h>			/* for inet_addr_type */
 
-#include <linux/netfilter.h>
 #include <linux/netfilter_ipv4.h>
 
 #include <net/ip_vs.h>
diff --git a/net/ipv4/ipvs/ip_vs_ctl.c b/net/ipv4/ipvs/ip_vs_ctl.c
index 7f0288b..a130c5f 100644
--- a/net/ipv4/ipvs/ip_vs_ctl.c
+++ b/net/ipv4/ipvs/ip_vs_ctl.c
@@ -20,26 +20,14 @@
  *
  */
 
-#include <linux/module.h>
-#include <linux/init.h>
-#include <linux/types.h>
-#include <linux/capability.h>
-#include <linux/fs.h>
-#include <linux/sysctl.h>
 #include <linux/proc_fs.h>
-#include <linux/workqueue.h>
-#include <linux/swap.h>
-#include <linux/proc_fs.h>
-#include <linux/seq_file.h>
-
-#include <linux/netfilter.h>
 #include <linux/netfilter_ipv4.h>
 
 #include <net/ip.h>
 #include <net/route.h>
 #include <net/sock.h>
 
-#include <asm/uaccess.h>
+//#include <asm/uaccess.h>
 
 #include <net/ip_vs.h>
 
diff --git a/net/ipv4/ipvs/ip_vs_dh.c b/net/ipv4/ipvs/ip_vs_dh.c
index 9fee19c..e40998c 100644
--- a/net/ipv4/ipvs/ip_vs_dh.c
+++ b/net/ipv4/ipvs/ip_vs_dh.c
@@ -38,8 +38,6 @@
  */
 
 #include <linux/ip.h>
-#include <linux/module.h>
-#include <linux/kernel.h>
 #include <linux/skbuff.h>
 
 #include <net/ip_vs.h>
diff --git a/net/ipv4/ipvs/ip_vs_est.c b/net/ipv4/ipvs/ip_vs_est.c
index c453e1e..ce3d3c3 100644
--- a/net/ipv4/ipvs/ip_vs_est.c
+++ b/net/ipv4/ipvs/ip_vs_est.c
@@ -13,12 +13,8 @@
  * Changes:
  *
  */
-#include <linux/config.h>
-#include <linux/kernel.h>
 #include <linux/jiffies.h>
 #include <linux/slab.h>
-#include <linux/types.h>
-#include <linux/interrupt.h>
 
 #include <net/ip_vs.h>
 
diff --git a/net/ipv4/ipvs/ip_vs_ftp.c b/net/ipv4/ipvs/ip_vs_ftp.c
index a19a33c..ab730b1 100644
--- a/net/ipv4/ipvs/ip_vs_ftp.c
+++ b/net/ipv4/ipvs/ip_vs_ftp.c
@@ -24,13 +24,7 @@
  *
  */
 
-#include <linux/module.h>
-#include <linux/moduleparam.h>
-#include <linux/kernel.h>
 #include <linux/skbuff.h>
-#include <linux/in.h>
-#include <linux/ip.h>
-#include <net/protocol.h>
 #include <net/tcp.h>
 
 #include <net/ip_vs.h>
diff --git a/net/ipv4/ipvs/ip_vs_lblc.c b/net/ipv4/ipvs/ip_vs_lblc.c
index 6e5cb92..ae51ae8 100644
--- a/net/ipv4/ipvs/ip_vs_lblc.c
+++ b/net/ipv4/ipvs/ip_vs_lblc.c
@@ -42,14 +42,8 @@
  */
 
 #include <linux/ip.h>
-#include <linux/module.h>
-#include <linux/kernel.h>
 #include <linux/skbuff.h>
 
-/* for sysctl */
-#include <linux/fs.h>
-#include <linux/sysctl.h>
-
 #include <net/ip_vs.h>
 
 
diff --git a/net/ipv4/ipvs/ip_vs_lblcr.c b/net/ipv4/ipvs/ip_vs_lblcr.c
index 32ba37b..ebe05a8 100644
--- a/net/ipv4/ipvs/ip_vs_lblcr.c
+++ b/net/ipv4/ipvs/ip_vs_lblcr.c
@@ -40,16 +40,8 @@
  */
 
 #include <linux/ip.h>
-#include <linux/module.h>
-#include <linux/kernel.h>
 #include <linux/skbuff.h>
 
-/* for sysctl */
-#include <linux/fs.h>
-#include <linux/sysctl.h>
-/* for proc_net_create/proc_net_remove */
-#include <linux/proc_fs.h>
-
 #include <net/ip_vs.h>
 
 
diff --git a/net/ipv4/ipvs/ip_vs_lc.c b/net/ipv4/ipvs/ip_vs_lc.c
index d88fef9..db63c0f 100644
--- a/net/ipv4/ipvs/ip_vs_lc.c
+++ b/net/ipv4/ipvs/ip_vs_lc.c
@@ -17,7 +17,6 @@
  */
 
 #include <linux/module.h>
-#include <linux/kernel.h>
 
 #include <net/ip_vs.h>
 
diff --git a/net/ipv4/ipvs/ip_vs_nq.c b/net/ipv4/ipvs/ip_vs_nq.c
index bc2a9e5..f1b4341 100644
--- a/net/ipv4/ipvs/ip_vs_nq.c
+++ b/net/ipv4/ipvs/ip_vs_nq.c
@@ -34,7 +34,6 @@
  */
 
 #include <linux/module.h>
-#include <linux/kernel.h>
 
 #include <net/ip_vs.h>
 
diff --git a/net/ipv4/ipvs/ip_vs_proto.c b/net/ipv4/ipvs/ip_vs_proto.c
index 867d4e9..9084338 100644
--- a/net/ipv4/ipvs/ip_vs_proto.c
+++ b/net/ipv4/ipvs/ip_vs_proto.c
@@ -15,17 +15,8 @@
  *
  */
 
-#include <linux/module.h>
-#include <linux/kernel.h>
 #include <linux/skbuff.h>
-#include <linux/in.h>
-#include <linux/ip.h>
-#include <net/protocol.h>
 #include <net/tcp.h>
-#include <net/udp.h>
-#include <asm/system.h>
-#include <linux/stat.h>
-#include <linux/proc_fs.h>
 
 #include <net/ip_vs.h>
 
diff --git a/net/ipv4/ipvs/ip_vs_proto_ah.c b/net/ipv4/ipvs/ip_vs_proto_ah.c
index 8b0505b..cb95f58 100644
--- a/net/ipv4/ipvs/ip_vs_proto_ah.c
+++ b/net/ipv4/ipvs/ip_vs_proto_ah.c
@@ -14,9 +14,6 @@
 
 #include <linux/in.h>
 #include <linux/ip.h>
-#include <linux/module.h>
-#include <linux/kernel.h>
-#include <linux/netfilter.h>
 #include <linux/netfilter_ipv4.h>
 
 #include <net/ip_vs.h>
diff --git a/net/ipv4/ipvs/ip_vs_proto_esp.c b/net/ipv4/ipvs/ip_vs_proto_esp.c
index c36ccf0..bcbad11 100644
--- a/net/ipv4/ipvs/ip_vs_proto_esp.c
+++ b/net/ipv4/ipvs/ip_vs_proto_esp.c
@@ -14,9 +14,6 @@
 
 #include <linux/in.h>
 #include <linux/ip.h>
-#include <linux/module.h>
-#include <linux/kernel.h>
-#include <linux/netfilter.h>
 #include <linux/netfilter_ipv4.h>
 
 #include <net/ip_vs.h>
diff --git a/net/ipv4/ipvs/ip_vs_proto_tcp.c b/net/ipv4/ipvs/ip_vs_proto_tcp.c
index bc28b11..deb98e7 100644
--- a/net/ipv4/ipvs/ip_vs_proto_tcp.c
+++ b/net/ipv4/ipvs/ip_vs_proto_tcp.c
@@ -15,11 +15,7 @@
  *
  */
 
-#include <linux/kernel.h>
-#include <linux/ip.h>
-#include <linux/tcp.h>                  /* for tcphdr */
-#include <net/ip.h>
-#include <net/tcp.h>                    /* for csum_tcpudp_magic */
+#include <net/tcp.h>
 #include <linux/netfilter_ipv4.h>
 
 #include <net/ip_vs.h>
diff --git a/net/ipv4/ipvs/ip_vs_proto_udp.c b/net/ipv4/ipvs/ip_vs_proto_udp.c
index 89d9175..7ffd5c2 100644
--- a/net/ipv4/ipvs/ip_vs_proto_udp.c
+++ b/net/ipv4/ipvs/ip_vs_proto_udp.c
@@ -17,9 +17,8 @@
 
 #include <linux/in.h>
 #include <linux/ip.h>
-#include <linux/kernel.h>
-#include <linux/netfilter_ipv4.h>
 #include <linux/udp.h>
+#include <linux/netfilter_ipv4.h>
 
 #include <net/ip_vs.h>
 
diff --git a/net/ipv4/ipvs/ip_vs_rr.c b/net/ipv4/ipvs/ip_vs_rr.c
index b23bab2..00ebed8 100644
--- a/net/ipv4/ipvs/ip_vs_rr.c
+++ b/net/ipv4/ipvs/ip_vs_rr.c
@@ -22,7 +22,6 @@
  */
 
 #include <linux/module.h>
-#include <linux/kernel.h>
 
 #include <net/ip_vs.h>
 
diff --git a/net/ipv4/ipvs/ip_vs_sched.c b/net/ipv4/ipvs/ip_vs_sched.c
index 8bc42b7..8abc2e9 100644
--- a/net/ipv4/ipvs/ip_vs_sched.c
+++ b/net/ipv4/ipvs/ip_vs_sched.c
@@ -20,11 +20,6 @@
  */
 
 #include <linux/module.h>
-#include <linux/sched.h>
-#include <linux/spinlock.h>
-#include <linux/interrupt.h>
-#include <asm/string.h>
-#include <linux/kmod.h>
 
 #include <net/ip_vs.h>
 
diff --git a/net/ipv4/ipvs/ip_vs_sed.c b/net/ipv4/ipvs/ip_vs_sed.c
index ff366f7..8269e6c 100644
--- a/net/ipv4/ipvs/ip_vs_sed.c
+++ b/net/ipv4/ipvs/ip_vs_sed.c
@@ -38,7 +38,6 @@
  */
 
 #include <linux/module.h>
-#include <linux/kernel.h>
 
 #include <net/ip_vs.h>
 
diff --git a/net/ipv4/ipvs/ip_vs_sh.c b/net/ipv4/ipvs/ip_vs_sh.c
index 7775e6c..878c63f 100644
--- a/net/ipv4/ipvs/ip_vs_sh.c
+++ b/net/ipv4/ipvs/ip_vs_sh.c
@@ -35,8 +35,6 @@
  */
 
 #include <linux/ip.h>
-#include <linux/module.h>
-#include <linux/kernel.h>
 #include <linux/skbuff.h>
 
 #include <net/ip_vs.h>
diff --git a/net/ipv4/ipvs/ip_vs_sync.c b/net/ipv4/ipvs/ip_vs_sync.c
index 1bca714..8d2dba4 100644
--- a/net/ipv4/ipvs/ip_vs_sync.c
+++ b/net/ipv4/ipvs/ip_vs_sync.c
@@ -19,20 +19,13 @@
  *	Justin Ossevoort	:	Fix endian problem on sync message size.
  */
 
-#include <linux/module.h>
-#include <linux/slab.h>
 #include <linux/inetdevice.h>
-#include <linux/net.h>
-#include <linux/completion.h>
 #include <linux/delay.h>
-#include <linux/skbuff.h>
-#include <linux/in.h>
 #include <linux/igmp.h>                 /* for ip_mc_join_group */
 #include <linux/udp.h>
+#include <linux/sched.h>
 
 #include <net/ip.h>
-#include <net/sock.h>
-#include <asm/uaccess.h>                /* for get_fs and set_fs */
 
 #include <net/ip_vs.h>
 
diff --git a/net/ipv4/ipvs/ip_vs_wlc.c b/net/ipv4/ipvs/ip_vs_wlc.c
index 8a9d913..6d90a7c 100644
--- a/net/ipv4/ipvs/ip_vs_wlc.c
+++ b/net/ipv4/ipvs/ip_vs_wlc.c
@@ -22,7 +22,6 @@
  */
 
 #include <linux/module.h>
-#include <linux/kernel.h>
 
 #include <net/ip_vs.h>
 
diff --git a/net/ipv4/ipvs/ip_vs_wrr.c b/net/ipv4/ipvs/ip_vs_wrr.c
index 749fa04..bfcd5fb 100644
--- a/net/ipv4/ipvs/ip_vs_wrr.c
+++ b/net/ipv4/ipvs/ip_vs_wrr.c
@@ -21,7 +21,6 @@
  */
 
 #include <linux/module.h>
-#include <linux/kernel.h>
 
 #include <net/ip_vs.h>
 
diff --git a/net/ipv4/ipvs/ip_vs_xmit.c b/net/ipv4/ipvs/ip_vs_xmit.c
index 52c12e9..19d85e3 100644
--- a/net/ipv4/ipvs/ip_vs_xmit.c
+++ b/net/ipv4/ipvs/ip_vs_xmit.c
@@ -15,14 +15,9 @@
  *
  */
 
-#include <linux/kernel.h>
-#include <linux/ip.h>
-#include <linux/tcp.h>                  /* for tcphdr */
-#include <net/tcp.h>                    /* for csum_tcpudp_magic */
-#include <net/udp.h>
+#include <net/ip.h>
 #include <net/icmp.h>                   /* for icmp_send */
 #include <net/route.h>                  /* for ip_route_output */
-#include <linux/netfilter.h>
 #include <linux/netfilter_ipv4.h>
 
 #include <net/ip_vs.h>

^ permalink raw reply related

* Re: [PATCH][RFC] Shrink ip_vs_*.c includes
From: Roberto Nibali @ 2006-02-06 10:33 UTC (permalink / raw)
  To: LinuxVirtualServer.org users mailing list.; +Cc: netdev
In-Reply-To: <ds7787$lnr$1@sea.gmane.org>

>>> CONFIG_IP_VS=m
>>> # CONFIG_IP_VS_DEBUG is not set
>>> CONFIG_IP_VS_TAB_BITS=12
>>> CONFIG_IP_VS_PROTO_TCP=y
>>> CONFIG_IP_VS_PROTO_UDP=y
>>> CONFIG_IP_VS_PROTO_ESP=y
>>> CONFIG_IP_VS_PROTO_AH=y

These 'y' caused me to think that it wasn't modular.

>>> CONFIG_IP_VS_RR=m
>>> CONFIG_IP_VS_WRR=m
>>> CONFIG_IP_VS_LC=m
>>> CONFIG_IP_VS_WLC=m
>>> CONFIG_IP_VS_LBLC=m
>>> CONFIG_IP_VS_LBLCR=m
>>> CONFIG_IP_VS_DH=m
>>> CONFIG_IP_VS_SH=m
>>> CONFIG_IP_VS_SED=m
>>> CONFIG_IP_VS_NQ=m
>>> CONFIG_IP_VS_FTP=m
>> Ok, this is m/y mixed. Haven't tried it yet.
> 
> Actually, I think that its completely modular.

So why the heck didn't it trigger on my system? Is it because the
include/net/* headers are not always included on ia64? Well, tant pis!

>> I'll reproduce it with your config. I didn't think of trying it with
>> mixed y/m settings. Following include is missing then:
>>
>> #include <linux/seq_file.h>
> 
> Thanks, I found that linux/module.h was also needed.

Ok. I thought this would get included by any of the other headers. Well,
so long as it also compiles fine on your system, I'm good.

> After putting those two back into ip_vs_conn.c the build went 
> find. I also tried a few other combinations, all on ia64, without issue.
> My diff is below. Could you recheck it?

Seems fine to me, thanks for testing this. I would have felt really bad
if I broke IPVS in mainline because of such changes.

>> Or do you think we could put all the needed includes into ip_vs.h and
>> simply be done with it?
> 
> I spoke breifly with Dave about this, and he isn't very keen on it.

Fair enough.

> The problem with that approach, is that while its less work to
> maintain the headers by hand, it will likely result in uneeded
> includes in some cases.

How so? All includes nota bene have the prevailing:

#ifndef _FOOBAR_H
#define _FOOBAR_H
[...]
#endif  /* _FOOBAR_H */

framework. So would this speak slightely against that? Also, from the
includes we take today, I reckon that in the end we half of the
include/{net,linux}/*.h is in our objects :). But you guys decide. I
could maybe run a call-graph.

> So all of LVS will get built when
> a given header is touched, where perhaps only half of it needed
> to be built.

Well, it does not happen so ofter that a core network related header is
touched to my avail.

> So with that in mind, could you continue in the vein of
> your original patch?

Sure thing. Your attached patch is fine; if you feel confident with our
changes, submit it.

Best regards,
Roberto Nibali, ratz
-- 
-------------------------------------------------------------
addr://Kasinostrasse 30, CH-5001 Aarau tel://++41 62 823 9355
http://www.terreactive.com             fax://++41 62 823 9356
-------------------------------------------------------------
10 Jahre Kompetenz in IT-Sicherheit.              1996 - 2006
Wir sichern Ihren Erfolg.                      terreActive AG
-------------------------------------------------------------

^ permalink raw reply

* Re: [test] airo : first WPA-PSK support
From: matthieu castet @ 2006-02-06 18:06 UTC (permalink / raw)
  To: netdev; +Cc: hostap
In-Reply-To: <4369099D.3010502@free.fr>

Hi,

matthieu castet wrote:
> Hi,
> 
> I have a working linux airo driver that support  WPA-PSK, but it is very 
> ugly.
> It only support one card, and don't support MPI350. Also it only works 
> with WPA.
> 
> Currently the RX and TX key are set only for set_tx=1 key. The card 
> should report valid mic key with EV_MIC, but the driver hangs for an 
> unknow reason.
> 
> There still lot's of work to complete WPA support and merge it with an 
> universal driver.
> 
> Attached a diff against 2.6.14 kernel.
> 
Some people asks me the status of this patch. The last version is 
available at http://castet.matthieu.free.fr/airo/ .
As I haven't any MPI350 it is still not supported and because only few 
people seem interested in this driver I don't plan to clean it for 
kernel.org integration.

Matthieu

^ permalink raw reply

* Re: [test] airo : first WPA-PSK support
From: Dan Williams @ 2006-02-06 18:52 UTC (permalink / raw)
  To: matthieu castet; +Cc: netdev, hostap
In-Reply-To: <43E7902E.9080002@free.fr>

On Mon, 2006-02-06 at 19:06 +0100, matthieu castet wrote:
> Hi,
> 
> matthieu castet wrote:
> > Hi,
> > 
> > I have a working linux airo driver that support  WPA-PSK, but it is very 
> > ugly.
> > It only support one card, and don't support MPI350. Also it only works 
> > with WPA.
> > 
> > Currently the RX and TX key are set only for set_tx=1 key. The card 
> > should report valid mic key with EV_MIC, but the driver hangs for an 
> > unknow reason.
> > 
> > There still lot's of work to complete WPA support and merge it with an 
> > universal driver.
> > 
> > Attached a diff against 2.6.14 kernel.
> > 
> Some people asks me the status of this patch. The last version is 
> available at http://castet.matthieu.free.fr/airo/ .
> As I haven't any MPI350 it is still not supported and because only few 
> people seem interested in this driver I don't plan to clean it for 
> kernel.org integration.

I can help out with the mpi350 if you'd like.  However, most of the code
for the MPI350 should be exactly the same as with the PCMCIA version of
the card.  They share just about everything except for the bus type.
(unless I'm wrong?)

Note that I added ENCODEEXT and AUTH support (for WEP only of course) in
a previous kernel patch, so you'll likely have to rediff your patches
against that...

I think bits of this patch (at least the support for the WPA & RSN
information elements in scans) should be upstreamed as soon as possible,
I'm willing to help with that too.

Dan

^ permalink raw reply

* Re: [test] airo : first WPA-PSK support
From: Dan Williams @ 2006-02-06 19:01 UTC (permalink / raw)
  To: matthieu castet; +Cc: netdev, hostap
In-Reply-To: <43E7902E.9080002@free.fr>

On Mon, 2006-02-06 at 19:06 +0100, matthieu castet wrote:
> Hi,
> 
> matthieu castet wrote:
> > Hi,
> > 
> > I have a working linux airo driver that support  WPA-PSK, but it is very 
> > ugly.
> > It only support one card, and don't support MPI350. Also it only works 
> > with WPA.
> > 
> > Currently the RX and TX key are set only for set_tx=1 key. The card 
> > should report valid mic key with EV_MIC, but the driver hangs for an 
> > unknow reason.
> > 
> > There still lot's of work to complete WPA support and merge it with an 
> > universal driver.
> > 
> > Attached a diff against 2.6.14 kernel.
> > 
> Some people asks me the status of this patch. The last version is 
> available at http://castet.matthieu.free.fr/airo/ .
> As I haven't any MPI350 it is still not supported and because only few 
> people seem interested in this driver I don't plan to clean it for 
> kernel.org integration.

Also, do you have access to the 4500/4800 Developer's Manual?  I'm
curious what the status code 0x0600 for an EV_LINK event is (as seen in
airo_interrupt()).

#define AUTHFAIL 0x0300 /* Authentication failure (low byte is reason
			   code) */
#define ASSOCIATED 0x0400 /* Assocatied */

There's 0x400, but no 0x0200 which is what I'd expect is the case for a
status code of 0x0600 (ie 0x0400 + 0x0200).

Thanks!
Dan

^ permalink raw reply

* Re: [test] airo : first WPA-PSK support
From: matthieu castet @ 2006-02-06 20:23 UTC (permalink / raw)
  To: Dan Williams; +Cc: netdev, hostap
In-Reply-To: <1139251955.5831.9.camel@dhcp83-115.boston.redhat.com>

Hi,

Dan Williams wrote:
> I can help out with the mpi350 if you'd like.  However, most of the code
> for the MPI350 should be exactly the same as with the PCMCIA version of
> the card.  They share just about everything except for the bus type.
> (unless I'm wrong?)
There are some differences for RX and TX code. Search for FLAG_MPI. But 
this should'nt be really hard to add them.
I will try to add it this weekend.


> 
> I think bits of this patch (at least the support for the WPA & RSN
> information elements in scans) should be upstreamed as soon as possible,
I don't know if you know well the code, but the driver can read/write 
some data that are indexed with RID.
The main problem is that in order to use WPA, you need to used RID 
supported only by newer firmware.
For example for WPA & RSN in scan you need to use a newer RID and a 
modified struct for data storage.
But the RID for configuration didn't change with newer firmware but 
there are extra elements in the structure.

We should check that we don't break anything for older cards/firmwares.

It is even worse, IIRC we can't mix older and new RID : this make the 
card hangs (firmware crash ?). For example the current auto WEP make the 
WPA fail.

 > I'm willing to help with that too.
You're welcome.


Matthieu

^ permalink raw reply

* Re: [test] airo : first WPA-PSK support
From: Dan Williams @ 2006-02-06 21:56 UTC (permalink / raw)
  To: matthieu castet; +Cc: netdev, hostap
In-Reply-To: <43E7B036.80202@free.fr>

On Mon, 2006-02-06 at 21:23 +0100, matthieu castet wrote:
> Hi,
> 
> Dan Williams wrote:
> > I can help out with the mpi350 if you'd like.  However, most of the code
> > for the MPI350 should be exactly the same as with the PCMCIA version of
> > the card.  They share just about everything except for the bus type.
> > (unless I'm wrong?)
> There are some differences for RX and TX code. Search for FLAG_MPI. But 
> this should'nt be really hard to add them.
> I will try to add it this weekend.
> 
> 
> > 
> > I think bits of this patch (at least the support for the WPA & RSN
> > information elements in scans) should be upstreamed as soon as possible,
> I don't know if you know well the code, but the driver can read/write 
> some data that are indexed with RID.
> The main problem is that in order to use WPA, you need to used RID 
> supported only by newer firmware.
> For example for WPA & RSN in scan you need to use a newer RID and a 
> modified struct for data storage.
> But the RID for configuration didn't change with newer firmware but 
> there are extra elements in the structure.

AFAIK anything less than 5.40.x doesn't work anyway.  The latest stuff
(5.60.x) has worked fine.  I previously had 5.30.17, which tended to
hang the card after a while.  Anyway, perhaps we require people to
update their firmware.  Not sure.

What's the minimum firmware version for WPA support?

Dan

^ permalink raw reply

* [PATCH 2/3] bridge: netfilter handle RCU during removal
From: Stephen Hemminger @ 2006-02-06 22:27 UTC (permalink / raw)
  To: David Miller; +Cc: netdev, netfilter-devel
In-Reply-To: <20060206222732.661214000@dxpl.pdx.osdl.net>

[-- Attachment #1: br-netfilter-ref.patch --]
[-- Type: text/plain, Size: 4833 bytes --]

Bridge netfilter code needs to handle the case where device is
removed from bridge while packet in process. In these cases the
bridge_parent can be come null while processing.

This should fix: http://bugzilla.kernel.org/show_bug.cgi?id=5803

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

--- br-2.6.orig/net/bridge/br_netfilter.c
+++ br-2.6/net/bridge/br_netfilter.c
@@ -51,9 +51,6 @@
 #define store_orig_dstaddr(skb)	 (skb_origaddr(skb) = (skb)->nh.iph->daddr)
 #define dnat_took_place(skb)	 (skb_origaddr(skb) != (skb)->nh.iph->daddr)
 
-#define has_bridge_parent(device)	((device)->br_port != NULL)
-#define bridge_parent(device)		((device)->br_port->br->dev)
-
 #ifdef CONFIG_SYSCTL
 static struct ctl_table_header *brnf_sysctl_header;
 static int brnf_call_iptables = 1;
@@ -98,6 +95,12 @@ static struct rtable __fake_rtable = {
 	.rt_flags	= 0,
 };
 
+static inline struct net_device *bridge_parent(const struct net_device *dev)
+{
+	struct net_bridge_port *port = rcu_dereference(dev->br_port);
+
+	return port ? port->br->dev : NULL;
+}
 
 /* PF_BRIDGE/PRE_ROUTING *********************************************/
 /* Undo the changes made for ip6tables PREROUTING and continue the
@@ -189,11 +192,15 @@ static int br_nf_pre_routing_finish_brid
 	skb->nf_bridge->mask ^= BRNF_NF_BRIDGE_PREROUTING;
 
 	skb->dev = bridge_parent(skb->dev);
-	if (skb->protocol == __constant_htons(ETH_P_8021Q)) {
-		skb_pull(skb, VLAN_HLEN);
-		skb->nh.raw += VLAN_HLEN;
+	if (!skb->dev)
+		kfree_skb(skb);
+	else {
+		if (skb->protocol == __constant_htons(ETH_P_8021Q)) {
+			skb_pull(skb, VLAN_HLEN);
+			skb->nh.raw += VLAN_HLEN;
+		}
+		skb->dst->output(skb);
 	}
-	skb->dst->output(skb);
 	return 0;
 }
 
@@ -270,7 +277,7 @@ bridged_dnat:
 }
 
 /* Some common code for IPv4/IPv6 */
-static void setup_pre_routing(struct sk_buff *skb)
+static struct net_device *setup_pre_routing(struct sk_buff *skb)
 {
 	struct nf_bridge_info *nf_bridge = skb->nf_bridge;
 
@@ -282,6 +289,8 @@ static void setup_pre_routing(struct sk_
 	nf_bridge->mask |= BRNF_NF_BRIDGE_PREROUTING;
 	nf_bridge->physindev = skb->dev;
 	skb->dev = bridge_parent(skb->dev);
+
+	return skb->dev;
 }
 
 /* We only check the length. A bridge shouldn't do any hop-by-hop stuff anyway */
@@ -376,7 +385,8 @@ static unsigned int br_nf_pre_routing_ip
  	nf_bridge_put(skb->nf_bridge);
 	if ((nf_bridge = nf_bridge_alloc(skb)) == NULL)
 		return NF_DROP;
-	setup_pre_routing(skb);
+	if (!setup_pre_routing(skb))
+		return NF_DROP;
 
 	NF_HOOK(PF_INET6, NF_IP6_PRE_ROUTING, skb, skb->dev, NULL,
 		br_nf_pre_routing_finish_ipv6);
@@ -465,7 +475,8 @@ static unsigned int br_nf_pre_routing(un
  	nf_bridge_put(skb->nf_bridge);
 	if ((nf_bridge = nf_bridge_alloc(skb)) == NULL)
 		return NF_DROP;
-	setup_pre_routing(skb);
+	if (!setup_pre_routing(skb))
+		return NF_DROP;
 	store_orig_dstaddr(skb);
 
 	NF_HOOK(PF_INET, NF_IP_PRE_ROUTING, skb, skb->dev, NULL,
@@ -539,11 +550,16 @@ static unsigned int br_nf_forward_ip(uns
 	struct sk_buff *skb = *pskb;
 	struct nf_bridge_info *nf_bridge;
 	struct vlan_ethhdr *hdr = vlan_eth_hdr(skb);
+	struct net_device *parent;
 	int pf;
 
 	if (!skb->nf_bridge)
 		return NF_ACCEPT;
 
+	parent = bridge_parent(out);
+	if (!parent)
+		return NF_DROP;
+
 	if (skb->protocol == __constant_htons(ETH_P_IP) || IS_VLAN_IP)
 		pf = PF_INET;
 	else
@@ -564,8 +580,8 @@ static unsigned int br_nf_forward_ip(uns
 	nf_bridge->mask |= BRNF_BRIDGED;
 	nf_bridge->physoutdev = skb->dev;
 
-	NF_HOOK(pf, NF_IP_FORWARD, skb, bridge_parent(in),
-		bridge_parent(out), br_nf_forward_finish);
+	NF_HOOK(pf, NF_IP_FORWARD, skb, bridge_parent(in), parent,
+		br_nf_forward_finish);
 
 	return NF_STOLEN;
 }
@@ -688,6 +704,8 @@ static unsigned int br_nf_local_out(unsi
 		goto out;
 	}
 	realoutdev = bridge_parent(skb->dev);
+	if (!realoutdev)
+		return NF_DROP;
 
 #if defined(CONFIG_VLAN_8021Q) || defined(CONFIG_VLAN_8021Q_MODULE)
 	/* iptables should match -o br0.x */
@@ -701,9 +719,11 @@ static unsigned int br_nf_local_out(unsi
 	/* IP forwarded traffic has a physindev, locally
 	 * generated traffic hasn't. */
 	if (realindev != NULL) {
-		if (!(nf_bridge->mask & BRNF_DONT_TAKE_PARENT) &&
-		    has_bridge_parent(realindev))
-			realindev = bridge_parent(realindev);
+		if (!(nf_bridge->mask & BRNF_DONT_TAKE_PARENT) ) {
+			struct net_device *parent = bridge_parent(realindev);
+			if (parent)
+				realindev = parent;
+		}
 
 		NF_HOOK_THRESH(pf, NF_IP_FORWARD, skb, realindev,
 			       realoutdev, br_nf_local_out_finish,
@@ -743,6 +763,9 @@ static unsigned int br_nf_post_routing(u
 	if (!nf_bridge)
 		return NF_ACCEPT;
 
+	if (!realoutdev)
+		return NF_DROP;
+
 	if (skb->protocol == __constant_htons(ETH_P_IP) || IS_VLAN_IP)
 		pf = PF_INET;
 	else

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

^ permalink raw reply

* [PATCH] acxsm: Change acx_ioctl_{get,set}_encode to use softmac
From: Carlos Martín @ 2006-02-06 23:32 UTC (permalink / raw)
  To: acx100-devel; +Cc: netdev


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

Hi,

 The attached patch changes the acx_ioctl_{get,set}_encode functions to use 
the 80211 stack in the kernel, so they become mere wrappers.

Signed-off-by: Carlos Martin <carlos@cmartin.tk>

   cmn
-- 
Carlos Martín       http://www.cmartin.tk

"Erdbeben? Sicherlich etwas, das mit Erdberen zu tun hat." -- me, paraphrased

[-- Attachment #1.2: acx-ioctl-getset-encode-sm.patch --]
[-- Type: text/x-diff, Size: 3668 bytes --]

diff --git a/ioctl.c b/ioctl.c
index 1502938..041f165 100644
--- a/ioctl.c
+++ b/ioctl.c
@@ -1007,87 +1007,7 @@ acx_ioctl_set_encode(
 	union iwreq_data *wrqu,
 	char *extra)
 {
-	struct iw_point *dwrq = &wrqu->encoding;
-	acx_device_t *adev = ndev2adev(ndev);
-	int index;
-	int result;
-
-	FN_ENTER;
-
-	log(L_IOCTL, "set encoding flags=0x%04X, size=%d, key: %s\n",
-			dwrq->flags, dwrq->length, extra ? "set" : "No key");
-
-	acx_sem_lock(adev);
-
-	index = (dwrq->flags & IW_ENCODE_INDEX) - 1;
-
-	if (dwrq->length > 0) {
-		/* if index is 0 or invalid, use default key */
-		if ((index < 0) || (index > 3))
-			index = (int)adev->ieee->sec.active_key;
-
-		if (0 == (dwrq->flags & IW_ENCODE_NOKEY)) {
-			if (dwrq->length > 29)
-				dwrq->length = 29; /* restrict it */
-
-			if (dwrq->length > 13) {
-				/* 29*8 == 232, WEP256 */
-				adev->ieee->sec.key_sizes[index] = 29;
-			} else if (dwrq->length > 5) {
-				/* 13*8 == 104bit, WEP128 */
-				adev->ieee->sec.key_sizes[index] = 13;
-			} else if (dwrq->length > 0) {
-				/* 5*8 == 40bit, WEP64 */
-				adev->ieee->sec.key_sizes[index] = 5;
-			} else {
-				/* disable key */
-				adev->ieee->sec.key_sizes[index] = 0;
-			}
-
-			memset(adev->ieee->sec.keys[index], 0,
-				sizeof(adev->ieee->sec.keys[index]));
-			memcpy(adev->ieee->sec.keys[index], extra, dwrq->length);
-		}
-	} else {
-		/* set transmit key */
-		if ((index >= 0) && (index <= 3))
-			adev->ieee->sec.active_key = index;
-		else if (0 == (dwrq->flags & IW_ENCODE_MODE)) {
-			/* complain if we were not just setting
-			 * the key mode */
-			result = -EINVAL;
-			goto end_unlock;
-		}
-	}
-
-	adev->ieee->sec.enabled = !(dwrq->flags & IW_ENCODE_DISABLED);
-
-	if (dwrq->flags & IW_ENCODE_OPEN) {
-		adev->ieee->sec.auth_mode = WLAN_AUTH_OPEN;
-
-	} else if (dwrq->flags & IW_ENCODE_RESTRICTED) {
-	  adev->ieee->sec.auth_mode = WLAN_AUTH_SHARED_KEY;
-	}
-
-	/* set flag to make sure the card WEP settings get updated */
-	SET_BIT(adev->set_mask, GETSET_WEP);
-
-	log(L_IOCTL, "len=%d, key at 0x%p, flags=0x%X\n",
-		dwrq->length, extra, dwrq->flags);
-
-	for (index = 0; index <= 3; index++) {
-		if (adev->ieee->sec.key_sizes[index]) {
-			log(L_IOCTL,	"index=%d, size=%d, key at 0x%p\n",
-				adev->ieee->sec.active_key,
-				(int) adev->ieee->sec.key_sizes[index],
-				adev->ieee->sec.keys[index]);
-		}
-	}
-	result = -EINPROGRESS;
-
-end_unlock:
-	acx_sem_unlock(adev);
-
+	int result = ieee80211_wx_set_encode(netdev_priv(ndev), info, wrqu, extra);
 	FN_EXIT1(result);
 	return result;
 }
@@ -1103,35 +1023,9 @@ acx_ioctl_get_encode(
 	union iwreq_data *wrqu,
 	char *extra)
 {
-	struct iw_point *dwrq = &wrqu->encoding;
-	acx_device_t *adev = ndev2adev(ndev);
-	int index = (dwrq->flags & IW_ENCODE_INDEX) - 1;
-
-	FN_ENTER;
-
-	if (adev->ieee->sec.enabled == 0) {
-		dwrq->flags = IW_ENCODE_DISABLED;
-	} else {
-		if ((index < 0) || (index > 3))
-			index = (int)adev->ieee->sec.active_key;
-
-		dwrq->flags = (adev->ieee->sec.auth_mode == WLAN_AUTH_SHARED_KEY) ?
-				IW_ENCODE_RESTRICTED : IW_ENCODE_OPEN;
-		dwrq->length = adev->ieee->sec.key_sizes[index];
-
-		memcpy(extra, adev->ieee->sec.keys[index],
-			      adev->ieee->sec.key_sizes[index]);
-	}
-
-	/* set the current index */
-	SET_BIT(dwrq->flags, index + 1);
-
-	log(L_IOCTL, "len=%d, key=%p, flags=0x%X\n",
-	       dwrq->length, dwrq->pointer,
-	       dwrq->flags);
-
-	FN_EXIT1(OK);
-	return OK;
+	int result = ieee80211_wx_get_encode(netdev_priv(ndev), info, wrqu, extra);
+	FN_EXIT1(result);
+	return result;
 }
 
 

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

^ permalink raw reply related

* Re: network delays, mysterious push packets
From: David S. Miller @ 2006-02-06 23:50 UTC (permalink / raw)
  To: david.carlton; +Cc: linux-kernel, linux-net, netdev
In-Reply-To: <yf2k6c8ru3x.fsf@kealia.sfbay.sun.com>

From: David Carlton <david.carlton@sun.com>
Date: Mon, 06 Feb 2006 14:38:10 -0800

> I'm working on an application that we're trying to switch from a 2.4
> kernel to a 2.6 kernel.  (I believe we're using 2.6.9.)  One part of
> the program periodically sends out chunks of data (whose size is just
> over 1MB) via tcp.

Please reproduce with something more current and report to the correct
mailing list (netdev@vger.kernel.org).

Thanks.

^ permalink raw reply

* Re: network delays, mysterious push packets
From: Herbert Xu @ 2006-02-07  1:18 UTC (permalink / raw)
  To: David S. Miller; +Cc: david.carlton, linux-kernel, linux-net, netdev
In-Reply-To: <20060206.155028.115708927.davem@davemloft.net>

David S. Miller <davem@davemloft.net> wrote:
> From: David Carlton <david.carlton@sun.com>
> Date: Mon, 06 Feb 2006 14:38:10 -0800
> 
>> I'm working on an application that we're trying to switch from a 2.4
>> kernel to a 2.6 kernel.  (I believe we're using 2.6.9.)  One part of
>> the program periodically sends out chunks of data (whose size is just
>> over 1MB) via tcp.
> 
> Please reproduce with something more current and report to the correct
> mailing list (netdev@vger.kernel.org).

Please include a packet dump too.

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

* Re: [PATCH][RFC] Shrink ip_vs_*.c includes
From: Horms @ 2006-02-07  4:00 UTC (permalink / raw)
  To: lvs-users; +Cc: netdev
In-Reply-To: <43E725E5.7080400@tac.ch>

In gmane.comp.linux.lvs.user Roberto Nibali <ratz@tac.ch> wrote:
>>>> CONFIG_IP_VS=m
>>>> # CONFIG_IP_VS_DEBUG is not set
>>>> CONFIG_IP_VS_TAB_BITS=12
>>>> CONFIG_IP_VS_PROTO_TCP=y
>>>> CONFIG_IP_VS_PROTO_UDP=y
>>>> CONFIG_IP_VS_PROTO_ESP=y
>>>> CONFIG_IP_VS_PROTO_AH=y
> 
> These 'y' caused me to think that it wasn't modular.

Me too :)

>>>> CONFIG_IP_VS_RR=m
>>>> CONFIG_IP_VS_WRR=m
>>>> CONFIG_IP_VS_LC=m
>>>> CONFIG_IP_VS_WLC=m
>>>> CONFIG_IP_VS_LBLC=m
>>>> CONFIG_IP_VS_LBLCR=m
>>>> CONFIG_IP_VS_DH=m
>>>> CONFIG_IP_VS_SH=m
>>>> CONFIG_IP_VS_SED=m
>>>> CONFIG_IP_VS_NQ=m
>>>> CONFIG_IP_VS_FTP=m
>>> Ok, this is m/y mixed. Haven't tried it yet.
>> 
>> Actually, I think that its completely modular.
> 
> So why the heck didn't it trigger on my system? Is it because the
> include/net/* headers are not always included on ia64? Well, tant pis!

I can reproduce the problem on x86 too.

>>> I'll reproduce it with your config. I didn't think of trying it with
>>> mixed y/m settings. Following include is missing then:
>>>
>>> #include <linux/seq_file.h>
>> 
>> Thanks, I found that linux/module.h was also needed.
> 
> Ok. I thought this would get included by any of the other headers. Well,
> so long as it also compiles fine on your system, I'm good.
> 
>> After putting those two back into ip_vs_conn.c the build went 
>> find. I also tried a few other combinations, all on ia64, without issue.
>> My diff is below. Could you recheck it?
> 
> Seems fine to me, thanks for testing this. I would have felt really bad
> if I broke IPVS in mainline because of such changes.
> 
>>> Or do you think we could put all the needed includes into ip_vs.h and
>>> simply be done with it?
>> 
>> I spoke breifly with Dave about this, and he isn't very keen on it.
> 
> Fair enough.
> 
>> The problem with that approach, is that while its less work to
>> maintain the headers by hand, it will likely result in uneeded
>> includes in some cases.
> 
> How so? All includes nota bene have the prevailing:
> 
> #ifndef _FOOBAR_H
> #define _FOOBAR_H
> [...]
> #endif  /* _FOOBAR_H */
> 
> framework. So would this speak slightely against that? 

I dare say that they do. However thats actually not the issue at hand.
The problem is, lets say that a.h is listed in ip_vs.h because
some of ipvs/*.c need it. Well, a.h is going to end up inclded in
all of ipvs/*.c, even the ones that don't need it, and thus would
otherwise not have it (assuming that we prune things by hand,
as you have done). So if a.h gets touched, for some reason,
then all of ipvs/*.c will be recompiled, some of which is not
neccessary.

This of course assumes that there is some variance in the includes
needed by the ipvs/*.c files. I think that is a fair assumption, though
I haven't done any analysis on it. Its also a reasonable expectation
that this could be the case in the future, even if it is not the case
now.

> Also, from the
> includes we take today, I reckon that in the end we half of the
> include/{net,linux}/*.h is in our objects :). But you guys decide. I
> could maybe run a call-graph.

Thats a slightly different issue. Perhaps the headers should be cleaned
up a little. But at least by taking the approach that your current patch
does, IPVS can get the benifit of any subsequent cleanups, rather than
partially annuling them.

>> So all of LVS will get built when
>> a given header is touched, where perhaps only half of it needed
>> to be built.
> 
> Well, it does not happen so ofter that a core network related header is
> touched to my avail.

That I would tend to agree with. But Dave seemed to think it is worth
the effort to break the headers out in IPVS, as they currently are.
And I think its reasonable enough.

>> So with that in mind, could you continue in the vein of
>> your original patch?
> 
> Sure thing. Your attached patch is fine; if you feel confident with our
> changes, submit it.

Will do. I'll drop the lvs-users CC as its a closed list whereas
netdev isn't. For the benifit of people who are on lvs-users and not
netdev, the patch will be the same as what I posted yesterday.

-- 
Horms

^ permalink raw reply

* Re: [PATCH] acxsm: Change acx_ioctl_{get,set}_encode to use softmac
From: Denis Vlasenko @ 2006-02-07  6:20 UTC (permalink / raw)
  To: acx100-devel; +Cc: Carlos Martín, netdev
In-Reply-To: <200602070033.02698.carlos@cmartin.tk>

On Tuesday 07 February 2006 01:32, Carlos Martín wrote:
> Hi,
> 
>  The attached patch changes the acx_ioctl_{get,set}_encode functions to use 
> the 80211 stack in the kernel, so they become mere wrappers.
> 
> Signed-off-by: Carlos Martin <carlos@cmartin.tk>
> 
>    cmn

Applied, thanks!
--
vda


-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid\x103432&bid#0486&dat\x121642

^ permalink raw reply

* Re: e100 oops on resume
From: Jeff Garzik @ 2006-02-07  6:57 UTC (permalink / raw)
  To: Jesse Brandeburg
  Cc: Stefan Seyfried, Olaf Kirch, Linux Kernel Mailing List, netdev,
	Jesse Brandeburg, Jeff Kirsher
In-Reply-To: <4807377b0601281153r618586ddhca27b7772e023d26@mail.gmail.com>

Jesse Brandeburg wrote:
> On 1/28/06, Mattia Dongili <malattia@linux.it> wrote:
> 
>>On Thu, Jan 26, 2006 at 08:02:37PM +0100, Stefan Seyfried wrote:
>>
>>>On Wed, Jan 25, 2006 at 04:28:48PM -0800, Jesse Brandeburg wrote:
>>>
>>>
>>>>Okay I reproduced the issue on 2.6.15.1 (with S1 sleep) and was able
>>>>to show that my patch that just removes e100_init_hw works okay for
>>>>me.  Let me know how it goes for you, I think this is a good fix.
>>>
>>>worked for me in the Compaq Armada e500 and reportedly also fixed the
>>>SONY that originally uncovered it.
>>
>>confirmed here too. The patch fixes S3 resume on this Sony (GR7/K)
>>running 2.6.16-rc1-mm3.
> 
> 
> excellent news! thanks for testing.
> 
> Jeff, could you please apply to 2.6.16-rcX
> 
> Jesse

SIGH.  In your last patch submission you had it right, but Intel has yet 
again regressed in patch submission form.

Your fixes will be expedited if they can be applied by script, and then 
quickly whisked upstream to Linus/Andrew.  This one had to be applied by 
hand (so yes, its applied) for several reasons:

* Unreviewable in mail reader, due to MIME type application/octet-stream.

* In general, never use MIME (attachments), they decrease the audience 
that can easily review your patch.

* Your patch's description and signed-off-by were buried inside the 
octet-stream attachment.

* Please review http://linux.yyz.us/patch-format.html  (I probably 
should add MIME admonitions to that)

	Jeff

^ permalink raw reply

* Re: [Patch] 2.4.32 - Neighbour Cache (ARP) State machine bug Fixed
From: Pradeep Vincent @ 2006-02-07  7:57 UTC (permalink / raw)
  To: David S. Miller, netdev, linux-kernel
In-Reply-To: <20060203.181839.104353534.davem@davemloft.net>

In 2.4.21, arp code uses gc_timer to check for stale arp cache
entries. In 2.6, each entry has its own timer to check for stale arp
cache. 2.4.29 to 2.4.32 kernels (atleast) use neither of these timers.
This causes problems in environments where IPs or MACs are reassigned
- saw this problem on load balancing router based networks that use
VMACs. Tested this code on load balancing router based networks as
well as peer-linux systems.


Thanks,


Signed off by: Pradeep Vincent <pradeep.vincent@gmail.com>

diff -Naur old/net/core/neighbour.c new/net/core/neighbour.c
--- old/net/core/neighbour.c    Wed Nov 23 17:15:30 2005
+++ new/net/core/neighbour.c    Wed Nov 23 17:26:01 2005
@@ -14,6 +14,7 @@
*     Vitaly E. Lavrov        releasing NULL neighbor in neigh_add.
*     Harald Welte            Add neighbour cache statistics like rtstat
*     Harald Welte            port neighbour cache rework from 2.6.9-rcX
+ *      Pradeep Vincent         Move neighbour cache entry to stale state
*/

#include <linux/config.h>
@@ -705,6 +706,14 @@
                      neigh_release(n);
                      continue;
              }
+
+               /* Mark it stale - To be reconfirmed later when used */
+               if (n->nud_state&NUD_REACHABLE &&
+                   now - n->confirmed > n->parms->reachable_time) {
+                       n->nud_state = NUD_STALE;
+                       neigh_suspect(n);
+               }
+
              write_unlock(&n->lock);


On 2/3/06, David S. Miller <davem@davemloft.net> wrote:
> From: Pradeep Vincent <pradeep.vincent@gmail.com>
> Date: Fri, 3 Feb 2006 18:06:53 -0800
>
> > Resending..
>
> Your email client has tab and newline mangled the patch so it
> cannot be applied.  Please fix this up and also supply an
> appropriate "Signed-off-by: " line.
>
> Thanks.
>

^ 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