nuttx/drivers/virtio/Make.defs

55 lines
1.5 KiB
Plaintext
Raw Normal View History

############################################################################
# drivers/virtio/Make.defs
#
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership. The
# ASF licenses this file to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance with the
# License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
#
############################################################################
# Include virtio support
ifeq ($(CONFIG_DRIVERS_VIRTIO),y)
virtio: add virtio framework in NuttX 1. virtio devics/drivers match and probe/remote mechanism; 2. virtio mmio transport layer based on OpenAmp (Compatible with both virtio mmio version 1 and 2); 3. virtio-serial driver based on new virtio framework; 4. virtio-rng driver based on new virtio framework; 5. virtio-net driver based on new virtio framework (IOB Offload implementation); 6. virtio-blk driver based on new virtio framework; 7. Remove the old virtio mmio framework, the old framework only support mmio transport layer, and the new framwork support more transport layer and this commit has implemented all the old virtio drivers; 8. Refresh the the qemu-arm64 and qemu-riscv virtio related configs, and update its README.txt; New virtio-net driver has better performance Compared with previous virtio-mmio-net: | | master/-c | master/-s | this/-c | this/-s | | :--------------------: | :-------: | :-------: | :-----: | :-----: | | qemu-armv8a:netnsh | 539Mbps | 524Mbps | 906Mbps | 715Mbps | | qemu-armv8a:netnsh_smp | 401Mbps | 437Mbps | 583Mbps | 505Mbps | | rv-virt:netnsh | 487Mbps | 512Mbps | 760Mbps | 634Mbps | | rv-virt:netnsh_smp | 387Mbps | 455Mbps | 447Mbps | 502Mbps | | rv-virt:netnsh64 | 602Mbps | 595Mbps | 881Mbps | 769Mbps | | rv-virt:netnsh64_smp | 414Mbps | 515Mbps | 491Mbps | 525Mbps | | rv-virt:knetnsh64 | 515Mbps | 457Mbps | 606Mbps | 540Mbps | | rv-virt:knetnsh64_smp | 308Mbps | 389Mbps | 415Mbps | 474Mbps | Note: Both CONFIG_IOB_NBUFFERS=64, using iperf command, all in Mbits/sec Tested in QEMU 7.2.2 Signed-off-by: wangbowen6 <wangbowen6@xiaomi.com> Signed-off-by: Zhe Weng <wengzhe@xiaomi.com>
2023-03-22 04:49:43 +01:00
CSRCS += virtio.c
endif
ifeq ($(CONFIG_DRIVERS_VIRTIO_MMIO),y)
CSRCS += virtio-mmio.c
endif
virtio: add virtio framework in NuttX 1. virtio devics/drivers match and probe/remote mechanism; 2. virtio mmio transport layer based on OpenAmp (Compatible with both virtio mmio version 1 and 2); 3. virtio-serial driver based on new virtio framework; 4. virtio-rng driver based on new virtio framework; 5. virtio-net driver based on new virtio framework (IOB Offload implementation); 6. virtio-blk driver based on new virtio framework; 7. Remove the old virtio mmio framework, the old framework only support mmio transport layer, and the new framwork support more transport layer and this commit has implemented all the old virtio drivers; 8. Refresh the the qemu-arm64 and qemu-riscv virtio related configs, and update its README.txt; New virtio-net driver has better performance Compared with previous virtio-mmio-net: | | master/-c | master/-s | this/-c | this/-s | | :--------------------: | :-------: | :-------: | :-----: | :-----: | | qemu-armv8a:netnsh | 539Mbps | 524Mbps | 906Mbps | 715Mbps | | qemu-armv8a:netnsh_smp | 401Mbps | 437Mbps | 583Mbps | 505Mbps | | rv-virt:netnsh | 487Mbps | 512Mbps | 760Mbps | 634Mbps | | rv-virt:netnsh_smp | 387Mbps | 455Mbps | 447Mbps | 502Mbps | | rv-virt:netnsh64 | 602Mbps | 595Mbps | 881Mbps | 769Mbps | | rv-virt:netnsh64_smp | 414Mbps | 515Mbps | 491Mbps | 525Mbps | | rv-virt:knetnsh64 | 515Mbps | 457Mbps | 606Mbps | 540Mbps | | rv-virt:knetnsh64_smp | 308Mbps | 389Mbps | 415Mbps | 474Mbps | Note: Both CONFIG_IOB_NBUFFERS=64, using iperf command, all in Mbits/sec Tested in QEMU 7.2.2 Signed-off-by: wangbowen6 <wangbowen6@xiaomi.com> Signed-off-by: Zhe Weng <wengzhe@xiaomi.com>
2023-03-22 04:49:43 +01:00
ifeq ($(CONFIG_DRIVERS_VIRTIO_BLK),y)
CSRCS += virtio-blk.c
endif
ifeq ($(CONFIG_DRIVERS_VIRTIO_GPU),y)
CSRCS += virtio-gpu.c
endif
ifeq ($(CONFIG_DRIVERS_VIRTIO_NET),y)
virtio: add virtio framework in NuttX 1. virtio devics/drivers match and probe/remote mechanism; 2. virtio mmio transport layer based on OpenAmp (Compatible with both virtio mmio version 1 and 2); 3. virtio-serial driver based on new virtio framework; 4. virtio-rng driver based on new virtio framework; 5. virtio-net driver based on new virtio framework (IOB Offload implementation); 6. virtio-blk driver based on new virtio framework; 7. Remove the old virtio mmio framework, the old framework only support mmio transport layer, and the new framwork support more transport layer and this commit has implemented all the old virtio drivers; 8. Refresh the the qemu-arm64 and qemu-riscv virtio related configs, and update its README.txt; New virtio-net driver has better performance Compared with previous virtio-mmio-net: | | master/-c | master/-s | this/-c | this/-s | | :--------------------: | :-------: | :-------: | :-----: | :-----: | | qemu-armv8a:netnsh | 539Mbps | 524Mbps | 906Mbps | 715Mbps | | qemu-armv8a:netnsh_smp | 401Mbps | 437Mbps | 583Mbps | 505Mbps | | rv-virt:netnsh | 487Mbps | 512Mbps | 760Mbps | 634Mbps | | rv-virt:netnsh_smp | 387Mbps | 455Mbps | 447Mbps | 502Mbps | | rv-virt:netnsh64 | 602Mbps | 595Mbps | 881Mbps | 769Mbps | | rv-virt:netnsh64_smp | 414Mbps | 515Mbps | 491Mbps | 525Mbps | | rv-virt:knetnsh64 | 515Mbps | 457Mbps | 606Mbps | 540Mbps | | rv-virt:knetnsh64_smp | 308Mbps | 389Mbps | 415Mbps | 474Mbps | Note: Both CONFIG_IOB_NBUFFERS=64, using iperf command, all in Mbits/sec Tested in QEMU 7.2.2 Signed-off-by: wangbowen6 <wangbowen6@xiaomi.com> Signed-off-by: Zhe Weng <wengzhe@xiaomi.com>
2023-03-22 04:49:43 +01:00
CSRCS += virtio-net.c
endif
virtio: add virtio framework in NuttX 1. virtio devics/drivers match and probe/remote mechanism; 2. virtio mmio transport layer based on OpenAmp (Compatible with both virtio mmio version 1 and 2); 3. virtio-serial driver based on new virtio framework; 4. virtio-rng driver based on new virtio framework; 5. virtio-net driver based on new virtio framework (IOB Offload implementation); 6. virtio-blk driver based on new virtio framework; 7. Remove the old virtio mmio framework, the old framework only support mmio transport layer, and the new framwork support more transport layer and this commit has implemented all the old virtio drivers; 8. Refresh the the qemu-arm64 and qemu-riscv virtio related configs, and update its README.txt; New virtio-net driver has better performance Compared with previous virtio-mmio-net: | | master/-c | master/-s | this/-c | this/-s | | :--------------------: | :-------: | :-------: | :-----: | :-----: | | qemu-armv8a:netnsh | 539Mbps | 524Mbps | 906Mbps | 715Mbps | | qemu-armv8a:netnsh_smp | 401Mbps | 437Mbps | 583Mbps | 505Mbps | | rv-virt:netnsh | 487Mbps | 512Mbps | 760Mbps | 634Mbps | | rv-virt:netnsh_smp | 387Mbps | 455Mbps | 447Mbps | 502Mbps | | rv-virt:netnsh64 | 602Mbps | 595Mbps | 881Mbps | 769Mbps | | rv-virt:netnsh64_smp | 414Mbps | 515Mbps | 491Mbps | 525Mbps | | rv-virt:knetnsh64 | 515Mbps | 457Mbps | 606Mbps | 540Mbps | | rv-virt:knetnsh64_smp | 308Mbps | 389Mbps | 415Mbps | 474Mbps | Note: Both CONFIG_IOB_NBUFFERS=64, using iperf command, all in Mbits/sec Tested in QEMU 7.2.2 Signed-off-by: wangbowen6 <wangbowen6@xiaomi.com> Signed-off-by: Zhe Weng <wengzhe@xiaomi.com>
2023-03-22 04:49:43 +01:00
ifeq ($(CONFIG_DRIVERS_VIRTIO_RNG),y)
CSRCS += virtio-rng.c
endif
ifeq ($(CONFIG_DRIVERS_VIRTIO_SERIAL),y)
CSRCS += virtio-serial.c
endif
# Include build support
DEPPATH += --dep-path virtio
VPATH += :virtio