Thread (16 messages) 16 messages, 4 authors, 2023-08-14

Re: [PATCH net-next 6/8] virtio-net: support rx netdim

From: Simon Horman <horms@kernel.org>
Date: 2023-08-12 17:35:01

On Fri, Aug 11, 2023 at 02:55:10PM +0800, Heng Qi wrote:
quoted hunk ↗ jump to hunk
By comparing the traffic information in the complete napi processes,
let the virtio-net driver automatically adjust the coalescing
moderation parameters of each receive queue.

Signed-off-by: Heng Qi <redacted>
---
 drivers/net/virtio_net.c | 124 +++++++++++++++++++++++++++++++++------
 1 file changed, 106 insertions(+), 18 deletions(-)
diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_net.c
index 0318113bd8c2..3fb801a7a785 100644
--- a/drivers/net/virtio_net.c
+++ b/drivers/net/virtio_net.c
@@ -19,6 +19,7 @@
 #include <linux/average.h>
 #include <linux/filter.h>
 #include <linux/kernel.h>
+#include <linux/dim.h>
 #include <net/route.h>
 #include <net/xdp.h>
 #include <net/net_failover.h>
@@ -168,8 +169,17 @@ struct receive_queue {
 
 	struct virtnet_rq_stats stats;
 
+	/* The number of rx notifications */
+	u16 calls;
+
+	/* Is dynamic interrupt moderation enabled? */
+	bool dim_enabled;
+
 	struct virtnet_interrupt_coalesce intr_coal;
 
+	/* Dynamic Iterrupt Moderation */
Hi Heng Qi,

nit: Iterrupt -> interrupt

     Also, elsewhere in this patchset.

     ./checkpatch.pl --codespell is your friend here
+	struct dim dim;
+
 	/* Chain pages by the private ptr. */
 	struct page *pages;
 
...
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help