From: Michael Chan <michael.chan@broadcom.com>
To: davem@davemloft.net
Cc: netdev@vger.kernel.org
Subject: [PATCH net-next 09/13] bnxt_en: Don't set ETS on unused TCs.
Date: Sun, 16 Dec 2018 18:46:27 -0500 [thread overview]
Message-ID: <1545003991-17488-10-git-send-email-michael.chan@broadcom.com> (raw)
In-Reply-To: <1545003991-17488-1-git-send-email-michael.chan@broadcom.com>
Currently, the code allows ETS bandwidth weight 0 to be set on unused TCs.
We should not set any DCB parameters on unused TCs at all.
Signed-off-by: Michael Chan <michael.chan@broadcom.com>
---
drivers/net/ethernet/broadcom/bnxt/bnxt_dcb.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/broadcom/bnxt/bnxt_dcb.c b/drivers/net/ethernet/broadcom/bnxt/bnxt_dcb.c
index a85d2be..15c7041 100644
--- a/drivers/net/ethernet/broadcom/bnxt/bnxt_dcb.c
+++ b/drivers/net/ethernet/broadcom/bnxt/bnxt_dcb.c
@@ -471,7 +471,10 @@ static int bnxt_ets_validate(struct bnxt *bp, struct ieee_ets *ets, u8 *tc)
if (total_ets_bw > 100)
return -EINVAL;
- *tc = max_tc + 1;
+ if (max_tc >= bp->max_tc)
+ *tc = bp->max_tc;
+ else
+ *tc = max_tc + 1;
return 0;
}
--
2.5.1
next prev parent reply other threads:[~2018-12-16 23:46 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-12-16 23:46 [PATCH net-next 00/13] bnxt_en: Updates for net-next Michael Chan
2018-12-16 23:46 ` [PATCH net-next 01/13] bnxt_en: Store the maximum NQs available on the PF Michael Chan
2018-12-16 23:46 ` [PATCH net-next 02/13] bnxt_en: Add bnxt_get_avail_cp_rings_for_en() helper function Michael Chan
2018-12-16 23:46 ` [PATCH net-next 03/13] bnxt_en: get rid of num_stat_ctxs variable Michael Chan
2018-12-16 23:46 ` [PATCH net-next 04/13] bnxt_en: Do not modify max_stat_ctxs after RDMA driver requests/frees stat_ctxs Michael Chan
2018-12-16 23:46 ` [PATCH net-next 05/13] bnxt_en: Reserve 1 stat_ctx for RDMA driver Michael Chan
2018-12-16 23:46 ` [PATCH net-next 06/13] bnxt_en: Disable MSIX before re-reserving NQs/CMPL rings Michael Chan
2018-12-16 23:46 ` [PATCH net-next 07/13] bnxt_en: Add SR-IOV support for 57500 chips Michael Chan
2018-12-16 23:46 ` [PATCH net-next 08/13] bnxt_en: Add ethtool -S priority counters Michael Chan
2018-12-16 23:46 ` Michael Chan [this message]
2018-12-16 23:46 ` [PATCH net-next 10/13] bnxt_en: Return linux standard errors in bnxt_ethtool.c Michael Chan
2018-12-16 23:46 ` [PATCH net-next 11/13] bnxt_en: Save ring statistics before reset Michael Chan
2018-12-16 23:46 ` [PATCH net-next 12/13] bnxt_en: Do not free port statistics buffer when device is down Michael Chan
2018-12-16 23:46 ` [PATCH net-next 13/13] bnxt_en: query force speeds before disabling autoneg mode Michael Chan
2018-12-18 7:12 ` [PATCH net-next 00/13] bnxt_en: Updates for net-next 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=1545003991-17488-10-git-send-email-michael.chan@broadcom.com \
--to=michael.chan@broadcom.com \
--cc=davem@davemloft.net \
--cc=netdev@vger.kernel.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