Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add networking UIO driver #136

Closed
wants to merge 19 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion dep/sddf
Submodule sddf updated 73 files
+33 −0 .clang-format
+19 −21 .github/workflows/examples.yaml
+16 −2 .github/workflows/pr.yaml
+278 −0 LICENSES/LicenseRef-APACHE-2-LLVM-EXCEPTION.txt
+180 −194 blk/components/virt.c
+124 −0 build.zig
+20 −10 ci/README.md
+1 −1 ci/examples.sh
+1 −1 drivers/blk/mmc/imx/mmc_driver.mk
+13 −13 drivers/blk/mmc/imx/usdhc.c
+0 −0 drivers/blk/mmc/imx/usdhc.h
+17 −17 drivers/blk/virtio/block.c
+0 −2 drivers/blk/virtio/block.h
+5 −3 drivers/i2c/meson/driver.h
+51 −15 drivers/i2c/meson/i2c.c
+9 −8 drivers/network/imx/ethernet.c
+22 −16 drivers/network/meson/ethernet.c
+15 −6 drivers/network/virtio/ethernet.c
+3 −3 drivers/serial/arm/uart.c
+3 −3 drivers/serial/imx/uart.c
+3 −3 drivers/serial/meson/uart.c
+93 −0 drivers/serial/snps/include/uart.h
+195 −0 drivers/serial/snps/uart.c
+27 −0 drivers/serial/snps/uart_driver.mk
+445 −0 drivers/serial/virtio/console.c
+34 −0 drivers/serial/virtio/include/console.h
+29 −0 drivers/serial/virtio/serial_driver.mk
+15 −2 drivers/timer/arm/timer.c
+220 −0 drivers/timer/jh7110/timer.c
+27 −0 drivers/timer/jh7110/timer_driver.mk
+1 −1 examples/blk/README.md
+1 −1 examples/blk/basic_data.txt
+14 −21 examples/blk/blk_config.h
+16 −15 examples/blk/board/qemu_virt_aarch64/blk.system
+4 −4 examples/blk/client.c
+57 −58 examples/echo_server/include/ethernet_config/ethernet_config.h
+18 −18 examples/echo_server/include/serial_config/serial_config.h
+8 −3 examples/echo_server/lwip.c
+7 −7 examples/echo_server/tcp_echo_socket.c
+10 −3 examples/i2c/client_ds3231.c
+6 −6 examples/i2c/client_pn532.c
+25 −24 examples/mmc/board/imx8mm_evk/mmc.system
+25 −24 examples/mmc/board/maaxboard/mmc.system
+3 −3 examples/mmc/client.c
+15 −22 examples/mmc/include/configs/blk_config.h
+107 −0 examples/serial/board/star64/serial.system
+12 −2 examples/serial/build.zig
+23 −23 examples/serial/include/serial_config/serial_config.h
+21 −15 examples/serial/serial.mk
+6 −1 examples/timer/Makefile
+25 −0 examples/timer/board/star64/timer.system
+12 −1 examples/timer/build.zig
+7 −25 examples/timer/client.c
+9 −4 examples/timer/timer.mk
+4 −5 i2c/devices/ds3231/ds3231.c
+17 −26 i2c/devices/pn532/pn532.c
+2 −0 include/sddf/blk/queue.h
+2 −0 include/sddf/blk/storage_info.h
+3 −0 include/sddf/i2c/devices/pn532/pn532.h
+6 −9 include/sddf/i2c/queue.h
+15 −15 include/sddf/network/queue.h
+10 −0 include/sddf/network/util.h
+27 −23 include/sddf/serial/queue.h
+105 −0 include/sddf/util/udivmodti4.h
+1 −0 include/sddf/virtio/virtio.h
+9 −3 network/components/copy.c
+18 −7 network/components/virt_rx.c
+19 −9 network/components/virt_tx.c
+2 −2 serial/components/virt_rx.c
+2 −2 serial/components/virt_tx.c
+3 −1 shell.nix
+1 −1 util/assert.c
+29 −33 util/cache.c
32 changes: 16 additions & 16 deletions examples/virtio/board/odroidc4/virtio.system
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
<map mr="rx_data_serial_vmm_1" vaddr="0x6_004_000" perms="rw" cached="true" setvar_vaddr="serial_rx_data" />

