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
nexedi
linux
Commits
62175c75
Commit
62175c75
authored
Feb 01, 2011
by
David S. Miller
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'vhost-net' of
git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost
parents
48bc9a2c
5e18247b
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
7 deletions
+8
-7
drivers/vhost/net.c
drivers/vhost/net.c
+5
-4
drivers/vhost/vhost.h
drivers/vhost/vhost.h
+3
-3
No files found.
drivers/vhost/net.c
View file @
62175c75
...
@@ -128,8 +128,7 @@ static void handle_tx(struct vhost_net *net)
...
@@ -128,8 +128,7 @@ static void handle_tx(struct vhost_net *net)
size_t
hdr_size
;
size_t
hdr_size
;
struct
socket
*
sock
;
struct
socket
*
sock
;
/* TODO: check that we are running from vhost_worker?
/* TODO: check that we are running from vhost_worker? */
* Not sure it's worth it, it's straight-forward enough. */
sock
=
rcu_dereference_check
(
vq
->
private_data
,
1
);
sock
=
rcu_dereference_check
(
vq
->
private_data
,
1
);
if
(
!
sock
)
if
(
!
sock
)
return
;
return
;
...
@@ -306,7 +305,8 @@ static void handle_rx_big(struct vhost_net *net)
...
@@ -306,7 +305,8 @@ static void handle_rx_big(struct vhost_net *net)
size_t
len
,
total_len
=
0
;
size_t
len
,
total_len
=
0
;
int
err
;
int
err
;
size_t
hdr_size
;
size_t
hdr_size
;
struct
socket
*
sock
=
rcu_dereference
(
vq
->
private_data
);
/* TODO: check that we are running from vhost_worker? */
struct
socket
*
sock
=
rcu_dereference_check
(
vq
->
private_data
,
1
);
if
(
!
sock
||
skb_queue_empty
(
&
sock
->
sk
->
sk_receive_queue
))
if
(
!
sock
||
skb_queue_empty
(
&
sock
->
sk
->
sk_receive_queue
))
return
;
return
;
...
@@ -415,7 +415,8 @@ static void handle_rx_mergeable(struct vhost_net *net)
...
@@ -415,7 +415,8 @@ static void handle_rx_mergeable(struct vhost_net *net)
int
err
,
headcount
;
int
err
,
headcount
;
size_t
vhost_hlen
,
sock_hlen
;
size_t
vhost_hlen
,
sock_hlen
;
size_t
vhost_len
,
sock_len
;
size_t
vhost_len
,
sock_len
;
struct
socket
*
sock
=
rcu_dereference
(
vq
->
private_data
);
/* TODO: check that we are running from vhost_worker? */
struct
socket
*
sock
=
rcu_dereference_check
(
vq
->
private_data
,
1
);
if
(
!
sock
||
skb_queue_empty
(
&
sock
->
sk
->
sk_receive_queue
))
if
(
!
sock
||
skb_queue_empty
(
&
sock
->
sk
->
sk_receive_queue
))
return
;
return
;
...
...
drivers/vhost/vhost.h
View file @
62175c75
...
@@ -173,9 +173,9 @@ static inline int vhost_has_feature(struct vhost_dev *dev, int bit)
...
@@ -173,9 +173,9 @@ static inline int vhost_has_feature(struct vhost_dev *dev, int bit)
{
{
unsigned
acked_features
;
unsigned
acked_features
;
acked_features
=
/* TODO: check that we are running from vhost_worker or dev mutex is
rcu_dereference_index_check
(
dev
->
acked_features
,
* held? */
lockdep_is_held
(
&
dev
->
mutex
)
);
acked_features
=
rcu_dereference_index_check
(
dev
->
acked_features
,
1
);
return
acked_features
&
(
1
<<
bit
);
return
acked_features
&
(
1
<<
bit
);
}
}
...
...
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