From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 58295A034C; Mon, 9 May 2022 14:55:57 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id BF5E4407FF; Mon, 9 May 2022 14:55:56 +0200 (CEST) Received: from mail-io1-f49.google.com (mail-io1-f49.google.com [209.85.166.49]) by mails.dpdk.org (Postfix) with ESMTP id 5B3DD4068F for ; Mon, 9 May 2022 14:55:55 +0200 (CEST) Received: by mail-io1-f49.google.com with SMTP id f4so15153518iov.2 for ; Mon, 09 May 2022 05:55:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=88dXieY3ofFTbnrxmgXJUcWy/q++WRUDbfNORlAgdN8=; b=HDEAibW7uYUuV50s4DQ8Tk0QrKI2fD4NEJgAbIh8FuffqMJgLl7C6HDqAbjM6CF+Nb YWOqCiX0JLgICr1ie6uYpIp/ZI2SyKi8AVg4bpyTRM7ykXzDj9sGnYn/ejurb4FdOb/5 qUl4t9rPaSsEQLg502TjUvgk0TYBtvmwJXiQS+GueIpH8PFqpjBNSvS/5rfiDXKqw5Bm KkubAmOD+BjQBnw7CjQ2rJd7wjcN+eWqidSLSClrRpz67VBzN6l9284WWD0qRwYDqq3K Q5tRPAtMVoCJ0rwoYTSzfnT438dOJjxYIY1sqYLGM5rIamPcvqQlhBKJN0pZdnsbvKK5 xsJg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=88dXieY3ofFTbnrxmgXJUcWy/q++WRUDbfNORlAgdN8=; b=mQlGEo7UVuH9CQ2Tprlnkp+e5WIUO3nFyo7hlVGZ0cmLiIYq89xZnAlNmR4LndsVcT pLuwMnhWJgZ2MJ3fJUzedA3KWW8j54OzAAo70EFsqkndQOp4HcJHzi4lJj9jLmps3Kcu 7mw472/JfryET3YE1sU6t7IGm1l7K2L4ClZFFTXPZHNDXoWjvK6o80mBzh22Q8JtScQY k+uJxVzMpGG7jET2RY3DWQOGC1xf2+NiqfpAKgIvXVZA3DpKp2eDKo2aUDOfl+NsGcNF 5unebuvxssPYwG3Uh3QY9eUzZTFTBcADuIgFx9xFEYXSbRjmmNkbxrsDRnu3NPr/aJEs 8ocA== X-Gm-Message-State: AOAM533dVJoypVmK+Y0dmHeVMXiJAFgdSHTtl+yzhsJYZBo+0SRfqEAJ RVZTXrckpjSRm5mtrO1d+QzjlOurK2ZhEBUblo4= X-Google-Smtp-Source: ABdhPJxvv2KCh06gof1TgkFBDyb+zxQS5I4vl9PzovPHvAZ/KQAOMIIQIkEKfyyBxP0ybwvuDK6r6QiebHLSdqAtPnE= X-Received: by 2002:a05:6602:1815:b0:658:c186:c1cc with SMTP id t21-20020a056602181500b00658c186c1ccmr6425809ioh.25.1652100954609; Mon, 09 May 2022 05:55:54 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Jerin Jacob Date: Mon, 9 May 2022 18:25:28 +0530 Message-ID: Subject: Re: [PATCH v2 4/6] test/event: test cases to test runtime queue attribute To: Shijith Thotton Cc: dpdk-dev , Jerin Jacob , Pavan Nikhilesh , "Van Haaren, Harry" , =?UTF-8?Q?Mattias_R=C3=B6nnblom?= Content-Type: text/plain; charset="UTF-8" X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org On Tue, Apr 5, 2022 at 11:12 AM Shijith Thotton wrote: > > Added test cases to test changing of queue QoS attributes priority, > weight and affinity at runtime. > > Signed-off-by: Shijith Thotton > --- > app/test/test_eventdev.c | 149 +++++++++++++++++++++++++++++++++++++++ > 1 file changed, 149 insertions(+) > > diff --git a/app/test/test_eventdev.c b/app/test/test_eventdev.c > index 4f51042bda..1af93d3b77 100644 > --- a/app/test/test_eventdev.c > +++ b/app/test/test_eventdev.c > @@ -385,6 +385,149 @@ test_eventdev_queue_attr_priority(void) > return TEST_SUCCESS; > } > > +static int > +test_eventdev_queue_attr_priority_runtime(void) > +{ > + struct rte_event_queue_conf qconf; > + struct rte_event_dev_info info; > + uint32_t queue_count; > + int i, ret; > + > + ret = rte_event_dev_info_get(TEST_DEV_ID, &info); > + TEST_ASSERT_SUCCESS(ret, "Failed to get event dev info"); > + > + if (!(info.event_dev_cap & RTE_EVENT_DEV_CAP_RUNTIME_QUEUE_ATTR)) > + return TEST_SKIPPED; > + > + set_val = i % RTE_EVENT_DEV_PRIORITY_LOWEST; > + TEST_ASSERT_SUCCESS( > + rte_event_queue_attr_set(TEST_DEV_ID, i, > + RTE_EVENT_QUEUE_ATTR_PRIORITY, > + set_val), > + "Queue priority set failed"); If the return code is -ENOSUP, Please mark the test as TEST_SKIPPED > + TEST_ASSERT_SUCCESS( > + rte_event_queue_attr_get(TEST_DEV_ID, i, > + RTE_EVENT_QUEUE_ATTR_PRIORITY, > + &get_val), > + "Queue priority get failed"); > + TEST_ASSERT_EQUAL(get_val, set_val, > + "Wrong priority value for queue%d", i); > + } > + > + return TEST_SUCCESS; > +} > + > +static int > +test_eventdev_queue_attr_weight_runtime(void) > +{ > + struct rte_event_queue_conf qconf; > + struct rte_event_dev_info info; > + uint32_t queue_count; > + int i, ret; > + > + ret = rte_event_dev_info_get(TEST_DEV_ID, &info); > + TEST_ASSERT_SUCCESS(ret, "Failed to get event dev info"); > + > + if (!(info.event_dev_cap & RTE_EVENT_DEV_CAP_RUNTIME_QUEUE_ATTR)) > + return TEST_SKIPPED; > + > + TEST_ASSERT_SUCCESS(rte_event_dev_attr_get( > + TEST_DEV_ID, RTE_EVENT_DEV_ATTR_QUEUE_COUNT, > + &queue_count), > + "Queue count get failed"); > + > + for (i = 0; i < (int)queue_count; i++) { > + ret = rte_event_queue_default_conf_get(TEST_DEV_ID, i, &qconf); > + TEST_ASSERT_SUCCESS(ret, "Failed to get queue%d def conf", i); > + ret = rte_event_queue_setup(TEST_DEV_ID, i, &qconf); > + TEST_ASSERT_SUCCESS(ret, "Failed to setup queue%d", i); > + } > + > + for (i = 0; i < (int)queue_count; i++) { > + uint32_t get_val; > + uint64_t set_val; > + > + set_val = i % RTE_EVENT_QUEUE_WEIGHT_HIGHEST; > + TEST_ASSERT_SUCCESS( > + rte_event_queue_attr_set(TEST_DEV_ID, i, > + RTE_EVENT_QUEUE_ATTR_WEIGHT, > + set_val), > + "Queue weight set failed"); If the return code is -ENOSUP, Please mark the test as TEST_SKIPPED > + TEST_ASSERT_SUCCESS(rte_event_queue_attr_get( > + TEST_DEV_ID, i, > + RTE_EVENT_QUEUE_ATTR_WEIGHT, &get_val), > + "Queue weight get failed"); > + TEST_ASSERT_EQUAL(get_val, set_val, > + "Wrong weight value for queue%d", i); > + } > + > + return TEST_SUCCESS; > +} > + > +static int > +test_eventdev_queue_attr_affinity_runtime(void) > +{ Please use rte_event_dequeue_burst() to get APIs to test the full functionality to validate the feature for both priority and affinity test cases.