<!-- sDDF related regions for virtIO block -->
<map mr="blk_config_vmm_1" vaddr="0x30000000" perms="rw" cached="false" setvar_vaddr="blk_config" />
<map mr="blk_storage_info_vmm_1" vaddr="0x30000000" perms="rw" cached="false" setvar_vaddr="blk_storage_info" />
<map mr="req_blk_vmm_1" vaddr="0x103_800_000" perms="rw" cached="false" setvar_vaddr="blk_req_queue" />
<map mr="resp_blk_vmm_1" vaddr="0x103_a00_000" perms="rw" cached="false" setvar_vaddr="blk_resp_queue" />
<map mr="data_blk_vmm_1" vaddr="0x30600000" perms="rw" cached="true" setvar_vaddr="blk_data" />
Expand All @@ -50,7 +50,7 @@
<map mr="rx_data_serial_vmm_2" vaddr="0x6_004_000" perms="rw" cached="true" setvar_vaddr="serial_rx_data" />

<!-- sDDF related regions for virtIO block -->
<map mr="blk_config_vmm_2" vaddr="0x30000000" perms="rw" cached="false" setvar_vaddr="blk_config" />
<map mr="blk_storage_info_vmm_2" vaddr="0x30000000" perms="rw" cached="false" setvar_vaddr="blk_storage_info" />
<map mr="req_blk_vmm_2" vaddr="0x103_800_000" perms="rw" cached="false" setvar_vaddr="blk_req_queue" />
<map mr="resp_blk_vmm_2" vaddr="0x103_a00_000" perms="rw" cached="false" setvar_vaddr="blk_resp_queue" />
<map mr="data_blk_vmm_2" vaddr="0x31600000" perms="rw" cached="true" setvar_vaddr="blk_data" />
Expand Down Expand Up @@ -165,17 +165,17 @@
</channel>

<!-- Block sDDF regions -->
<memory_region name="blk_config_driver" size="0x1000" page_size="0x1000" />
<memory_region name="blk_storage_info_driver" size="0x1000" page_size="0x1000" />
<memory_region name="req_blk_driver" size="0x200_000" page_size="0x200_000"/>
<memory_region name="resp_blk_driver" size="0x200_000" page_size="0x200_000"/>
<memory_region name="data_blk_driver" size="0x200_000" page_size="0x200_000" />

<memory_region name="blk_config_vmm_1" size="0x1000" page_size="0x1000" />
<memory_region name="blk_storage_info_vmm_1" size="0x1000" page_size="0x1000" />
<memory_region name="req_blk_vmm_1" size="0x200_000" page_size="0x200_000"/>
<memory_region name="resp_blk_vmm_1" size="0x200_000" page_size="0x200_000"/>
<memory_region name="data_blk_vmm_1" size="0x200_000" page_size="0x200_000" />

<memory_region name="blk_config_vmm_2" size="0x1000" page_size="0x1000" />
<memory_region name="blk_storage_info_vmm_2" size="0x1000" page_size="0x1000" />
<memory_region name="data_blk_vmm_2" size="0x200_000" page_size="0x200_000" />
<memory_region name="req_blk_vmm_2" size="0x200_000" page_size="0x200_000"/>
<memory_region name="resp_blk_vmm_2" size="0x200_000" page_size="0x200_000"/>
Expand Down Expand Up @@ -207,7 +207,7 @@
<map mr="bus3" vaddr="0xffd00000" perms="rw" cached="false" />

<!-- sDDF block -->
<map mr="blk_config_driver" vaddr="0x40000000" perms="rw" cached="false" />
<map mr="blk_storage_info_driver" vaddr="0x40000000" perms="rw" cached="false" />
<map mr="req_blk_driver" vaddr="0x40200000" perms="rw" cached="false" />
<map mr="resp_blk_driver" vaddr="0x40400000" perms="rw" cached="false" />
<map mr="data_blk_driver" vaddr="0x40800000" perms="rw" cached="true" />
Expand All @@ -221,18 +221,18 @@

