Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
raspberrypi-kernel
提交
bec571ec
R
raspberrypi-kernel
项目概览
openeuler
/
raspberrypi-kernel
通知
13
Star
1
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
R
raspberrypi-kernel
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
bec571ec
编写于
5月 28, 2009
作者:
D
David S. Miller
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
decnet: Use SKB queue and list helpers instead of doing it by-hand.
Signed-off-by:
N
David S. Miller
<
davem@davemloft.net
>
上级
b6211ae7
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
7 addition
and
20 deletion
+7
-20
net/decnet/af_decnet.c
net/decnet/af_decnet.c
+5
-14
net/decnet/dn_nsp_out.c
net/decnet/dn_nsp_out.c
+2
-6
未找到文件。
net/decnet/af_decnet.c
浏览文件 @
bec571ec
...
...
@@ -1250,14 +1250,8 @@ static int dn_ioctl(struct socket *sock, unsigned int cmd, unsigned long arg)
if
(
skb
)
{
amount
=
skb
->
len
;
}
else
{
skb
=
sk
->
sk_receive_queue
.
next
;
for
(;;)
{
if
(
skb
==
(
struct
sk_buff
*
)
&
sk
->
sk_receive_queue
)
break
;
skb_queue_walk
(
&
sk
->
sk_receive_queue
,
skb
)
amount
+=
skb
->
len
;
skb
=
skb
->
next
;
}
}
release_sock
(
sk
);
err
=
put_user
(
amount
,
(
int
__user
*
)
arg
);
...
...
@@ -1644,13 +1638,13 @@ static int __dn_getsockopt(struct socket *sock, int level,int optname, char __us
static
int
dn_data_ready
(
struct
sock
*
sk
,
struct
sk_buff_head
*
q
,
int
flags
,
int
target
)
{
struct
sk_buff
*
skb
=
q
->
next
;
struct
sk_buff
*
skb
;
int
len
=
0
;
if
(
flags
&
MSG_OOB
)
return
!
skb_queue_empty
(
q
)
?
1
:
0
;
while
(
skb
!=
(
struct
sk_buff
*
)
q
)
{
skb_queue_walk
(
q
,
skb
)
{
struct
dn_skb_cb
*
cb
=
DN_SKB_CB
(
skb
);
len
+=
skb
->
len
;
...
...
@@ -1666,8 +1660,6 @@ static int dn_data_ready(struct sock *sk, struct sk_buff_head *q, int flags, int
/* minimum data length for read exceeded */
if
(
len
>=
target
)
return
1
;
skb
=
skb
->
next
;
}
return
0
;
...
...
@@ -1683,7 +1675,7 @@ static int dn_recvmsg(struct kiocb *iocb, struct socket *sock,
size_t
target
=
size
>
1
?
1
:
0
;
size_t
copied
=
0
;
int
rv
=
0
;
struct
sk_buff
*
skb
,
*
n
skb
;
struct
sk_buff
*
skb
,
*
n
;
struct
dn_skb_cb
*
cb
=
NULL
;
unsigned
char
eor
=
0
;
long
timeo
=
sock_rcvtimeo
(
sk
,
flags
&
MSG_DONTWAIT
);
...
...
@@ -1758,7 +1750,7 @@ static int dn_recvmsg(struct kiocb *iocb, struct socket *sock,
finish_wait
(
sk
->
sk_sleep
,
&
wait
);
}
for
(
skb
=
queue
->
next
;
skb
!=
(
struct
sk_buff
*
)
queue
;
skb
=
nskb
)
{
skb_queue_walk_safe
(
queue
,
skb
,
n
)
{
unsigned
int
chunk
=
skb
->
len
;
cb
=
DN_SKB_CB
(
skb
);
...
...
@@ -1775,7 +1767,6 @@ static int dn_recvmsg(struct kiocb *iocb, struct socket *sock,
skb_pull
(
skb
,
chunk
);
eor
=
cb
->
nsp_flags
&
0x40
;
nskb
=
skb
->
next
;
if
(
skb
->
len
==
0
)
{
skb_unlink
(
skb
,
queue
);
...
...
net/decnet/dn_nsp_out.c
浏览文件 @
bec571ec
...
...
@@ -382,7 +382,7 @@ int dn_nsp_check_xmit_queue(struct sock *sk, struct sk_buff *skb, struct sk_buff
{
struct
dn_skb_cb
*
cb
=
DN_SKB_CB
(
skb
);
struct
dn_scp
*
scp
=
DN_SK
(
sk
);
struct
sk_buff
*
skb2
,
*
list
,
*
ack
=
NULL
;
struct
sk_buff
*
skb2
,
*
n
,
*
ack
=
NULL
;
int
wakeup
=
0
;
int
try_retrans
=
0
;
unsigned
long
reftime
=
cb
->
stamp
;
...
...
@@ -390,9 +390,7 @@ int dn_nsp_check_xmit_queue(struct sock *sk, struct sk_buff *skb, struct sk_buff
unsigned
short
xmit_count
;
unsigned
short
segnum
;
skb2
=
q
->
next
;
list
=
(
struct
sk_buff
*
)
q
;
while
(
list
!=
skb2
)
{
skb_queue_walk_safe
(
q
,
skb2
,
n
)
{
struct
dn_skb_cb
*
cb2
=
DN_SKB_CB
(
skb2
);
if
(
dn_before_or_equal
(
cb2
->
segnum
,
acknum
))
...
...
@@ -400,8 +398,6 @@ int dn_nsp_check_xmit_queue(struct sock *sk, struct sk_buff *skb, struct sk_buff
/* printk(KERN_DEBUG "ack: %s %04x %04x\n", ack ? "ACK" : "SKIP", (int)cb2->segnum, (int)acknum); */
skb2
=
skb2
->
next
;
if
(
ack
==
NULL
)
continue
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录