Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
cloud-kernel
提交
5dc7c779
cloud-kernel
项目概览
openanolis
/
cloud-kernel
12 个月 前同步成功
通知
152
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,发现更多精彩内容 >>
提交
5dc7c779
编写于
7月 22, 2012
作者:
D
David S. Miller
浏览文件
操作
浏览文件
下载
差异文件
Merge branch 'vhost-net-next' of
git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost
上级
2a304bb8
163049ae
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
11 addition
and
8 deletion
+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
未找到文件。
drivers/vhost/net.c
浏览文件 @
5dc7c779
...
...
@@ -823,14 +823,14 @@ static long vhost_net_ioctl(struct file *f, unsigned int ioctl,
return
-
EFAULT
;
return
vhost_net_set_backend
(
n
,
backend
.
index
,
backend
.
fd
);
case
VHOST_GET_FEATURES
:
features
=
VHOST_FEATURES
;
features
=
VHOST_
NET_
FEATURES
;
if
(
copy_to_user
(
featurep
,
&
features
,
sizeof
features
))
return
-
EFAULT
;
return
0
;
case
VHOST_SET_FEATURES
:
if
(
copy_from_user
(
&
features
,
featurep
,
sizeof
features
))
return
-
EFAULT
;
if
(
features
&
~
VHOST_FEATURES
)
if
(
features
&
~
VHOST_
NET_
FEATURES
)
return
-
EOPNOTSUPP
;
return
vhost_net_set_features
(
n
,
features
);
case
VHOST_RESET_OWNER
:
...
...
drivers/vhost/test.c
浏览文件 @
5dc7c779
...
...
@@ -261,14 +261,14 @@ static long vhost_test_ioctl(struct file *f, unsigned int ioctl,
return
-
EFAULT
;
return
vhost_test_run
(
n
,
test
);
case
VHOST_GET_FEATURES
:
features
=
VHOST_FEATURES
;
features
=
VHOST_
NET_
FEATURES
;
if
(
copy_to_user
(
featurep
,
&
features
,
sizeof
features
))
return
-
EFAULT
;
return
0
;
case
VHOST_SET_FEATURES
:
if
(
copy_from_user
(
&
features
,
featurep
,
sizeof
features
))
return
-
EFAULT
;
if
(
features
&
~
VHOST_FEATURES
)
if
(
features
&
~
VHOST_
NET_
FEATURES
)
return
-
EOPNOTSUPP
;
return
vhost_test_set_features
(
n
,
features
);
case
VHOST_RESET_OWNER
:
...
...
drivers/vhost/vhost.c
浏览文件 @
5dc7c779
...
...
@@ -64,7 +64,7 @@ static int vhost_poll_wakeup(wait_queue_t *wait, unsigned mode, int sync,
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
);
work
->
fn
=
fn
;
...
...
@@ -137,8 +137,7 @@ void vhost_poll_flush(struct vhost_poll *poll)
vhost_work_flush
(
poll
->
dev
,
&
poll
->
work
);
}
static
inline
void
vhost_work_queue
(
struct
vhost_dev
*
dev
,
struct
vhost_work
*
work
)
void
vhost_work_queue
(
struct
vhost_dev
*
dev
,
struct
vhost_work
*
work
)
{
unsigned
long
flags
;
...
...
drivers/vhost/vhost.h
浏览文件 @
5dc7c779
...
...
@@ -43,6 +43,9 @@ struct vhost_poll {
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
,
unsigned
long
mask
,
struct
vhost_dev
*
dev
);
void
vhost_poll_start
(
struct
vhost_poll
*
poll
,
struct
file
*
file
);
...
...
@@ -201,7 +204,8 @@ enum {
VHOST_FEATURES
=
(
1ULL
<<
VIRTIO_F_NOTIFY_ON_EMPTY
)
|
(
1ULL
<<
VIRTIO_RING_F_INDIRECT_DESC
)
|
(
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
<<
VIRTIO_NET_F_MRG_RXBUF
),
};
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录