Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
Kernel
提交
d3a9632f
K
Kernel
项目概览
openeuler
/
Kernel
1 年多 前同步成功
通知
8
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
K
Kernel
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
提交
d3a9632f
编写于
11月 24, 2014
作者:
A
Al Viro
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
skb_copy_datagram_iovec() can die
no callers other than itself. Signed-off-by:
N
Al Viro
<
viro@zeniv.linux.org.uk
>
上级
ba568408
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
0 addition
and
86 deletion
+0
-86
include/linux/skbuff.h
include/linux/skbuff.h
+0
-2
net/core/datagram.c
net/core/datagram.c
+0
-84
未找到文件。
include/linux/skbuff.h
浏览文件 @
d3a9632f
...
@@ -2644,8 +2644,6 @@ struct sk_buff *skb_recv_datagram(struct sock *sk, unsigned flags, int noblock,
...
@@ -2644,8 +2644,6 @@ struct sk_buff *skb_recv_datagram(struct sock *sk, unsigned flags, int noblock,
int
*
err
);
int
*
err
);
unsigned
int
datagram_poll
(
struct
file
*
file
,
struct
socket
*
sock
,
unsigned
int
datagram_poll
(
struct
file
*
file
,
struct
socket
*
sock
,
struct
poll_table_struct
*
wait
);
struct
poll_table_struct
*
wait
);
int
skb_copy_datagram_iovec
(
const
struct
sk_buff
*
from
,
int
offset
,
struct
iovec
*
to
,
int
size
);
int
skb_copy_datagram_iter
(
const
struct
sk_buff
*
from
,
int
offset
,
int
skb_copy_datagram_iter
(
const
struct
sk_buff
*
from
,
int
offset
,
struct
iov_iter
*
to
,
int
size
);
struct
iov_iter
*
to
,
int
size
);
static
inline
int
skb_copy_datagram_msg
(
const
struct
sk_buff
*
from
,
int
offset
,
static
inline
int
skb_copy_datagram_msg
(
const
struct
sk_buff
*
from
,
int
offset
,
...
...
net/core/datagram.c
浏览文件 @
d3a9632f
...
@@ -309,90 +309,6 @@ int skb_kill_datagram(struct sock *sk, struct sk_buff *skb, unsigned int flags)
...
@@ -309,90 +309,6 @@ int skb_kill_datagram(struct sock *sk, struct sk_buff *skb, unsigned int flags)
}
}
EXPORT_SYMBOL
(
skb_kill_datagram
);
EXPORT_SYMBOL
(
skb_kill_datagram
);
/**
* skb_copy_datagram_iovec - Copy a datagram to an iovec.
* @skb: buffer to copy
* @offset: offset in the buffer to start copying from
* @to: io vector to copy to
* @len: amount of data to copy from buffer to iovec
*
* Note: the iovec is modified during the copy.
*/
int
skb_copy_datagram_iovec
(
const
struct
sk_buff
*
skb
,
int
offset
,
struct
iovec
*
to
,
int
len
)
{
int
start
=
skb_headlen
(
skb
);
int
i
,
copy
=
start
-
offset
;
struct
sk_buff
*
frag_iter
;
trace_skb_copy_datagram_iovec
(
skb
,
len
);
/* Copy header. */
if
(
copy
>
0
)
{
if
(
copy
>
len
)
copy
=
len
;
if
(
memcpy_toiovec
(
to
,
skb
->
data
+
offset
,
copy
))
goto
fault
;
if
((
len
-=
copy
)
==
0
)
return
0
;
offset
+=
copy
;
}
/* Copy paged appendix. Hmm... why does this look so complicated? */
for
(
i
=
0
;
i
<
skb_shinfo
(
skb
)
->
nr_frags
;
i
++
)
{
int
end
;
const
skb_frag_t
*
frag
=
&
skb_shinfo
(
skb
)
->
frags
[
i
];
WARN_ON
(
start
>
offset
+
len
);
end
=
start
+
skb_frag_size
(
frag
);
if
((
copy
=
end
-
offset
)
>
0
)
{
int
err
;
u8
*
vaddr
;
struct
page
*
page
=
skb_frag_page
(
frag
);
if
(
copy
>
len
)
copy
=
len
;
vaddr
=
kmap
(
page
);
err
=
memcpy_toiovec
(
to
,
vaddr
+
frag
->
page_offset
+
offset
-
start
,
copy
);
kunmap
(
page
);
if
(
err
)
goto
fault
;
if
(
!
(
len
-=
copy
))
return
0
;
offset
+=
copy
;
}
start
=
end
;
}
skb_walk_frags
(
skb
,
frag_iter
)
{
int
end
;
WARN_ON
(
start
>
offset
+
len
);
end
=
start
+
frag_iter
->
len
;
if
((
copy
=
end
-
offset
)
>
0
)
{
if
(
copy
>
len
)
copy
=
len
;
if
(
skb_copy_datagram_iovec
(
frag_iter
,
offset
-
start
,
to
,
copy
))
goto
fault
;
if
((
len
-=
copy
)
==
0
)
return
0
;
offset
+=
copy
;
}
start
=
end
;
}
if
(
!
len
)
return
0
;
fault:
return
-
EFAULT
;
}
EXPORT_SYMBOL
(
skb_copy_datagram_iovec
);
/**
/**
* skb_copy_datagram_iter - Copy a datagram to an iovec iterator.
* skb_copy_datagram_iter - Copy a datagram to an iovec iterator.
* @skb: buffer to copy
* @skb: buffer to copy
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录