Re: 2.6.21-rc5-mm3: fix e1000 compilation

Previous thread: 2.6.21-rc5-mm3 by Andrew Morton on Friday, March 30, 2007 - 1:05 am. (52 messages)

Next thread: Ze Cyclades card testing by Jiri Slaby on Friday, March 30, 2007 - 2:09 am. (1 message)
From: Alexey Dobriyan
Date: Friday, March 30, 2007 - 1:50 am

CC [M]  drivers/net/e1000/e1000_main.o
drivers/net/e1000/e1000_main.c: In function 'e1000_tso':
drivers/net/e1000/e1000_main.c:2968: error: dereferencing pointer to incomplete type
	...

--- a/drivers/net/e1000/e1000_main.c
+++ b/drivers/net/e1000/e1000_main.c
@@ -32,6 +32,8 @@ #include <linux/init.h>
 #include <linux/vmalloc.h>
 #include <linux/pagemap.h>
 #include <linux/netdevice.h>
+#include <linux/tcp.h>
+#include <linux/ipv6.h>
 #include <net/checksum.h>
 #include <net/ip6_checksum.h>
 #include <linux/mii.h>

-

From: Kok, Auke
Date: Friday, March 30, 2007 - 7:39 am

can you send me your config? I'd like to see why nobody here didn't spot this on 
any of our tests.

thanks,

-

From: Alexey Dobriyan
Date: Friday, March 30, 2007 - 8:05 am

Sure...

#
# Automatically generated make config: don't edit
# Linux kernel version: 2.6.21-rc5-mm3
# Fri Mar 30 13:00:57 2007
#
CONFIG_X86_32=y
CONFIG_GENERIC_TIME=y
CONFIG_CLOCKSOURCE_WATCHDOG=y
CONFIG_GENERIC_CLOCKEVENTS=y
CONFIG_LOCKDEP_SUPPORT=y
CONFIG_STACKTRACE_SUPPORT=y
CONFIG_SEMAPHORE_SLEEPERS=y
CONFIG_X86=y
CONFIG_MMU=y
CONFIG_ZONE_DMA=y
CONFIG_GENERIC_ISA_DMA=y
CONFIG_GENERIC_IOMAP=y
CONFIG_GENERIC_BUG=y
CONFIG_GENERIC_HWEIGHT=y
CONFIG_ARCH_MAY_HAVE_PC_FDC=y
CONFIG_DMI=y
CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"

#
# Code maturity level options
#
CONFIG_EXPERIMENTAL=y
CONFIG_BROKEN_ON_SMP=y
CONFIG_LOCK_KERNEL=y
CONFIG_INIT_ENV_ARG_LIMIT=32

#
# General setup
#
CONFIG_LOCALVERSION=""
# CONFIG_LOCALVERSION_AUTO is not set
CONFIG_SWAP=y
# CONFIG_SWAP_PREFETCH is not set
CONFIG_SYSVIPC=y
CONFIG_IPC_NS=y
CONFIG_SYSVIPC_SYSCTL=y
# CONFIG_POSIX_MQUEUE is not set
# CONFIG_BSD_PROCESS_ACCT is not set
# CONFIG_TASKSTATS is not set
CONFIG_UTS_NS=y
# CONFIG_AUDIT is not set
CONFIG_IKCONFIG=y
CONFIG_IKCONFIG_PROC=y
# CONFIG_SYSFS_DEPRECATED is not set
# CONFIG_RELAY is not set
# CONFIG_BLK_DEV_INITRD is not set
# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
CONFIG_SYSCTL=y
# CONFIG_EMBEDDED is not set
CONFIG_UID16=y
CONFIG_SYSCTL_SYSCALL=y
CONFIG_KALLSYMS=y
CONFIG_KALLSYMS_ALL=y
# CONFIG_KALLSYMS_EXTRA_PASS is not set
CONFIG_HOTPLUG=y
CONFIG_PRINTK=y
CONFIG_BUG=y
CONFIG_ELF_CORE=y
CONFIG_BASE_FULL=y
CONFIG_FUTEX=y
CONFIG_EPOLL=y
CONFIG_SHMEM=y
CONFIG_SLAB=y
CONFIG_VM_EVENT_COUNTERS=y
CONFIG_RT_MUTEXES=y
# CONFIG_TINY_SHMEM is not set
CONFIG_BASE_SMALL=0
# CONFIG_SLOB is not set
# CONFIG_PAGE_GROUP_BY_MOBILITY is not set

