* [net-2.6 PATCH] ixgbe: cleanup maximum number of tx queues
@ 2010-03-24 20:01 Jeff Kirsher
2010-03-24 20:08 ` Eric Dumazet
2010-03-26 18:58 ` David Miller
0 siblings, 2 replies; 3+ messages in thread
From: Jeff Kirsher @ 2010-03-24 20:01 UTC (permalink / raw)
To: davem; +Cc: netdev, gospo, John Fastabend, Jeff Kirsher
From: John Fastabend <john.r.fastabend@intel.com>
In the last patch I missed an unecessary min_t comparison.
This patch removes it, the path allocates at most
72 tx queues for 82599 and 24 for 82598 there is no need
for this check.
Additionally this sets MAX_[TX|RX]_QUEUES to 72. Which is
used as the size for the tx/rx_ring arrays. There is no
reason to have more tx_rings/rx_rings then num_tx_queues.
Signed-off-by: John Fastabend <john.r.fastabend@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
---
drivers/net/ixgbe/ixgbe.h | 7 +++++--
drivers/net/ixgbe/ixgbe_main.c | 1 -
2 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/drivers/net/ixgbe/ixgbe.h b/drivers/net/ixgbe/ixgbe.h
index 19e94ee..79c35ae 100644
--- a/drivers/net/ixgbe/ixgbe.h
+++ b/drivers/net/ixgbe/ixgbe.h
@@ -204,14 +204,17 @@ enum ixgbe_ring_f_enum {
#define IXGBE_MAX_FDIR_INDICES 64
#ifdef IXGBE_FCOE
#define IXGBE_MAX_FCOE_INDICES 8
+#define MAX_RX_QUEUES (IXGBE_MAX_FDIR_INDICES + IXGBE_MAX_FCOE_INDICES)
+#define MAX_TX_QUEUES (IXGBE_MAX_FDIR_INDICES + IXGBE_MAX_FCOE_INDICES)
+#else
+#define MAX_RX_QUEUES IXGBE_MAX_FDIR_INDICES
+#define MAX_TX_QUEUES IXGBE_MAX_FDIR_INDICES
#endif /* IXGBE_FCOE */
struct ixgbe_ring_feature {
int indices;
int mask;
} ____cacheline_internodealigned_in_smp;
-#define MAX_RX_QUEUES 128
-#define MAX_TX_QUEUES 128
#define MAX_RX_PACKET_BUFFERS ((adapter->flags & IXGBE_FLAG_DCB_ENABLED) \
? 8 : 1)
diff --git a/drivers/net/ixgbe/ixgbe_main.c b/drivers/net/ixgbe/ixgbe_main.c
index 315622f..a9147e5 100644
--- a/drivers/net/ixgbe/ixgbe_main.c
+++ b/drivers/net/ixgbe/ixgbe_main.c
@@ -6041,7 +6041,6 @@ static int __devinit ixgbe_probe(struct pci_dev *pdev,
indices += min_t(unsigned int, num_possible_cpus(),
IXGBE_MAX_FCOE_INDICES);
#endif
- indices = min_t(unsigned int, indices, MAX_TX_QUEUES);
netdev = alloc_etherdev_mq(sizeof(struct ixgbe_adapter), indices);
if (!netdev) {
err = -ENOMEM;
^ permalink raw reply related [flat|nested] 3+ messages in thread* Re: [net-2.6 PATCH] ixgbe: cleanup maximum number of tx queues
2010-03-24 20:01 [net-2.6 PATCH] ixgbe: cleanup maximum number of tx queues Jeff Kirsher
@ 2010-03-24 20:08 ` Eric Dumazet
2010-03-26 18:58 ` David Miller
1 sibling, 0 replies; 3+ messages in thread
From: Eric Dumazet @ 2010-03-24 20:08 UTC (permalink / raw)
To: Jeff Kirsher; +Cc: davem, netdev, gospo, John Fastabend
Le mercredi 24 mars 2010 à 13:01 -0700, Jeff Kirsher a écrit :
> From: John Fastabend <john.r.fastabend@intel.com>
>
> In the last patch I missed an unecessary min_t comparison.
> This patch removes it, the path allocates at most
> 72 tx queues for 82599 and 24 for 82598 there is no need
> for this check.
>
> Additionally this sets MAX_[TX|RX]_QUEUES to 72. Which is
> used as the size for the tx/rx_ring arrays. There is no
> reason to have more tx_rings/rx_rings then num_tx_queues.
>
> Signed-off-by: John Fastabend <john.r.fastabend@intel.com>
> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Acked-by: Eric Dumazet <eric.dumazet@gmail.com>
Thanks guys
> ---
>
> drivers/net/ixgbe/ixgbe.h | 7 +++++--
> drivers/net/ixgbe/ixgbe_main.c | 1 -
> 2 files changed, 5 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/net/ixgbe/ixgbe.h b/drivers/net/ixgbe/ixgbe.h
> index 19e94ee..79c35ae 100644
> --- a/drivers/net/ixgbe/ixgbe.h
> +++ b/drivers/net/ixgbe/ixgbe.h
> @@ -204,14 +204,17 @@ enum ixgbe_ring_f_enum {
> #define IXGBE_MAX_FDIR_INDICES 64
> #ifdef IXGBE_FCOE
> #define IXGBE_MAX_FCOE_INDICES 8
> +#define MAX_RX_QUEUES (IXGBE_MAX_FDIR_INDICES + IXGBE_MAX_FCOE_INDICES)
> +#define MAX_TX_QUEUES (IXGBE_MAX_FDIR_INDICES + IXGBE_MAX_FCOE_INDICES)
> +#else
> +#define MAX_RX_QUEUES IXGBE_MAX_FDIR_INDICES
> +#define MAX_TX_QUEUES IXGBE_MAX_FDIR_INDICES
> #endif /* IXGBE_FCOE */
> struct ixgbe_ring_feature {
> int indices;
> int mask;
> } ____cacheline_internodealigned_in_smp;
>
> -#define MAX_RX_QUEUES 128
> -#define MAX_TX_QUEUES 128
>
> #define MAX_RX_PACKET_BUFFERS ((adapter->flags & IXGBE_FLAG_DCB_ENABLED) \
> ? 8 : 1)
> diff --git a/drivers/net/ixgbe/ixgbe_main.c b/drivers/net/ixgbe/ixgbe_main.c
> index 315622f..a9147e5 100644
> --- a/drivers/net/ixgbe/ixgbe_main.c
> +++ b/drivers/net/ixgbe/ixgbe_main.c
> @@ -6041,7 +6041,6 @@ static int __devinit ixgbe_probe(struct pci_dev *pdev,
> indices += min_t(unsigned int, num_possible_cpus(),
> IXGBE_MAX_FCOE_INDICES);
> #endif
> - indices = min_t(unsigned int, indices, MAX_TX_QUEUES);
> netdev = alloc_etherdev_mq(sizeof(struct ixgbe_adapter), indices);
> if (!netdev) {
> err = -ENOMEM;
>
> --
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: [net-2.6 PATCH] ixgbe: cleanup maximum number of tx queues
2010-03-24 20:01 [net-2.6 PATCH] ixgbe: cleanup maximum number of tx queues Jeff Kirsher
2010-03-24 20:08 ` Eric Dumazet
@ 2010-03-26 18:58 ` David Miller
1 sibling, 0 replies; 3+ messages in thread
From: David Miller @ 2010-03-26 18:58 UTC (permalink / raw)
To: jeffrey.t.kirsher; +Cc: netdev, gospo, john.r.fastabend
From: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Date: Wed, 24 Mar 2010 13:01:45 -0700
> From: John Fastabend <john.r.fastabend@intel.com>
>
> In the last patch I missed an unecessary min_t comparison.
> This patch removes it, the path allocates at most
> 72 tx queues for 82599 and 24 for 82598 there is no need
> for this check.
>
> Additionally this sets MAX_[TX|RX]_QUEUES to 72. Which is
> used as the size for the tx/rx_ring arrays. There is no
> reason to have more tx_rings/rx_rings then num_tx_queues.
>
> Signed-off-by: John Fastabend <john.r.fastabend@intel.com>
> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Applied.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2010-03-26 18:57 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-03-24 20:01 [net-2.6 PATCH] ixgbe: cleanup maximum number of tx queues Jeff Kirsher
2010-03-24 20:08 ` Eric Dumazet
2010-03-26 18:58 ` David Miller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox