Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
Kernel
提交
c8cdaf99
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看板
提交
c8cdaf99
编写于
3月 10, 2008
作者:
Y
YOSHIFUJI Hideaki
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
[IPV4,IPV6]: Share cork.rt between IPv4 and IPv6.
Signed-off-by:
N
YOSHIFUJI Hideaki
<
yoshfuji@linux-ipv6.org
>
上级
a9b05723
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
13 addition
and
16 deletion
+13
-16
include/linux/ipv6.h
include/linux/ipv6.h
+0
-1
include/net/inet_sock.h
include/net/inet_sock.h
+1
-1
net/ipv4/ip_output.c
net/ipv4/ip_output.c
+6
-8
net/ipv6/ip6_output.c
net/ipv6/ip6_output.c
+6
-6
未找到文件。
include/linux/ipv6.h
浏览文件 @
c8cdaf99
...
@@ -315,7 +315,6 @@ struct ipv6_pinfo {
...
@@ -315,7 +315,6 @@ struct ipv6_pinfo {
struct
sk_buff
*
pktoptions
;
struct
sk_buff
*
pktoptions
;
struct
{
struct
{
struct
ipv6_txoptions
*
opt
;
struct
ipv6_txoptions
*
opt
;
struct
rt6_info
*
rt
;
int
hop_limit
;
int
hop_limit
;
int
tclass
;
int
tclass
;
}
cork
;
}
cork
;
...
...
include/net/inet_sock.h
浏览文件 @
c8cdaf99
...
@@ -136,7 +136,7 @@ struct inet_sock {
...
@@ -136,7 +136,7 @@ struct inet_sock {
unsigned
int
flags
;
unsigned
int
flags
;
unsigned
int
fragsize
;
unsigned
int
fragsize
;
struct
ip_options
*
opt
;
struct
ip_options
*
opt
;
struct
rtable
*
r
t
;
struct
dst_entry
*
ds
t
;
int
length
;
/* Total length of all frames */
int
length
;
/* Total length of all frames */
__be32
addr
;
__be32
addr
;
struct
flowi
fl
;
struct
flowi
fl
;
...
...
net/ipv4/ip_output.c
浏览文件 @
c8cdaf99
...
@@ -825,7 +825,7 @@ int ip_append_data(struct sock *sk,
...
@@ -825,7 +825,7 @@ int ip_append_data(struct sock *sk,
inet
->
cork
.
fragsize
=
mtu
=
inet
->
pmtudisc
==
IP_PMTUDISC_PROBE
?
inet
->
cork
.
fragsize
=
mtu
=
inet
->
pmtudisc
==
IP_PMTUDISC_PROBE
?
rt
->
u
.
dst
.
dev
->
mtu
:
rt
->
u
.
dst
.
dev
->
mtu
:
dst_mtu
(
rt
->
u
.
dst
.
path
);
dst_mtu
(
rt
->
u
.
dst
.
path
);
inet
->
cork
.
rt
=
r
t
;
inet
->
cork
.
dst
=
&
rt
->
u
.
ds
t
;
inet
->
cork
.
length
=
0
;
inet
->
cork
.
length
=
0
;
sk
->
sk_sndmsg_page
=
NULL
;
sk
->
sk_sndmsg_page
=
NULL
;
sk
->
sk_sndmsg_off
=
0
;
sk
->
sk_sndmsg_off
=
0
;
...
@@ -834,7 +834,7 @@ int ip_append_data(struct sock *sk,
...
@@ -834,7 +834,7 @@ int ip_append_data(struct sock *sk,
transhdrlen
+=
exthdrlen
;
transhdrlen
+=
exthdrlen
;
}
}
}
else
{
}
else
{
rt
=
inet
->
cork
.
r
t
;
rt
=
(
struct
rtable
*
)
inet
->
cork
.
ds
t
;
if
(
inet
->
cork
.
flags
&
IPCORK_OPT
)
if
(
inet
->
cork
.
flags
&
IPCORK_OPT
)
opt
=
inet
->
cork
.
opt
;
opt
=
inet
->
cork
.
opt
;
...
@@ -1083,7 +1083,7 @@ ssize_t ip_append_page(struct sock *sk, struct page *page,
...
@@ -1083,7 +1083,7 @@ ssize_t ip_append_page(struct sock *sk, struct page *page,
if
(
skb_queue_empty
(
&
sk
->
sk_write_queue
))
if
(
skb_queue_empty
(
&
sk
->
sk_write_queue
))
return
-
EINVAL
;
return
-
EINVAL
;
rt
=
inet
->
cork
.
r
t
;
rt
=
(
struct
rtable
*
)
inet
->
cork
.
ds
t
;
if
(
inet
->
cork
.
flags
&
IPCORK_OPT
)
if
(
inet
->
cork
.
flags
&
IPCORK_OPT
)
opt
=
inet
->
cork
.
opt
;
opt
=
inet
->
cork
.
opt
;
...
@@ -1208,10 +1208,8 @@ static void ip_cork_release(struct inet_sock *inet)
...
@@ -1208,10 +1208,8 @@ static void ip_cork_release(struct inet_sock *inet)
inet
->
cork
.
flags
&=
~
IPCORK_OPT
;
inet
->
cork
.
flags
&=
~
IPCORK_OPT
;
kfree
(
inet
->
cork
.
opt
);
kfree
(
inet
->
cork
.
opt
);
inet
->
cork
.
opt
=
NULL
;
inet
->
cork
.
opt
=
NULL
;
if
(
inet
->
cork
.
rt
)
{
dst_release
(
inet
->
cork
.
dst
);
ip_rt_put
(
inet
->
cork
.
rt
);
inet
->
cork
.
dst
=
NULL
;
inet
->
cork
.
rt
=
NULL
;
}
}
}
/*
/*
...
@@ -1224,7 +1222,7 @@ int ip_push_pending_frames(struct sock *sk)
...
@@ -1224,7 +1222,7 @@ int ip_push_pending_frames(struct sock *sk)
struct
sk_buff
**
tail_skb
;
struct
sk_buff
**
tail_skb
;
struct
inet_sock
*
inet
=
inet_sk
(
sk
);
struct
inet_sock
*
inet
=
inet_sk
(
sk
);
struct
ip_options
*
opt
=
NULL
;
struct
ip_options
*
opt
=
NULL
;
struct
rtable
*
rt
=
inet
->
cork
.
r
t
;
struct
rtable
*
rt
=
(
struct
rtable
*
)
inet
->
cork
.
ds
t
;
struct
iphdr
*
iph
;
struct
iphdr
*
iph
;
__be16
df
=
0
;
__be16
df
=
0
;
__u8
ttl
;
__u8
ttl
;
...
...
net/ipv6/ip6_output.c
浏览文件 @
c8cdaf99
...
@@ -1115,7 +1115,7 @@ int ip6_append_data(struct sock *sk, int getfrag(void *from, char *to,
...
@@ -1115,7 +1115,7 @@ int ip6_append_data(struct sock *sk, int getfrag(void *from, char *to,
/* need source address above miyazawa*/
/* need source address above miyazawa*/
}
}
dst_hold
(
&
rt
->
u
.
dst
);
dst_hold
(
&
rt
->
u
.
dst
);
np
->
cork
.
rt
=
r
t
;
inet
->
cork
.
dst
=
&
rt
->
u
.
ds
t
;
inet
->
cork
.
fl
=
*
fl
;
inet
->
cork
.
fl
=
*
fl
;
np
->
cork
.
hop_limit
=
hlimit
;
np
->
cork
.
hop_limit
=
hlimit
;
np
->
cork
.
tclass
=
tclass
;
np
->
cork
.
tclass
=
tclass
;
...
@@ -1136,7 +1136,7 @@ int ip6_append_data(struct sock *sk, int getfrag(void *from, char *to,
...
@@ -1136,7 +1136,7 @@ int ip6_append_data(struct sock *sk, int getfrag(void *from, char *to,
length
+=
exthdrlen
;
length
+=
exthdrlen
;
transhdrlen
+=
exthdrlen
;
transhdrlen
+=
exthdrlen
;
}
else
{
}
else
{
rt
=
np
->
cork
.
r
t
;
rt
=
(
struct
rt6_info
*
)
inet
->
cork
.
ds
t
;
fl
=
&
inet
->
cork
.
fl
;
fl
=
&
inet
->
cork
.
fl
;
if
(
inet
->
cork
.
flags
&
IPCORK_OPT
)
if
(
inet
->
cork
.
flags
&
IPCORK_OPT
)
opt
=
np
->
cork
.
opt
;
opt
=
np
->
cork
.
opt
;
...
@@ -1381,9 +1381,9 @@ static void ip6_cork_release(struct inet_sock *inet, struct ipv6_pinfo *np)
...
@@ -1381,9 +1381,9 @@ static void ip6_cork_release(struct inet_sock *inet, struct ipv6_pinfo *np)
inet
->
cork
.
flags
&=
~
IPCORK_OPT
;
inet
->
cork
.
flags
&=
~
IPCORK_OPT
;
kfree
(
np
->
cork
.
opt
);
kfree
(
np
->
cork
.
opt
);
np
->
cork
.
opt
=
NULL
;
np
->
cork
.
opt
=
NULL
;
if
(
np
->
cork
.
r
t
)
{
if
(
inet
->
cork
.
ds
t
)
{
dst_release
(
&
np
->
cork
.
rt
->
u
.
dst
);
dst_release
(
inet
->
cork
.
dst
);
np
->
cork
.
r
t
=
NULL
;
inet
->
cork
.
ds
t
=
NULL
;
inet
->
cork
.
flags
&=
~
IPCORK_ALLFRAG
;
inet
->
cork
.
flags
&=
~
IPCORK_ALLFRAG
;
}
}
memset
(
&
inet
->
cork
.
fl
,
0
,
sizeof
(
inet
->
cork
.
fl
));
memset
(
&
inet
->
cork
.
fl
,
0
,
sizeof
(
inet
->
cork
.
fl
));
...
@@ -1398,7 +1398,7 @@ int ip6_push_pending_frames(struct sock *sk)
...
@@ -1398,7 +1398,7 @@ int ip6_push_pending_frames(struct sock *sk)
struct
ipv6_pinfo
*
np
=
inet6_sk
(
sk
);
struct
ipv6_pinfo
*
np
=
inet6_sk
(
sk
);
struct
ipv6hdr
*
hdr
;
struct
ipv6hdr
*
hdr
;
struct
ipv6_txoptions
*
opt
=
np
->
cork
.
opt
;
struct
ipv6_txoptions
*
opt
=
np
->
cork
.
opt
;
struct
rt6_info
*
rt
=
np
->
cork
.
r
t
;
struct
rt6_info
*
rt
=
(
struct
rt6_info
*
)
inet
->
cork
.
ds
t
;
struct
flowi
*
fl
=
&
inet
->
cork
.
fl
;
struct
flowi
*
fl
=
&
inet
->
cork
.
fl
;
unsigned
char
proto
=
fl
->
proto
;
unsigned
char
proto
=
fl
->
proto
;
int
err
=
0
;
int
err
=
0
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录