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
5dc7c779
Commit
5dc7c779
authored
Jul 22, 2012
by
David S. Miller
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'vhost-net-next' of
git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost
parents
2a304bb8
163049ae
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
11 additions
and
8 deletions
+11
-8
drivers/vhost/net.c
drivers/vhost/net.c
+2
-2
drivers/vhost/test.c
drivers/vhost/test.c
+2
-2
drivers/vhost/vhost.c
drivers/vhost/vhost.c
+2
-3
drivers/vhost/vhost.h
drivers/vhost/vhost.h
+5
-1
No files found.
drivers/vhost/net.c
View file @
5dc7c779
...
@@ -823,14 +823,14 @@ static long vhost_net_ioctl(struct file *f, unsigned int ioctl,
...
@@ -823,14 +823,14 @@ static long vhost_net_ioctl(struct file *f, unsigned int ioctl,
return
-
EFAULT
;
return
-
EFAULT
;
return
vhost_net_set_backend
(
n
,
backend
.
index
,
backend
.
fd
);
return
vhost_net_set_backend
(
n
,
backend
.
index
,
backend
.
fd
);
case
VHOST_GET_FEATURES
:
case
VHOST_GET_FEATURES
:
features
=
VHOST_FEATURES
;
features
=
VHOST_
NET_
FEATURES
;
if
(
copy_to_user
(
featurep
,
&
features
,
sizeof
features
))
if
(
copy_to_user
(
featurep
,
&
features
,
sizeof
features
))
return
-
EFAULT
;
return
-
EFAULT
;
return
0
;
return
0
;
case
VHOST_SET_FEATURES
:
case
VHOST_SET_FEATURES
:
if
(
copy_from_user
(
&
features
,
featurep
,
sizeof
features
))
if
(
copy_from_user
(
&
features
,
featurep
,
sizeof
features
))
return
-
EFAULT
;
return
-
EFAULT
;
if
(
features
&
~
VHOST_FEATURES
)
if
(
features
&
~
VHOST_
NET_
FEATURES
)
return
-
EOPNOTSUPP
;
return
-
EOPNOTSUPP
;
return
vhost_net_set_features
(
n
,
features
);
return
vhost_net_set_features
(
n
,
features
);
case
VHOST_RESET_OWNER
:
case
VHOST_RESET_OWNER
:
...
...
drivers/vhost/test.c
View file @
5dc7c779
...
@@ -261,14 +261,14 @@ static long vhost_test_ioctl(struct file *f, unsigned int ioctl,
...
@@ -261,14 +261,14 @@ static long vhost_test_ioctl(struct file *f, unsigned int ioctl,
return
-
EFAULT
;
return
-
EFAULT
;
return
vhost_test_run
(
n
,
test
);
return
vhost_test_run
(
n
,
test
);
case
VHOST_GET_FEATURES
:
case
VHOST_GET_FEATURES
:
features
=
VHOST_FEATURES
;
features
=
VHOST_
NET_
FEATURES
;
if
(
copy_to_user
(
featurep
,
&
features
,
sizeof
features
))
if
(
copy_to_user
(
featurep
,
&
features
,
sizeof
features
))
return
-
EFAULT
;
return
-
EFAULT
;
return
0
;
return
0
;
case
VHOST_SET_FEATURES
:
case
VHOST_SET_FEATURES
:
if
(
copy_from_user
(
&
features
,
featurep
,
sizeof
features
))
if
(
copy_from_user
(
&
features
,
featurep
,
sizeof
features
))
return
-
EFAULT
;
return
-
EFAULT
;
if
(
features
&
~
VHOST_FEATURES
)
if
(
features
&
~
VHOST_
NET_
FEATURES
)
return
-
EOPNOTSUPP
;
return
-
EOPNOTSUPP
;
return
vhost_test_set_features
(
n
,
features
);
return
vhost_test_set_features
(
n
,
features
);
case
VHOST_RESET_OWNER
:
case
VHOST_RESET_OWNER
:
...
...
drivers/vhost/vhost.c
View file @
5dc7c779
...
@@ -64,7 +64,7 @@ static int vhost_poll_wakeup(wait_queue_t *wait, unsigned mode, int sync,
...
@@ -64,7 +64,7 @@ static int vhost_poll_wakeup(wait_queue_t *wait, unsigned mode, int sync,
return
0
;
return
0
;
}
}
static
void
vhost_work_init
(
struct
vhost_work
*
work
,
vhost_work_fn_t
fn
)
void
vhost_work_init
(
struct
vhost_work
*
work
,
vhost_work_fn_t
fn
)
{
{
INIT_LIST_HEAD
(
&
work
->
node
);
INIT_LIST_HEAD
(
&
work
->
node
);
work
->
fn
=
fn
;
work
->
fn
=
fn
;
...
@@ -137,8 +137,7 @@ void vhost_poll_flush(struct vhost_poll *poll)
...
@@ -137,8 +137,7 @@ void vhost_poll_flush(struct vhost_poll *poll)
vhost_work_flush
(
poll
->
dev
,
&
poll
->
work
);
vhost_work_flush
(
poll
->
dev
,
&
poll
->
work
);
}
}
static
inline
void
vhost_work_queue
(
struct
vhost_dev
*
dev
,
void
vhost_work_queue
(
struct
vhost_dev
*
dev
,
struct
vhost_work
*
work
)
struct
vhost_work
*
work
)
{
{
unsigned
long
flags
;
unsigned
long
flags
;
...
...
drivers/vhost/vhost.h
View file @
5dc7c779
...
@@ -43,6 +43,9 @@ struct vhost_poll {
...
@@ -43,6 +43,9 @@ struct vhost_poll {
struct
vhost_dev
*
dev
;
struct
vhost_dev
*
dev
;
};
};
void
vhost_work_init
(
struct
vhost_work
*
work
,
vhost_work_fn_t
fn
);
void
vhost_work_queue
(
struct
vhost_dev
*
dev
,
struct
vhost_work
*
work
);
void
vhost_poll_init
(
struct
vhost_poll
*
poll
,
vhost_work_fn_t
fn
,
void
vhost_poll_init
(
struct
vhost_poll
*
poll
,
vhost_work_fn_t
fn
,
unsigned
long
mask
,
struct
vhost_dev
*
dev
);
unsigned
long
mask
,
struct
vhost_dev
*
dev
);
void
vhost_poll_start
(
struct
vhost_poll
*
poll
,
struct
file
*
file
);
void
vhost_poll_start
(
struct
vhost_poll
*
poll
,
struct
file
*
file
);
...
@@ -201,7 +204,8 @@ enum {
...
@@ -201,7 +204,8 @@ enum {
VHOST_FEATURES
=
(
1ULL
<<
VIRTIO_F_NOTIFY_ON_EMPTY
)
|
VHOST_FEATURES
=
(
1ULL
<<
VIRTIO_F_NOTIFY_ON_EMPTY
)
|
(
1ULL
<<
VIRTIO_RING_F_INDIRECT_DESC
)
|
(
1ULL
<<
VIRTIO_RING_F_INDIRECT_DESC
)
|
(
1ULL
<<
VIRTIO_RING_F_EVENT_IDX
)
|
(
1ULL
<<
VIRTIO_RING_F_EVENT_IDX
)
|
(
1ULL
<<
VHOST_F_LOG_ALL
)
|
(
1ULL
<<
VHOST_F_LOG_ALL
),
VHOST_NET_FEATURES
=
VHOST_FEATURES
|
(
1ULL
<<
VHOST_NET_F_VIRTIO_NET_HDR
)
|
(
1ULL
<<
VHOST_NET_F_VIRTIO_NET_HDR
)
|
(
1ULL
<<
VIRTIO_NET_F_MRG_RXBUF
),
(
1ULL
<<
VIRTIO_NET_F_MRG_RXBUF
),
};
};
...
...
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