Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
Kernel
提交
f69e6d13
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看板
提交
f69e6d13
编写于
11月 24, 2014
作者:
A
Al Viro
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
ip_generic_getfrag, udplite_getfrag: switch to passing msghdr
Signed-off-by:
N
Al Viro
<
viro@zeniv.linux.org.uk
>
上级
19e3c66b
变更
7
显示空白变更内容
内联
并排
Showing
7 changed file
with
11 addition
and
10 deletion
+11
-10
include/net/udplite.h
include/net/udplite.h
+2
-1
net/ipv4/ip_output.c
net/ipv4/ip_output.c
+3
-3
net/ipv4/raw.c
net/ipv4/raw.c
+1
-1
net/ipv4/udp.c
net/ipv4/udp.c
+2
-2
net/ipv6/raw.c
net/ipv6/raw.c
+1
-1
net/ipv6/udp.c
net/ipv6/udp.c
+1
-1
net/l2tp/l2tp_ip6.c
net/l2tp/l2tp_ip6.c
+1
-1
未找到文件。
include/net/udplite.h
浏览文件 @
f69e6d13
...
@@ -19,7 +19,8 @@ extern struct udp_table udplite_table;
...
@@ -19,7 +19,8 @@ extern struct udp_table udplite_table;
static
__inline__
int
udplite_getfrag
(
void
*
from
,
char
*
to
,
int
offset
,
static
__inline__
int
udplite_getfrag
(
void
*
from
,
char
*
to
,
int
offset
,
int
len
,
int
odd
,
struct
sk_buff
*
skb
)
int
len
,
int
odd
,
struct
sk_buff
*
skb
)
{
{
return
memcpy_fromiovecend
(
to
,
(
struct
iovec
*
)
from
,
offset
,
len
);
struct
msghdr
*
msg
=
from
;
return
memcpy_fromiovecend
(
to
,
msg
->
msg_iov
,
offset
,
len
);
}
}
/* Designate sk as UDP-Lite socket */
/* Designate sk as UDP-Lite socket */
...
...
net/ipv4/ip_output.c
浏览文件 @
f69e6d13
...
@@ -752,14 +752,14 @@ EXPORT_SYMBOL(ip_fragment);
...
@@ -752,14 +752,14 @@ EXPORT_SYMBOL(ip_fragment);
int
int
ip_generic_getfrag
(
void
*
from
,
char
*
to
,
int
offset
,
int
len
,
int
odd
,
struct
sk_buff
*
skb
)
ip_generic_getfrag
(
void
*
from
,
char
*
to
,
int
offset
,
int
len
,
int
odd
,
struct
sk_buff
*
skb
)
{
{
struct
iovec
*
iov
=
from
;
struct
msghdr
*
msg
=
from
;
if
(
skb
->
ip_summed
==
CHECKSUM_PARTIAL
)
{
if
(
skb
->
ip_summed
==
CHECKSUM_PARTIAL
)
{
if
(
memcpy_fromiovecend
(
to
,
iov
,
offset
,
len
)
<
0
)
if
(
memcpy_fromiovecend
(
to
,
msg
->
msg_
iov
,
offset
,
len
)
<
0
)
return
-
EFAULT
;
return
-
EFAULT
;
}
else
{
}
else
{
__wsum
csum
=
0
;
__wsum
csum
=
0
;
if
(
csum_partial_copy_fromiovecend
(
to
,
iov
,
offset
,
len
,
&
csum
)
<
0
)
if
(
csum_partial_copy_fromiovecend
(
to
,
msg
->
msg_
iov
,
offset
,
len
,
&
csum
)
<
0
)
return
-
EFAULT
;
return
-
EFAULT
;
skb
->
csum
=
csum_block_add
(
skb
->
csum
,
csum
,
odd
);
skb
->
csum
=
csum_block_add
(
skb
->
csum
,
csum
,
odd
);
}
}
...
...
net/ipv4/raw.c
浏览文件 @
f69e6d13
...
@@ -478,7 +478,7 @@ static int raw_getfrag(void *from, char *to, int offset, int len, int odd,
...
@@ -478,7 +478,7 @@ static int raw_getfrag(void *from, char *to, int offset, int len, int odd,
offset
-=
rfv
->
hlen
;
offset
-=
rfv
->
hlen
;
return
ip_generic_getfrag
(
rfv
->
msg
->
msg_iov
,
to
,
offset
,
len
,
odd
,
skb
);
return
ip_generic_getfrag
(
rfv
->
msg
,
to
,
offset
,
len
,
odd
,
skb
);
}
}
static
int
raw_sendmsg
(
struct
kiocb
*
iocb
,
struct
sock
*
sk
,
struct
msghdr
*
msg
,
static
int
raw_sendmsg
(
struct
kiocb
*
iocb
,
struct
sock
*
sk
,
struct
msghdr
*
msg
,
...
...
net/ipv4/udp.c
浏览文件 @
f69e6d13
...
@@ -1049,7 +1049,7 @@ int udp_sendmsg(struct kiocb *iocb, struct sock *sk, struct msghdr *msg,
...
@@ -1049,7 +1049,7 @@ int udp_sendmsg(struct kiocb *iocb, struct sock *sk, struct msghdr *msg,
/* Lockless fast path for the non-corking case. */
/* Lockless fast path for the non-corking case. */
if
(
!
corkreq
)
{
if
(
!
corkreq
)
{
skb
=
ip_make_skb
(
sk
,
fl4
,
getfrag
,
msg
->
msg_iov
,
ulen
,
skb
=
ip_make_skb
(
sk
,
fl4
,
getfrag
,
msg
,
ulen
,
sizeof
(
struct
udphdr
),
&
ipc
,
&
rt
,
sizeof
(
struct
udphdr
),
&
ipc
,
&
rt
,
msg
->
msg_flags
);
msg
->
msg_flags
);
err
=
PTR_ERR
(
skb
);
err
=
PTR_ERR
(
skb
);
...
@@ -1080,7 +1080,7 @@ int udp_sendmsg(struct kiocb *iocb, struct sock *sk, struct msghdr *msg,
...
@@ -1080,7 +1080,7 @@ int udp_sendmsg(struct kiocb *iocb, struct sock *sk, struct msghdr *msg,
do_append_data:
do_append_data:
up
->
len
+=
ulen
;
up
->
len
+=
ulen
;
err
=
ip_append_data
(
sk
,
fl4
,
getfrag
,
msg
->
msg_iov
,
ulen
,
err
=
ip_append_data
(
sk
,
fl4
,
getfrag
,
msg
,
ulen
,
sizeof
(
struct
udphdr
),
&
ipc
,
&
rt
,
sizeof
(
struct
udphdr
),
&
ipc
,
&
rt
,
corkreq
?
msg
->
msg_flags
|
MSG_MORE
:
msg
->
msg_flags
);
corkreq
?
msg
->
msg_flags
|
MSG_MORE
:
msg
->
msg_flags
);
if
(
err
)
if
(
err
)
...
...
net/ipv6/raw.c
浏览文件 @
f69e6d13
...
@@ -727,7 +727,7 @@ static int raw6_getfrag(void *from, char *to, int offset, int len, int odd,
...
@@ -727,7 +727,7 @@ static int raw6_getfrag(void *from, char *to, int offset, int len, int odd,
offset
-=
rfv
->
hlen
;
offset
-=
rfv
->
hlen
;
return
ip_generic_getfrag
(
rfv
->
msg
->
msg_iov
,
to
,
offset
,
len
,
odd
,
skb
);
return
ip_generic_getfrag
(
rfv
->
msg
,
to
,
offset
,
len
,
odd
,
skb
);
}
}
static
int
rawv6_sendmsg
(
struct
kiocb
*
iocb
,
struct
sock
*
sk
,
static
int
rawv6_sendmsg
(
struct
kiocb
*
iocb
,
struct
sock
*
sk
,
...
...
net/ipv6/udp.c
浏览文件 @
f69e6d13
...
@@ -1312,7 +1312,7 @@ int udpv6_sendmsg(struct kiocb *iocb, struct sock *sk,
...
@@ -1312,7 +1312,7 @@ int udpv6_sendmsg(struct kiocb *iocb, struct sock *sk,
dontfrag
=
np
->
dontfrag
;
dontfrag
=
np
->
dontfrag
;
up
->
len
+=
ulen
;
up
->
len
+=
ulen
;
getfrag
=
is_udplite
?
udplite_getfrag
:
ip_generic_getfrag
;
getfrag
=
is_udplite
?
udplite_getfrag
:
ip_generic_getfrag
;
err
=
ip6_append_data
(
sk
,
getfrag
,
msg
->
msg_iov
,
ulen
,
err
=
ip6_append_data
(
sk
,
getfrag
,
msg
,
ulen
,
sizeof
(
struct
udphdr
),
hlimit
,
tclass
,
opt
,
&
fl6
,
sizeof
(
struct
udphdr
),
hlimit
,
tclass
,
opt
,
&
fl6
,
(
struct
rt6_info
*
)
dst
,
(
struct
rt6_info
*
)
dst
,
corkreq
?
msg
->
msg_flags
|
MSG_MORE
:
msg
->
msg_flags
,
dontfrag
);
corkreq
?
msg
->
msg_flags
|
MSG_MORE
:
msg
->
msg_flags
,
dontfrag
);
...
...
net/l2tp/l2tp_ip6.c
浏览文件 @
f69e6d13
...
@@ -619,7 +619,7 @@ static int l2tp_ip6_sendmsg(struct kiocb *iocb, struct sock *sk,
...
@@ -619,7 +619,7 @@ static int l2tp_ip6_sendmsg(struct kiocb *iocb, struct sock *sk,
back_from_confirm:
back_from_confirm:
lock_sock
(
sk
);
lock_sock
(
sk
);
err
=
ip6_append_data
(
sk
,
ip_generic_getfrag
,
msg
->
msg_iov
,
err
=
ip6_append_data
(
sk
,
ip_generic_getfrag
,
msg
,
ulen
,
transhdrlen
,
hlimit
,
tclass
,
opt
,
ulen
,
transhdrlen
,
hlimit
,
tclass
,
opt
,
&
fl6
,
(
struct
rt6_info
*
)
dst
,
&
fl6
,
(
struct
rt6_info
*
)
dst
,
msg
->
msg_flags
,
dontfrag
);
msg
->
msg_flags
,
dontfrag
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录