Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
cloud-kernel
提交
cd07a8ea
cloud-kernel
项目概览
openanolis
/
cloud-kernel
大约 1 年 前同步成功
通知
158
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看板
体验新版 GitCode,发现更多精彩内容 >>
提交
cd07a8ea
编写于
9月 23, 2008
作者:
D
David S. Miller
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
tcp: Use SKB queue handling interfaces instead of by-hand versions.
Signed-off-by:
N
David S. Miller
<
davem@davemloft.net
>
上级
1164f52a
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
15 addition
and
25 deletion
+15
-25
include/net/tcp.h
include/net/tcp.h
+15
-25
未找到文件。
include/net/tcp.h
浏览文件 @
cd07a8ea
...
...
@@ -1181,49 +1181,45 @@ static inline void tcp_write_queue_purge(struct sock *sk)
static
inline
struct
sk_buff
*
tcp_write_queue_head
(
struct
sock
*
sk
)
{
struct
sk_buff
*
skb
=
sk
->
sk_write_queue
.
next
;
if
(
skb
==
(
struct
sk_buff
*
)
&
sk
->
sk_write_queue
)
return
NULL
;
return
skb
;
return
skb_peek
(
&
sk
->
sk_write_queue
);
}
static
inline
struct
sk_buff
*
tcp_write_queue_tail
(
struct
sock
*
sk
)
{
struct
sk_buff
*
skb
=
sk
->
sk_write_queue
.
prev
;
if
(
skb
==
(
struct
sk_buff
*
)
&
sk
->
sk_write_queue
)
return
NULL
;
return
skb
;
return
skb_peek_tail
(
&
sk
->
sk_write_queue
);
}
static
inline
struct
sk_buff
*
tcp_write_queue_next
(
struct
sock
*
sk
,
struct
sk_buff
*
skb
)
{
return
skb
->
next
;
return
skb
_queue_next
(
&
sk
->
sk_write_queue
,
skb
)
;
}
#define tcp_for_write_queue(skb, sk) \
for (skb = (sk)->sk_write_queue.next; \
(skb != (struct sk_buff *)&(sk)->sk_write_queue); \
skb = skb->next)
skb_queue_walk(&(sk)->sk_write_queue, skb)
#define tcp_for_write_queue_from(skb, sk) \
for (; (skb != (struct sk_buff *)&(sk)->sk_write_queue);\
skb = skb->next)
skb_queue_walk_from(&(sk)->sk_write_queue, skb)
#define tcp_for_write_queue_from_safe(skb, tmp, sk) \
for (tmp = skb->next; \
(skb != (struct sk_buff *)&(sk)->sk_write_queue); \
skb = tmp, tmp = skb->next)
skb_queue_walk_from_safe(&(sk)->sk_write_queue, skb, tmp)
static
inline
struct
sk_buff
*
tcp_send_head
(
struct
sock
*
sk
)
{
return
sk
->
sk_send_head
;
}
static
inline
bool
tcp_skb_is_last
(
const
struct
sock
*
sk
,
const
struct
sk_buff
*
skb
)
{
return
skb_queue_is_last
(
&
sk
->
sk_write_queue
,
skb
);
}
static
inline
void
tcp_advance_send_head
(
struct
sock
*
sk
,
struct
sk_buff
*
skb
)
{
sk
->
sk_send_head
=
skb
->
next
;
if
(
sk
->
sk_send_head
==
(
struct
sk_buff
*
)
&
sk
->
sk_write_queue
)
if
(
tcp_skb_is_last
(
sk
,
skb
))
sk
->
sk_send_head
=
NULL
;
else
sk
->
sk_send_head
=
tcp_write_queue_next
(
sk
,
skb
);
}
static
inline
void
tcp_check_send_head
(
struct
sock
*
sk
,
struct
sk_buff
*
skb_unlinked
)
...
...
@@ -1284,12 +1280,6 @@ static inline void tcp_unlink_write_queue(struct sk_buff *skb, struct sock *sk)
__skb_unlink
(
skb
,
&
sk
->
sk_write_queue
);
}
static
inline
bool
tcp_skb_is_last
(
const
struct
sock
*
sk
,
const
struct
sk_buff
*
skb
)
{
return
skb_queue_is_last
(
&
sk
->
sk_write_queue
,
skb
);
}
static
inline
int
tcp_write_queue_empty
(
struct
sock
*
sk
)
{
return
skb_queue_empty
(
&
sk
->
sk_write_queue
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录