patch-1.3.6 linux/include/net/sock.h

Next file: linux/kernel/exit.c
Previous file: linux/include/net/route.h
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v1.3.5/linux/include/net/sock.h linux/include/net/sock.h
@@ -213,10 +213,8 @@
   struct sk_buff *	(*rmalloc)(struct sock *sk,
 				    unsigned long size, int force,
 				    int priority);
-  void			(*wfree)(struct sock *sk, struct sk_buff *skb,
-				 unsigned long size);
-  void			(*rfree)(struct sock *sk, struct sk_buff *skb,
-				 unsigned long size);
+  void			(*wfree)(struct sock *sk, struct sk_buff *skb);
+  void			(*rfree)(struct sock *sk, struct sk_buff *skb);
   unsigned long		(*rspace)(struct sock *sk);
   unsigned long		(*wspace)(struct sock *sk);
   void			(*close)(struct sock *sk, int timeout);
@@ -303,10 +301,8 @@
 extern struct sk_buff		*sock_rmalloc(struct sock *sk,
 					      unsigned long size, int force,
 					      int priority);
-extern void			sock_wfree(struct sock *sk, struct sk_buff *skb,
-					   unsigned long size);
-extern void			sock_rfree(struct sock *sk, struct sk_buff *skb,
-					   unsigned long size);
+extern void			sock_wfree(struct sock *sk, struct sk_buff *skb);
+extern void			sock_rfree(struct sock *sk, struct sk_buff *skb);
 extern unsigned long		sock_rspace(struct sock *sk);
 extern unsigned long		sock_wspace(struct sock *sk);
 
@@ -326,11 +322,11 @@
 extern __inline__ int sock_queue_rcv_skb(struct sock *sk, struct sk_buff *skb)
 {
 	unsigned long flags;
-	if(sk->rmem_alloc + skb->mem_len >= sk->rcvbuf)
+	if(sk->rmem_alloc + skb->truesize >= sk->rcvbuf)
 		return -ENOMEM;
 	save_flags(flags);
 	cli();
-	sk->rmem_alloc+=skb->mem_len;
+	sk->rmem_alloc+=skb->truesize;
 	skb->sk=sk;
 	restore_flags(flags);
 	skb_queue_tail(&sk->receive_queue,skb);

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov with Sam's (original) version
of this