lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20081026.230500.268424963.davem@davemloft.net>
Date:	Sun, 26 Oct 2008 23:05:00 -0700 (PDT)
From:	David Miller <davem@...emloft.net>
To:	buytenh@...tstofly.org
Cc:	shemminger@...tta.com, rdunlap@...otime.net, netdev@...r.kernel.org
Subject: Re: [PATCH] net: add documentation for skb recycling

From: Lennert Buytenhek <buytenh@...tstofly.org>
Date: Tue, 21 Oct 2008 05:17:32 +0200

> On Mon, Oct 20, 2008 at 07:06:54PM -0700, Stephen Hemminger wrote:
> 
> > Include description of function from Lennert's original checkin.
> > 
> > Signed-off-by: Stephen Hemminger <shemminger@...tta.com>
> > ---
> > As a matter of policy, any exported function should have docbook.
> > 
> > 
> > --- a/net/core/skbuff.c	2008-10-20 16:10:44.000000000 -0700
> > +++ b/net/core/skbuff.c	2008-10-20 16:16:01.000000000 -0700
> > @@ -449,6 +449,18 @@ void kfree_skb(struct sk_buff *skb)
> >  	__kfree_skb(skb);
> >  }
> >  
> > +/**
> > + * 	skb_recycle_check - check if skb can be reused for receive
> > + *	@skb: buffer
> > + * 	@skb_size: minimum receive buffer size
> > + *
> > + * 	Checks that the skb is not shared or cloned, and that it is
> > + * 	linear and its head portion large enough (as determined by
> > + * 	the driver) to be recycled as a receive buffer.  If these
> > + * 	conditions are met, it does any necessary reference count
> > + * 	dropping and cleans up the skbuff as if it just came from
> > + * 	__alloc_skb().
> 
> How about tweaking this slightly and saying:
> 
>  * 	Checks that the skb passed in is not shared or cloned, and
>  *	that it is linear and its head portion at least as large as
>  *	skb_size so that it can be recycled as a receive buffer.
>  * 	If these conditions are met, this function does any necessary
>  *	reference count dropping and cleans up the skbuff as if it
>  *	just came from __alloc_skb().

I like this tweak, someone please send me the final version with proper
signoffs etc.

Thanks!
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