<protection_domain name="BLK_VIRT" priority="150" budget="100" period="400">
<program_image path="blk_virt.elf" />
<map mr="blk_config_driver" vaddr="0x40000000" perms="rw" cached="false" setvar_vaddr="blk_config_driver" />
<map mr="req_blk_driver" vaddr="0x40200000" perms="rw" cached="false" setvar_vaddr="blk_req_queue_driver" />
<map mr="resp_blk_driver" vaddr="0x40400000" perms="rw" cached="false" setvar_vaddr="blk_resp_queue_driver" />
<map mr="data_blk_driver" vaddr="0x40800000" perms="rw" cached="true" setvar_vaddr="blk_data_driver" />

<map mr="blk_config_vmm_1" vaddr="0x30000000" perms="rw" cached="false" setvar_vaddr="blk_config" />
<map mr="blk_config_vmm_2" vaddr="0x30200000" perms="rw" cached="false" />
<map mr="req_blk_vmm_1" vaddr="0x31000000" perms="rw" cached="false" setvar_vaddr="blk_req_queue" />
<map mr="blk_storage_info_driver" vaddr="0x40000000" perms="rw" cached="false" setvar_vaddr="blk_driver_storage_info" />
<map mr="req_blk_driver" vaddr="0x40200000" perms="rw" cached="false" setvar_vaddr="blk_driver_req_queue" />
<map mr="resp_blk_driver" vaddr="0x40400000" perms="rw" cached="false" setvar_vaddr="blk_driver_resp_queue" />
<map mr="data_blk_driver" vaddr="0x40800000" perms="rw" cached="true" setvar_vaddr="blk_driver_data" />

<map mr="blk_storage_info_vmm_1" vaddr="0x30000000" perms="rw" cached="false" setvar_vaddr="blk_client_storage_info" />
<map mr="blk_storage_info_vmm_2" vaddr="0x30200000" perms="rw" cached="false" />
<map mr="req_blk_vmm_1" vaddr="0x31000000" perms="rw" cached="false" setvar_vaddr="blk_client_req_queue" />
<map mr="req_blk_vmm_2" vaddr="0x31200000" perms="rw" cached="false" />
<map mr="resp_blk_vmm_1" vaddr="0x32000000" perms="rw" cached="false" setvar_vaddr="blk_resp_queue" />
<map mr="resp_blk_vmm_1" vaddr="0x32000000" perms="rw" cached="false" setvar_vaddr="blk_client_resp_queue" />
<map mr="resp_blk_vmm_2" vaddr="0x32200000" perms="rw" cached="false" />
<map mr="data_blk_vmm_1" vaddr="0x33000000" perms="rw" cached="true" setvar_vaddr="blk_client_data_start"/>
<map mr="data_blk_vmm_1" vaddr="0x33000000" perms="rw" cached="true" setvar_vaddr="blk_client_data"/>
<map mr="data_blk_vmm_2" vaddr="0x33200000" perms="rw" cached="true" />
</protection_domain>

Expand Down
32 changes: 16 additions & 16 deletions examples/virtio/board/qemu_virt_aarch64/virtio.system
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
<map mr="rx_data_serial_vmm_1" vaddr="0x6_004_000" perms="rw" cached="true" setvar_vaddr="serial_rx_data" />

<!-- sDDF related regions for virtIO block -->
<map mr="blk_config_vmm_1" vaddr="0x30000000" perms="rw" cached="false" setvar_vaddr="blk_config" />
<map mr="blk_storage_info_vmm_1" vaddr="0x30000000" perms="rw" cached="false" setvar_vaddr="blk_storage_info" />
<map mr="req_blk_vmm_1" vaddr="0x103_800_000" perms="rw" cached="false" setvar_vaddr="blk_req_queue" />
<map mr="resp_blk_vmm_1" vaddr="0x103_a00_000" perms="rw" cached="false" setvar_vaddr="blk_resp_queue" />
<map mr="data_blk_vmm_1" vaddr="0x30600000" perms="rw" cached="true" setvar_vaddr="blk_data" />
Expand All @@ -47,7 +47,7 @@

<!-- sDDF related regions for virtIO block -->
<!-- blk config region -->
<map mr="blk_config_vmm_2" vaddr="0x30000000" perms="rw" cached="false" setvar_vaddr="blk_config" />
<map mr="blk_storage_info_vmm_2" vaddr="0x30000000" perms="rw" cached="false" setvar_vaddr="blk_storage_info" />
<!-- shared memory for queues -->
<map mr="req_blk_vmm_2" vaddr="0x103_800_000" perms="rw" cached="false" setvar_vaddr="blk_req_queue" />
<map mr="resp_blk_vmm_2" vaddr="0x103_a00_000" perms="rw" cached="false" setvar_vaddr="blk_resp_queue" />
Expand Down Expand Up @@ -164,17 +164,17 @@
</channel>

