Netdev List
 help / color / mirror / Atom feed
From: Manish Chopra <manishc@marvell.com>
To: <davem@davemloft.net>
Cc: <netdev@vger.kernel.org>, <aelior@marvell.com>,
	<mkalderon@marvell.com>,
	Sudarsana Reddy Kalluru <skalluru@marvell.com>
Subject: [PATCH net 3/6] qed: Consider TX tcs while deriving the max num_queues for PF.
Date: Wed, 6 Feb 2019 14:43:44 -0800	[thread overview]
Message-ID: <20190206224347.17054-4-manishc@marvell.com> (raw)
In-Reply-To: <20190206224347.17054-1-manishc@marvell.com>

From: Sudarsana Reddy Kalluru <skalluru@marvell.com>

Max supported queues is derived incorrectly in the case of multi-CoS.
Need to consider TCs while calculating num_queues for PF.

Signed-off-by: Sudarsana Reddy Kalluru <skalluru@marvell.com>
Signed-off-by: Ariel Elior <aelior@marvell.com>
---
 drivers/net/ethernet/qlogic/qed/qed_l2.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/drivers/net/ethernet/qlogic/qed/qed_l2.c b/drivers/net/ethernet/qlogic/qed/qed_l2.c
index e68ca83..64ac95c 100644
--- a/drivers/net/ethernet/qlogic/qed/qed_l2.c
+++ b/drivers/net/ethernet/qlogic/qed/qed_l2.c
@@ -2216,7 +2216,7 @@ static int qed_fill_eth_dev_info(struct qed_dev *cdev,
 			u16 num_queues = 0;
 
 			/* Since the feature controls only queue-zones,
-			 * make sure we have the contexts [rx, tx, xdp] to
+			 * make sure we have the contexts [rx, xdp, tcs] to
 			 * match.
 			 */
 			for_each_hwfn(cdev, i) {
@@ -2226,7 +2226,8 @@ static int qed_fill_eth_dev_info(struct qed_dev *cdev,
 				u16 cids;
 
 				cids = hwfn->pf_params.eth_pf_params.num_cons;
-				num_queues += min_t(u16, l2_queues, cids / 3);
+				cids /= (2 + info->num_tc);
+				num_queues += min_t(u16, l2_queues, cids);
 			}
 
 			/* queues might theoretically be >256, but interrupts'
-- 
1.8.3.1


  parent reply	other threads:[~2019-02-06 22:46 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-02-06 22:43 [PATCH net 0/6] qed*: Bug fixes Manish Chopra
2019-02-06 22:43 ` [PATCH net 1/6] qed: Fix EQ full firmware assert Manish Chopra
2019-02-06 22:43 ` [PATCH net 2/6] qed: Assign UFP TC value to vlan priority in UFP mode Manish Chopra
2019-02-06 22:43 ` Manish Chopra [this message]
2019-02-06 22:43 ` [PATCH net 4/6] qede: Fix system crash on configuring channels Manish Chopra
2019-02-06 22:43 ` [PATCH net 5/6] qed: Change verbosity for coalescing message Manish Chopra
2019-02-06 22:43 ` [PATCH net 6/6] qed*: Advance drivers version to 8.37.0.20 Manish Chopra
2019-02-07  0:53 ` [PATCH net 0/6] qed*: Bug fixes 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=20190206224347.17054-4-manishc@marvell.com \
    --to=manishc@marvell.com \
    --cc=aelior@marvell.com \
    --cc=davem@davemloft.net \
    --cc=mkalderon@marvell.com \
    --cc=netdev@vger.kernel.org \
    --cc=skalluru@marvell.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