[v2,2/2] event/dlb2: improve cq_weight error messages

Message ID 20220706214628.2375117-3-timothy.mcdaniel@intel.com (mailing list archive)
State Accepted, archived
Delegated to: Thomas Monjalon
Headers
Series DLB2: cq_weight fixes |

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/Intel-compilation success Compilation OK
ci/iol-aarch64-unit-testing success Testing PASS
ci/iol-intel-Performance success Performance Testing PASS
ci/iol-intel-Functional success Functional Testing PASS
ci/iol-x86_64-unit-testing success Testing PASS
ci/github-robot: build success github build: passed
ci/iol-x86_64-compile-testing success Testing PASS
ci/iol-aarch64-compile-testing success Testing PASS
ci/iol-abi-testing success Testing PASS
ci/intel-Testing success Testing PASS

Commit Message

Timothy McDaniel July 6, 2022, 9:46 p.m. UTC
  This commit changes 2 error messages to better
describe cq_weight related errors, should one occur.

Fixes: ffa46fc4a2b5 ("event/dlb2: support CQ weight")
Cc: stable@dpdk.org

Signed-off-by: Timothy McDaniel <timothy.mcdaniel@intel.com>
---
 drivers/event/dlb2/dlb2.c                  | 4 ++--
 drivers/event/dlb2/pf/base/dlb2_resource.c | 3 +++
 2 files changed, 5 insertions(+), 2 deletions(-)
  

Patch

diff --git a/drivers/event/dlb2/dlb2.c b/drivers/event/dlb2/dlb2.c
index 93bf215762..5a443acff8 100644
--- a/drivers/event/dlb2/dlb2.c
+++ b/drivers/event/dlb2/dlb2.c
@@ -1527,8 +1527,8 @@  dlb2_hw_create_ldb_port(struct dlb2_eventdev *dlb2,
 
 	if (dlb2->version == DLB2_HW_V2 && ev_port->cq_weight != 0 &&
 	    ev_port->cq_weight > dequeue_depth) {
-		DLB2_LOG_ERR("dlb2: invalid cq depth, must be >= cq weight%d\n",
-			     DLB2_MIN_ENQUEUE_DEPTH);
+		DLB2_LOG_ERR("dlb2: invalid cq dequeue depth %d, must be >= cq weight %d\n",
+			     dequeue_depth, ev_port->cq_weight);
 		return -EINVAL;
 	}
 
diff --git a/drivers/event/dlb2/pf/base/dlb2_resource.c b/drivers/event/dlb2/pf/base/dlb2_resource.c
index e73d289445..0731416a43 100644
--- a/drivers/event/dlb2/pf/base/dlb2_resource.c
+++ b/drivers/event/dlb2/pf/base/dlb2_resource.c
@@ -6397,6 +6397,9 @@  dlb2_verify_enable_cq_weight_args(struct dlb2_hw *hw,
 	struct dlb2_ldb_port *port;
 
 	if (hw->ver == DLB2_HW_V2) {
+		DLB2_HW_ERR(hw,
+			    "[%s():%d] CQ weight feature requires DLB 2.5 or later\n",
+			    __func__, __LINE__);
 		resp->status = DLB2_ST_FEATURE_UNAVAILABLE;
 		return -EINVAL;
 	}