rpms/kernel/F-9 linux-2.6-tun-fix-skb-csum-start-computation.patch, NONE, 1.1.2.1 linux-2.6-tun-fix-trivial-coding-style-issue.patch, NONE, 1.1.2.1 linux-2.6-tun-use-correct-virtio-net-csum-macro-for-testing-flags.patch, NONE, 1.1.2.1 linux-2.6-virtio-fix-typo-in-virtio-net-hdr-comments.patch, NONE, 1.1.2.1 linux-2.6-virtio-net-fix-skb-csum-start-computation.patch, NONE, 1.1.2.1 linux-2.6-virtio-net-trivial-coding-style-fix.patch, NONE, 1.1.2.1 kernel.spec, 1.648.2.1, 1.648.2.2
Mark McLoughlin (markmc)
fedora-extras-commits at redhat.com
Mon May 26 13:28:48 UTC 2008
- Previous message (by thread): rpms/kdegraphics/devel .cvsignore, 1.41, 1.42 kdegraphics.spec, 1.144, 1.145 sources, 1.44, 1.45
- Next message (by thread): rpms/kdelibs/devel .cvsignore, 1.49, 1.50 kdelibs.spec, 1.325, 1.326 sources, 1.59, 1.60
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Author: markmc
Update of /cvs/pkgs/rpms/kernel/F-9
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv14455
Modified Files:
Tag: private-markmc-virtio-gso-branch
kernel.spec
Added Files:
Tag: private-markmc-virtio-gso-branch
linux-2.6-tun-fix-skb-csum-start-computation.patch
linux-2.6-tun-fix-trivial-coding-style-issue.patch
linux-2.6-tun-use-correct-virtio-net-csum-macro-for-testing-flags.patch
linux-2.6-virtio-fix-typo-in-virtio-net-hdr-comments.patch
linux-2.6-virtio-net-fix-skb-csum-start-computation.patch
linux-2.6-virtio-net-trivial-coding-style-fix.patch
Log Message:
* Mon May 26 2008 Mark McLoughlin <markmc at redhat.com> - 2.6.25.4-29.2.virtio_gso
- virtio_net/tun: misc csum/GSO patches
linux-2.6-tun-fix-skb-csum-start-computation.patch:
--- NEW FILE linux-2.6-tun-fix-skb-csum-start-computation.patch ---
>From e6117c8fbdbadf39e74886b7c27794eadb58d02d Mon Sep 17 00:00:00 2001
From: Mark McLoughlin <markmc at redhat.com>
Date: Mon, 26 May 2008 13:45:27 +0100
Subject: [PATCH 13/13] tun: Fix skb->csum_start computation
hdr->csum_start is the offset from the start of the ethernet
header to the transport layer checksum field. skb->csum_start
is the offset from skb->head.
skb_partial_csum_set() assumes that skb->data points to the
ethernet header - i.e. it computes skb->csum_start by adding
the headroom to hdr->csum_start.
Since eth_type_trans() skb_pull()s the ethernet header,
skb_partial_csum_set() should be called before
eth_type_trans().
Signed-off-by: Mark McLoughlin <markmc at redhat.com>
Cc: Herbert Xu <herbert at gondor.apana.org.au>
---
drivers/net/tun.c | 18 +++++++++---------
1 files changed, 9 insertions(+), 9 deletions(-)
diff --git a/drivers/net/tun.c b/drivers/net/tun.c
index 2898673..151b409 100644
--- a/drivers/net/tun.c
+++ b/drivers/net/tun.c
@@ -450,6 +450,15 @@ static __inline__ ssize_t tun_get_user(struct tun_struct *tun, struct iovec *iv,
return PTR_ERR(skb);
}
+ if (gso.flags & VIRTIO_NET_HDR_F_NEEDS_CSUM) {
+ if (!skb_partial_csum_set(skb, gso.csum_start, gso.csum_offset)) {
+ tun->dev->stats.rx_dropped++;
+ kfree_skb(skb);
+ return -EINVAL;
+ }
+ } else if (tun->flags & TUN_NOCHECKSUM)
+ skb->ip_summed = CHECKSUM_UNNECESSARY;
+
switch (tun->flags & TUN_TYPE_MASK) {
case TUN_TUN_DEV:
skb_reset_mac_header(skb);
@@ -461,15 +470,6 @@ static __inline__ ssize_t tun_get_user(struct tun_struct *tun, struct iovec *iv,
break;
};
- if (gso.flags & VIRTIO_NET_HDR_F_NEEDS_CSUM) {
- if (!skb_partial_csum_set(skb, gso.csum_start, gso.csum_offset)) {
- tun->dev->stats.rx_dropped++;
- kfree_skb(skb);
- return -EINVAL;
- }
- } else if (tun->flags & TUN_NOCHECKSUM)
- skb->ip_summed = CHECKSUM_UNNECESSARY;
-
netif_rx_ni(skb);
tun->dev->last_rx = jiffies;
--
1.5.4.1
linux-2.6-tun-fix-trivial-coding-style-issue.patch:
--- NEW FILE linux-2.6-tun-fix-trivial-coding-style-issue.patch ---
>From 7755dbdf02836b2047e13cf2ac59a7854e88dc9e Mon Sep 17 00:00:00 2001
From: Mark McLoughlin <markmc at redhat.com>
Date: Mon, 26 May 2008 13:44:50 +0100
Subject: [PATCH 11/13] tun: Fix trivial coding style issue
Signed-off-by: Mark McLoughlin <markmc at redhat.com>
---
drivers/net/tun.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/drivers/net/tun.c b/drivers/net/tun.c
index 7557776..785f384 100644
--- a/drivers/net/tun.c
+++ b/drivers/net/tun.c
@@ -462,7 +462,7 @@ static __inline__ ssize_t tun_get_user(struct tun_struct *tun, struct iovec *iv,
};
if (gso.flags & (1 << VIRTIO_NET_F_CSUM)) {
- if (!skb_partial_csum_set(skb,gso.csum_start,gso.csum_offset)) {
+ if (!skb_partial_csum_set(skb, gso.csum_start, gso.csum_offset)) {
tun->dev->stats.rx_dropped++;
kfree_skb(skb);
return -EINVAL;
--
1.5.4.1
linux-2.6-tun-use-correct-virtio-net-csum-macro-for-testing-flags.patch:
--- NEW FILE linux-2.6-tun-use-correct-virtio-net-csum-macro-for-testing-flags.patch ---
>From 0649fa3cc62c3043e43e0d89dc82e5f380f9c9a9 Mon Sep 17 00:00:00 2001
From: Mark McLoughlin <markmc at redhat.com>
Date: Fri, 23 May 2008 12:51:42 +0100
Subject: [PATCH 12/13] tun: Use correct virtio_net CSUM macro for testing flags
Signed-off-by: Mark McLoughlin <markmc at redhat.com>
---
drivers/net/tun.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/drivers/net/tun.c b/drivers/net/tun.c
index 785f384..2898673 100644
--- a/drivers/net/tun.c
+++ b/drivers/net/tun.c
@@ -461,7 +461,7 @@ static __inline__ ssize_t tun_get_user(struct tun_struct *tun, struct iovec *iv,
break;
};
- if (gso.flags & (1 << VIRTIO_NET_F_CSUM)) {
+ if (gso.flags & VIRTIO_NET_HDR_F_NEEDS_CSUM) {
if (!skb_partial_csum_set(skb, gso.csum_start, gso.csum_offset)) {
tun->dev->stats.rx_dropped++;
kfree_skb(skb);
--
1.5.4.1
linux-2.6-virtio-fix-typo-in-virtio-net-hdr-comments.patch:
--- NEW FILE linux-2.6-virtio-fix-typo-in-virtio-net-hdr-comments.patch ---
>From 4f5b7b4c74495dace797bc953c81c8c616c693e6 Mon Sep 17 00:00:00 2001
From: Mark McLoughlin <markmc at redhat.com>
Date: Thu, 22 May 2008 08:15:23 +0100
Subject: [PATCH 08/13] virtio: Fix typo in virtio_net_hdr comments
Signed-off-by: Mark McLoughlin <markmc at redhat.com>
---
include/linux/virtio_net.h | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/include/linux/virtio_net.h b/include/linux/virtio_net.h
index 1ea3351..06c3e38 100644
--- a/include/linux/virtio_net.h
+++ b/include/linux/virtio_net.h
@@ -29,7 +29,7 @@ struct virtio_net_hdr
#define VIRTIO_NET_HDR_GSO_ECN 0x80 // TCP has ECN set
__u8 gso_type;
__u16 hdr_len; /* Ethernet + IP + tcp/udp hdrs */
- __u16 gso_size; /* Bytes to append to gso_hdr_len per frame */
+ __u16 gso_size; /* Bytes to append to hdr_len per frame */
__u16 csum_start; /* Position to start checksumming from */
__u16 csum_offset; /* Offset after that to place checksum */
};
--
1.5.4.1
linux-2.6-virtio-net-fix-skb-csum-start-computation.patch:
--- NEW FILE linux-2.6-virtio-net-fix-skb-csum-start-computation.patch ---
>From 81496e6802f1fd0dfa4d8085da887e4fa9cd3df1 Mon Sep 17 00:00:00 2001
From: Mark McLoughlin <markmc at redhat.com>
Date: Mon, 26 May 2008 13:37:58 +0100
Subject: [PATCH 10/13] virtio_net: Fix skb->csum_start computation
hdr->csum_start is the offset from the start of the ethernet
header to the transport layer checksum field. skb->csum_start
is the offset from skb->head.
skb_partial_csum_set() assumes that skb->data points to the
ethernet header - i.e. it computes skb->csum_start by adding
the headroom to hdr->csum_start.
Since eth_type_trans() skb_pull()s the ethernet header,
skb_partial_csum_set() should be called before
eth_type_trans().
Signed-off-by: Mark McLoughlin <markmc at redhat.com>
Cc: Herbert Xu <herbert at gondor.apana.org.au>
---
drivers/net/virtio_net.c | 7 ++++---
1 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_net.c
index bbf2d8e..2c116bf 100644
--- a/drivers/net/virtio_net.c
+++ b/drivers/net/virtio_net.c
@@ -93,9 +93,6 @@ static void receive_skb(struct net_device *dev, struct sk_buff *skb,
}
skb->truesize += skb->data_len;
- skb->protocol = eth_type_trans(skb, dev);
- pr_debug("Receiving skb proto 0x%04x len %i type %i\n",
- ntohs(skb->protocol), skb->len, skb->pkt_type);
dev->stats.rx_bytes += skb->len;
dev->stats.rx_packets++;
@@ -105,6 +102,10 @@ static void receive_skb(struct net_device *dev, struct sk_buff *skb,
goto frame_err;
}
+ skb->protocol = eth_type_trans(skb, dev);
+ pr_debug("Receiving skb proto 0x%04x len %i type %i\n",
+ ntohs(skb->protocol), skb->len, skb->pkt_type);
+
if (hdr->gso_type != VIRTIO_NET_HDR_GSO_NONE) {
pr_debug("GSO!\n");
switch (hdr->gso_type & ~VIRTIO_NET_HDR_GSO_ECN) {
--
1.5.4.1
linux-2.6-virtio-net-trivial-coding-style-fix.patch:
--- NEW FILE linux-2.6-virtio-net-trivial-coding-style-fix.patch ---
>From e2d82f24bbc4cca16b475acc01da8a0d48dfbc90 Mon Sep 17 00:00:00 2001
From: Mark McLoughlin <markmc at redhat.com>
Date: Mon, 26 May 2008 13:33:09 +0100
Subject: [PATCH 09/13] virtio_net: Trivial coding style fix
Signed-off-by: Mark McLoughlin <markmc at redhat.com>
---
drivers/net/virtio_net.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_net.c
index dd267aa..bbf2d8e 100644
--- a/drivers/net/virtio_net.c
+++ b/drivers/net/virtio_net.c
@@ -101,7 +101,7 @@ static void receive_skb(struct net_device *dev, struct sk_buff *skb,
if (hdr->flags & VIRTIO_NET_HDR_F_NEEDS_CSUM) {
pr_debug("Needs csum!\n");
- if (!skb_partial_csum_set(skb,hdr->csum_start,hdr->csum_offset))
+ if (!skb_partial_csum_set(skb, hdr->csum_start, hdr->csum_offset))
goto frame_err;
}
--
1.5.4.1
Index: kernel.spec
===================================================================
RCS file: /cvs/pkgs/rpms/kernel/F-9/kernel.spec,v
retrieving revision 1.648.2.1
retrieving revision 1.648.2.2
diff -u -r1.648.2.1 -r1.648.2.2
--- kernel.spec 20 May 2008 13:49:16 -0000 1.648.2.1
+++ kernel.spec 26 May 2008 13:27:49 -0000 1.648.2.2
@@ -643,6 +643,13 @@
Patch1605: linux-2.6-interface-to-query-tun-tap-features.patch
Patch1606: linux-2.6-tun-fix-gso-mapping.patch
+Patch1607: linux-2.6-virtio-fix-typo-in-virtio-net-hdr-comments.patch
+Patch1608: linux-2.6-virtio-net-trivial-coding-style-fix.patch
+Patch1609: linux-2.6-virtio-net-fix-skb-csum-start-computation.patch
+Patch1610: linux-2.6-tun-fix-trivial-coding-style-issue.patch
+Patch1611: linux-2.6-tun-use-correct-virtio-net-csum-macro-for-testing-flags.patch
+Patch1612: linux-2.6-tun-fix-skb-csum-start-computation.patch
+
# nouveau + drm fixes
Patch1801: linux-2.6-drm-git-mm.patch
Patch1803: nouveau-drm.patch
@@ -1212,6 +1219,14 @@
ApplyPatch linux-2.6-interface-to-query-tun-tap-features.patch
ApplyPatch linux-2.6-tun-fix-gso-mapping.patch
+# misc virtio_net/tun csum/GSO fixes
+ApplyPatch linux-2.6-virtio-fix-typo-in-virtio-net-hdr-comments.patch
+ApplyPatch linux-2.6-virtio-net-trivial-coding-style-fix.patch
+ApplyPatch linux-2.6-virtio-net-fix-skb-csum-start-computation.patch
+ApplyPatch linux-2.6-tun-fix-trivial-coding-style-issue.patch
+ApplyPatch linux-2.6-tun-use-correct-virtio-net-csum-macro-for-testing-flags.patch
+ApplyPatch linux-2.6-tun-fix-skb-csum-start-computation.patch
+
ApplyPatch linux-2.6-e1000-ich9.patch
ApplyPatch linux-2.6-sata-eeepc-faster.patch
@@ -1843,6 +1858,9 @@
%kernel_variant_files -a /%{image_install_path}/xen*-%{KVERREL}.xen -e /etc/ld.so.conf.d/kernelcap-%{KVERREL}.xen.conf %{with_xen} xen
%changelog
+* Mon May 26 2008 Mark McLoughlin <markmc at redhat.com> - 2.6.25.4-29.2.virtio_gso
+- virtio_net/tun: misc csum/GSO patches
+
* Tue May 20 2008 Mark McLoughlin <markmc at redhat.com> - 2.6.25.4-29.1.virtio_gso
- virtio_net/tun: add GSO patches
- Previous message (by thread): rpms/kdegraphics/devel .cvsignore, 1.41, 1.42 kdegraphics.spec, 1.144, 1.145 sources, 1.44, 1.45
- Next message (by thread): rpms/kdelibs/devel .cvsignore, 1.49, 1.50 kdelibs.spec, 1.325, 1.326 sources, 1.59, 1.60
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the fedora-extras-commits
mailing list