patches for DPDK stable branches
 help / color / mirror / Atom feed
From: Kevin Traynor <ktraynor@redhat.com>
To: qi.z.zhang@intel.com
Cc: dev@dpdk.org, Kevin Traynor <ktraynor@redhat.com>,
	stable@dpdk.org, zhirun.yan@intel.com
Subject: [dpdk-stable] [PATCH 1/2] net/i40e: fix negative check on unsigned queue pairs
Date: Tue,  5 Mar 2019 16:30:38 +0000	[thread overview]
Message-ID: <20190305163039.16790-1-ktraynor@redhat.com> (raw)

Fix the check and associated log. Also, fix a typo in other log.

Fixes: 03d478e9609d ("net/i40e: support PF respond VF request more queues")
Cc: stable@dpdk.org

Cc: zhirun.yan@intel.com
Signed-off-by: Kevin Traynor <ktraynor@redhat.com>
---
 drivers/net/i40e/i40e_pf.c | 10 ++++------
 1 file changed, 4 insertions(+), 6 deletions(-)

diff --git a/drivers/net/i40e/i40e_pf.c b/drivers/net/i40e/i40e_pf.c
index 585b21cbc..0c4bdbcd1 100644
--- a/drivers/net/i40e/i40e_pf.c
+++ b/drivers/net/i40e/i40e_pf.c
@@ -1251,9 +1251,7 @@ i40e_pf_host_process_cmd_request_queues(struct i40e_pf_vf *vf, uint8_t *msg)
 	pf = vf->pf;
 
-	if (req_pairs <= 0) {
-		PMD_DRV_LOG(ERR,
-			    "VF %d tried to request %d queues. Ignoring.\n",
-			    vf->vf_idx,
-			    I40E_MAX_QP_NUM_PER_VF);
+	if (req_pairs == 0) {
+		PMD_DRV_LOG(ERR, "VF %d tried to request 0 queues. Ignoring.\n",
+			    vf->vf_idx);
 	} else if (req_pairs > I40E_MAX_QP_NUM_PER_VF) {
 		PMD_DRV_LOG(ERR,
@@ -1264,5 +1262,5 @@ i40e_pf_host_process_cmd_request_queues(struct i40e_pf_vf *vf, uint8_t *msg)
 	} else if (req_pairs > cur_pairs + pf->qp_pool.num_free) {
 		PMD_DRV_LOG(ERR,
-			    "VF %d requested %d more queues, but noly %d left\n",
+			    "VF %d requested %d more queues, but only %d left\n",
 			    vf->vf_idx,
 			    req_pairs - cur_pairs,
-- 
2.20.1

             reply	other threads:[~2019-03-05 16:31 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-03-05 16:30 Kevin Traynor [this message]
2019-03-07 13:42 ` Zhang, Qi Z

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=20190305163039.16790-1-ktraynor@redhat.com \
    --to=ktraynor@redhat.com \
    --cc=dev@dpdk.org \
    --cc=qi.z.zhang@intel.com \
    --cc=stable@dpdk.org \
    --cc=zhirun.yan@intel.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;
as well as URLs for NNTP newsgroup(s).