Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
cloud-kernel
提交
e69dd336
cloud-kernel
项目概览
openanolis
/
cloud-kernel
1 年多 前同步成功
通知
160
Star
36
Fork
7
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
10
列表
看板
标记
里程碑
合并请求
2
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
cloud-kernel
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
10
Issue
10
列表
看板
标记
里程碑
合并请求
2
合并请求
2
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
e69dd336
编写于
7月 12, 2011
作者:
D
David S. Miller
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
net: Push protocol type directly down to header_ops->cache()
Signed-off-by:
N
David S. Miller
<
davem@davemloft.net
>
上级
3769cffb
变更
7
显示空白变更内容
内联
并排
Showing
7 changed file
with
13 addition
and
13 deletion
+13
-13
drivers/firewire/net.c
drivers/firewire/net.c
+3
-3
drivers/isdn/i4l/isdn_net.c
drivers/isdn/i4l/isdn_net.c
+3
-2
drivers/net/plip.c
drivers/net/plip.c
+3
-3
include/linux/etherdevice.h
include/linux/etherdevice.h
+1
-1
include/linux/netdevice.h
include/linux/netdevice.h
+1
-1
net/core/neighbour.c
net/core/neighbour.c
+1
-1
net/ethernet/eth.c
net/ethernet/eth.c
+1
-2
未找到文件。
drivers/firewire/net.c
浏览文件 @
e69dd336
...
...
@@ -261,16 +261,16 @@ static int fwnet_header_rebuild(struct sk_buff *skb)
}
static
int
fwnet_header_cache
(
const
struct
neighbour
*
neigh
,
struct
hh_cache
*
hh
)
struct
hh_cache
*
hh
,
__be16
type
)
{
struct
net_device
*
net
;
struct
fwnet_header
*
h
;
if
(
hh
->
hh_
type
==
cpu_to_be16
(
ETH_P_802_3
))
if
(
type
==
cpu_to_be16
(
ETH_P_802_3
))
return
-
1
;
net
=
neigh
->
dev
;
h
=
(
struct
fwnet_header
*
)((
u8
*
)
hh
->
hh_data
+
16
-
sizeof
(
*
h
));
h
->
h_proto
=
hh
->
hh_
type
;
h
->
h_proto
=
type
;
memcpy
(
h
->
h_dest
,
neigh
->
ha
,
net
->
addr_len
);
hh
->
hh_len
=
FWNET_HLEN
;
...
...
drivers/isdn/i4l/isdn_net.c
浏览文件 @
e69dd336
...
...
@@ -1983,13 +1983,14 @@ isdn_net_rebuild_header(struct sk_buff *skb)
return
ret
;
}
static
int
isdn_header_cache
(
const
struct
neighbour
*
neigh
,
struct
hh_cache
*
hh
)
static
int
isdn_header_cache
(
const
struct
neighbour
*
neigh
,
struct
hh_cache
*
hh
,
__be16
type
)
{
const
struct
net_device
*
dev
=
neigh
->
dev
;
isdn_net_local
*
lp
=
netdev_priv
(
dev
);
if
(
lp
->
p_encap
==
ISDN_NET_ENCAP_ETHER
)
return
eth_header_cache
(
neigh
,
hh
);
return
eth_header_cache
(
neigh
,
hh
,
type
);
return
-
1
;
}
...
...
drivers/net/plip.c
浏览文件 @
e69dd336
...
...
@@ -152,7 +152,7 @@ static int plip_hard_header(struct sk_buff *skb, struct net_device *dev,
unsigned
short
type
,
const
void
*
daddr
,
const
void
*
saddr
,
unsigned
len
);
static
int
plip_hard_header_cache
(
const
struct
neighbour
*
neigh
,
struct
hh_cache
*
hh
);
struct
hh_cache
*
hh
,
__be16
type
);
static
int
plip_open
(
struct
net_device
*
dev
);
static
int
plip_close
(
struct
net_device
*
dev
);
static
int
plip_ioctl
(
struct
net_device
*
dev
,
struct
ifreq
*
ifr
,
int
cmd
);
...
...
@@ -1026,11 +1026,11 @@ plip_hard_header(struct sk_buff *skb, struct net_device *dev,
}
static
int
plip_hard_header_cache
(
const
struct
neighbour
*
neigh
,
struct
hh_cache
*
hh
)
struct
hh_cache
*
hh
,
__be16
type
)
{
int
ret
;
ret
=
eth_header_cache
(
neigh
,
hh
);
ret
=
eth_header_cache
(
neigh
,
hh
,
type
);
if
(
ret
==
0
)
{
struct
ethhdr
*
eth
;
...
...
include/linux/etherdevice.h
浏览文件 @
e69dd336
...
...
@@ -38,7 +38,7 @@ extern int eth_header(struct sk_buff *skb, struct net_device *dev,
const
void
*
daddr
,
const
void
*
saddr
,
unsigned
len
);
extern
int
eth_rebuild_header
(
struct
sk_buff
*
skb
);
extern
int
eth_header_parse
(
const
struct
sk_buff
*
skb
,
unsigned
char
*
haddr
);
extern
int
eth_header_cache
(
const
struct
neighbour
*
neigh
,
struct
hh_cache
*
hh
);
extern
int
eth_header_cache
(
const
struct
neighbour
*
neigh
,
struct
hh_cache
*
hh
,
__be16
type
);
extern
void
eth_header_cache_update
(
struct
hh_cache
*
hh
,
const
struct
net_device
*
dev
,
const
unsigned
char
*
haddr
);
...
...
include/linux/netdevice.h
浏览文件 @
e69dd336
...
...
@@ -308,7 +308,7 @@ struct header_ops {
const
void
*
saddr
,
unsigned
len
);
int
(
*
parse
)(
const
struct
sk_buff
*
skb
,
unsigned
char
*
haddr
);
int
(
*
rebuild
)(
struct
sk_buff
*
skb
);
int
(
*
cache
)(
const
struct
neighbour
*
neigh
,
struct
hh_cache
*
hh
);
int
(
*
cache
)(
const
struct
neighbour
*
neigh
,
struct
hh_cache
*
hh
,
__be16
type
);
void
(
*
cache_update
)(
struct
hh_cache
*
hh
,
const
struct
net_device
*
dev
,
const
unsigned
char
*
haddr
);
...
...
net/core/neighbour.c
浏览文件 @
e69dd336
...
...
@@ -1247,7 +1247,7 @@ static void neigh_hh_init(struct neighbour *n, struct dst_entry *dst,
hh
->
hh_type
=
protocol
;
atomic_set
(
&
hh
->
hh_refcnt
,
2
);
if
(
dev
->
header_ops
->
cache
(
n
,
hh
))
{
if
(
dev
->
header_ops
->
cache
(
n
,
hh
,
protocol
))
{
kfree
(
hh
);
return
;
}
...
...
net/ethernet/eth.c
浏览文件 @
e69dd336
...
...
@@ -233,9 +233,8 @@ EXPORT_SYMBOL(eth_header_parse);
* @hh: destination cache entry
* Create an Ethernet header template from the neighbour.
*/
int
eth_header_cache
(
const
struct
neighbour
*
neigh
,
struct
hh_cache
*
hh
)
int
eth_header_cache
(
const
struct
neighbour
*
neigh
,
struct
hh_cache
*
hh
,
__be16
type
)
{
__be16
type
=
hh
->
hh_type
;
struct
ethhdr
*
eth
;
const
struct
net_device
*
dev
=
neigh
->
dev
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录