Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
Kernel
提交
869759b9
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看板
提交
869759b9
编写于
7月 25, 2011
作者:
D
David Miller
提交者:
David S. Miller
11月 30, 2011
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
atm: clip: Convert over to neighbour_priv()
Signed-off-by:
N
David S. Miller
<
davem@davemloft.net
>
上级
76cc714e
变更
2
显示空白变更内容
内联
并排
Showing
2 changed file
with
15 addition
and
15 deletion
+15
-15
include/net/atmclip.h
include/net/atmclip.h
+0
-2
net/atm/clip.c
net/atm/clip.c
+15
-13
未找到文件。
include/net/atmclip.h
浏览文件 @
869759b9
...
...
@@ -15,7 +15,6 @@
#define CLIP_VCC(vcc) ((struct clip_vcc *) ((vcc)->user_back))
#define NEIGH2ENTRY(neigh) ((struct atmarp_entry *) (neigh)->primary_key)
struct
sk_buff
;
...
...
@@ -36,7 +35,6 @@ struct clip_vcc {
struct
atmarp_entry
{
__be32
ip
;
/* IP address */
struct
clip_vcc
*
vccs
;
/* active VCCs; NULL if resolution is
pending */
unsigned
long
expires
;
/* entry expiration time */
...
...
net/atm/clip.c
浏览文件 @
869759b9
...
...
@@ -119,7 +119,7 @@ static void unlink_clip_vcc(struct clip_vcc *clip_vcc)
/* The neighbour entry n->lock is held. */
static
int
neigh_check_cb
(
struct
neighbour
*
n
)
{
struct
atmarp_entry
*
entry
=
NEIGH2ENTRY
(
n
);
struct
atmarp_entry
*
entry
=
neighbour_priv
(
n
);
struct
clip_vcc
*
cv
;
for
(
cv
=
entry
->
vccs
;
cv
;
cv
=
cv
->
next
)
{
...
...
@@ -262,8 +262,10 @@ static void clip_pop(struct atm_vcc *vcc, struct sk_buff *skb)
static
void
clip_neigh_solicit
(
struct
neighbour
*
neigh
,
struct
sk_buff
*
skb
)
{
__be32
*
ip
=
(
__be32
*
)
neigh
->
primary_key
;
pr_debug
(
"(neigh %p, skb %p)
\n
"
,
neigh
,
skb
);
to_atmarpd
(
act_need
,
PRIV
(
neigh
->
dev
)
->
number
,
NEIGH2ENTRY
(
neigh
)
->
ip
);
to_atmarpd
(
act_need
,
PRIV
(
neigh
->
dev
)
->
number
,
*
ip
);
}
static
void
clip_neigh_error
(
struct
neighbour
*
neigh
,
struct
sk_buff
*
skb
)
...
...
@@ -284,13 +286,13 @@ static const struct neigh_ops clip_neigh_ops = {
static
int
clip_constructor
(
struct
neighbour
*
neigh
)
{
struct
atmarp_entry
*
entry
=
NEIGH2ENTRY
(
neigh
);
struct
atmarp_entry
*
entry
=
neighbour_priv
(
neigh
);
struct
net_device
*
dev
=
neigh
->
dev
;
struct
in_device
*
in_dev
;
struct
neigh_parms
*
parms
;
pr_debug
(
"(neigh %p, entry %p)
\n
"
,
neigh
,
entry
);
neigh
->
type
=
inet_addr_type
(
&
init_net
,
entry
->
ip
);
neigh
->
type
=
inet_addr_type
(
&
init_net
,
*
((
__be32
*
)
neigh
->
primary_key
)
);
if
(
neigh
->
type
!=
RTN_UNICAST
)
return
-
EINVAL
;
...
...
@@ -398,12 +400,12 @@ static netdev_tx_t clip_start_xmit(struct sk_buff *skb,
dev
->
stats
.
tx_dropped
++
;
return
NETDEV_TX_OK
;
}
entry
=
NEIGH2ENTRY
(
n
);
entry
=
neighbour_priv
(
n
);
if
(
!
entry
->
vccs
)
{
if
(
time_after
(
jiffies
,
entry
->
expires
))
{
/* should be resolved */
entry
->
expires
=
jiffies
+
ATMARP_RETRY_DELAY
*
HZ
;
to_atmarpd
(
act_need
,
PRIV
(
dev
)
->
number
,
entry
->
ip
);
to_atmarpd
(
act_need
,
PRIV
(
dev
)
->
number
,
*
((
__be32
*
)
n
->
primary_key
)
);
}
if
(
entry
->
neigh
->
arp_queue
.
qlen
<
ATMARP_MAX_UNRES_PACKETS
)
skb_queue_tail
(
&
entry
->
neigh
->
arp_queue
,
skb
);
...
...
@@ -510,7 +512,7 @@ static int clip_setentry(struct atm_vcc *vcc, __be32 ip)
ip_rt_put
(
rt
);
if
(
!
neigh
)
return
-
ENOMEM
;
entry
=
NEIGH2ENTRY
(
neigh
);
entry
=
neighbour_priv
(
neigh
);
if
(
entry
!=
clip_vcc
->
entry
)
{
if
(
!
clip_vcc
->
entry
)
pr_debug
(
"add
\n
"
);
...
...
@@ -771,9 +773,10 @@ static void svc_addr(struct seq_file *seq, struct sockaddr_atmsvc *addr)
/* This means the neighbour entry has no attached VCC objects. */
#define SEQ_NO_VCC_TOKEN ((void *) 2)
static
void
atmarp_info
(
struct
seq_file
*
seq
,
struct
ne
t_device
*
dev
,
static
void
atmarp_info
(
struct
seq_file
*
seq
,
struct
ne
ighbour
*
n
,
struct
atmarp_entry
*
entry
,
struct
clip_vcc
*
clip_vcc
)
{
struct
net_device
*
dev
=
n
->
dev
;
unsigned
long
exp
;
char
buf
[
17
];
int
svc
,
llc
,
off
;
...
...
@@ -793,8 +796,7 @@ static void atmarp_info(struct seq_file *seq, struct net_device *dev,
seq_printf
(
seq
,
"%-6s%-4s%-4s%5ld "
,
dev
->
name
,
svc
?
"SVC"
:
"PVC"
,
llc
?
"LLC"
:
"NULL"
,
exp
);
off
=
scnprintf
(
buf
,
sizeof
(
buf
)
-
1
,
"%pI4"
,
&
entry
->
ip
);
off
=
scnprintf
(
buf
,
sizeof
(
buf
)
-
1
,
"%pI4"
,
n
->
primary_key
);
while
(
off
<
16
)
buf
[
off
++
]
=
' '
;
buf
[
off
]
=
'\0'
;
...
...
@@ -865,7 +867,7 @@ static void *clip_seq_sub_iter(struct neigh_seq_state *_state,
{
struct
clip_seq_state
*
state
=
(
struct
clip_seq_state
*
)
_state
;
return
clip_seq_vcc_walk
(
state
,
NEIGH2ENTRY
(
n
),
pos
);
return
clip_seq_vcc_walk
(
state
,
neighbour_priv
(
n
),
pos
);
}
static
void
*
clip_seq_start
(
struct
seq_file
*
seq
,
loff_t
*
pos
)
...
...
@@ -884,10 +886,10 @@ static int clip_seq_show(struct seq_file *seq, void *v)
seq_puts
(
seq
,
atm_arp_banner
);
}
else
{
struct
clip_seq_state
*
state
=
seq
->
private
;
struct
neighbour
*
n
=
v
;
struct
clip_vcc
*
vcc
=
state
->
vcc
;
struct
neighbour
*
n
=
v
;
atmarp_info
(
seq
,
n
->
dev
,
NEIGH2ENTRY
(
n
),
vcc
);
atmarp_info
(
seq
,
n
,
neighbour_priv
(
n
),
vcc
);
}
return
0
;
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录