DPDK patches and discussions
 help / color / mirror / Atom feed
From: Harish Patil <harish.patil@qlogic.com>
To: Chas Williams <3chas3@gmail.com>, "dev@dpdk.org" <dev@dpdk.org>
Cc: "Charles (Chas) Williams" <ciwillia@brocade.com>
Subject: Re: [dpdk-dev] [PATCH] bnx2x: Correctly determine MSIX vector count
Date: Tue, 21 Jun 2016 05:55:19 +0000	[thread overview]
Message-ID: <D38E2478.40C51%harish.patil@qlogic.com> (raw)
In-Reply-To: <1465597132-11674-1-git-send-email-3chas3@gmail.com>

>
>From: "Charles (Chas) Williams" <ciwillia@brocade.com>
>
>If MSIX is available, the vector count given by the table size is one
>less than the actual count.  This count also limits the receive and
>transmit queue resources the VF can support.
>
>Fixes: 540a211084a7 ("bnx2x: driver core")
>
>Signed-off-by: Chas Williams <ciwillia@brocade.com>
>---
> drivers/net/bnx2x/bnx2x.c | 8 +++++---
> 1 file changed, 5 insertions(+), 3 deletions(-)
>
>diff --git a/drivers/net/bnx2x/bnx2x.c b/drivers/net/bnx2x/bnx2x.c
>index 6edb2f9..4be732f 100644
>--- a/drivers/net/bnx2x/bnx2x.c
>+++ b/drivers/net/bnx2x/bnx2x.c
>@@ -9570,8 +9570,10 @@ static int bnx2x_pci_get_caps(struct bnx2x_softc
>*sc)
> static void bnx2x_init_rte(struct bnx2x_softc *sc)
> {
> 	if (IS_VF(sc)) {
>-		sc->max_tx_queues = BNX2X_VF_MAX_QUEUES_PER_VF;
>-		sc->max_rx_queues = BNX2X_VF_MAX_QUEUES_PER_VF;
>+		sc->max_tx_queues = min(BNX2X_VF_MAX_QUEUES_PER_VF,
>+					sc->igu_sb_cnt);
>+		sc->max_rx_queues = min(BNX2X_VF_MAX_QUEUES_PER_VF,
>+					sc->igu_sb_cnt);
> 	} else {
> 		sc->max_tx_queues = 128;
> 		sc->max_rx_queues = 128;
>@@ -9713,7 +9715,7 @@ int bnx2x_attach(struct bnx2x_softc *sc)
> 		pci_read(sc,
> 			 (sc->devinfo.pcie_msix_cap_reg + PCIR_MSIX_CTRL), &val,
> 			 2);
>-		sc->igu_sb_cnt = (val & PCIM_MSIXCTRL_TABLE_SIZE);
>+		sc->igu_sb_cnt = (val & PCIM_MSIXCTRL_TABLE_SIZE) + 1;
> 	} else {
> 		sc->igu_sb_cnt = 1;
> 	}
>-- 
>2.5.5
>
>

Acked-by: Harish Patil <harish.patil@qlogic.com>


  parent reply	other threads:[~2016-06-21  5:55 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-06-10 22:18 Chas Williams
2016-06-17 16:25 ` Ferruh Yigit
2016-06-21  5:55 ` Harish Patil [this message]
2016-06-21 10:12   ` Bruce Richardson

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=D38E2478.40C51%harish.patil@qlogic.com \
    --to=harish.patil@qlogic.com \
    --cc=3chas3@gmail.com \
    --cc=ciwillia@brocade.com \
    --cc=dev@dpdk.org \
    /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;
as well as URLs for NNTP newsgroup(s).