Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 130317 Details for
Bug 191664
[vmware overlay] app-emulation/vmware-workstation-tools does not compile under kernel-2.6.22
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Michael's patch
000_all_vmwaretools-6.0.0-45731-vmxnet-2.6.22.patch (text/plain), 2.34 KB, created by
Mike Auty (RETIRED)
on 2007-09-08 08:31:25 UTC
(
hide
)
Description:
Michael's patch
Filename:
MIME Type:
Creator:
Mike Auty (RETIRED)
Created:
2007-09-08 08:31:25 UTC
Size:
2.34 KB
patch
obsolete
>diff -Nur vmxnet.c vmxnet.c >--- vmxnet.c 2007-05-02 05:37:18.000000000 +0200 >+++ vmxnet.c 2007-08-08 15:36:21.000000000 +0200 >@@ -1217,13 +1217,13 @@ > iphOffset += VLAN_TAG_LENGTH; > } > if (LIKELY(PKT_OF_IPV4(skb))){ >- if (LIKELY(skb->nh.iph->protocol == IPPROTO_TCP)) { >+ if (LIKELY(VMWARE_SKB_NH(skb)->protocol == IPPROTO_TCP)) { > /* tcp traffic, copy all protocol headers */ >- tcphOffset = iphOffset + (skb->nh.iph->ihl << 2); >- headerSize = tcphOffset + (skb->h.th->doff << 2); >+ tcphOffset = iphOffset + (VMWARE_SKB_NH(skb)->ihl << 2); >+ headerSize = tcphOffset + (VMWARE_SKB_H(skb)->doff << 2); > } else { > /* non-tcp traffic, copy mac + ip header */ >- headerSize = iphOffset + (skb->nh.iph->ihl << 2); >+ headerSize = iphOffset + (VMWARE_SKB_NH(skb)->ihl << 2); > tcphOffset = 0; > } > } else { >@@ -1364,8 +1364,8 @@ > dd->stats.noCopyTransmits++; > > /* prepare for the chopping */ >- nextSeq = ntohl(skb->h.th->seq); >- nextId = ntohs(skb->nh.iph->id); >+ nextSeq = ntohl(VMWARE_SKB_H(skb)->seq); >+ nextId = ntohs(VMWARE_SKB_NH(skb)->id); > tcphSize = headerSize - tcphOffset; > tcpiphSize = headerSize - iphOffset; > >@@ -1442,8 +1442,8 @@ > VMXNET_INC(dd->txDriverNext, dd->txRingLength); > } else { > /* special considerations for the last one */ >- tcph->fin = skb->h.th->fin; >- tcph->psh = skb->h.th->psh; >+ tcph->fin = VMWARE_SKB_H(skb)->fin; >+ tcph->psh = VMWARE_SKB_H(skb)->psh; > > lp->numTxPending += txEntries; > if (lp->numTxPending > dd->txRingLength - 5) { >diff -Nur vmxnetInt.h vmxnetInt.h >--- vmxnetInt.h 2007-05-02 05:37:18.000000000 +0200 >+++ vmxnetInt.h 2007-08-08 15:35:06.000000000 +0200 >@@ -104,6 +104,14 @@ > # define VM_CHECKSUM_UNNECESSARY CHECKSUM_UNNECESSARY > #endif > >+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,22) >+# define VMWARE_SKB_NH(a) (ip_hdr(a)) >+# define VMWARE_SKB_H(a) (tcp_hdr(a)) >+#else >+# define VMWARE_SKB_NH(a) (a->nh.iph) >+# define VMWARE_SKB_H(a) (a->h.th) >+#endif >+ > struct Vmxnet_TxBuf { > struct sk_buff *skb; > char sgForLinear; /* the sg entry mapping the linear part
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 191664
: 130317