Module Name:    src
Committed By:   msaitoh
Date:           Fri Oct  6 14:42:51 UTC 2023

Modified Files:
        src/sys/dev/pci/ixgbe: ixgbe.c ixgbe.h ixv.c

Log Message:
ixgbe: Simplify definitions. No functional change.

 Both DEFAULT_{TX,RX}D and PERFORM_{TX,RX}D are 2048. Use DEFAULT_{TX,RX}D.
Same as FreeBSD.


To generate a diff of this commit:
cvs rdiff -u -r1.334 -r1.335 src/sys/dev/pci/ixgbe/ixgbe.c
cvs rdiff -u -r1.90 -r1.91 src/sys/dev/pci/ixgbe/ixgbe.h
cvs rdiff -u -r1.186 -r1.187 src/sys/dev/pci/ixgbe/ixv.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/dev/pci/ixgbe/ixgbe.c
diff -u src/sys/dev/pci/ixgbe/ixgbe.c:1.334 src/sys/dev/pci/ixgbe/ixgbe.c:1.335
--- src/sys/dev/pci/ixgbe/ixgbe.c:1.334	Fri Oct  6 14:40:06 2023
+++ src/sys/dev/pci/ixgbe/ixgbe.c	Fri Oct  6 14:42:51 2023
@@ -1,4 +1,4 @@
-/* $NetBSD: ixgbe.c,v 1.334 2023/10/06 14:40:06 msaitoh Exp $ */
+/* $NetBSD: ixgbe.c,v 1.335 2023/10/06 14:42:51 msaitoh Exp $ */
 
 /******************************************************************************
 
@@ -64,7 +64,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ixgbe.c,v 1.334 2023/10/06 14:40:06 msaitoh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ixgbe.c,v 1.335 2023/10/06 14:42:51 msaitoh Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_inet.h"
@@ -370,12 +370,12 @@ SYSCTL_INT(_hw_ix, OID_AUTO, num_queues,
  * setting higher than RX as this seems
  * the better performing choice.
  */
-static int ixgbe_txd = PERFORM_TXD;
+static int ixgbe_txd = DEFAULT_TXD;
 SYSCTL_INT(_hw_ix, OID_AUTO, txd, CTLFLAG_RDTUN, &ixgbe_txd, 0,
     "Number of transmit descriptors per queue");
 
 /* Number of RX descriptors per ring */
-static int ixgbe_rxd = PERFORM_RXD;
+static int ixgbe_rxd = DEFAULT_RXD;
 SYSCTL_INT(_hw_ix, OID_AUTO, rxd, CTLFLAG_RDTUN, &ixgbe_rxd, 0,
     "Number of receive descriptors per queue");
 

Index: src/sys/dev/pci/ixgbe/ixgbe.h
diff -u src/sys/dev/pci/ixgbe/ixgbe.h:1.90 src/sys/dev/pci/ixgbe/ixgbe.h:1.91
--- src/sys/dev/pci/ixgbe/ixgbe.h:1.90	Fri Oct  6 14:38:03 2023
+++ src/sys/dev/pci/ixgbe/ixgbe.h	Fri Oct  6 14:42:51 2023
@@ -1,4 +1,4 @@
-/* $NetBSD: ixgbe.h,v 1.90 2023/10/06 14:38:03 msaitoh Exp $ */
+/* $NetBSD: ixgbe.h,v 1.91 2023/10/06 14:42:51 msaitoh Exp $ */
 
 /******************************************************************************
   SPDX-License-Identifier: BSD-3-Clause
@@ -119,19 +119,18 @@
 /* Tunables */
 
 /*
- * TxDescriptors Valid Range: 64-4096 Default Value: 256 This value is the
+ * TxDescriptors Valid Range: 64-4096 Default Value: 2048 This value is the
  * number of transmit descriptors allocated by the driver. Increasing this
  * value allows the driver to queue more transmits. Each descriptor is 16
  * bytes. Performance tests have show the 2K value to be optimal for top
  * performance.
  */
-#define DEFAULT_TXD	1024
-#define PERFORM_TXD	2048
+#define DEFAULT_TXD	2048
 #define MAX_TXD		4096
 #define MIN_TXD		64
 
 /*
- * RxDescriptors Valid Range: 64-4096 Default Value: 256 This value is the
+ * RxDescriptors Valid Range: 64-4096 Default Value: 2048 This value is the
  * number of receive descriptors allocated for each RX queue. Increasing this
  * value allows the driver to buffer more incoming packets. Each descriptor
  * is 16 bytes.  A receive buffer is also allocated for each descriptor.
@@ -140,8 +139,7 @@
  *	against the system mbuf pool limit, you can tune nmbclusters
  *	to adjust for this.
  */
-#define DEFAULT_RXD	1024
-#define PERFORM_RXD	2048
+#define DEFAULT_RXD	2048
 #define MAX_RXD		4096
 #define MIN_RXD		64
 

Index: src/sys/dev/pci/ixgbe/ixv.c
diff -u src/sys/dev/pci/ixgbe/ixv.c:1.186 src/sys/dev/pci/ixgbe/ixv.c:1.187
--- src/sys/dev/pci/ixgbe/ixv.c:1.186	Fri Oct  6 14:37:04 2023
+++ src/sys/dev/pci/ixgbe/ixv.c	Fri Oct  6 14:42:51 2023
@@ -1,4 +1,4 @@
-/* $NetBSD: ixv.c,v 1.186 2023/10/06 14:37:04 msaitoh Exp $ */
+/* $NetBSD: ixv.c,v 1.187 2023/10/06 14:42:51 msaitoh Exp $ */
 
 /******************************************************************************
 
@@ -35,7 +35,7 @@
 /*$FreeBSD: head/sys/dev/ixgbe/if_ixv.c 331224 2018-03-19 20:55:05Z erj $*/
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ixv.c,v 1.186 2023/10/06 14:37:04 msaitoh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ixv.c,v 1.187 2023/10/06 14:42:51 msaitoh Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_inet.h"
@@ -217,11 +217,11 @@ static bool ixv_txrx_workqueue = false;
  * setting higher than RX as this seems
  * the better performing choice.
  */
-static int ixv_txd = PERFORM_TXD;
+static int ixv_txd = DEFAULT_TXD;
 TUNABLE_INT("hw.ixv.txd", &ixv_txd);
 
 /* Number of RX descriptors per ring */
-static int ixv_rxd = PERFORM_RXD;
+static int ixv_rxd = DEFAULT_RXD;
 TUNABLE_INT("hw.ixv.rxd", &ixv_rxd);
 
 /* Legacy Transmit (single queue) */

Reply via email to