diff mbox series

vhost: add vhost_test to Kconfig & Makefile

Message ID 20210616120734.1050-1-caihuoqing@baidu.com (mailing list archive)
State New, archived
Headers show
Series vhost: add vhost_test to Kconfig & Makefile | expand

Commit Message

Cai,Huoqing June 16, 2021, 12:07 p.m. UTC
When running vhost test, make it easier to config

Signed-off-by: Cai Huoqing <caihuoqing@baidu.com>
---
 drivers/vhost/Kconfig  | 12 ++++++++++++
 drivers/vhost/Makefile |  3 +++
 2 files changed, 15 insertions(+)

Comments

Leon Romanovsky June 16, 2021, 1:06 p.m. UTC | #1
On Wed, Jun 16, 2021 at 08:07:34PM +0800, Cai Huoqing wrote:
> When running vhost test, make it easier to config
> 
> Signed-off-by: Cai Huoqing <caihuoqing@baidu.com>
> ---
>  drivers/vhost/Kconfig  | 12 ++++++++++++
>  drivers/vhost/Makefile |  3 +++
>  2 files changed, 15 insertions(+)
> 
> diff --git a/drivers/vhost/Kconfig b/drivers/vhost/Kconfig
> index 587fbae06182..c93c12843a6f 100644
> --- a/drivers/vhost/Kconfig
> +++ b/drivers/vhost/Kconfig
> @@ -61,6 +61,18 @@ config VHOST_VSOCK
>         To compile this driver as a module, choose M here: the module will be called
>         vhost_vsock.
>  
> +config VHOST_TEST
> +       tristate "vhost virtio-test driver"
> +       depends on EVENTFD
> +       select VHOST
> +       default n

You don't need to write explicitly "default n". "No" is already default.

Thanks

> +       help
> +       This kernel module can be loaded in the host kernel to test vhost function
> +       with tools/virtio-test.
> +
> +       To compile this driver as a module, choose M here: the module will be called
> +       vhost_test.
> +
>  config VHOST_VDPA
>         tristate "Vhost driver for vDPA-based backend"
>         depends on EVENTFD
> diff --git a/drivers/vhost/Makefile b/drivers/vhost/Makefile
> index f3e1897cce85..cf31c1f2652d 100644
> --- a/drivers/vhost/Makefile
> +++ b/drivers/vhost/Makefile
> @@ -8,6 +8,9 @@ vhost_scsi-y := scsi.o
>  obj-$(CONFIG_VHOST_VSOCK) += vhost_vsock.o
>  vhost_vsock-y := vsock.o
>  
> +obj-$(CONFIG_VHOST_TEST) += vhost_test.o
> +vhost_test-y := test.o
> +
>  obj-$(CONFIG_VHOST_RING) += vringh.o
>  
>  obj-$(CONFIG_VHOST_VDPA) += vhost_vdpa.o
> -- 
> 2.22.0
>
diff mbox series

Patch

diff --git a/drivers/vhost/Kconfig b/drivers/vhost/Kconfig
index 587fbae06182..c93c12843a6f 100644
--- a/drivers/vhost/Kconfig
+++ b/drivers/vhost/Kconfig
@@ -61,6 +61,18 @@  config VHOST_VSOCK
        To compile this driver as a module, choose M here: the module will be called
        vhost_vsock.
 
+config VHOST_TEST
+       tristate "vhost virtio-test driver"
+       depends on EVENTFD
+       select VHOST
+       default n
+       help
+       This kernel module can be loaded in the host kernel to test vhost function
+       with tools/virtio-test.
+
+       To compile this driver as a module, choose M here: the module will be called
+       vhost_test.
+
 config VHOST_VDPA
        tristate "Vhost driver for vDPA-based backend"
        depends on EVENTFD
diff --git a/drivers/vhost/Makefile b/drivers/vhost/Makefile
index f3e1897cce85..cf31c1f2652d 100644
--- a/drivers/vhost/Makefile
+++ b/drivers/vhost/Makefile
@@ -8,6 +8,9 @@  vhost_scsi-y := scsi.o
 obj-$(CONFIG_VHOST_VSOCK) += vhost_vsock.o
 vhost_vsock-y := vsock.o
 
+obj-$(CONFIG_VHOST_TEST) += vhost_test.o
+vhost_test-y := test.o
+
 obj-$(CONFIG_VHOST_RING) += vringh.o
 
 obj-$(CONFIG_VHOST_VDPA) += vhost_vdpa.o