Dor Laor
2008-Mar-05 14:40 UTC
[PATCH 2/3] Move COMPAT_csum_offset to kernels < .24 Also add #else for initializing the virtio_net_hdr
Signed-off-by: Dor Laor <dor.laor at qumranet.com> --- external-module-compat.h | 4 ++-- hack-module.awk | 5 ++++- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/external-module-compat.h b/external-module-compat.h index 75c4fd0..9c93464 100644 --- a/external-module-compat.h +++ b/external-module-compat.h @@ -63,6 +63,8 @@ do { \ } while(0) #define netif_rx_schedule(dev, napi) netif_rx_schedule(dev) +#define COMPAT_csum_offset + #if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,23) #define scsi_cmd_ioctl(filp, rq, gendisk, cmd, data) \ @@ -85,8 +87,6 @@ do { \ #define list_first_entry(ptr, type, member) \ list_entry((ptr)->next, type, member) -#define COMPAT_csum_offset - static inline void * __must_check krealloc(const void *data, size_t size, gfp_t gfp) { diff --git a/hack-module.awk b/hack-module.awk index bd63fb9..41ba60d 100644 --- a/hack-module.awk +++ b/hack-module.awk @@ -106,7 +106,10 @@ } /ip_summed == CHECKSUM_PARTIAL\)/ { - print "#ifndef COMPAT_csum_offset"; + print "#ifdef COMPAT_csum_offset"; + print "\thdr->flags = 0;" + print "\thdr->csum_offset = hdr->csum_start = 0;" + print "#else" need_endif_indent_brace = 1; } -- 1.5.4.1 --=-GX8nzkmESIKGfVphMk3E Content-Disposition: attachment; filename*0=0003-Backport-skb_transport_header-as-a-BUG.-Since-kvm-h.patc; filename*1=h Content-Type: application/mbox; name=0003-Backport-skb_transport_header-as-a-BUG.-Since-kvm-h.patch Content-Transfer-Encoding: 7bit
Seemingly Similar Threads
- [PATCH 3/3] Backport skb_transport_header as a BUG.. Since kvm host side does not support GSO anyway the simplest/fastest thing is to backport the relative new skb_transport_header as BUG.
- [PATCH 1/3] Backward compat to replace napi in *rx_schedule*
- 1.1.3: imap crashes with SIGSEGV
- 2.2.14 Panic in sync_expunge_range()
- [PATCH v4 21/42] virtio_net: get rid of virtio_net_hdr/skb_vnet_hdr