<!-- Block sDDF regions -->
<memory_region name="blk_config_driver" size="0x1000" page_size="0x1000" />
<memory_region name="blk_storage_info_driver" size="0x1000" page_size="0x1000" />
<memory_region name="req_blk_driver" size="0x200_000" page_size="0x200_000"/>
<memory_region name="resp_blk_driver" size="0x200_000" page_size="0x200_000"/>
<memory_region name="data_blk_driver" size="0x200_000" page_size="0x200_000" />

<memory_region name="blk_config_vmm_1" size="0x1000" page_size="0x1000" />
<memory_region name="blk_storage_info_vmm_1" size="0x1000" page_size="0x1000" />
<memory_region name="req_blk_vmm_1" size="0x200_000" page_size="0x200_000"/>
<memory_region name="resp_blk_vmm_1" size="0x200_000" page_size="0x200_000"/>
<memory_region name="data_blk_vmm_1" size="0x200_000" page_size="0x200_000" />

<memory_region name="blk_config_vmm_2" size="0x1000" page_size="0x1000" />
<memory_region name="blk_storage_info_vmm_2" size="0x1000" page_size="0x1000" />
<memory_region name="data_blk_vmm_2" size="0x200_000" page_size="0x200_000" />
<memory_region name="req_blk_vmm_2" size="0x200_000" page_size="0x200_000"/>
<memory_region name="resp_blk_vmm_2" size="0x200_000" page_size="0x200_000"/>
Expand All @@ -200,7 +200,7 @@
<map mr="uart" vaddr="0x9000000" perms="rw" cached="false" />

<!-- sDDF block -->
<map mr="blk_config_driver" vaddr="0x20000000" perms="rw" cached="false" />
<map mr="blk_storage_info_driver" vaddr="0x20000000" perms="rw" cached="false" />
<map mr="req_blk_driver" vaddr="0x20200000" perms="rw" cached="false" />
<map mr="resp_blk_driver" vaddr="0x20400000" perms="rw" cached="false" />
<map mr="data_blk_driver" vaddr="0x20800000" perms="rw" cached="true" />
Expand All @@ -214,18 +214,18 @@

<protection_domain name="BLK_VIRT" priority="150" budget="100" period="400">
<program_image path="blk_virt.elf" />
<map mr="blk_config_driver" vaddr="0x20000000" perms="rw" cached="false" setvar_vaddr="blk_config_driver" />
<map mr="req_blk_driver" vaddr="0x20200000" perms="rw" cached="false" setvar_vaddr="blk_req_queue_driver" />
<map mr="resp_blk_driver" vaddr="0x20400000" perms="rw" cached="false" setvar_vaddr="blk_resp_queue_driver" />
<map mr="data_blk_driver" vaddr="0x20800000" perms="rw" cached="true" setvar_vaddr="blk_data_driver" />

<map mr="blk_config_vmm_1" vaddr="0x30000000" perms="rw" cached="false" setvar_vaddr="blk_config" />
<map mr="blk_config_vmm_2" vaddr="0x30200000" perms="rw" cached="false" />
<map mr="req_blk_vmm_1" vaddr="0x31000000" perms="rw" cached="false" setvar_vaddr="blk_req_queue" />
<map mr="blk_storage_info_driver" vaddr="0x20000000" perms="rw" cached="false" setvar_vaddr="blk_driver_storage_info" />
<map mr="req_blk_driver" vaddr="0x20200000" perms="rw" cached="false" setvar_vaddr="blk_driver_req_queue" />
<map mr="resp_blk_driver" vaddr="0x20400000" perms="rw" cached="false" setvar_vaddr="blk_driver_resp_queue" />
<map mr="data_blk_driver" vaddr="0x20800000" perms="rw" cached="true" setvar_vaddr="blk_driver_data" />

