Patchwork [4/5] net: sh_eth: add CONFIG_SH_ETH_NUM_RXDESC option

login
register
mail settings
Submitter Yoshihiro Shimoda
Date March 16, 2012, 8:46 a.m.
Message ID <4F62FDD8.9010907@renesas.com>
Download mbox | patch
Permalink /patch/147157/
State Changes Requested
Delegated to: David Miller
Headers show

Comments

Yoshihiro Shimoda - March 16, 2012, 8:46 a.m.
This patch allows you to configure the number of RX descriptors.

Signed-off-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
---
 drivers/net/ethernet/renesas/Kconfig  |    8 ++++++++
 drivers/net/ethernet/renesas/sh_eth.h |    2 +-
 2 files changed, 9 insertions(+), 1 deletions(-)
David Miller - March 16, 2012, 9:11 a.m.
From: "Shimoda, Yoshihiro" <yoshihiro.shimoda.uh@renesas.com>
Date: Fri, 16 Mar 2012 17:46:16 +0900

> This patch allows you to configure the number of RX descriptors.
> 
> Signed-off-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>

Never decide such things at compile time, use ethtool at runtime
for this.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Yoshihiro Shimoda - March 16, 2012, 10:26 a.m.
2012/03/16 18:11, David Miller wrote:
> From: "Shimoda, Yoshihiro" <yoshihiro.shimoda.uh@renesas.com>
> Date: Fri, 16 Mar 2012 17:46:16 +0900
> 
>> This patch allows you to configure the number of RX descriptors.
>>
>> Signed-off-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
> 
> Never decide such things at compile time, use ethtool at runtime
> for this.
> 

Thank you for the review. I will fix this.

Best regards,
Yoshihiro Shimoda
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Patch

diff --git a/drivers/net/ethernet/renesas/Kconfig b/drivers/net/ethernet/renesas/Kconfig
index 9755b49..32c093b 100644
--- a/drivers/net/ethernet/renesas/Kconfig
+++ b/drivers/net/ethernet/renesas/Kconfig
@@ -17,3 +17,11 @@  config SH_ETH
 	  Renesas SuperH Ethernet device driver.
 	  This driver supporting CPUs are:
 		- SH7710, SH7712, SH7763, SH7619, SH7724, and SH7757.
+
+config SH_ETH_NUM_RXDESC
+	int "Number of RX descriptor"
+	depends on SH_ETH
+	default "64"
+	---help---
+	  If you want to need more RX descriptors, you can configure
+	  the number of RX descriptors by this option.
diff --git a/drivers/net/ethernet/renesas/sh_eth.h b/drivers/net/ethernet/renesas/sh_eth.h
index 9ab3f8b..667bdd2 100644
--- a/drivers/net/ethernet/renesas/sh_eth.h
+++ b/drivers/net/ethernet/renesas/sh_eth.h
@@ -26,7 +26,7 @@ 
 #define CARDNAME	"sh-eth"
 #define TX_TIMEOUT	(5*HZ)
 #define TX_RING_SIZE	64	/* Tx ring size */
-#define RX_RING_SIZE	64	/* Rx ring size */
+#define RX_RING_SIZE	CONFIG_SH_ETH_NUM_RXDESC	/* Rx ring size */
 #define ETHERSMALL		60
 #define PKT_BUF_SZ		1538
 #define SH_ETH_TSU_TIMEOUT_MS	500