From patchwork Wed Nov 1 10:18:09 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Amit Prakash Shukla X-Patchwork-Id: 133723 X-Patchwork-Delegate: thomas@monjalon.net Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id AE4FB4325F; Wed, 1 Nov 2023 11:18:30 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 47ACA402D5; Wed, 1 Nov 2023 11:18:30 +0100 (CET) Received: from mx0b-0016f401.pphosted.com (mx0a-0016f401.pphosted.com [67.231.148.174]) by mails.dpdk.org (Postfix) with ESMTP id BF9B9400EF for ; Wed, 1 Nov 2023 11:18:28 +0100 (CET) Received: from pps.filterd (m0045849.ppops.net [127.0.0.1]) by mx0a-0016f401.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 3A194qfa022227; Wed, 1 Nov 2023 03:18:27 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.com; h=from : to : cc : subject : date : message-id : mime-version : content-transfer-encoding : content-type; s=pfpt0220; bh=K1a7pqPYyt5MMZ/3e5Cl71YLJLGo0yqAg23dTWXedq0=; b=F+jy/W/pS+EaT9Boc349TZumaqHsXBNZ1x94JTNbZ6vWFsKXXbFvZrJ8AHNoCkf8307w zduLiF/6o1ew2bTLfcJ+cqgLDlXZ5ClkWPwLsJJG08m+cIAJCC+IH3F3GwdfcrsLc+RL Qx6gpZu1M++nL+gsqtZ+Aj/XzaWVPoK6BKeAJCM5Sfpty59GEvDqx2zL+Bu/9YWDYzzO mUz9Qno1nRTrXViNp91lIqE0lww6n3MIA87Dr3qEkILxCxyT5aIpDgUGf0UuGnAMLOlv QpoARAci981JlFg3dPBPLkStq84xdVpP6SnjvTnaYzCqZASl3cJmYN4fRnpbv1PbclK0 Hw== Received: from dc5-exch01.marvell.com ([199.233.59.181]) by mx0a-0016f401.pphosted.com (PPS) with ESMTPS id 3u31u8vfaw-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT); Wed, 01 Nov 2023 03:18:27 -0700 Received: from DC5-EXCH01.marvell.com (10.69.176.38) by DC5-EXCH01.marvell.com (10.69.176.38) with Microsoft SMTP Server (TLS) id 15.0.1497.48; Wed, 1 Nov 2023 03:18:26 -0700 Received: from maili.marvell.com (10.69.176.80) by DC5-EXCH01.marvell.com (10.69.176.38) with Microsoft SMTP Server id 15.0.1497.48 via Frontend Transport; Wed, 1 Nov 2023 03:18:26 -0700 Received: from localhost.localdomain (unknown [10.28.36.157]) by maili.marvell.com (Postfix) with ESMTP id 907F13F704C; Wed, 1 Nov 2023 03:18:21 -0700 (PDT) From: Amit Prakash Shukla To: Chengwen Feng , Kevin Laatz , Bruce Richardson CC: , , , , , , , , , , , Amit Prakash Shukla Subject: [PATCH] test/dma: fix for buffer auto free Date: Wed, 1 Nov 2023 15:48:09 +0530 Message-ID: <20231101101809.3546500-1-amitprakashs@marvell.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 X-Proofpoint-GUID: 49qW_vKRBxcJkOhiifO1uwU5VvdVR7Xs X-Proofpoint-ORIG-GUID: 49qW_vKRBxcJkOhiifO1uwU5VvdVR7Xs X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.272,Aquarius:18.0.987,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2023-11-01_07,2023-11-01_01,2023-05-22_02 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 Buffer auto free test failed for more than 1 dma device as the device initialization for the test was been done only for the first dma device. This changeset fixes the same. Fixes: 877cb3e37426 ("dmadev: add buffer auto free offload") Signed-off-by: Amit Prakash Shukla --- app/test/test_dmadev.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/test/test_dmadev.c b/app/test/test_dmadev.c index 216f84b6bb..3d4cb37ee6 100644 --- a/app/test/test_dmadev.c +++ b/app/test/test_dmadev.c @@ -49,6 +49,8 @@ struct dma_add_test dma_add_test[] = { [TEST_M2D_AUTO_FREE] = {.name = "m2d_auto_free", .enabled = false}, }; +static bool dev_init; + static void __rte_format_printf(3, 4) print_err(const char *func, int lineno, const char *format, ...) @@ -837,7 +839,6 @@ test_m2d_auto_free(int16_t dev_id, uint16_t vchan) }; uint32_t buf_cnt1, buf_cnt2; struct rte_mempool_ops *ops; - static bool dev_init; uint16_t nb_done = 0; bool dma_err = false; int retry = 100; @@ -1011,6 +1012,7 @@ test_dmadev_instance(int16_t dev_id) if ((info.dev_capa & RTE_DMA_CAPA_M2D_AUTO_FREE) && dma_add_test[TEST_M2D_AUTO_FREE].enabled == true) { + dev_init = false; if (runtest("m2d_auto_free", test_m2d_auto_free, 128, dev_id, vchan, CHECK_ERRS) < 0) goto err;