<map mr="blk_storage_info_vmm_1" vaddr="0x30000000" perms="rw" cached="false" setvar_vaddr="blk_client_storage_info" />
<map mr="blk_storage_info_vmm_2" vaddr="0x30200000" perms="rw" cached="false" />
<map mr="req_blk_vmm_1" vaddr="0x31000000" perms="rw" cached="false" setvar_vaddr="blk_client_req_queue" />
<map mr="req_blk_vmm_2" vaddr="0x31200000" perms="rw" cached="false" />
<map mr="resp_blk_vmm_1" vaddr="0x32000000" perms="rw" cached="false" setvar_vaddr="blk_resp_queue" />
<map mr="resp_blk_vmm_1" vaddr="0x32000000" perms="rw" cached="false" setvar_vaddr="blk_client_resp_queue" />
<map mr="resp_blk_vmm_2" vaddr="0x32200000" perms="rw" cached="false" />
<map mr="data_blk_vmm_1" vaddr="0x33000000" perms="rw" cached="true" setvar_vaddr="blk_client_data_start"/>
<map mr="data_blk_vmm_1" vaddr="0x33000000" perms="rw" cached="true" setvar_vaddr="blk_client_data"/>
<map mr="data_blk_vmm_2" vaddr="0x33200000" perms="rw" cached="true" />
</protection_domain>

Expand Down
45 changes: 22 additions & 23 deletions examples/virtio/client_vmm.c
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@ extern char _guest_initrd_image_end[];
/* Microkit will set this variable to the start of the guest RAM memory region. */
uintptr_t guest_ram_vaddr;


/* Virtio Console */
#define SERIAL_VIRT_TX_CH 1
#define SERIAL_VIRT_RX_CH 2
Expand All @@ -67,19 +66,17 @@ static struct virtio_console_device virtio_console;
#define VIRTIO_BLK_BASE (0x150000)
#define VIRTIO_BLK_SIZE (0x1000)

uintptr_t blk_req_queue;
uintptr_t blk_resp_queue;
blk_req_queue_t *blk_req_queue;
blk_resp_queue_t *blk_resp_queue;
uintptr_t blk_data;
uintptr_t blk_config;
blk_storage_info_t *blk_storage_info;

static struct virtio_blk_device virtio_blk;

void init(void)
{
blk_storage_info_t *storage_info = (blk_storage_info_t *)blk_config;

/* Busy wait until blk device is ready */
while (!blk_storage_is_ready(storage_info));
while (!blk_storage_is_ready(blk_storage_info));

/* Initialise the VMM, the VCPU(s), and start the guest */
LOG_VMM("starting \"%s\"\n", microkit_name);
Expand Down Expand Up @@ -111,32 +108,33 @@ void init(void)

/* Initialise our sDDF ring buffers for the serial device */
serial_queue_handle_t serial_rxq, serial_txq;
serial_cli_queue_init_sys(microkit_name, &serial_rxq, serial_rx_queue, serial_rx_data, &serial_txq, serial_tx_queue, serial_tx_data);
serial_cli_queue_init_sys(microkit_name, &serial_rxq, serial_rx_queue, serial_rx_data, &serial_txq, serial_tx_queue,
serial_tx_data);

/* Initialise virtIO console device */
success = virtio_mmio_console_init(&virtio_console,
VIRTIO_CONSOLE_BASE,
VIRTIO_CONSOLE_SIZE,
VIRTIO_CONSOLE_IRQ,
&serial_rxq, &serial_txq,
SERIAL_VIRT_TX_CH);
VIRTIO_CONSOLE_BASE,
VIRTIO_CONSOLE_SIZE,
VIRTIO_CONSOLE_IRQ,
&serial_rxq, &serial_txq,
SERIAL_VIRT_TX_CH);

/* virtIO block */
/* Initialise our sDDF queues for the block device */
blk_queue_handle_t blk_queue_h;
blk_queue_init(&blk_queue_h,
(blk_req_queue_t *)blk_req_queue,
(blk_resp_queue_t *)blk_resp_queue,
blk_cli_queue_size(microkit_name));
blk_req_queue,
blk_resp_queue,
blk_cli_queue_capacity(microkit_name));

