LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
* [PATCH 2.6.21 1/4] cxgb3 - fix ethtool cmd on multiple queues port
@ 2007-03-18 20:10 divy
  2007-03-23  5:50 ` Jeff Garzik
  0 siblings, 1 reply; 2+ messages in thread
From: divy @ 2007-03-18 20:10 UTC (permalink / raw)
  To: jeff; +Cc: netdev, linux-kernel, swise

From: Divy Le Ray <divy@chelsio.com>

Limit ethtool -g/-G to the given port's queues.

Signed-off-by: Divy Le Ray <divy@chelsio.com>
---
---

 drivers/net/cxgb3/cxgb3_main.c |   19 +++++++++++--------
 1 files changed, 11 insertions(+), 8 deletions(-)

diff --git a/drivers/net/cxgb3/cxgb3_main.c b/drivers/net/cxgb3/cxgb3_main.c
index 7ff834e..eb0a4e0 100644
--- a/drivers/net/cxgb3/cxgb3_main.c
+++ b/drivers/net/cxgb3/cxgb3_main.c
@@ -1362,23 +1362,27 @@ static int set_rx_csum(struct net_device
 
 static void get_sge_param(struct net_device *dev, struct ethtool_ringparam *e)
 {
-	struct adapter *adapter = dev->priv;
+	const struct adapter *adapter = dev->priv;
+	const struct port_info *pi = netdev_priv(dev);
+	const struct qset_params *q = &adapter->params.sge.qset[pi->first_qset];
 
 	e->rx_max_pending = MAX_RX_BUFFERS;
 	e->rx_mini_max_pending = 0;
 	e->rx_jumbo_max_pending = MAX_RX_JUMBO_BUFFERS;
 	e->tx_max_pending = MAX_TXQ_ENTRIES;
 
-	e->rx_pending = adapter->params.sge.qset[0].fl_size;
-	e->rx_mini_pending = adapter->params.sge.qset[0].rspq_size;
-	e->rx_jumbo_pending = adapter->params.sge.qset[0].jumbo_size;
-	e->tx_pending = adapter->params.sge.qset[0].txq_size[0];
+	e->rx_pending = q->fl_size;
+	e->rx_mini_pending = q->rspq_size;
+	e->rx_jumbo_pending = q->jumbo_size;
+	e->tx_pending = q->txq_size[0];
 }
 
 static int set_sge_param(struct net_device *dev, struct ethtool_ringparam *e)
 {
 	int i;
+	struct qset_params *q;
 	struct adapter *adapter = dev->priv;
+	const struct port_info *pi = netdev_priv(dev);
 
 	if (e->rx_pending > MAX_RX_BUFFERS ||
 	    e->rx_jumbo_pending > MAX_RX_JUMBO_BUFFERS ||
@@ -1393,9 +1397,8 @@ static int set_sge_param(struct net_devi
 	if (adapter->flags & FULL_INIT_DONE)
 		return -EBUSY;
 
-	for (i = 0; i < SGE_QSETS; ++i) {
-		struct qset_params *q = &adapter->params.sge.qset[i];
-
+	q = &adapter->params.sge.qset[pi->first_qset];
+	for (i = 0; i < pi->nqsets; ++i, ++q) {
 		q->rspq_size = e->rx_mini_pending;
 		q->fl_size = e->rx_pending;
 		q->jumbo_size = e->rx_jumbo_pending;

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH 2.6.21 1/4] cxgb3 - fix ethtool cmd on multiple queues port
  2007-03-18 20:10 [PATCH 2.6.21 1/4] cxgb3 - fix ethtool cmd on multiple queues port divy
@ 2007-03-23  5:50 ` Jeff Garzik
  0 siblings, 0 replies; 2+ messages in thread
From: Jeff Garzik @ 2007-03-23  5:50 UTC (permalink / raw)
  To: divy; +Cc: netdev, linux-kernel, swise

divy@chelsio.com wrote:
> From: Divy Le Ray <divy@chelsio.com>
> 
> Limit ethtool -g/-G to the given port's queues.
> 
> Signed-off-by: Divy Le Ray <divy@chelsio.com>

applied 1-4



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2007-03-23  5:50 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-03-18 20:10 [PATCH 2.6.21 1/4] cxgb3 - fix ethtool cmd on multiple queues port divy
2007-03-23  5:50 ` Jeff Garzik

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).