From: Eric Dumazet <eric.dumazet@gmail.com>
To: Rasesh Mody <rmody@brocade.com>
Cc: davem@davemloft.net, netdev@vger.kernel.org,
adapter_linux_open_src_team@brocade.com,
Gurunatha Karaje <gkaraje@brocade.com>
Subject: Re: [net-next 10/12] bna: TX Queue Depth Fix
Date: Wed, 31 Aug 2011 06:24:30 +0200 [thread overview]
Message-ID: <1314764670.2556.23.camel@edumazet-laptop> (raw)
In-Reply-To: <1314754068-31978-11-git-send-email-rmody@brocade.com>
Le mardi 30 août 2011 à 18:27 -0700, Rasesh Mody a écrit :
> sk_buff unmap_array grows greater than 65536 (x2) with Tx ring of 65536.
> Reducing TXQ depth and safe(max) acking of Tx events to 32768 (same as Rx).
> Add defines for TX and RX queue depths.
>
> Signed-off-by: Gurunatha Karaje <gkaraje@brocade.com>
> Signed-off-by: Rasesh Mody <rmody@brocade.com>
> ---
> drivers/net/ethernet/brocade/bna/bnad.h | 4 ++++
> drivers/net/ethernet/brocade/bna/bnad_ethtool.c | 8 ++++----
> 2 files changed, 8 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/net/ethernet/brocade/bna/bnad.h b/drivers/net/ethernet/brocade/bna/bnad.h
> index 0c9d736..6c42c14 100644
> --- a/drivers/net/ethernet/brocade/bna/bnad.h
> +++ b/drivers/net/ethernet/brocade/bna/bnad.h
> @@ -86,6 +86,10 @@ struct bnad_rx_ctrl {
> #define BNAD_MAX_Q_DEPTH 0x10000
> #define BNAD_MIN_Q_DEPTH 0x200
>
> +#define BNAD_MAX_RXQ_DEPTH (BNAD_MAX_Q_DEPTH / bnad_rxqs_per_cq)
> +/* keeping MAX TX and RX Q depth equal */
> +#define BNAD_MAX_TXQ_DEPTH BNAD_MAX_RXQ_DEPTH
> +
> #define BNAD_JUMBO_MTU 9000
>
> #define BNAD_NETIF_WAKE_THRESHOLD 8
> diff --git a/drivers/net/ethernet/brocade/bna/bnad_ethtool.c b/drivers/net/ethernet/brocade/bna/bnad_ethtool.c
> index 96ff700..4842224 100644
> --- a/drivers/net/ethernet/brocade/bna/bnad_ethtool.c
> +++ b/drivers/net/ethernet/brocade/bna/bnad_ethtool.c
> @@ -418,10 +418,10 @@ bnad_get_ringparam(struct net_device *netdev,
> {
> struct bnad *bnad = netdev_priv(netdev);
>
> - ringparam->rx_max_pending = BNAD_MAX_Q_DEPTH / bnad_rxqs_per_cq;
> + ringparam->rx_max_pending = BNAD_MAX_RXQ_DEPTH;
> ringparam->rx_mini_max_pending = 0;
> ringparam->rx_jumbo_max_pending = 0;
> - ringparam->tx_max_pending = BNAD_MAX_Q_DEPTH;
> + ringparam->tx_max_pending = BNAD_MAX_TXQ_DEPTH;
>
> ringparam->rx_pending = bnad->rxq_depth;
> ringparam->rx_mini_max_pending = 0;
> @@ -445,13 +445,13 @@ bnad_set_ringparam(struct net_device *netdev,
> }
>
> if (ringparam->rx_pending < BNAD_MIN_Q_DEPTH ||
> - ringparam->rx_pending > BNAD_MAX_Q_DEPTH / bnad_rxqs_per_cq ||
> + ringparam->rx_pending > BNAD_MAX_RXQ_DEPTH ||
> !BNA_POWER_OF_2(ringparam->rx_pending)) {
> mutex_unlock(&bnad->conf_mutex);
> return -EINVAL;
> }
> if (ringparam->tx_pending < BNAD_MIN_Q_DEPTH ||
> - ringparam->tx_pending > BNAD_MAX_Q_DEPTH ||
> + ringparam->tx_pending > BNAD_MAX_TXQ_DEPTH ||
> !BNA_POWER_OF_2(ringparam->tx_pending)) {
> mutex_unlock(&bnad->conf_mutex);
> return -EINVAL;
BNAD_MAX_Q_DEPTH is now defined but not used.
BTW, 32768 slots in a RX queue is insane.
next prev parent reply other threads:[~2011-08-31 4:24 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-08-31 1:27 [net-next 00/12] bna: Update bna driver version to 3.0.2.1 Rasesh Mody
2011-08-31 1:27 ` [net-next 01/12] bna: Naming Change and Minor Macro Fix Rasesh Mody
2011-08-31 1:27 ` [net-next 02/12] bna: PCI Probe Fix Rasesh Mody
2011-08-31 1:27 ` [net-next 03/12] bna: Interrupt Polling and NAPI Init Changes Rasesh Mody
2011-08-31 1:27 ` [net-next 04/12] bna: TX Path and RX Path Changes Rasesh Mody
2011-08-31 1:27 ` [net-next 05/12] bna: Formatting and Code Cleanup Rasesh Mody
2011-08-31 1:27 ` [net-next 06/12] bna: Initialization and Locking Fix Rasesh Mody
2011-08-31 1:27 ` [net-next 07/12] bna: Ethtool Enhancements and Fix Rasesh Mody
2011-08-31 1:27 ` [net-next 08/12] bna: Async Mode Tx Rx Init Fix Rasesh Mody
2011-08-31 1:27 ` [net-next 09/12] bna: MBOX IRQ Flag Check after Locking Rasesh Mody
2011-08-31 1:27 ` [net-next 10/12] bna: TX Queue Depth Fix Rasesh Mody
2011-08-31 4:24 ` Eric Dumazet [this message]
2011-08-31 4:34 ` Dave Taht
2011-08-31 4:46 ` Eric Dumazet
2011-08-31 1:27 ` [net-next 11/12] bna: SKB PCI UNMAP Fix Rasesh Mody
2011-08-31 1:27 ` [net-next 12/12] bna: Driver Version changed to 3.0.2.1 Rasesh Mody
2011-09-07 19:24 ` [net-next 00/12] bna: Update bna driver version " Jing Huang
2011-09-07 19:47 ` David Miller
2011-09-15 19:41 ` David Miller
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1314764670.2556.23.camel@edumazet-laptop \
--to=eric.dumazet@gmail.com \
--cc=adapter_linux_open_src_team@brocade.com \
--cc=davem@davemloft.net \
--cc=gkaraje@brocade.com \
--cc=netdev@vger.kernel.org \
--cc=rmody@brocade.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox