From: "Jeff Chua" <jeff.chua.linux@gmail.com>
To: lkml <linux-kernel@vger.kernel.org>
Subject: patch for vmware for Linux-2.6.21
Date: Mon, 14 May 2007 09:18:06 +0800 [thread overview]
Message-ID: <b6a2187b0705131818x556eb57me42d1811e0db7a04@mail.gmail.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 121 bytes --]
Attached are patches for vmware-5.5.3 to make the vmmon and vmnet
modules compile under Linux-2.6.22-rc1.
Thanks,
Jeff.
[-- Attachment #2: patch-compat_kernel.h --]
[-- Type: text/plain, Size: 389 bytes --]
--- vmware/vmmon-only/include/compat_kernel.h.org 2006-12-26 16:47:25 +0800
+++ vmware/vmmon-only/include/compat_kernel.h 2006-12-26 16:48:00 +0800
@@ -18,7 +18,9 @@
* provided by x86-64, arm and other (but not by i386).
*/
#define __NR_compat_exit __NR_exit
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,19)
static inline _syscall1(int, compat_exit, int, exit_code);
+#endif
/*
[-- Attachment #3: patch-driver_config.h --]
[-- Type: text/plain, Size: 333 bytes --]
--- vmware/vmmon-only/include/driver-config.h.org 2007-01-26 10:46:01 +0800
+++ vmware/vmmon-only/include/driver-config.h 2006-11-14 05:06:18 +0800
@@ -19,7 +19,8 @@
#include "includeCheck.h"
#include <linux/autoconf.h>
+#undef CONFIG_PARAVIRT
#include "compat_version.h"
/* We rely on Kernel Module support. Check here. */
[-- Attachment #4: patch-vmnet-2.6.22 --]
[-- Type: application/octet-stream, Size: 2627 bytes --]
--- vmware/vmnet-only/userif.c.org 2007-05-13 19:08:06 +0800
+++ vmware/vmnet-only/userif.c 2007-05-13 19:20:33 +0800
@@ -627,13 +627,14 @@
*/
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->transport_header != skb->network_header &&
skb->len == count) { /* No truncation may occur */
size_t skl;
int csum;
u_int16_t csum16;
- skl = skb->h.raw - skb->data;
+ skl = skb_transport_offset(skb);
+
if (VNetCopyDatagram(skb, buf, skl)) {
return -EFAULT;
}
--- vmware/vmnet-only/vnetInt.h.org 2007-05-13 19:37:20 +0800
+++ vmware/vmnet-only/vnetInt.h 2007-05-13 19:28:03 +0800
@@ -25,8 +25,8 @@
#define DEV_QUEUE_XMIT(skb, dev, pri) ( \
(skb)->dev = (dev), \
(skb)->priority = (pri), \
- (skb)->mac.raw = (skb)->data, \
- (skb)->nh.raw = (skb)->data + sizeof (struct ethhdr), \
+ skb_reset_mac_header(skb), \
+ (skb)->network_header = skb->mac_header + sizeof(struct ethhdr), \
dev_queue_xmit(skb) \
)
#ifdef KERNEL_2_3_15
--- vmware/vmnet-only/bridge.c.org 2007-05-13 19:40:29 +0800
+++ vmware/vmnet-only/bridge.c 2007-05-13 19:40:02 +0800
@@ -1070,12 +1070,13 @@
VNetBridgeComputeHeaderPos(struct sk_buff *skb) // IN: buffer to examine
{
/* Maybe some kernel gets it right... */
- if (skb->h.raw != skb->nh.raw) {
+ if(skb->transport_header != skb->network_header) {
return;
}
switch (be16_to_cpu(skb->protocol)) {
case ETH_P_IP:
- skb->h.raw = skb->nh.raw + (skb->nh.raw[0] & 0x0F) * 4;
+ skb->transport_header = skb->network_header
+ + (skb_network_header(skb)[0] & 0x0F) *4;
return;
default:
LOG(3, (KERN_DEBUG "Unknown EII protocol %04X: csum at %d\n",
@@ -1161,7 +1162,7 @@
# endif
if (bridge->smac) {
- if (VNetCallSMACFunc(bridge->smac, &skb, skb->mac.raw,
+ if (VNetCallSMACFunc(bridge->smac, &skb, skb_mac_header(skb),
SMAC_CheckPacketFromHost) !=
PacketStatusForwardPacket) {
LOG(4, (KERN_NOTICE "bridge-%s: packet dropped .\n",
@@ -1185,7 +1186,7 @@
#endif
#endif
- skb_push(skb, skb->data - skb->mac.raw);
+ skb_push(skb, skb->data - skb_mac_header(skb));
LOG(3, (KERN_DEBUG "bridge-%s: receive %d\n",
bridge->name, (int) skb->len));
next reply other threads:[~2007-05-14 1:18 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-05-14 1:18 Jeff Chua [this message]
2007-05-14 1:35 ` Arjan van de Ven
2007-05-14 3:19 ` Jeff Chua
2007-05-14 6:15 ` [OT] " Petr Vandrovec
2007-05-14 6:57 ` Christoph Hellwig
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=b6a2187b0705131818x556eb57me42d1811e0db7a04@mail.gmail.com \
--to=jeff.chua.linux@gmail.com \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®