Re: [PATCH 2/5] AF_RXRPC: Move generic skbuff stuff from XFRM code to generic code [try #2]

From: Christoph Hellwig
Date: Fri Mar 16 2007 - 09:36:29 EST


On Fri, Mar 16, 2007 at 12:50:21PM +0000, David Howells wrote:
> Move generic skbuff stuff from XFRM code to generic code so that AF_RXRPC can
> use it too.
>
> Signed-Off-By: David Howells <dhowells@xxxxxxxxxx>
> ---
>
> include/linux/skbuff.h | 4 +
> include/net/esp.h | 2 -
> net/core/skbuff.c | 173 ++++++++++++++++++++++++++++++++++++++++++++++++
> net/xfrm/xfrm_algo.c | 169 -----------------------------------------------
> 4 files changed, 177 insertions(+), 171 deletions(-)

> --- a/include/linux/skbuff.h
> +++ b/include/linux/skbuff.h
> @@ -1481,5 +1481,9 @@ static inline int skb_is_gso(const struct sk_buff *skb)
> return skb_shinfo(skb)->gso_size;
> }
>
> +struct scatterlist;

normally we try to put structure forward declarations at the top of the
header instead of spreading it around all over.

> +extern int skb_to_sgvec(struct sk_buff *skb, struct scatterlist *sg, int offset, int len);
> +extern int skb_cow_data(struct sk_buff *skb, int tailbits, struct sk_buff **trailer);

please make sure no line is longer than 80 characters. Also shouldn't
prototypes normally be above inlines? Or at least grouped into logical
areas?

> +/*
> + * fill a scatter-gather list with pointers into a part of a socket buffer
> + * chain
> + */

This could probably use a kdoc comment now that it's a public symbol.

> +/*
> + * Check that skb data bits are writable. If they are not, copy data
> + * to newly created private area. If "tailbits" is given, make sure that
> + * tailbits bytes beyond current end of skb are writable.
> + *
> + * Returns amount of elements of scatterlist to load for subsequent
> + * transformations and pointer to writable trailer skb.
> + */

Same here.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/