提交 12c1604a 编写于 作者: J Jakub Kicinski 提交者: David S. Miller

net: skb: remove old comments about frag_size for build_skb()

Since commit ce098da1 ("skbuff: Introduce slab_build_skb()")
drivers trying to build skb around slab-backed buffers should
go via slab_build_skb() rather than passing frag_size = 0 to
the main build_skb().

Remove the copy'n'pasted comments about 0 meaning slab.
Signed-off-by: NJakub Kicinski <kuba@kernel.org>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 0fd43d0c
...@@ -386,8 +386,6 @@ struct sk_buff *__build_skb(void *data, unsigned int frag_size) ...@@ -386,8 +386,6 @@ struct sk_buff *__build_skb(void *data, unsigned int frag_size)
/* build_skb() is wrapper over __build_skb(), that specifically /* build_skb() is wrapper over __build_skb(), that specifically
* takes care of skb->head and skb->pfmemalloc * takes care of skb->head and skb->pfmemalloc
* This means that if @frag_size is not zero, then @data must be backed
* by a page fragment, not kmalloc() or vmalloc()
*/ */
struct sk_buff *build_skb(void *data, unsigned int frag_size) struct sk_buff *build_skb(void *data, unsigned int frag_size)
{ {
...@@ -406,7 +404,7 @@ EXPORT_SYMBOL(build_skb); ...@@ -406,7 +404,7 @@ EXPORT_SYMBOL(build_skb);
* build_skb_around - build a network buffer around provided skb * build_skb_around - build a network buffer around provided skb
* @skb: sk_buff provide by caller, must be memset cleared * @skb: sk_buff provide by caller, must be memset cleared
* @data: data buffer provided by caller * @data: data buffer provided by caller
* @frag_size: size of data, or 0 if head was kmalloced * @frag_size: size of data
*/ */
struct sk_buff *build_skb_around(struct sk_buff *skb, struct sk_buff *build_skb_around(struct sk_buff *skb,
void *data, unsigned int frag_size) void *data, unsigned int frag_size)
...@@ -428,7 +426,7 @@ EXPORT_SYMBOL(build_skb_around); ...@@ -428,7 +426,7 @@ EXPORT_SYMBOL(build_skb_around);
/** /**
* __napi_build_skb - build a network buffer * __napi_build_skb - build a network buffer
* @data: data buffer provided by caller * @data: data buffer provided by caller
* @frag_size: size of data, or 0 if head was kmalloced * @frag_size: size of data
* *
* Version of __build_skb() that uses NAPI percpu caches to obtain * Version of __build_skb() that uses NAPI percpu caches to obtain
* skbuff_head instead of inplace allocation. * skbuff_head instead of inplace allocation.
...@@ -452,7 +450,7 @@ static struct sk_buff *__napi_build_skb(void *data, unsigned int frag_size) ...@@ -452,7 +450,7 @@ static struct sk_buff *__napi_build_skb(void *data, unsigned int frag_size)
/** /**
* napi_build_skb - build a network buffer * napi_build_skb - build a network buffer
* @data: data buffer provided by caller * @data: data buffer provided by caller
* @frag_size: size of data, or 0 if head was kmalloced * @frag_size: size of data
* *
* Version of __napi_build_skb() that takes care of skb->head_frag * Version of __napi_build_skb() that takes care of skb->head_frag
* and skb->pfmemalloc when the data is a page or page fragment. * and skb->pfmemalloc when the data is a page or page fragment.
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册