[pve-devel] r6152 - pve-kernel-2.6.32-rh/trunk

svn-commits at proxmox.com svn-commits at proxmox.com
Fri Jun 24 10:52:04 CEST 2011


Author: dietmar
Date: 2011-06-24 10:52:03 +0200 (Fri, 24 Jun 2011)
New Revision: 6152

Modified:
   pve-kernel-2.6.32-rh/trunk/Makefile
   pve-kernel-2.6.32-rh/trunk/config-2.6.32.diff
   pve-kernel-2.6.32-rh/trunk/put_page_callback-2.6.32.patch.diff
Log:


Modified: pve-kernel-2.6.32-rh/trunk/Makefile
===================================================================
--- pve-kernel-2.6.32-rh/trunk/Makefile	2011-06-24 08:07:40 UTC (rev 6151)
+++ pve-kernel-2.6.32-rh/trunk/Makefile	2011-06-24 08:52:03 UTC (rev 6152)
@@ -1,7 +1,5 @@
 RELEASE=1.8
 
-# fixme: re-enable pu-page-callback patch
-
 KERNEL_VER=2.6.32
 PKGREL=36
 # alsp include priv firmware into the fw package  fwlist-2.6.32-PREV-pve
@@ -157,7 +155,7 @@
 	cd ${KERNEL_SRC}; patch -p1 <../scst-src/scst/kernel/scst_exec_req_fifo-2.6.32.patch
 	cd ${KERNEL_SRC}; patch -p1 <../scst-src/scst/kernel/io_context-2.6.32.patch
 	#cd ${KERNEL_SRC}; patch -p1 <../scst-src/scst/kernel/readahead-2.6.32.patch
-	#cd ${KERNEL_SRC}; patch -p1 <../put_page_callback-2.6.32.patch
+	cd ${KERNEL_SRC}; patch -p1 <../put_page_callback-2.6.32.patch
 	cd ${KERNEL_SRC}; patch -p1 <../ovz-fix-slow-fsync.patch
 	sed -i ${KERNEL_SRC}/Makefile -e 's/^EXTRAVERSION.*$$/EXTRAVERSION=${EXTRAVERSION}/'
 	touch $@

Modified: pve-kernel-2.6.32-rh/trunk/config-2.6.32.diff
===================================================================
--- pve-kernel-2.6.32-rh/trunk/config-2.6.32.diff	2011-06-24 08:07:40 UTC (rev 6151)
+++ pve-kernel-2.6.32-rh/trunk/config-2.6.32.diff	2011-06-24 08:52:03 UTC (rev 6152)
@@ -1,5 +1,5 @@
 --- config-2.6.32-042stab018.1.x86_64	2011-06-24 07:48:34.000000000 +0200
-+++ config-2.6.32	2011-06-24 08:17:38.000000000 +0200
++++ config-2.6.32	2011-06-24 10:50:39.000000000 +0200
 @@ -101,7 +101,7 @@
  CONFIG_HAVE_UNSTABLE_SCHED_CLOCK=y
  CONFIG_GROUP_SCHED=y
@@ -18,7 +18,15 @@
  # CONFIG_MODULE_SIG_FORCE is not set
  CONFIG_MODULE_VERIFY=y
  CONFIG_STOP_MACHINE=y
-@@ -1322,10 +1322,10 @@
+@@ -602,6 +602,7 @@
+ CONFIG_NET_KEY=m
+ CONFIG_NET_KEY_MIGRATE=y
+ CONFIG_INET=y
++CONFIG_TCP_ZERO_COPY_TRANSFER_COMPLETION_NOTIFICATION=y
+ CONFIG_IP_MULTICAST=y
+ CONFIG_IP_ADVANCED_ROUTER=y
+ CONFIG_ASK_IP_FIB_HASH=y
+@@ -1322,10 +1323,10 @@
  #
  # SCSI support type (disk, tape, CD-ROM)
  #
@@ -31,7 +39,7 @@
  CONFIG_BLK_DEV_SR_VENDOR=y
  CONFIG_CHR_DEV_SG=m
  CONFIG_CHR_DEV_SCH=m
