Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
linux
Commits
f4362a2c
Commit
f4362a2c
authored
Nov 24, 2014
by
Al Viro
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
switch tcp_sock->ucopy from iovec (ucopy.iov) to msghdr (ucopy.msg)
Signed-off-by:
Al Viro
<
viro@zeniv.linux.org.uk
>
parent
f69e6d13
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
5 additions
and
6 deletions
+5
-6
include/linux/tcp.h
include/linux/tcp.h
+1
-1
net/ipv4/tcp.c
net/ipv4/tcp.c
+1
-1
net/ipv4/tcp_input.c
net/ipv4/tcp_input.c
+3
-4
No files found.
include/linux/tcp.h
View file @
f4362a2c
...
...
@@ -162,7 +162,7 @@ struct tcp_sock {
struct
{
struct
sk_buff_head
prequeue
;
struct
task_struct
*
task
;
struct
iovec
*
iov
;
struct
msghdr
*
msg
;
int
memory
;
int
len
;
}
ucopy
;
...
...
net/ipv4/tcp.c
View file @
f4362a2c
...
...
@@ -1729,7 +1729,7 @@ int tcp_recvmsg(struct kiocb *iocb, struct sock *sk, struct msghdr *msg,
if
(
!
user_recv
&&
!
(
flags
&
(
MSG_TRUNC
|
MSG_PEEK
)))
{
user_recv
=
current
;
tp
->
ucopy
.
task
=
user_recv
;
tp
->
ucopy
.
iov
=
msg
->
msg_iov
;
tp
->
ucopy
.
msg
=
msg
;
}
tp
->
ucopy
.
len
=
len
;
...
...
net/ipv4/tcp_input.c
View file @
f4362a2c
...
...
@@ -4421,7 +4421,7 @@ static void tcp_data_queue(struct sock *sk, struct sk_buff *skb)
__set_current_state
(
TASK_RUNNING
);
local_bh_enable
();
if
(
!
skb_copy_datagram_
iovec
(
skb
,
0
,
tp
->
ucopy
.
iov
,
chunk
))
{
if
(
!
skb_copy_datagram_
msg
(
skb
,
0
,
tp
->
ucopy
.
msg
,
chunk
))
{
tp
->
ucopy
.
len
-=
chunk
;
tp
->
copied_seq
+=
chunk
;
eaten
=
(
chunk
==
skb
->
len
);
...
...
@@ -4941,10 +4941,9 @@ static int tcp_copy_to_iovec(struct sock *sk, struct sk_buff *skb, int hlen)
local_bh_enable
();
if
(
skb_csum_unnecessary
(
skb
))
err
=
skb_copy_datagram_
iovec
(
skb
,
hlen
,
tp
->
ucopy
.
iov
,
chunk
);
err
=
skb_copy_datagram_
msg
(
skb
,
hlen
,
tp
->
ucopy
.
msg
,
chunk
);
else
err
=
skb_copy_and_csum_datagram_iovec
(
skb
,
hlen
,
tp
->
ucopy
.
iov
);
err
=
skb_copy_and_csum_datagram_msg
(
skb
,
hlen
,
tp
->
ucopy
.
msg
);
if
(
!
err
)
{
tp
->
ucopy
.
len
-=
chunk
;
...
...
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