* [dpdk-dev] [PATCH] bnx2x: Correctly determine MSIX vector count
@ 2016-06-10 22:18 Chas Williams
2016-06-17 16:25 ` Ferruh Yigit
2016-06-21 5:55 ` Harish Patil
0 siblings, 2 replies; 4+ messages in thread
From: Chas Williams @ 2016-06-10 22:18 UTC (permalink / raw)
To: dev; +Cc: harish.patil, Charles (Chas) Williams
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
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [dpdk-dev] [PATCH] bnx2x: Correctly determine MSIX vector count
2016-06-10 22:18 [dpdk-dev] [PATCH] bnx2x: Correctly determine MSIX vector count Chas Williams
@ 2016-06-17 16:25 ` Ferruh Yigit
2016-06-21 5:55 ` Harish Patil
1 sibling, 0 replies; 4+ messages in thread
From: Ferruh Yigit @ 2016-06-17 16:25 UTC (permalink / raw)
To: Chas Williams, dev
Cc: harish.patil, Charles (Chas) Williams, Rasesh Mody, Sony Chacko
On 6/10/2016 11:18 PM, Chas Williams wrote:
> 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>
> ---
Since this patch not acked yet, adding all maintainers to cc
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [dpdk-dev] [PATCH] bnx2x: Correctly determine MSIX vector count
2016-06-10 22:18 [dpdk-dev] [PATCH] bnx2x: Correctly determine MSIX vector count Chas Williams
2016-06-17 16:25 ` Ferruh Yigit
@ 2016-06-21 5:55 ` Harish Patil
2016-06-21 10:12 ` Bruce Richardson
1 sibling, 1 reply; 4+ messages in thread
From: Harish Patil @ 2016-06-21 5:55 UTC (permalink / raw)
To: Chas Williams, dev; +Cc: Charles (Chas) Williams
>
>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>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [dpdk-dev] [PATCH] bnx2x: Correctly determine MSIX vector count
2016-06-21 5:55 ` Harish Patil
@ 2016-06-21 10:12 ` Bruce Richardson
0 siblings, 0 replies; 4+ messages in thread
From: Bruce Richardson @ 2016-06-21 10:12 UTC (permalink / raw)
To: Harish Patil; +Cc: Chas Williams, dev, Charles (Chas) Williams
On Tue, Jun 21, 2016 at 05:55:19AM +0000, Harish Patil wrote:
> >
> >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>
<snip>
>
> Acked-by: Harish Patil <harish.patil@qlogic.com>
>
Applied to dpdk-next-net/rel_16_07
/Bruce
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2016-06-21 10:12 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-06-10 22:18 [dpdk-dev] [PATCH] bnx2x: Correctly determine MSIX vector count Chas Williams
2016-06-17 16:25 ` Ferruh Yigit
2016-06-21 5:55 ` Harish Patil
2016-06-21 10:12 ` Bruce Richardson
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).