Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 191664
Collapse All | Expand All

(-)vmxnet.c (-8 / +8 lines)
Lines 1217-1229 Link Here
1217
         iphOffset += VLAN_TAG_LENGTH;
1217
         iphOffset += VLAN_TAG_LENGTH;
1218
      }
1218
      }
1219
      if (LIKELY(PKT_OF_IPV4(skb))){
1219
      if (LIKELY(PKT_OF_IPV4(skb))){
1220
         if (LIKELY(skb->nh.iph->protocol == IPPROTO_TCP)) {
1220
         if (LIKELY(VMWARE_SKB_NH(skb)->protocol == IPPROTO_TCP)) {
1221
            /* tcp traffic, copy all protocol headers */
1221
            /* tcp traffic, copy all protocol headers */
1222
            tcphOffset = iphOffset + (skb->nh.iph->ihl << 2);
1222
            tcphOffset = iphOffset + (VMWARE_SKB_NH(skb)->ihl << 2);
1223
            headerSize = tcphOffset + (skb->h.th->doff << 2);
1223
            headerSize = tcphOffset + (VMWARE_SKB_H(skb)->doff << 2);
1224
         } else {
1224
         } else {
1225
            /* non-tcp traffic, copy mac + ip header */
1225
            /* non-tcp traffic, copy mac + ip header */
1226
            headerSize = iphOffset + (skb->nh.iph->ihl << 2);
1226
            headerSize = iphOffset + (VMWARE_SKB_NH(skb)->ihl << 2);
1227
            tcphOffset = 0;
1227
            tcphOffset = 0;
1228
         }
1228
         }
1229
      } else { 
1229
      } else { 
Lines 1364-1371 Link Here
1364
         dd->stats.noCopyTransmits++;
1364
         dd->stats.noCopyTransmits++;
1365
1365
1366
         /* prepare for the chopping */
1366
         /* prepare for the chopping */
1367
         nextSeq = ntohl(skb->h.th->seq);
1367
         nextSeq = ntohl(VMWARE_SKB_H(skb)->seq);
1368
         nextId = ntohs(skb->nh.iph->id);
1368
         nextId = ntohs(VMWARE_SKB_NH(skb)->id);
1369
         tcphSize = headerSize - tcphOffset;
1369
         tcphSize = headerSize - tcphOffset;
1370
         tcpiphSize = headerSize - iphOffset;
1370
         tcpiphSize = headerSize - iphOffset;
1371
1371
Lines 1442-1449 Link Here
1442
               VMXNET_INC(dd->txDriverNext, dd->txRingLength);
1442
               VMXNET_INC(dd->txDriverNext, dd->txRingLength);
1443
            } else {
1443
            } else {
1444
               /* special considerations for the last one */
1444
               /* special considerations for the last one */
1445
               tcph->fin = skb->h.th->fin;
1445
               tcph->fin = VMWARE_SKB_H(skb)->fin;
1446
               tcph->psh = skb->h.th->psh;
1446
               tcph->psh = VMWARE_SKB_H(skb)->psh;
1447
1447
1448
               lp->numTxPending += txEntries;
1448
               lp->numTxPending += txEntries;
1449
               if (lp->numTxPending > dd->txRingLength - 5) {
1449
               if (lp->numTxPending > dd->txRingLength - 5) {
(-)vmxnetInt.h (+8 lines)
Lines 104-109 Link Here
104
#   define VM_CHECKSUM_UNNECESSARY CHECKSUM_UNNECESSARY
104
#   define VM_CHECKSUM_UNNECESSARY CHECKSUM_UNNECESSARY
105
#endif
105
#endif
106
106
107
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,22)
108
#   define VMWARE_SKB_NH(a)		(ip_hdr(a))
109
#   define VMWARE_SKB_H(a)		(tcp_hdr(a))
110
#else
111
#   define VMWARE_SKB_NH(a)		(a->nh.iph)
112
#   define VMWARE_SKB_H(a)		(a->h.th)
113
#endif
114
107
struct Vmxnet_TxBuf {
115
struct Vmxnet_TxBuf {
108
   struct sk_buff *skb;
116
   struct sk_buff *skb;
109
   char    sgForLinear; /* the sg entry mapping the linear part 
117
   char    sgForLinear; /* the sg entry mapping the linear part 

Return to bug 191664