#
# Loadable module support
#
CONFIG_MODULES=y
CONFIG_MODULE_UNLOAD=y
# CONFIG_MODULE_FORCE_UNLOAD is not set
# CONFIG_MODVERSIONS is not set
# CONFIG_MODULE_SRCVERSION_ALL is not set
CONFIG_KMOD=y

#
# Process debugging support
#
CONFIG_UTRACE=y
CONFIG_PTRACE=y

#
# Block ...
From: Andrew Morton
Date: Friday, March 30, 2007 - 10:01 am

test.kernel.org got thoroughly broken by e1000, but Alexey's patch fixed things
up.
-

From: Randy Dunlap
Date: Friday, March 30, 2007 - 10:07 am

My daily/nightly builds were also broken by it...

---
~Randy
*** Remember to use Documentation/SubmitChecklist when testing your code ***
-

From: Kok, Auke
Date: Friday, March 30, 2007 - 10:27 am

turns out that NETIF_F_TSO6 is defined even if CONFIG_IPV6 is turned off, which 
is what broke e1000. That in itself might be a problem. Perhaps this should be 
fixed in netdevice.h (gratuitous bad inline patch below) but I'm not sure if 
people would appreciate this, as it's rather ugly, and it gets all horrible when 
people disable TCP protocol support...

In any case, I was not suspecting this at all. The patch to e1000 is fine with me.

Auke


---
diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h
index 1a52854..f077137 100644
--- a/include/linux/netdevice.h
+++ b/include/linux/netdevice.h
@@ -331,10 +331,16 @@ struct net_device
  #define NETIF_F_UFO            (SKB_GSO_UDP << NETIF_F_GSO_SHIFT)
  #define NETIF_F_GSO_ROBUST     (SKB_GSO_DODGY << NETIF_F_GSO_SHIFT)
  #define NETIF_F_TSO_ECN        (SKB_GSO_TCP_ECN << NETIF_F_GSO_SHIFT)
+#ifdef CONFIG_IPV6
  #define NETIF_F_TSO6           (SKB_GSO_TCPV6 << NETIF_F_GSO_SHIFT)
+#endif

         /* List of features with software fallbacks. */
+#ifdef CONFIG_IPV6
  #define NETIF_F_GSO_SOFTWARE   (NETIF_F_TSO | NETIF_F_TSO_ECN | NETIF_F_TSO6)
+#else
+#define NETIF_F_GSO_SOFTWARE   (NETIF_F_TSO | NETIF_F_TSO_ECN)
+#endif

  #define NETIF_F_GEN_CSUM       (NETIF_F_NO_CSUM | NETIF_F_HW_CSUM)
  #define NETIF_F_ALL_CSUM       (NETIF_F_IP_CSUM | NETIF_F_GEN_CSUM)
-

From: David Miller
Date: Friday, March 30, 2007 - 2:20 pm

From: "Kok, Auke" <auke-jan.h.kok@intel.com>

No, I don't think we should do this.

We have the vlan acceleration flags available when 802.1Q is
disabled, same situation, and just as valid.
-

Previous thread: 2.6.21-rc5-mm3 by Andrew Morton on Friday, March 30, 2007 - 1:05 am. (52 messages)

Next thread: Ze Cyclades card testing by Jiri Slaby on Friday, March 30, 2007 - 2:09 am. (1 message)