the problem when running vmware-config.pl so it can compile the modules:
Using 2.6.x kernel build system.
make: Entering directory `/tmp/vmware-config0/vmnet-only'
make -C /lib/modules/2.6.21-git13-SPTNK1/build/include/.. SUBDIRS=$PWD SRCROOT=$PWD/. modules
make[1]: Entering directory `/usr/src/linux-2.6.21'
CC /tmp/vmware-config0/vmnet-only/driver.o
CC /tmp/vmware-config0/vmnet-only/hub.o
CC /tmp/vmware-config0/vmnet-only/userif.o
/tmp/vmware-config0/vmnet-only/userif.c: In function VNetCopyDatagramToUser:
/tmp/vmware-config0/vmnet-only/userif.c:630: error: const struct sk_buff has no member named h
/tmp/vmware-config0/vmnet-only/userif.c:630: error: const struct sk_buff has no member named nh
/tmp/vmware-config0/vmnet-only/userif.c:636: error: const struct sk_buff has no member named h
make[1]: *** \[_module_/tmp/vmware-config0/vmnet-only] Error 2
make[1]: Leaving directory `/usr/src/linux-2.6.21'
make: *** \[vmnet.ko] Error 2
make: Leaving directory `/tmp/vmware-config0/vmnet-only'
Unable to build the vmnet module.
I have gone as far as removing the licensing restriction in paravirt_ops.c, and patching my kernel to git13 (which has the paravirt_ops patch aswell). This has removed the compiling error for vmmon's "unknown symbol" and many other problems for modules that use different licenses other than GPL.
It appears I'm unable to win having paravirt_ops enabled. Disabling it is the last resort... althrough I don't see any relevence between this and paravirt_ops. I have an idea what this is, but I'm at a loss as to where to start.
edit: I forgot to include I have CONFIG_COMPAT_VDSO disabled.
"# CONFIG_COMPAT_VDSO is not set"
info:
OS - ArchLinux 0.8, self maintained kernel.
uname -a
Linux SPUTNIK1 2.6.21-git13-SPTNK1 #1 PREEMPT Fri May 11 05:59:04 CST 2007 i686 AMD Athlon(tm) AuthenticAMD GNU/Linux
glib 1.2.10-6
glib2 2.12.12-1
glibc 2.5-8
gcc version 4.1.2 20070423 (prerelease)
VMware-workstation-6.0.0-45731
Any help would be greatly appreciated.
Looks like you are using kernel 2.6.21 and not 2.6.22 as listed in the subject field. Did you disable paravirtualization support in the kernel config?
Ahh.. I just noticed the typo I made in the topic title. No, I'm running 2.6.21-git13. Vanilla 2.6.21 kernel from kernel.org and it's following patchset.
I haven't disabled paravirtualisation support within the kernel so that I may use the VMI. If I disable paravirtualisation the option to use VMI becomes disabled within menuconfig.
To clarify, paravirtualisation has nothing to do with the compilation error.
I wanted to double check before posting, so I recompiled my kernel without paravirtualisation, and tried running vmware-config.pl again which returned the same result.
The only option I see would be downgrading the kernel to 2.6.20. I would like to avoid this and find someway to get 2.6.21 working if that's possible.
commit b0e380b1d8a8e0aca215df97702f99815f05c094
Author: Arnaldo Carvalho de Melo <acme@redhat.com>
Date: Tue Apr 10 21:21:55 2007 -0700
\[SK_BUFF]: unions of just one member don't get anything done, kill them
Renaming skb->h to skb->transport_header, skb->nh to skb->network_header and
skb->mac to skb->mac_header, to match the names of the associated helpers
(skb[_\[re]set]_\{transport,network,mac}_header).
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
commit cfe1fc7759fdacb0c650b575daed1692bf3eaece
Author: Arnaldo Carvalho de Melo <acme@redhat.com>
Date: Fri Mar 16 17:26:39 2007 -0300
\[SK_BUFF]: Introduce skb_network_header_len
For the common sequence "skb->h.raw - skb->nh.raw", similar to skb->mac_len,
that is precalculated tho, don't think we need to bloat skb with one more
member, so just use this new helper, reducing the number of non-skbuff.h
references to the layer headers even more.
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
\----
vmnet - userif.c
/*
If truncation occurs, we do not bother with checksumming - caller cannot
verify checksum anyway in such case, and copy without checksum it is
faster.
*/
if (skb->pkt_type == PACKET_OUTGOING && /* Packet must be outgoing */
skb->ip_summed == VM_CHECKSUM_PARTIAL && /* Without checksum */
skb->h.raw != skb->nh.raw && /* We must know where header is */
skb->len == count) { /* No truncation may occur */
size_t skl;
int csum;
u_int16_t csum16;
skl = skb->h.raw - skb->data;
if (VNetCopyDatagram(skb, buf, skl)) {
return -EFAULT;
}
\----
vmnet - userif.c
which translates to:
/*
If truncation occurs, we do not bother with checksumming - caller cannot
verify checksum anyway in such case, and copy without checksum it is
faster.
*/
if (skb->pkt_type == PACKET_OUTGOING && /* Packet must be outgoing */
skb->ip_summed == VM_CHECKSUM_PARTIAL && /* Without checksum */
skb->transport_header != skb->network_header && /* We must know where header is */
skb->len == count) { /* No truncation may occur */
size_t skl;
int csum;
u_int16_t csum16;
skl = skb->transport_header - skb->data;
if (VNetCopyDatagram(skb, buf, skl)) {
return -EFAULT;
}
\----
additional files altered:
bridge.c
filter.c
vnetInt.h
smac_compact.c
those who wish to use the 2.6.21 kernel, you must patch your kernel to 2.6.22rc1. www.kernel.org - simply download the kernel 2.6.21 and download 2.6.21 RC1, then patch it.
you should have paravirtualisation enabled in your kernel, followed by the VMI. it is not required, and the vm-modules will still build. this fix applys to their vmnet. it is VERY important you patch your kernel to 2.6.22rc1 otherwise you'll get the famious GPL error if you choose to include paravirtualisation support.
download the file I have placed here into /usr/lib/vmware/modules/source/ and rerun vmware-config.pl
http://76.223.200.211:8001/vmware/vmnet.tar
my entire goal was to use paravirtualisation without the need of using a so called ''supported platform'' (ie *buntu) which is not an acceptable answer as I absolutely love ArchLinux, and like maintaining my own kernel.
I hope this will help others out there who are likeminded.
Message was edited by:
sputnik66
Here is a compatible vmxnet for 2.6.22-rc1 on VMware Workstation 6:-
Erk, sorry, the link should read:-
I didn't try the above download, but have found (from trying to get Madwifi going too) that most people are doing less than is needed for 64 bit machines. For 64 bit, the code has been changed to use offsets for the various skb headers. This tarball:
http://stage.suspend2.net/downloads/all/vmnet.tar
Compiles on my AMD64 machine. (Not tried on 32 bit).
Nigel.
Here's yet another patch that works for me (2.6.22, AMD64):
http://npw.net/~phbaer/vmware-workstation-6.0_linux-kernel-2.6.22.patch
A tar is available as well:
http://npw.net/~phbaer/vmnet.tar
It has not yet been tested on a IA32 platform! Other patches I tried all generated dmesg messages like
...
\[18015.990080] protocol 0608 is buggy, dev eth1
\[18017.132883] protocol 0008 is buggy, dev eth1
...
Tested on IA32 and it works for me using 2.6.22-rc1.
Thanks
Hi,
i do use kernel 2.6.22 and still get this message on my 32 bit:
Using 2.6.x kernel build system.
make: Entering directory `/tmp/vmware-config1/vmnet-only'
make -C /lib/modules/2.6.22-rc2-git7-43-default/build/include/.. SUBDIRS=$PWD SRCROOT=$PWD/. modules
make[1]: Entering directory `/usr/src/linux-2.6.22-rc2-git7-43-obj/i386/default'
make -C ../../../linux-2.6.22-rc2-git7-43 O=../linux-2.6.22-rc2-git7-43-obj/i386/default modules
CC /tmp/vmware-config1/vmnet-only/driver.o
CC /tmp/vmware-config1/vmnet-only/hub.o
CC /tmp/vmware-config1/vmnet-only/userif.o
/tmp/vmware-config1/vmnet-only/userif.c: In function VNetCopyDatagramToUser:
/tmp/vmware-config1/vmnet-only/userif.c:630: error: const struct sk_buff has no member named h
/tmp/vmware-config1/vmnet-only/userif.c:630: error: const struct sk_buff has no member named nh
/tmp/vmware-config1/vmnet-only/userif.c:636: error: const struct sk_buff has no member named h
make[3]: *** \[_module_/tmp/vmware-config1/vmnet-only] Fehler 2
make[2]: *** \[modules] Fehler 2
make[1]: *** \[modules] Fehler 2
make[1]: Leaving directory `/usr/src/linux-2.6.22-rc2-git7-43-obj/i386/default'
make: *** \[vmnet.ko] Fehler 2
make: Leaving directory `/tmp/vmware-config1/vmnet-only'
Unable to build the vmnet module.
For more information on how to troubleshoot module-related problems, please
visit our Web site at "http://www.vmware.com/download/modules/modules.html" and
"http://www.vmware.com/support/reference/linux/prebuilt_modules_linux.html".
Execution aborted.
my second connection's IP has changed. I will host this on my primary connection aswell when I return to my home (which will be in a few hours)
http://76.223.206.140:8001/vmware/vmnet.tar
be sure to replace the one in /usr/lib/vmware/modules/source/vmnet.tar with the above, then run vmware-config.pl again.
Thanks for help, but it still doesn't work.
make[1]: Entering directory `/usr/src/linux-2.6.22-rc2-git7-43-obj/i386/default'
make -C ../../../linux-2.6.22-rc2-git7-43 O=../linux-2.6.22-rc2-git7-43-obj/i386
/default modules
CC /tmp/vmware-config4/vmnet-only/driver.o
CC /tmp/vmware-config4/vmnet-only/hub.o
CC /tmp/vmware-config4/vmnet-only/userif.o
CC /tmp/vmware-config4/vmnet-only/netif.o
CC /tmp/vmware-config4/vmnet-only/bridge.o
CC /tmp/vmware-config4/vmnet-only/filter.o
/tmp/vmware-config4/vmnet-only/filter.c: In function VNetFilterHookFn:
/tmp/vmware-config4/vmnet-only/filter.c:232: error: struct sk_buff has no memb er named nh
make[3]: *** \[_module_/tmp/vmware-config4/vmnet-only] Fehler 2
make[2]: *** \[modules] Fehler 2
make[1]: *** \[modules] Fehler 2
make[1]: Leaving directory `/usr/src/linux-2.6.22-rc2-git7-43-obj/i386/default'
make: *** \[vmnet.ko] Fehler 2
make: Leaving directory `/tmp/vmware-config4/vmnet-only'
Unable to build the vmnet module.
For more information on how to troubleshoot module-related problems, please
visit our Web site at "http://www.vmware.com/download/modules/modules.html" and
"http://www.vmware.com/support/reference/linux/prebuilt_modules_linux.html".
Execution aborted.
I see what's going on. It fails because I have the majority of options such as netfilter disabled in my kernel, which doesn't require additional changes to vmnet in order to compile on mine.
I only changed what was required for vmnet to compile on my system. I didn't take others into account and I appologise. Arrogance is not bliss.
Thanks for the output you've given. I will attempt to port the rest over as quickly as possible.
Okay, let's see if this fixes your problem.
1. http://76.223.206.140:8001/vmware/marbles/vmnet.tar
2. http://24.12.114.66:8001/vmware/marbles/vmnet.tar
It compiles on my system with the new changes, but remains untested as I do not have certain features enabled in my kernel which you have in yours - so this remains largely untested. Please let me know if this works or not.
still the same.
thanks
The error message cannot be the same unless you didn't replace vmnet.tar correctly. Could you provide the output?
Well, i'm sure that i replaced the file correctly, but just did it one more time.
Still the same output:
Building the vmnet module.
Using 2.6.x kernel build system.
make: Entering directory `/tmp/vmware-config7/vmnet-only'
make -C /lib/modules/2.6.22-rc2-git7-58-default/build/include/.. SUBDIRS=$PWD SR
CROOT=$PWD/. modules
make[1]: Entering directory `/usr/src/linux-2.6.22-rc2-git7-58-obj/i386/default'
make -C ../../../linux-2.6.22-rc2-git7-58 O=../linux-2.6.22-rc2-git7-58-obj/i386
/default modules
CC /tmp/vmware-config7/vmnet-only/driver.o
CC /tmp/vmware-config7/vmnet-only/hub.o
CC /tmp/vmware-config7/vmnet-only/userif.o
CC /tmp/vmware-config7/vmnet-only/netif.o
CC /tmp/vmware-config7/vmnet-only/bridge.o
CC /tmp/vmware-config7/vmnet-only/filter.o
/tmp/vmware-config7/vmnet-only/filter.c: In function VNetFilterHookFn:
/tmp/vmware-config7/vmnet-only/filter.c:232: error: struct sk_buff has no memb er named ip_hdr
make[3]: *** \[_module_/tmp/vmware-config7/vmnet-only] Fehler 2
make[2]: *** \[modules] Fehler 2
make[1]: *** \[modules] Fehler 2
make[1]: Leaving directory `/usr/src/linux-2.6.22-rc2-git7-58-obj/i386/default'
make: *** \[vmnet.ko] Fehler 2
make: Leaving directory `/tmp/vmware-config7/vmnet-only'
Unable to build the vmnet module.
For more information on how to troubleshoot module-related problems, please
visit our Web site at "http://www.vmware.com/download/modules/modules.html" and
"http://www.vmware.com/support/reference/linux/prebuilt_modules_linux.html".
Execution aborted.
"/tmp/vmware-config7/vmnet-only/filter.c:232: error: struct sk_buff has no member named ip_hdr "
I feared this would be the result. The format has changed to the point where I do not understand it. I took a shot and seemed to failed. I don't like the idea of recompiling my kernel for generic options in order to test my ideas.
I do have a spare machine onhand which I can experiment with.. however I cannot provide results in a reasonable time frame.
I have converted/ported enough as I could, however the new format for the list below I do not understand yet.
An example of this would be,
filter.c:
line 232: ip = skb->nh.iph;
line 233: packetHeader = (uint8 *)ip;
my attempt:
line 232: ip = skb->ip_hdr;
line 233: packetHeader = (uint8 *)ip;
another attempt:
line 232: ip = ip_hdr(skb);
line 233: packetHeader = (uint8 *)ip;
Which I believe to be the correct format.
as of kernel 2.6.22rc1, nh.iph has been dropped and replaced with ip_hdr
a full list is as follows:
\[SK_BUFF]: Introduce ip_hdr(), remove skb->nh.iph
\[SK_BUFF]: Introduce arp_hdr(), remove skb->nh.arph
\[SK_BUFF]: Introduce ipv6_hdr(), remove skb->nh.ipv6h
\[SK_BUFF]: Introduce skb_reset_transport_header(skb)
\[SK_BUFF]: Introduce skb_transport_offset()
\[SK_BUFF]: Introduce skb_set_transport_header
\[SCTP]: Introduce sctp_hdr()
\[ICMP6]: Introduce icmp6_hdr()
\[SK_BUFF]: Introduce igmp_hdr() & friends, remove skb->h.igmph
\[SK_BUFF]: Introduce udp_hdr(), remove skb->h.uh
\[SK_BUFF]: Introduce icmp_hdr(), remove skb->h.icmph
\[TCP]: Introduce tcp_hdrlen() and tcp_optlen()
\[SK_BUFF]: Introduce tcp_hdr(), remove skb->h.th
\[SK_BUFF]: Introduce ipip_hdr(), remove skb->h.ipiph
\[SK_BUFF]: Introduce ipipv6_hdr(), remove skb->h.ipv6h
Convert skb->tail to sk_buff_data_t
Convert skb->end to sk_buff_data_t
http://lwn.net/Articles/234135/
My previous patch works flawlessly on my machine without a hitch. Until then I'm removing the vmnet in the ''marbles'' directory I listed for you to try, and keeping the original up. It does work on kernels without netfilter/multicast and possibly other features built in. For the curious I will throw my kernel config in kpf for those who are interested.
This is for 2.6.22-rc2 - http://24.12.114.66:8001/vmware/config