Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
linux-davinci
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
linux
linux-davinci
Commits
cd07a8ea
Commit
cd07a8ea
authored
Sep 23, 2008
by
David S. Miller
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
tcp: Use SKB queue handling interfaces instead of by-hand versions.
Signed-off-by:
David S. Miller
<
davem@davemloft.net
>
parent
1164f52a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
25 deletions
+15
-25
include/net/tcp.h
include/net/tcp.h
+15
-25
No files found.
include/net/tcp.h
View file @
cd07a8ea
...
@@ -1181,49 +1181,45 @@ static inline void tcp_write_queue_purge(struct sock *sk)
...
@@ -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
)
static
inline
struct
sk_buff
*
tcp_write_queue_head
(
struct
sock
*
sk
)
{
{
struct
sk_buff
*
skb
=
sk
->
sk_write_queue
.
next
;
return
skb_peek
(
&
sk
->
sk_write_queue
);
if
(
skb
==
(
struct
sk_buff
*
)
&
sk
->
sk_write_queue
)
return
NULL
;
return
skb
;
}
}
static
inline
struct
sk_buff
*
tcp_write_queue_tail
(
struct
sock
*
sk
)
static
inline
struct
sk_buff
*
tcp_write_queue_tail
(
struct
sock
*
sk
)
{
{
struct
sk_buff
*
skb
=
sk
->
sk_write_queue
.
prev
;
return
skb_peek_tail
(
&
sk
->
sk_write_queue
);
if
(
skb
==
(
struct
sk_buff
*
)
&
sk
->
sk_write_queue
)
return
NULL
;
return
skb
;
}
}
static
inline
struct
sk_buff
*
tcp_write_queue_next
(
struct
sock
*
sk
,
struct
sk_buff
*
skb
)
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) \
#define tcp_for_write_queue(skb, sk) \
for (skb = (sk)->sk_write_queue.next; \
skb_queue_walk(&(sk)->sk_write_queue, skb)
(skb != (struct sk_buff *)&(sk)->sk_write_queue); \
skb = skb->next)
#define tcp_for_write_queue_from(skb, sk) \
#define tcp_for_write_queue_from(skb, sk) \
for (; (skb != (struct sk_buff *)&(sk)->sk_write_queue);\
skb_queue_walk_from(&(sk)->sk_write_queue, skb)
skb = skb->next)
#define tcp_for_write_queue_from_safe(skb, tmp, sk) \
#define tcp_for_write_queue_from_safe(skb, tmp, sk) \
for (tmp = skb->next; \
skb_queue_walk_from_safe(&(sk)->sk_write_queue, skb, tmp)
(skb != (struct sk_buff *)&(sk)->sk_write_queue); \
skb = tmp, tmp = skb->next)
static
inline
struct
sk_buff
*
tcp_send_head
(
struct
sock
*
sk
)
static
inline
struct
sk_buff
*
tcp_send_head
(
struct
sock
*
sk
)
{
{
return
sk
->
sk_send_head
;
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
)
static
inline
void
tcp_advance_send_head
(
struct
sock
*
sk
,
struct
sk_buff
*
skb
)
{
{
sk
->
sk_send_head
=
skb
->
next
;
if
(
tcp_skb_is_last
(
sk
,
skb
))
if
(
sk
->
sk_send_head
==
(
struct
sk_buff
*
)
&
sk
->
sk_write_queue
)
sk
->
sk_send_head
=
NULL
;
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
)
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)
...
@@ -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
);
__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
)
static
inline
int
tcp_write_queue_empty
(
struct
sock
*
sk
)
{
{
return
skb_queue_empty
(
&
sk
->
sk_write_queue
);
return
skb_queue_empty
(
&
sk
->
sk_write_queue
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment