Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 25 Aug 2017 22:38:56 +0000 (UTC)
From:      Sean Bruno <sbruno@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r322906 - head/sys/dev/e1000
Message-ID:  <201708252238.v7PMcujp012682@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: sbruno
Date: Fri Aug 25 22:38:55 2017
New Revision: 322906
URL: https://svnweb.freebsd.org/changeset/base/322906

Log:
  Add a different #define for the maximum number of transmit and
  recieve descriptors for the igb(4) class of devices.  This will
  allow a better definition for maximum going forward.  Some igb(4)
  devices support more than the default 4K.
  
  Reported by:	Jason (j@nitrology.com)
  Sponsored by:	Limelight Networks

Modified:
  head/sys/dev/e1000/if_em.c
  head/sys/dev/e1000/if_em.h

Modified: head/sys/dev/e1000/if_em.c
==============================================================================
--- head/sys/dev/e1000/if_em.c	Fri Aug 25 21:53:51 2017	(r322905)
+++ head/sys/dev/e1000/if_em.c	Fri Aug 25 22:38:55 2017	(r322906)
@@ -515,8 +515,8 @@ static struct if_shared_ctx igb_sctx_init = {
 
 	.isc_nrxd_min = {EM_MIN_RXD},
 	.isc_ntxd_min = {EM_MIN_TXD},
-	.isc_nrxd_max = {EM_MAX_RXD},
-	.isc_ntxd_max = {EM_MAX_TXD},
+	.isc_nrxd_max = {IGB_MAX_RXD},
+	.isc_ntxd_max = {IGB_MAX_TXD},
 	.isc_nrxd_default = {EM_DEFAULT_RXD},
 	.isc_ntxd_default = {EM_DEFAULT_TXD},
 };

Modified: head/sys/dev/e1000/if_em.h
==============================================================================
--- head/sys/dev/e1000/if_em.h	Fri Aug 25 21:53:51 2017	(r322905)
+++ head/sys/dev/e1000/if_em.h	Fri Aug 25 22:38:55 2017	(r322906)
@@ -96,10 +96,10 @@
 /* Tunables */
 
 /*
- * EM_TXD: Maximum number of Transmit Descriptors
+ * EM_MAX_TXD: Maximum number of Transmit Descriptors
  * Valid Range: 80-256 for 82542 and 82543-based adapters
  *              80-4096 for others
- * Default Value: 256
+ * Default Value: 1024
  *   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.
@@ -111,12 +111,13 @@
 #define EM_MAX_TXD		4096
 #define EM_DEFAULT_TXD          1024
 #define EM_DEFAULT_MULTI_TXD	4096
+#define IGB_MAX_TXD		4096
 
 /*
- * EM_RXD - Maximum number of receive Descriptors
+ * EM_MAX_RXD - Maximum number of receive Descriptors
  * Valid Range: 80-256 for 82542 and 82543-based adapters
  *              80-4096 for others
- * Default Value: 256
+ * Default Value: 1024
  *   This value is the number of receive descriptors allocated by the driver.
  *   Increasing this value allows the driver to buffer more incoming packets.
  *   Each descriptor is 16 bytes.  A receive buffer is also allocated for each
@@ -129,6 +130,7 @@
 #define EM_MAX_RXD		4096
 #define EM_DEFAULT_RXD          1024
 #define EM_DEFAULT_MULTI_RXD	4096
+#define IGB_MAX_RXD		4096
 
 /*
  * EM_TIDV - Transmit Interrupt Delay Value



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201708252238.v7PMcujp012682>