-@@ -1523,7 +1523,7 @@
+@@ -1523,7 +1524,7 @@
  # CONFIG_MULTICORE_RAID456 is not set
  # CONFIG_MD_MULTIPATH is not set
  CONFIG_MD_FAULTY=m
@@ -40,7 +48,7 @@
  CONFIG_DM_DEBUG=y
  CONFIG_DM_CRYPT=m
  CONFIG_DM_SNAPSHOT=m
-@@ -3092,6 +3092,11 @@
+@@ -3092,6 +3093,11 @@
  # CONFIG_LOGO_LINUX_MONO is not set
  # CONFIG_LOGO_LINUX_VGA16 is not set
  CONFIG_LOGO_LINUX_CLUT224=y
@@ -52,7 +60,7 @@
  CONFIG_SOUND=m
  CONFIG_SOUND_OSS_CORE=y
  CONFIG_SOUND_OSS_CORE_PRECLAIM=y
-@@ -4043,7 +4048,7 @@
+@@ -4043,7 +4049,7 @@
  # Kernel hacking
  #
  CONFIG_TRACE_IRQFLAGS_SUPPORT=y
@@ -61,7 +69,7 @@
  # CONFIG_ENABLE_WARN_DEPRECATED is not set
  CONFIG_ENABLE_MUST_CHECK=y
  CONFIG_FRAME_WARN=2048
-@@ -4087,7 +4092,7 @@
+@@ -4087,7 +4093,7 @@
  CONFIG_STACKTRACE=y
  # CONFIG_DEBUG_KOBJECT is not set
  CONFIG_DEBUG_BUGVERBOSE=y

