event/dlb2: improve CQ weight error messages
authorTimothy McDaniel <timothy.mcdaniel@intel.com>
Wed, 6 Jul 2022 21:46:28 +0000 (16:46 -0500)
committerThomas Monjalon <thomas@monjalon.net>
Mon, 11 Jul 2022 20:29:39 +0000 (22:29 +0200)
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
drivers/event/dlb2/pf/base/dlb2_resource.c

index 93bf215..5a443ac 100644 (file)
@@ -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;
        }
 
index e73d289..0731416 100644 (file)
@@ -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;
        }