2017-06-28 15:37 UTC

View Issue Details Jump to Notes ]
IDProjectCategoryView StatusLast Update
0003977CentOS-5CentOS-5-Pluspublic2010-06-11 14:48
Reportertoracat 
PrioritynormalSeverityminorReproducibilityalways
StatusclosedResolutionnot fixable 
Product Version5.4 
Target VersionFixed in Version 
Summary0003977: VMWare Modules fail to build on latest Centos Plus kernel
DescriptionOriginally reported in the CentOS forum:

http://www.centos.org/modules/newbb/viewtopic.php?topic_id=23040&forum=37

We are seeing a build failure of the VMWare modules with kernel-2.6.18-164.2.1.el5.plus.x86_64

make[1]: Entering directory `/usr/src/kernels/2.6.18-164.2.1.el5.plus-x86_64'
CC [M] /tmp/vmware-config2/vmnet-only/driver.o
CC [M] /tmp/vmware-config2/vmnet-only/hub.o
CC [M] /tmp/vmware-config2/vmnet-only/userif.o
CC [M] /tmp/vmware-config2/vmnet-only/netif.o
In file included from /tmp/vmware-config2/vmnet-only/netif.c:47:
/tmp/vmware-config2/vmnet-only/compat_netdevice.h:273: error: redefinition of ‘struct napi_struct’
make[2]: *** [/tmp/vmware-config2/vmnet-only/netif.o] Error 1
make[1]: *** [_module_/tmp/vmware-config2/vmnet-only] Error 2
make[1]: Leaving directory `/usr/src/kernels/2.6.18-164.2.1.el5.plus-x86_64'
make: *** [vmnet.ko] Error 2

Building with the plain kernel-2.6.18-164.2.1.el5.x86_64 works fine.

This happens for me on VMWare 6.5.3 or VMware-server-2.0.1.
Additional InformationI can reproduce the problem. VMware Server 1.0.x does not have this issue.
TagsNo tags attached.
Attached Files

-Relationships
+Relationships

-Notes

~0010259

toracat (manager)

As seen in a followup comment in the referenced forum thread, there is a patched version of vmnet.tar offered by a VMware community member.

http://communities.vmware.com/servlet/JiveServlet/download/1402806-30733/vmnet.tar.gz

The compat_netdevice.h file defines 'napi_struct' and the patched version has this block commented out.

In CentOS, this is defined in include/linux/netdevice.h. It is possible that one (or more) of the kernel drivers enabled in the cplus kernel has a call to this file ?? Infiniband is a candidate.

~0010281

toracat (manager)

Tried the latest (soon to be released) cplus kernel 2.6.18-164.6.1 and encountered the same error.

~0010296

toracat (manager)

There isn't much that can be done as far as the cplus kernel is concerned. A workaround is to use the patched vmnet.tar.

The relevant post in the vmware forum is:

http://communities.vmware.com/message/1372156#1372156

Get the vmnet.tar file provided in that thread and replace the existing file in /usr/lib/vmware/modules/source/ (after saving the original).

Marking this report "resolved" for now. If there is a new development, that can still be posted here.

~0010718

toracat (manager)

Opening this ticket to add more info.

The original issue dealt with the host. There is a similar problem with guests when building vmware-tools modules.

[problem]
With recent centosplus kernels, compilation of the vmxnet module fails:

In file included from /tmp/vmware-config0/vmxnet-only/vmxnet.c:39:
/tmp/vmware-config0/vmxnet-only/compat_netdevice.h:273: error: redefinition of ?struct napi_struct?

[solution]
On the guest, untar the file:

/usr/lib/vmware-tools/modules/source/vmxnet.tar

and patch vmxnet-only/compat_netdevice.h with:

--- compat_netdevice.h.dist 2010-01-08 11:06:56.000000000 -0800
+++ compat_netdevice.h 2010-01-08 10:59:39.000000000 -0800
@@ -270,9 +270,11 @@
 #define compat_napi_enable(dev, napi) napi_enable(napi)
 #define compat_napi_disable(dev, napi) napi_disable(napi)
 #else