Modified: pve-kernel-2.6.32-rh/trunk/put_page_callback-2.6.32.patch.diff
===================================================================
--- pve-kernel-2.6.32-rh/trunk/put_page_callback-2.6.32.patch.diff	2011-06-24 08:07:40 UTC (rev 6151)
+++ pve-kernel-2.6.32-rh/trunk/put_page_callback-2.6.32.patch.diff	2011-06-24 08:52:03 UTC (rev 6152)
@@ -1,14 +1,259 @@
---- put_page_callback-2.6.32.patch.orig	2010-08-03 12:10:56.000000000 +0200
-+++ put_page_callback-2.6.32.patch	2010-08-03 12:15:38.000000000 +0200
-@@ -257,9 +257,9 @@
+--- put_page_callback-2.6.32.patch.orig	2011-06-24 10:12:23.000000000 +0200
++++ put_page_callback-2.6.32.patch	2011-06-24 10:34:19.000000000 +0200
+@@ -1,28 +1,28 @@
+-diff -upkr linux-2.6.32.1/include/linux/mm_types.h linux-2.6.32.1/include/linux/mm_types.h
+---- linux-2.6.32.1/include/linux/mm_types.h	2009-12-03 06:51:21.000000000 +0300
+-+++ linux-2.6.32.1/include/linux/mm_types.h	2009-12-16 15:22:16.000000000 +0300
+-@@ -106,6 +106,18 @@ struct page {
++diff -upr old/include/linux/mm_types.h linux-2.6-2.6.32/include/linux/mm_types.h
++--- old/include/linux/mm_types.h	2011-06-24 10:12:25.000000000 +0200
+++++ linux-2.6-2.6.32/include/linux/mm_types.h	2011-06-24 10:22:14.000000000 +0200
++@@ -107,6 +107,18 @@ struct page {
+  	 */
+  	void *shadow;
+  #endif
+ +
+ +#if defined(CONFIG_TCP_ZERO_COPY_TRANSFER_COMPLETION_NOTIFICATION)
+-+	/*
+-+	 * Used to implement support for notification on zero-copy TCP transfer
+-+	 * completion. It might look as not good to have this field here and
+-+	 * it's better to have it in struct sk_buff, but it would make the code
+-+	 * much more complicated and fragile, since all skb then would have to
+-+	 * contain only pages with the same value in this field.
+-+	 */
+-+	 void *net_priv;
+++ 	/*
+++ 	 * Used to implement support for notification on zero-copy TCP transfer
+++ 	 * completion. It might look as not good to have this field here and
+++ 	 * it's better to have it in struct sk_buff, but it would make the code
+++ 	 * much more complicated and fragile, since all skb then would have to
+++ 	 * contain only pages with the same value in this field.
+++ 	 */
+++ 	 void *net_priv;
+ +#endif
+-+
+- };
+- 
+- /*
+-diff -upkr linux-2.6.32.1/include/linux/net.h linux-2.6.32.1/include/linux/net.h
+---- linux-2.6.32.1/include/linux/net.h	2009-12-03 06:51:21.000000000 +0300
+-+++ linux-2.6.32.1/include/linux/net.h	2009-12-16 15:23:08.000000000 +0300
+++ 
++ 	union {
++ #ifdef CONFIG_MEMORY_GANGS
++ 		struct gang *gang;
++diff -upr old/include/linux/net.h linux-2.6-2.6.32/include/linux/net.h
++--- old/include/linux/net.h	2011-05-10 20:37:57.000000000 +0200
+++++ linux-2.6-2.6.32/include/linux/net.h	2011-06-24 10:12:56.000000000 +0200
+ @@ -20,6 +20,7 @@
+  
+  #include <linux/socket.h>
+@@ -31,7 +31,7 @@
+  
+  #define NPROTO		AF_MAX
+  
+-@@ -361,5 +362,44 @@ static const struct proto_ops name##_ops
++@@ -365,5 +366,44 @@ static const struct proto_ops name##_ops
+  extern struct ratelimit_state net_ratelimit_state;
+  #endif
+  
+@@ -76,10 +76,10 @@
+ +
+  #endif /* __KERNEL__ */
+  #endif	/* _LINUX_NET_H */
+-diff -upkr linux-2.6.32.1/net/core/dev.c linux-2.6.32.1/net/core/dev.c
+---- linux-2.6.32.1/net/core/dev.c	2009-12-03 06:51:21.000000000 +0300
+-+++ linux-2.6.32.1/net/core/dev.c	2009-12-16 15:22:16.000000000 +0300
+-@@ -2516,7 +2516,7 @@ pull:
++diff -upr old/net/core/dev.c linux-2.6-2.6.32/net/core/dev.c
++--- old/net/core/dev.c	2011-06-24 10:12:25.000000000 +0200
+++++ linux-2.6-2.6.32/net/core/dev.c	2011-06-24 10:12:56.000000000 +0200
++@@ -2932,7 +2932,7 @@ pull:
+  		skb_shinfo(skb)->frags[0].size -= grow;
+  
+  		if (unlikely(!skb_shinfo(skb)->frags[0].size)) {
+@@ -88,10 +88,10 @@
+  			memmove(skb_shinfo(skb)->frags,
+  				skb_shinfo(skb)->frags + 1,
+  				--skb_shinfo(skb)->nr_frags);
+-diff -upkr linux-2.6.32.1/net/core/skbuff.c linux-2.6.32.1/net/core/skbuff.c
+---- linux-2.6.32.1/net/core/skbuff.c	2009-12-03 06:51:21.000000000 +0300
+-+++ linux-2.6.32.1/net/core/skbuff.c	2009-12-16 15:22:16.000000000 +0300
+-@@ -76,13 +76,13 @@ static struct kmem_cache *skbuff_fclone_
++diff -upr old/net/core/skbuff.c linux-2.6-2.6.32/net/core/skbuff.c
++--- old/net/core/skbuff.c	2011-06-24 10:12:25.000000000 +0200
+++++ linux-2.6-2.6.32/net/core/skbuff.c	2011-06-24 10:12:56.000000000 +0200
++@@ -77,13 +77,13 @@ static struct kmem_cache *skbuff_fclone_
+  static void sock_pipe_buf_release(struct pipe_inode_info *pipe,
+  				  struct pipe_buffer *buf)
+  {
+@@ -107,7 +107,7 @@
+  }
+  
+  static int sock_pipe_buf_steal(struct pipe_inode_info *pipe,
+-@@ -344,7 +344,7 @@ static void skb_release_data(struct sk_b
++@@ -352,7 +352,7 @@ static void skb_release_data(struct sk_b
+  		if (skb_shinfo(skb)->nr_frags) {
+  			int i;
+  			for (i = 0; i < skb_shinfo(skb)->nr_frags; i++)
+@@ -116,7 +116,7 @@
+  		}
+  
+  		if (skb_has_frags(skb))
+-@@ -762,7 +762,7 @@ struct sk_buff *pskb_copy(struct sk_buff
++@@ -794,7 +794,7 @@ struct sk_buff *pskb_copy(struct sk_buff
+  
+  		for (i = 0; i < skb_shinfo(skb)->nr_frags; i++) {
+  			skb_shinfo(n)->frags[i] = skb_shinfo(skb)->frags[i];
+@@ -125,7 +125,7 @@
+  		}
+  		skb_shinfo(n)->nr_frags = i;
+  	}
+-@@ -828,7 +828,7 @@ int pskb_expand_head(struct sk_buff *skb
++@@ -860,7 +860,7 @@ int pskb_expand_head(struct sk_buff *skb
+  	       sizeof(struct skb_shared_info));
+  
+  	for (i = 0; i < skb_shinfo(skb)->nr_frags; i++)
+@@ -134,7 +134,7 @@
+  
+  	if (skb_has_frags(skb))
+  		skb_clone_fraglist(skb);
+-@@ -1102,7 +1102,7 @@ drop_pages:
++@@ -1134,7 +1134,7 @@ drop_pages:
+  		skb_shinfo(skb)->nr_frags = i;
+  
+  		for (; i < nfrags; i++)
+@@ -143,7 +143,7 @@
+  
+  		if (skb_has_frags(skb))
+  			skb_drop_fraglist(skb);
+-@@ -1271,7 +1271,7 @@ pull_pages:
++@@ -1303,7 +1303,7 @@ pull_pages:
+  	k = 0;
+  	for (i = 0; i < skb_shinfo(skb)->nr_frags; i++) {
+  		if (skb_shinfo(skb)->frags[i].size <= eat) {
+@@ -152,7 +152,7 @@
+  			eat -= skb_shinfo(skb)->frags[i].size;
+  		} else {
+  			skb_shinfo(skb)->frags[k] = skb_shinfo(skb)->frags[i];
+-@@ -1372,7 +1372,7 @@ EXPORT_SYMBOL(skb_copy_bits);
++@@ -1404,7 +1404,7 @@ EXPORT_SYMBOL(skb_copy_bits);
+   */
+  static void sock_spd_release(struct splice_pipe_desc *spd, unsigned int i)
+  {
+@@ -161,7 +161,7 @@
+  }
+  
+  static inline struct page *linear_to_page(struct page *page, unsigned int *len,
+-@@ -1396,7 +1396,7 @@ new_page:
++@@ -1428,7 +1428,7 @@ new_page:
+  		off = sk->sk_sndmsg_off;
+  		mlen = PAGE_SIZE - off;
+  		if (mlen < 64 && mlen < *len) {
+@@ -170,7 +170,7 @@
+  			goto new_page;
+  		}
+  
+-@@ -1406,7 +1406,7 @@ new_page:
++@@ -1438,7 +1438,7 @@ new_page:
+  	memcpy(page_address(p) + off, page_address(page) + *offset, *len);
+  	sk->sk_sndmsg_off += *len;
+  	*offset = off;
+@@ -179,7 +179,7 @@
+  
+  	return p;
+  }
+-@@ -1427,7 +1427,7 @@ static inline int spd_fill_page(struct s
++@@ -1459,7 +1459,7 @@ static inline int spd_fill_page(struct s
+  		if (!page)
+  			return 1;
+  	} else
+@@ -188,7 +188,7 @@
+  
+  	spd->pages[spd->nr_pages] = page;
+  	spd->partial[spd->nr_pages].len = *len;
+-@@ -2057,7 +2057,7 @@ static inline void skb_split_no_header(s
++@@ -2089,7 +2089,7 @@ static inline void skb_split_no_header(s
+  				 *    where splitting is expensive.
+  				 * 2. Split is accurately. We make this.
+  				 */
+@@ -197,7 +197,7 @@
+  				skb_shinfo(skb1)->frags[0].page_offset += len - pos;
+  				skb_shinfo(skb1)->frags[0].size -= len - pos;
+  				skb_shinfo(skb)->frags[i].size	= len - pos;
+-@@ -2179,7 +2179,7 @@ int skb_shift(struct sk_buff *tgt, struc
++@@ -2211,7 +2211,7 @@ int skb_shift(struct sk_buff *tgt, struc
+  			to++;
+  
+  		} else {
+@@ -206,7 +206,7 @@
+  			fragto->page = fragfrom->page;
+  			fragto->page_offset = fragfrom->page_offset;
+  			fragto->size = todo;
+-@@ -2201,7 +2201,7 @@ int skb_shift(struct sk_buff *tgt, struc
++@@ -2233,7 +2233,7 @@ int skb_shift(struct sk_buff *tgt, struc
+  		fragto = &skb_shinfo(tgt)->frags[merge];
+  
+  		fragto->size += fragfrom->size;
+@@ -215,7 +215,7 @@
+  	}
+  
+  	/* Reposition in the original skb */
+-@@ -2599,7 +2599,7 @@ struct sk_buff *skb_segment(struct sk_bu
++@@ -2628,7 +2628,7 @@ struct sk_buff *skb_segment(struct sk_bu
+  
+  		while (pos < offset + len && i < nfrags) {
+  			*frag = skb_shinfo(skb)->frags[i];
+@@ -224,19 +224,19 @@
+  			size = frag->size;
+  
+  			if (pos < offset) {
+-diff -upkr linux-2.6.32.1/net/ipv4/ip_output.c linux-2.6.32.1/net/ipv4/ip_output.c
+---- linux-2.6.32.1/net/ipv4/ip_output.c	2009-12-03 06:51:21.000000000 +0300
+-+++ linux-2.6.32.1/net/ipv4/ip_output.c	2009-12-16 15:22:16.000000000 +0300
+-@@ -1020,7 +1020,7 @@ alloc_new_skb:
++diff -upr old/net/ipv4/ip_output.c linux-2.6-2.6.32/net/ipv4/ip_output.c
++--- old/net/ipv4/ip_output.c	2011-06-24 10:12:25.000000000 +0200
+++++ linux-2.6-2.6.32/net/ipv4/ip_output.c	2011-06-24 10:25:32.000000000 +0200
++@@ -982,7 +982,7 @@ alloc_new_skb:
+  						err = -EMSGSIZE;
+  						goto error;
+  					}
+ -					get_page(page);
+ +					net_get_page(page);
+- 					skb_fill_page_desc(skb, i, page, sk->sk_sndmsg_off, 0);
++ 					skb_fill_page_desc(skb, i, page, off, 0);
+  					frag = &skb_shinfo(skb)->frags[i];
+  				}
+-@@ -1178,7 +1178,7 @@ ssize_t	ip_append_page(struct sock *sk, 
++@@ -1214,7 +1214,7 @@ ssize_t	ip_append_page(struct sock *sk, 
+  		if (skb_can_coalesce(skb, i, page, offset)) {
+  			skb_shinfo(skb)->frags[i-1].size += len;
+  		} else if (i < MAX_SKB_FRAGS) {
+@@ -245,9 +245,9 @@
+  			skb_fill_page_desc(skb, i, page, offset, len);
+  		} else {
+  			err = -EMSGSIZE;
+-diff -upkr linux-2.6.32.1/net/ipv4/Makefile linux-2.6.32.1/net/ipv4/Makefile
+---- linux-2.6.32.1/net/ipv4/Makefile	2009-12-03 06:51:21.000000000 +0300
+-+++ linux-2.6.32.1/net/ipv4/Makefile	2009-12-16 15:22:16.000000000 +0300
++diff -upr old/net/ipv4/Makefile linux-2.6-2.6.32/net/ipv4/Makefile
++--- old/net/ipv4/Makefile	2009-12-03 04:51:21.000000000 +0100
+++++ linux-2.6-2.6.32/net/ipv4/Makefile	2011-06-24 10:12:56.000000000 +0200
+ @@ -49,6 +49,7 @@ obj-$(CONFIG_TCP_CONG_LP) += tcp_lp.o
+  obj-$(CONFIG_TCP_CONG_YEAH) += tcp_yeah.o
+  obj-$(CONFIG_TCP_CONG_ILLINOIS) += tcp_illinois.o
+@@ -256,10 +256,10 @@
+  
   obj-$(CONFIG_XFRM) += xfrm4_policy.o xfrm4_state.o xfrm4_input.o \
   		      xfrm4_output.o
- diff -upkr linux-2.6.32.1/net/ipv4/tcp.c linux-2.6.32.1/net/ipv4/tcp.c
+-diff -upkr linux-2.6.32.1/net/ipv4/tcp.c linux-2.6.32.1/net/ipv4/tcp.c
 ---- linux-2.6.32.1/net/ipv4/tcp.c	2009-12-03 06:51:21.000000000 +0300
 -+++ linux-2.6.32.1/net/ipv4/tcp.c	2009-12-16 15:22:16.000000000 +0300
 -@@ -799,7 +799,7 @@ new_segment:
-+--- linux-2.6-2.6.32/net/ipv4/tcp.c.orig	2010-08-03 12:03:17.000000000 +0200
-++++ linux-2.6-2.6.32/net/ipv4/tcp.c	2010-08-03 12:06:08.000000000 +0200
++diff -upr old/net/ipv4/tcp.c linux-2.6-2.6.32/net/ipv4/tcp.c
++--- old/net/ipv4/tcp.c	2011-06-24 10:12:25.000000000 +0200
+++++ linux-2.6-2.6.32/net/ipv4/tcp.c	2011-06-24 10:27:22.000000000 +0200
 +@@ -827,7 +827,7 @@ new_segment:
   		if (can_coalesce) {
   			skb_shinfo(skb)->frags[i - 1].size += copy;
@@ -33,14 +278,103 @@
   				} else {
   					skb_fill_page_desc(skb, i, page, off, copy);
   					if (TCP_PAGE(sk)) {
-@@ -287,8 +287,8 @@
+@@ -287,12 +287,12 @@
  -						get_page(page);
  +						net_get_page(page);
   						TCP_PAGE(sk) = page;
 - 					}
 - 				}
+-diff -upkr linux-2.6.32.1/net/ipv4/tcp_output.c linux-2.6.32.1/net/ipv4/tcp_output.c
+---- linux-2.6.32.1/net/ipv4/tcp_output.c	2009-12-03 06:51:21.000000000 +0300
+-+++ linux-2.6.32.1/net/ipv4/tcp_output.c	2009-12-16 15:22:16.000000000 +0300
+-@@ -909,7 +909,7 @@ static void __pskb_trim_head(struct sk_b
 + 					} else
 + 						ub_sock_tcp_detachpage(sk);
- diff -upkr linux-2.6.32.1/net/ipv4/tcp_output.c linux-2.6.32.1/net/ipv4/tcp_output.c
- --- linux-2.6.32.1/net/ipv4/tcp_output.c	2009-12-03 06:51:21.000000000 +0300
- +++ linux-2.6.32.1/net/ipv4/tcp_output.c	2009-12-16 15:22:16.000000000 +0300
++diff -upr old/net/ipv4/tcp_output.c linux-2.6-2.6.32/net/ipv4/tcp_output.c
++--- old/net/ipv4/tcp_output.c	2011-06-24 10:12:25.000000000 +0200
+++++ linux-2.6-2.6.32/net/ipv4/tcp_output.c	2011-06-24 10:12:56.000000000 +0200
++@@ -935,7 +935,7 @@ static void __pskb_trim_head(struct sk_b
+  	k = 0;
+  	for (i = 0; i < skb_shinfo(skb)->nr_frags; i++) {
+  		if (skb_shinfo(skb)->frags[i].size <= eat) {
+@@ -301,63 +301,10 @@
+  			eat -= skb_shinfo(skb)->frags[i].size;
+  		} else {
+  			skb_shinfo(skb)->frags[k] = skb_shinfo(skb)->frags[i];
+-diff -upkr linux-2.6.32.1/net/ipv4/tcp_zero_copy.c linux-2.6.32.1/net/ipv4/tcp_zero_copy.c
+---- linux-2.6.32.1/net/ipv4/tcp_zero_copy.c	2009-12-08 17:41:11.000000000 +0300
+-+++ linux-2.6.32.1/net/ipv4/tcp_zero_copy.c	2009-12-16 15:22:16.000000000 +0300
+-@@ -0,0 +1,49 @@
+-+/*
+-+ *	Support routines for TCP zero copy transmit
+-+ *
+-+ *	Created by Vladislav Bolkhovitin
+-+ *
+-+ *	This program is free software; you can redistribute it and/or
+-+ *      modify it under the terms of the GNU General Public License
+-+ *      version 2 as published by the Free Software Foundation.
+-+ */
+-+
+-+#include <linux/skbuff.h>
+-+
+-+net_get_page_callback_t net_get_page_callback __read_mostly;
+-+EXPORT_SYMBOL(net_get_page_callback);
+-+
+-+net_put_page_callback_t net_put_page_callback __read_mostly;
+-+EXPORT_SYMBOL(net_put_page_callback);
+-+
+-+/*
+-+ * Caller of this function must ensure that at the moment when it's called
+-+ * there are no pages in the system with net_priv field set to non-zero
+-+ * value. Hence, this function, as well as net_get_page() and net_put_page(),
+-+ * don't need any protection.
+-+ */
+-+int net_set_get_put_page_callbacks(
+-+	net_get_page_callback_t get_callback,
+-+	net_put_page_callback_t put_callback)
+-+{
+-+	int res = 0;
+-+
+-+	if ((net_get_page_callback != NULL) && (get_callback != NULL) &&
+-+	    (net_get_page_callback != get_callback)) {
+-+		res = -EBUSY;
+-+		goto out;
+-+	}
+-+
+-+	if ((net_put_page_callback != NULL) && (put_callback != NULL) &&
+-+	    (net_put_page_callback != put_callback)) {
+-+		res = -EBUSY;
+-+		goto out;
+-+	}
+-+
+-+	net_get_page_callback = get_callback;
+-+	net_put_page_callback = put_callback;
+-+
+-+out:
+-+	return res;
+-+}
+-+EXPORT_SYMBOL(net_set_get_put_page_callbacks);
+-diff -upkr linux-2.6.32.1/net/ipv6/ip6_output.c linux-2.6.32.1/net/ipv6/ip6_output.c
+---- linux-2.6.32.1/net/ipv6/ip6_output.c	2009-12-03 06:51:21.000000000 +0300
+-+++ linux-2.6.32.1/net/ipv6/ip6_output.c	2009-12-16 15:22:16.000000000 +0300
+-@@ -1379,7 +1379,7 @@ alloc_new_skb:
++diff -upr old/net/ipv6/ip6_output.c linux-2.6-2.6.32/net/ipv6/ip6_output.c
++--- old/net/ipv6/ip6_output.c	2011-06-24 10:12:25.000000000 +0200
+++++ linux-2.6-2.6.32/net/ipv6/ip6_output.c	2011-06-24 10:12:56.000000000 +0200
++@@ -1389,7 +1389,7 @@ alloc_new_skb:
+  						err = -EMSGSIZE;
+  						goto error;
+  					}
+@@ -366,9 +313,9 @@
+  					skb_fill_page_desc(skb, i, page, sk->sk_sndmsg_off, 0);
+  					frag = &skb_shinfo(skb)->frags[i];
+  				}
+-diff -upkr linux-2.6.32.1/net/Kconfig linux-2.6.32.1/net/Kconfig
+---- linux-2.6.32.1/net/Kconfig	2009-12-03 06:51:21.000000000 +0300
+-+++ linux-2.6.32.1/net/Kconfig	2009-12-16 15:22:16.000000000 +0300
++diff -upr old/net/Kconfig linux-2.6-2.6.32/net/Kconfig
++--- old/net/Kconfig	2009-12-03 04:51:21.000000000 +0100
+++++ linux-2.6-2.6.32/net/Kconfig	2011-06-24 10:12:56.000000000 +0200
+ @@ -72,6 +72,18 @@ config INET
+  
+  	  Short answer: say Y.




More information about the pve-devel mailing list