/* Initialise virtIO block device */
success = virtio_mmio_blk_init(&virtio_blk,
VIRTIO_BLK_BASE, VIRTIO_BLK_SIZE, VIRTIO_BLK_IRQ,
blk_data,
BLK_DATA_SIZE,
storage_info,
&blk_queue_h,
BLK_CH);
VIRTIO_BLK_BASE, VIRTIO_BLK_SIZE, VIRTIO_BLK_IRQ,
blk_data,
BLK_DATA_SIZE,
blk_storage_info,
&blk_queue_h,
BLK_CH);
assert(success);

/* Finally start the guest */
Expand All @@ -161,7 +159,8 @@ void notified(microkit_channel ch)
}
}

seL4_Bool fault(microkit_child child, microkit_msginfo msginfo, microkit_msginfo *reply_msginfo) {
seL4_Bool fault(microkit_child child, microkit_msginfo msginfo, microkit_msginfo *reply_msginfo)
{
bool success = fault_handle(child, msginfo);
if (success) {
/* Now that we have handled the fault successfully, we reply to it so
Expand Down
24 changes: 11 additions & 13 deletions examples/virtio/include/blk_config.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,11 @@
#define BLK_NAME_CLI0 "CLIENT_VMM-1"
#define BLK_NAME_CLI1 "CLIENT_VMM-2"

#define BLK_QUEUE_SIZE_CLI0 1024
#define BLK_QUEUE_SIZE_CLI1 1024
#define BLK_QUEUE_SIZE_DRIV (BLK_QUEUE_SIZE_CLI0 + BLK_QUEUE_SIZE_CLI1)
#define BLK_QUEUE_CAPACITY_CLI0 1024
#define BLK_QUEUE_CAPACITY_CLI1 1024
#define BLK_QUEUE_CAPACITY_DRIV (BLK_QUEUE_CAPACITY_CLI0 + BLK_QUEUE_CAPACITY_CLI1)

#define BLK_REGION_SIZE 0x200000
#define BLK_CONFIG_REGION_SIZE_CLI0 BLK_REGION_SIZE
#define BLK_CONFIG_REGION_SIZE_CLI1 BLK_REGION_SIZE

#define BLK_DATA_REGION_SIZE_CLI0 BLK_REGION_SIZE
#define BLK_DATA_REGION_SIZE_CLI1 BLK_REGION_SIZE
Expand All @@ -40,13 +38,13 @@ _Static_assert(BLK_DATA_REGION_SIZE_DRIV >= BLK_TRANSFER_SIZE &&BLK_DATA_REGION_

static const int blk_partition_mapping[BLK_NUM_CLIENTS] = { 0, 1 };

static inline blk_storage_info_t *blk_virt_cli_config_info(blk_storage_info_t *info, unsigned int id)
static inline blk_storage_info_t *blk_virt_cli_storage_info(blk_storage_info_t *info, unsigned int id)
{
switch (id) {
case 0:
return info;
case 1:
return (blk_storage_info_t *)((uintptr_t)info + BLK_CONFIG_REGION_SIZE_CLI0);
return (blk_storage_info_t *)((uintptr_t)info + BLK_STORAGE_INFO_REGION_SIZE);
default:
return NULL;
}
Expand Down Expand Up @@ -100,24 +98,24 @@ static inline blk_resp_queue_t *blk_virt_cli_resp_queue(blk_resp_queue_t *resp,
}
}

static inline uint32_t blk_virt_cli_queue_size(unsigned int id)
static inline uint32_t blk_virt_cli_queue_capacity(unsigned int id)
{
switch (id) {
case 0:
return BLK_QUEUE_SIZE_CLI0;
return BLK_QUEUE_CAPACITY_CLI0;
case 1:
return BLK_QUEUE_SIZE_CLI1;
return BLK_QUEUE_CAPACITY_CLI1;
default:
return 0;
}
}

static inline uint32_t blk_cli_queue_size(char *pd_name)
static inline uint32_t blk_cli_queue_capacity(char *pd_name)
{
if (!sddf_strcmp(pd_name, BLK_NAME_CLI0)) {
return BLK_QUEUE_SIZE_CLI0;
return BLK_QUEUE_CAPACITY_CLI0;
} else if (!sddf_strcmp(pd_name, BLK_NAME_CLI1)) {
return BLK_QUEUE_SIZE_CLI1;
return BLK_QUEUE_CAPACITY_CLI1;
} else {
return 0;
}
Expand Down
Loading
Loading