[1/2] net/i40e: fix negative check on unsigned queue pairs

Message ID 20190305163039.16790-1-ktraynor@redhat.com (mailing list archive)
State Accepted, archived
Delegated to: Qi Zhang
Headers
Series [1/2] net/i40e: fix negative check on unsigned queue pairs |

Checks

Context Check Description
ci/intel-Performance-Testing success Performance Testing PASS
ci/mellanox-Performance-Testing success Performance Testing PASS
ci/Intel-compilation success Compilation OK

Commit Message

Kevin Traynor March 5, 2019, 4:30 p.m. UTC
  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(-)
  

Comments

Qi Zhang March 7, 2019, 1:42 p.m. UTC | #1
> -----Original Message-----
> From: Kevin Traynor [mailto:ktraynor@redhat.com]
> Sent: Wednesday, March 6, 2019 12:31 AM
> To: Zhang, Qi Z <qi.z.zhang@intel.com>
> Cc: dev@dpdk.org; Kevin Traynor <ktraynor@redhat.com>; stable@dpdk.org;
> Yan, Zhirun <zhirun.yan@intel.com>
> Subject: [PATCH 1/2] net/i40e: fix negative check on unsigned queue pairs
> 
> 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>

Acked-by: Qi Zhang <qi.z.zhang@intel.com>

Applied to dpdk-next-net-intel.

Thanks
Qi
  

Patch

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,