Thread (5 messages) 5 messages, 3 authors, 2011-04-01

RE: [PATCH] net: ethtool support to configure number of RX rings

From: Amit Salecha <hidden>
Date: 2011-03-31 05:55:41

quoted hunk ↗ jump to hunk
o Ethtool hook to configure number of RX rings.
o Implementation is scalable to support configuring TX rings.
o There exist ETHTOOL_GRXRINGS command for getting number of RX rings,
  but it is tigtly coupled with RX flow hash configuration.
o Patches for qlcnic and netxen_nic driver supporting this features
  will follow soon.

Signed-off-by: Amit Kumar Salecha <redacted>
---
 include/linux/ethtool.h |   20 ++++++++++++++++++++
 net/core/ethtool.c      |   33 +++++++++++++++++++++++++++++++++
 2 files changed, 53 insertions(+), 0 deletions(-)
diff --git a/include/linux/ethtool.h b/include/linux/ethtool.h
index aac3e2e..de0decd 100644
--- a/include/linux/ethtool.h
+++ b/include/linux/ethtool.h
@@ -226,6 +226,21 @@ struct ethtool_ringparam {
      __u32   tx_pending;
 };

+/* for configuring number of RX ring */
+struct ethtool_ring {
+     __u32   cmd;    /* ETHTOOL_{G,S}RING */
+
+     /* Read only attributes.  These indicate the maximum number
+      * of RX rings the driver will allow the user to set.
+      */
+     __u32   rx_max;
+
+     /* Values changeable by the user.  The valid values are
+      * in the range 1 to the "*_max" counterpart above.
+      */
+     __u32   rx_pending;
+};
+
Current implementation can't scale to support TX rings. Because once structure is defined, that can't be changed.
As tools will have dependency on it.
If configuring tx rings need to be supported, I need to define Tx parameters in struct ethtool_ring now.
Currently qlcnic and netxen_nic driver doesn't have requirement to configure number of tx rings.
Should I define tx parameters in struct ethtool_ring ?

-Amit

This message and any attached documents contain information from QLogic Corporation or its wholly-owned subsidiaries that may be confidential. If you are not the intended recipient, you may not read, copy, distribute, or use this information. If you have received this transmission in error, please notify the sender immediately by reply e-mail and then delete this message.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help