From 6d644defe5724c4830be4618139db410d7398b64 Mon Sep 17 00:00:00 2001 From: Ivan-Velickovic Date: Wed, 9 Oct 2024 14:56:37 +1100 Subject: [PATCH 1/2] drivers/blk/virtio: remove incorrect comment Signed-off-by: Ivan-Velickovic --- drivers/blk/virtio/block.h | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/blk/virtio/block.h b/drivers/blk/virtio/block.h index 9dd14bfb3..dc3113884 100644 --- a/drivers/blk/virtio/block.h +++ b/drivers/blk/virtio/block.h @@ -164,7 +164,5 @@ static void virtio_blk_print_features(uint64_t features) if (features & ((uint64_t)1 << VIRTIO_BLK_F_ZONED)) { LOG_DRIVER(" VIRTIO_BLK_F_ZONED\n"); } - /* The reserved feature bits, that are not device specific, sit in the middle - * of all the network feature bits, which is why we print them here. */ virtio_print_reserved_feature_bits(features); } From 5861d28a5a0b1d11dc681fc6c219b1f0e6c9fb35 Mon Sep 17 00:00:00 2001 From: Ivan-Velickovic Date: Wed, 9 Oct 2024 14:43:18 +1100 Subject: [PATCH 2/2] drivers/net/virtio: notify RX queue when enqueuing into avail virtq Signed-off-by: Ivan-Velickovic --- drivers/network/virtio/ethernet.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/drivers/network/virtio/ethernet.c b/drivers/network/virtio/ethernet.c index d4990bcf8..738af52cd 100644 --- a/drivers/network/virtio/ethernet.c +++ b/drivers/network/virtio/ethernet.c @@ -101,6 +101,7 @@ static inline bool virtio_avail_full_tx(struct virtq *virtq) static void rx_provide(void) { /* We need to take all of our sDDF free entries and place them in the virtIO 'free' ring. */ + bool transferred = false; bool reprocess = true; while (reprocess) { while (!virtio_avail_full_rx(&rx_virtq) && !net_queue_empty_free(&rx_queue)) { @@ -135,6 +136,8 @@ static void rx_provide(void) // this list, but we are adding two desc entries. rx_virtq.avail->idx++; rx_last_desc_idx += 2; + + transferred = true; } net_request_signal_free(&rx_queue); @@ -145,6 +148,11 @@ static void rx_provide(void) reprocess = true; } } + + if (transferred) { + /* We have added more avail buffers, so notify the device */ + regs->QueueNotify = VIRTIO_NET_RX_QUEUE; + } } static void rx_return(void)