+/* needs to be commented out to get vmxnet to compile under CentOSPlus kernel
 struct napi_struct {
    int dummy;
 };
+*/

 #define compat_netif_napi_add(dev, napi, pollcb, quota) \
    do {

~0011206

chengcsw (reporter)

After updating to latest kernel of CentOS 5.4. The header files still do not make the compilation successful

What is the location of the directory of C header files that match your running
kernel? [/lib/modules/2.6.18-164.15.1.el5/build/include]

Extracting the sources of the vmnet module.

Building the vmnet module.

Using 2.6.x kernel build system.
make: Entering directory `/tmp/vmware-config0/vmnet-only'
make -C /lib/modules/2.6.18-164.15.1.el5/build/include/.. SUBDIRS=$PWD SRCROOT=$PWD/. modules
make[1]: Entering directory `/usr/src/kernels/2.6.18-164.15.1.el5-x86_64'
  CC [M] /tmp/vmware-config0/vmnet-only/driver.o
  CC [M] /tmp/vmware-config0/vmnet-only/hub.o
  CC [M] /tmp/vmware-config0/vmnet-only/userif.o
  CC [M] /tmp/vmware-config0/vmnet-only/netif.o
  CC [M] /tmp/vmware-config0/vmnet-only/bridge.o
  CC [M] /tmp/vmware-config0/vmnet-only/filter.o
  CC [M] /tmp/vmware-config0/vmnet-only/procfs.o
  CC [M] /tmp/vmware-config0/vmnet-only/smac_compat.o
  CC [M] /tmp/vmware-config0/vmnet-only/smac.o
  CC [M] /tmp/vmware-config0/vmnet-only/vnetEvent.o
  CC [M] /tmp/vmware-config0/vmnet-only/vnetUserListener.o
  LD [M] /tmp/vmware-config0/vmnet-only/vmnet.o
  Building modules, stage 2.
  MODPOST
  CC /tmp/vmware-config0/vmnet-only/vmnet.mod.o
  LD [M] /tmp/vmware-config0/vmnet-only/vmnet.ko
make[1]: Leaving directory `/usr/src/kernels/2.6.18-164.15.1.el5-x86_64'
cp -f vmnet.ko ./../vmnet.o
make: Leaving directory `/tmp/vmware-config0/vmnet-only'
Unable to make a vmnet module that can be loaded in the running kernel:
insmod: error inserting '/tmp/vmware-config0/vmnet.o': -1 File exists
There is probably a slight difference in the kernel configuration between the
set of C header files you specified and your running kernel. You may want to
rebuild a kernel based on that directory, or specify another directory.

For more information on how to troubleshoot module-related problems, please
visit our Web site at "http://www.vmware.com/go/unsup-linux-products" and
"http://www.vmware.com/go/unsup-linux-tools".

Execution aborted.

~0011208

toracat (manager)

Unfortunately, this problem will not go away any time soon. The cplus kernel is a custom kernel, so we cannot expect VMware to support it (even the distro kernel has a problem and it's not been corrected by VMware).

There is a slim chance that we can rectify the issue by removing the offending module in the cplus kernel -- if we can identify which one.

~0011211

chengcsw (reporter)

This is quoted from the VMware datasheet
"Expanded operating system support: VMware Server now
supports Windows Server 2008, Windows Vista® Business
Edition and Ultimate Edition (guest only), Red Hat® Enterprise
Linux 5 and Ubuntu 8.04; including para-virtualized mode
support on certain Linux distributions."

So if CentOS 5.4 is not a suitable O/S, is CentOS 5.3 a suitable O/S?

~0011214

toracat (manager)

Well, with CentOS 5.3, there will be no need for the patch. However, 5.3 is so obsolete and has many security bugs. It is best to stay current with CentOS using the proposed fix.

~0011215

toracat (manager)

Note to self:

Candidate .h files that might be conflicting:

net/benet/be_compat.h: struct napi_struct *napi,
net/benet/be.h: struct napi_struct napi;
net/cxgb3/adapter.h: struct napi_struct napi;
net/igb/igb.h: struct napi_struct napi;
net/ixgbe/ixgbe.h: struct napi_struct napi;
net/netxen/netxen_nic.h: struct napi_struct napi;
net/qlge/qlge.h: struct napi_struct napi;

Ref: http://www.cs.fsu.edu/~baker/devices/lxr/http/ident?i=napi_struct

~0011464

toracat (manager)

I am going to close this report for now. The reasons are:

(1) Even if we successfully identify the module whose code conflicts with the vmware's, we cannot disable/modify it because that would inconvenience users needing it.

(2) There is a fix for this issue (see above).
+Notes

-Issue History
Date Modified Username Field Change
2009-11-03 19:13 toracat New Issue
2009-11-03 19:22 toracat Note Added: 0010259
2009-11-03 19:22 toracat Status new => acknowledged
2009-11-04 16:12 toracat Note Added: 0010281
2009-11-05 15:21 toracat Note Added: 0010296
2009-11-05 15:22 toracat Status acknowledged => resolved
2009-11-05 15:22 toracat Resolution open => not fixable
2009-11-26 08:55 slapper Tag Attached: 5.4
2009-11-26 08:55 slapper Tag Detached: 5.4
2010-01-08 19:53 toracat Note Added: 0010718
2010-01-08 19:53 toracat Status resolved => feedback
2010-01-08 19:53 toracat Resolution not fixable => reopened
2010-01-08 19:53 toracat Status feedback => assigned
2010-05-03 13:13 chengcsw Note Added: 0011206
2010-05-03 14:43 toracat Note Added: 0011208
2010-05-04 13:27 chengcsw Note Added: 0011211
2010-05-04 19:47 toracat Note Added: 0011214
2010-05-04 20:11 toracat Note Added: 0011215
2010-06-11 14:48 toracat Note Added: 0011464
2010-06-11 14:48 toracat Status assigned => closed
2010-06-11 14:48 toracat Resolution reopened => not fixable
+Issue History