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

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

From: Heng Qi <hidden>
Date: 2023-08-14 01:57:14


在 2023/8/13 上午1:34, Simon Horman 写道:
On Fri, Aug 11, 2023 at 02:55:10PM +0800, Heng Qi wrote:
quoted
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
Hi,

Will fix in the next version ^^
      Also, elsewhere in this patchset.

      ./checkpatch.pl --codespell is your friend here
Ok. I will try this.

Thanks!
quoted
+	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