WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-changelog

[Xen-changelog] [linux-2.6.18-xen] Solarflare: use simplifying header-of

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [linux-2.6.18-xen] Solarflare: use simplifying header-offset macros where possible
From: "Xen patchbot-linux-2.6.18-xen" <patchbot-linux-2.6.18-xen@xxxxxxxxxxxxxxxxxxx>
Date: Thu, 21 Feb 2008 07:11:14 -0800
Delivery-date: Fri, 22 Feb 2008 07:42:53 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User Keir Fraser <keir.fraser@xxxxxxxxxx>
# Date 1203589347 0
# Node ID 5069c4f9481242082c52e58e1828c1a5a4bb9a65
# Parent  fc44fda2c68a9dc057e98dafdfe6eece417c106c
Solarflare: use simplifying header-offset macros where possible
Signed-off-by: Jan Beulich <jbeulich@xxxxxxxxxx>
---
 drivers/xen/sfc_netfront/accel_tso.c |    5 ++---
 1 files changed, 2 insertions(+), 3 deletions(-)

diff -r fc44fda2c68a -r 5069c4f94812 drivers/xen/sfc_netfront/accel_tso.c
--- a/drivers/xen/sfc_netfront/accel_tso.c      Thu Feb 21 10:21:34 2008 +0000
+++ b/drivers/xen/sfc_netfront/accel_tso.c      Thu Feb 21 10:22:27 2008 +0000
@@ -115,7 +115,7 @@ static inline void tso_check_safe(struct
        EPRINTK_ON(skb->protocol != htons (ETH_P_IP));
        EPRINTK_ON(((struct ethhdr*) skb->data)->h_proto != htons (ETH_P_IP));
        EPRINTK_ON(skb->nh.iph->protocol != IPPROTO_TCP);
-       EPRINTK_ON((PTR_DIFF(skb->h.th, skb->data)
+       EPRINTK_ON((SKB_TCP_OFF(skb)
                    + (skb->h.th->doff << 2u)) > skb_headlen(skb));
 }
 
@@ -129,8 +129,7 @@ static inline void tso_start(struct netf
         * All ethernet/IP/TCP headers combined size is TCP header size
         * plus offset of TCP header relative to start of packet.
         */
-       st->p.header_length = ((skb->h.th->doff << 2u)
-                              + PTR_DIFF(skb->h.th, skb->data));
+       st->p.header_length = (skb->h.th->doff << 2u) + SKB_TCP_OFF(skb);
        st->p.full_packet_size = (st->p.header_length
                                  + skb_shinfo(skb)->gso_size);
        st->p.gso_size = skb_shinfo(skb)->gso_size;

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [linux-2.6.18-xen] Solarflare: use simplifying header-offset macros where possible, Xen patchbot-linux-2.6.18-xen <=