From: dpdklab@iol.unh.edu
To: test-report@dpdk.org
Cc: dpdk-test-reports@iol.unh.edu
Subject: [dpdk-test-report] |WARNING| pw100192 [PATCH] [v4] eventdev/rx-adapter: fix segfault in queue conf get
Date: Tue, 5 Oct 2021 05:44:13 +0000 (UTC) [thread overview]
Message-ID: <20211005054413.CC30061CE7@dpdk-ubuntu.dpdklab.iol.unh.edu> (raw)
[-- Attachment #1: Type: text/plain, Size: 4478 bytes --]
Test-Label: iol-testing
Test-Status: WARNING
http://dpdk.org/patch/100192
_apply patch failure_
Submitter: Kundapura, Ganapati <ganapati.kundapura@intel.com>
Date: Friday, October 01 2021 05:30:00
Applied on: CommitID:086d426406bd3f6fac96a15bbd871c7fe714bc2d
Apply patch set 100192 failed:
Checking patch app/test/test_event_eth_rx_adapter.c...
error: while searching for:
adapter_queue_conf(void)
{
int err;
struct rte_event_eth_rx_adapter_queue_conf queue_conf;
err = rte_event_eth_rx_adapter_queue_conf_get(TEST_INST_ID, TEST_DEV_ID,
0, &queue_conf);
TEST_ASSERT(err == 0, "Expected 0 got %d", err);
err = rte_event_eth_rx_adapter_queue_conf_get(TEST_INST_ID, TEST_DEV_ID,
-1, &queue_conf);
TEST_ASSERT(err == -EINVAL, "Expected -EINVAL got %d", err);
err = rte_event_eth_rx_adapter_queue_conf_get(TEST_INST_ID, TEST_DEV_ID,
0, NULL);
TEST_ASSERT(err == -EINVAL, "Expected -EINVAL got %d", err);
return TEST_SUCCESS;
}
error: patch failed: app/test/test_event_eth_rx_adapter.c:751
Checking patch lib/eventdev/rte_event_eth_rx_adapter.c...
error: while searching for:
return -EINVAL;
dev_info = &rx_adapter->eth_devices[eth_dev_id];
queue_info = &dev_info->rx_queue[rx_queue_id];
if (!queue_info->queue_enabled) {
RTE_EDEV_LOG_ERR("Rx queue %u not added", rx_queue_id);
return -EINVAL;
}
qi_ev = (struct rte_event *)&queue_info->event;
memset(queue_conf, 0, sizeof(*queue_conf));
error: patch failed: lib/eventdev/rte_event_eth_rx_adapter.c:2844
Applying patch app/test/test_event_eth_rx_adapter.c with 1 reject...
Rejected hunk #1.
Applying patch lib/eventdev/rte_event_eth_rx_adapter.c with 1 reject...
Rejected hunk #1.
diff a/app/test/test_event_eth_rx_adapter.c b/app/test/test_event_eth_rx_adapter.c (rejected hunks)
@@ -751,20 +751,48 @@ static int
adapter_queue_conf(void)
{
int err;
- struct rte_event_eth_rx_adapter_queue_conf queue_conf;
+ struct rte_event_eth_rx_adapter_queue_conf queue_conf = {0};
- err = rte_event_eth_rx_adapter_queue_conf_get(TEST_INST_ID, TEST_DEV_ID,
+ /* Case 1: queue conf get without any queues in Rx adapter */
+ err = rte_event_eth_rx_adapter_queue_conf_get(TEST_INST_ID,
+ TEST_ETHDEV_ID,
+ 0, &queue_conf);
+ TEST_ASSERT(err == -EINVAL, "Expected -EINVAL got %d", err);
+
+ /* Add queue to Rx adapter */
+ queue_conf.ev.queue_id = 0;
+ queue_conf.ev.sched_type = RTE_SCHED_TYPE_ATOMIC;
+ queue_conf.ev.priority = RTE_EVENT_DEV_PRIORITY_NORMAL;
+
+ err = rte_event_eth_rx_adapter_queue_add(TEST_INST_ID,
+ TEST_ETHDEV_ID,
+ 0, &queue_conf);
+ TEST_ASSERT(err == 0, "Expected 0 got %d", err);
+
+ /* Case 2: queue conf get with queue added to Rx adapter */
+ err = rte_event_eth_rx_adapter_queue_conf_get(TEST_INST_ID,
+ TEST_ETHDEV_ID,
0, &queue_conf);
TEST_ASSERT(err == 0, "Expected 0 got %d", err);
- err = rte_event_eth_rx_adapter_queue_conf_get(TEST_INST_ID, TEST_DEV_ID,
+ /* Case 3: queue conf get with invalid rx queue id */
+ err = rte_event_eth_rx_adapter_queue_conf_get(TEST_INST_ID,
+ TEST_ETHDEV_ID,
-1, &queue_conf);
TEST_ASSERT(err == -EINVAL, "Expected -EINVAL got %d", err);
- err = rte_event_eth_rx_adapter_queue_conf_get(TEST_INST_ID, TEST_DEV_ID,
+ /* Case 4: queue conf get with NULL queue conf struct */
+ err = rte_event_eth_rx_adapter_queue_conf_get(TEST_INST_ID,
+ TEST_ETHDEV_ID,
0, NULL);
TEST_ASSERT(err == -EINVAL, "Expected -EINVAL got %d", err);
+ /* Delete queue from the Rx adapter */
+ err = rte_event_eth_rx_adapter_queue_del(TEST_INST_ID,
+ TEST_ETHDEV_ID,
+ 0);
+ TEST_ASSERT(err == 0, "Expected 0 got %d", err);
+
return TEST_SUCCESS;
}
diff a/lib/eventdev/rte_event_eth_rx_adapter.c b/lib/eventdev/rte_event_eth_rx_adapter.c (rejected hunks)
@@ -2844,12 +2844,13 @@ rte_event_eth_rx_adapter_queue_conf_get(uint8_t id,
return -EINVAL;
dev_info = &rx_adapter->eth_devices[eth_dev_id];
- queue_info = &dev_info->rx_queue[rx_queue_id];
- if (!queue_info->queue_enabled) {
+ if (dev_info->rx_queue == NULL ||
+ !dev_info->rx_queue[rx_queue_id].queue_enabled) {
RTE_EDEV_LOG_ERR("Rx queue %u not added", rx_queue_id);
return -EINVAL;
}
+ queue_info = &dev_info->rx_queue[rx_queue_id];
qi_ev = (struct rte_event *)&queue_info->event;
memset(queue_conf, 0, sizeof(*queue_conf));
https://lab.dpdk.org/results/dashboard/patchsets/19102/
UNH-IOL DPDK Community Lab
reply other threads:[~2021-10-05 5:44 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20211005054413.CC30061CE7@dpdk-ubuntu.dpdklab.iol.unh.edu \
--to=dpdklab@iol.unh.edu \
--cc=dpdk-test-reports@iol.unh.edu \
--cc=test-report@dpdk.org \
/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).