The problem is in the default values of several module parameters.
Most important is InterruptThrottleRate which default value in rt_e1000e is 3. 
In other drivers (rt_e1000 and rt_e1000_new) its 0.
Other such parameters are TxIntDelay and TxAbsIntDelay that are also non zero 
in default. But their influence is not so  visible
Parameters RxIntDelay and RxAbsIntDelay seems to be OK (zero default value).

Tested patches always welcome.

In the attachment there is diff file produced by git with the changes of 
default parameter values of rt_e1000e driver. But I'm not sure if TxIntDelay 
and TxAbsIntDelay zero default parameter is necessary, because I was unable to 
see any difference. The InterruptThrottleRate has very significant influence to 
latencies and is fixed in it.

Part of the diff file is also old bug fix of rt_r9169 driver.

Petr
diff --git a/drivers/e1000e/param.c b/drivers/e1000e/param.c
index 4dd9b63..91354fc 100644
--- a/drivers/e1000e/param.c
+++ b/drivers/e1000e/param.c
@@ -67,9 +67,11 @@ MODULE_PARM_DESC(copybreak,
  * Tx interrupt delay needs to typically be set to something non-zero
  *
  * Valid Range: 0-65535
+ * 
+ * Default Value: 0 for rtnet
  */
 E1000_PARAM(TxIntDelay, "Transmit Interrupt Delay");
-#define DEFAULT_TIDV 8
+#define DEFAULT_TIDV 0
 #define MAX_TXDELAY 0xFFFF
 #define MIN_TXDELAY 0
 
@@ -77,9 +79,11 @@ E1000_PARAM(TxIntDelay, "Transmit Interrupt Delay");
  * Transmit Absolute Interrupt Delay in units of 1.024 microseconds
  *
  * Valid Range: 0-65535
+ * 
+ * Default Value: 0 for rtnet
  */
 E1000_PARAM(TxAbsIntDelay, "Transmit Absolute Interrupt Delay");
-#define DEFAULT_TADV 32
+#define DEFAULT_TADV 0
 #define MAX_TXABSDELAY 0xFFFF
 #define MIN_TXABSDELAY 0
 
@@ -106,9 +110,11 @@ E1000_PARAM(RxAbsIntDelay, "Receive Absolute Interrupt Delay");
  * Interrupt Throttle Rate (interrupts/sec)
  *
  * Valid Range: 100-100000 (0=off, 1=dynamic, 3=dynamic conservative)
+ * 
+ * Default Value: 0 for rtnet
  */
 E1000_PARAM(InterruptThrottleRate, "Interrupt Throttling Rate");
-#define DEFAULT_ITR 3
+#define DEFAULT_ITR 0
 #define MAX_ITR 100000
 #define MIN_ITR 100
 
@@ -380,7 +386,7 @@ void __devinit e1000e_check_options(struct e1000_adapter *adapter)
 			}
 		} else {
 			adapter->itr_setting = opt.def;
-			adapter->itr = 20000;
+			adapter->itr = 0;
 		}
 	}
 	{ /* Interrupt Mode */
diff --git a/drivers/experimental/rt_r8169.c b/drivers/experimental/rt_r8169.c
index 484a658..b716c53 100644
--- a/drivers/experimental/rt_r8169.c
+++ b/drivers/experimental/rt_r8169.c
@@ -85,7 +85,7 @@ RTL8169_VERSION "2.2"	<2004/08/09>
 #define RTL8169_DRIVER_NAME   MODULENAME " RTnet Gigabit Ethernet driver " RTL8169_VERSION
 #define PFX MODULENAME ": "
 
-#define RTL8169_DEBUG
+//#define RTL8169_DEBUG
 #undef RTL8169_JUMBO_FRAME_SUPPORT	/*** RTnet: no not enable! ***/
 #undef	RTL8169_HW_FLOW_CONTROL_SUPPORT
 
@@ -1711,11 +1711,12 @@ static void rtl8169_rx_interrupt (struct rtnet_device *rtdev, struct rtl8169_pri
 			priv->stats.rx_errors++;
 			if ( le32_to_cpu(rxdesc->status) & (RxRWT|RxRUNT) )
 				priv->stats.rx_length_errors++;
-			if ( le32_to_cpu(rxdesc->status) & RxCRC)
+			if ( le32_to_cpu(rxdesc->status) & RxCRC) {
 				/* in the rt_via-rhine.c there's a lock around the incrementation... we'll do that also here <kk> */
 				rtdm_lock_get(&priv->lock); /*** RTnet ***/
 				priv->stats.rx_crc_errors++;
 				rtdm_lock_put(&priv->lock); /*** RTnet ***/
+			}
 	    }
 	    else{
 			pkt_size=(int)(le32_to_cpu(rxdesc->status) & 0x00001FFF)-4;
------------------------------------------------------------------------------
Keep Your Developer Skills Current with LearnDevNow!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-d2d
_______________________________________________
RTnet-users mailing list
RTnet-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rtnet-users

Reply via email to