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 A073C4266D; Fri, 29 Sep 2023 09:21:03 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 7319740277; Fri, 29 Sep 2023 09:21:03 +0200 (CEST) Received: from mail-ua1-f50.google.com (mail-ua1-f50.google.com [209.85.222.50]) by mails.dpdk.org (Postfix) with ESMTP id 8EA214003C for ; Fri, 29 Sep 2023 09:21:02 +0200 (CEST) Received: by mail-ua1-f50.google.com with SMTP id a1e0cc1a2514c-7a50a1d1246so5562144241.3 for ; Fri, 29 Sep 2023 00:21:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1695972062; x=1696576862; darn=dpdk.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=AQvO2N68P+WARCtPmpTssaC1TGudflsHVLA9LyF3K/E=; b=a8yRCU95ldoEkJiEwx0/318vfXrz1t3WrsCSadpb4rKNGwKi0/jcI2xTNFDvCVU0T5 gAQc7o4mQV00NRJcYhiDm/J/a05AK5rcDkq6c2NYcAG1ryjp1pu6weWWsrUAyLi1ASxg 1PFfqVCJ15lsaSrmnFT9crJfzFQ7W4HVSr1AS+TP4yT86dwjL+OrWMWMDgSSNyv2g+gU Kit90oD1am7Pc8IBUb7RLJTVDeM+fMzqwtrUGHp1okp2fmAcpZEaO/zva3L82RG9Jg5e haLX3FTlCv+sVy9PmH1/6k5ZkWd3z8Lwt1a2Kcyn5ZQPG4Bwt7Rs5X17WA7MVY76vJ89 Lqdw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1695972062; x=1696576862; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=AQvO2N68P+WARCtPmpTssaC1TGudflsHVLA9LyF3K/E=; b=oHzuXsLSkHlKiBjThmimRviNaRNRDvksDRvYmQ5sPCIrGuuDewLExdkLrFIkSXVSKo B1pcJr0W3AQ/eNnAOE3GJgjgaUJJgodljmUoT2P1RlhSFVI/BrBOh0wxM1Q9Z10L/pfp yjFS/fr5kPryrWXdiHBuTpERyDVXcxQXWWcwi35xI1DnV7CXmEDyNY1LfHyLRWFArlk4 +6n/mlTmMsmd/3d154abRF7M1v80SoyaICx1nCWbp3cYP0ZwnYv5nm54oELLaBRyXezT TIqBW3h4fuOWXHCdi9b/nn5byFThdc7ThJY75FH/7ogQ5tXzbA9oF+P5S4kU0mH13Mfn 6kLw== X-Gm-Message-State: AOJu0Yy81KOjpZq1abwnbil9mDZeY3xsrQoCUanCWp6vh0RTTytJtRvq vS5PqXbJ+AhnTsgGlaeZ0JSnsldA//EFjSCxKTo= X-Google-Smtp-Source: AGHT+IHrTNs4xfnBjigDay8GgZHgWeEz+j/NHo1F2yOENXUKNu/5YBpzQURn9YKldtS2qyFZj5nPe/+AkETHtkeVWfw= X-Received: by 2002:a05:6102:2d3:b0:452:6e5f:cf95 with SMTP id h19-20020a05610202d300b004526e5fcf95mr3035224vsh.23.1695972061742; Fri, 29 Sep 2023 00:21:01 -0700 (PDT) MIME-Version: 1.0 References: <20230926103233.3956431-1-amitprakashs@marvell.com> <20230928103623.216287-1-amitprakashs@marvell.com> <20230928103623.216287-13-amitprakashs@marvell.com> In-Reply-To: <20230928103623.216287-13-amitprakashs@marvell.com> From: Jerin Jacob Date: Fri, 29 Sep 2023 12:50:35 +0530 Message-ID: Subject: Re: [PATCH v5 12/12] app/test: add event DMA adapter auto-test To: Amit Prakash Shukla Cc: dev@dpdk.org, jerinj@marvell.com, fengchengwen@huawei.com, kevin.laatz@intel.com, bruce.richardson@intel.com, conor.walsh@intel.com, vattunuru@marvell.com, g.singh@nxp.com, sachin.saxena@oss.nxp.com, hemant.agrawal@nxp.com, cheng1.jiang@intel.com, ndabilpuram@marvell.com, anoobj@marvell.com, mb@smartsharesystems.com Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable 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 Fri, Sep 29, 2023 at 9:46=E2=80=AFAM Amit Prakash Shukla wrote: > > Added testsuite to test the dma adapter functionality. > The testsuite detects event and DMA device capability > and accordingly dma adapter is configured and modes are > tested. Test command: > > /app/test/dpdk-test event_dma_adapter_autotest Use the below command with SW driver so that anyone can run it. > > Signed-off-by: Amit Prakash Shukla sudo ./build/app/test/dpdk-test --vdev=3Ddma_skeleton event_dma_adapter_aut= otest There are failures with above as skelton dmadev does not support SG and most of remaining drivers. So please change to following. [for-main]dell[dpdk-next-eventdev] $ git diff diff --git a/lib/eventdev/rte_event_dma_adapter.c b/lib/eventdev/rte_event_dma_adapter.c index 4899bc5d0f..bbdfd3daa6 100644 --- a/lib/eventdev/rte_event_dma_adapter.c +++ b/lib/eventdev/rte_event_dma_adapter.c @@ -256,8 +256,13 @@ edma_circular_buffer_flush_to_dma_dev(struct event_dma_adapter *adapter, for (i =3D 0; i < n; i++) { op =3D bufp->op_buffer[*head]; - ret =3D rte_dma_copy_sg(dma_dev_id, vchan, op->src_seg, op->dst_seg, - op->nb_src, op->nb_dst, op->flags); + if (op->nb_src =3D=3D 1 && op->nb_dst =3D=3D 1) + ret =3D rte_dma_copy(dma_dev_id, vchan, op->src_seg->addr, op->dst_seg->addr, + op->src_seg->length, op->flags); + else + ret =3D rte_dma_copy_sg(dma_dev_id, vchan, op->src_seg, op->dst_seg, + op->nb_src, op->nb_dst, op->flags); + With above change all test cases are pasiing on skelton device. [for-main]dell[dpdk-next-eventdev] $ sudo ./build/app/test/dpdk-test --vdev=3Ddma_skeleton event_dma_adapter_autotest EAL: Detected CPU lcores: 56 EAL: Detected NUMA nodes: 2 EAL: Detected static linkage of DPDK EAL: Multi-process socket /var/run/dpdk/rte/mp_socket EAL: Selected IOVA mode 'VA' skeldma_probe(): Create dma_skeleton dmadev with lcore-id -1 APP: HPET is not enabled, using TSC as default timer RTE>>event_dma_adapter_autotest + ------------------------------------------------------- + + Test Suite : Event dma adapter test suite + ------------------------------------------------------- + + TestCase [ 0] : test_dma_adapter_create succeeded + TestCase [ 1] : test_dma_adapter_vchan_add_del succeeded +------------------------------------------------------+ + DMA adapter stats for instance 0: + Event port poll count 0x0 + Event dequeue count 0x0 + DMA dev enqueue count 0x0 + DMA dev enqueue failed count 0x0 + DMA dev dequeue count 0x0 + Event enqueue count 0x0 + Event enqueue retry count 0x0 + Event enqueue fail count 0x0 +------------------------------------------------------+ + TestCase [ 2] : test_dma_adapter_stats succeeded + TestCase [ 3] : test_dma_adapter_params succeeded +------------------------------------------------------+ + DMA adapter stats for instance 0: + Event port poll count 0xc5df + Event dequeue count 0x20 + DMA dev enqueue count 0x20 + DMA dev enqueue failed count 0x0 + DMA dev dequeue count 0x20 + Event enqueue count 0x20 + Event enqueue retry count 0x0 + Event enqueue fail count 0x0 +------------------------------------------------------+ + TestCase [ 4] : test_with_op_forward_mode succeeded EVENTDEV: rte_event_dev_stop() line 1427: Device with dev_id=3D0already sto= pped + ------------------------------------------------------- + + Test Suite Summary : Event dma adapter test suite + ------------------------------------------------------- + + Tests Total : 5 + Tests Skipped : 0 + Tests Executed : 5 + Tests Unsupported: 0 + Tests Passed : 5 + Tests Failed : 0 + ------------------------------------------------------- + Test OK RTE>>skeldma_remove(): Remove dma_skeleton dmadev # Please fix the second warning by using rte_strscpy [for-main]dell[dpdk-next-eventdev] $ ./devtools/checkpatches.sh -n 12 && ./devtools/check-git-log.sh -n 12 ### [PATCH] eventdev/dma: support adapter create and free WARNING:MACRO_WITH_FLOW_CONTROL: Macros with flow control statements should be avoided #60: FILE: lib/eventdev/rte_event_dma_adapter.c:19: +#define EVENT_DMA_ADAPTER_ID_VALID_OR_ERR_RET(id, retval) \ + do { \ + if (!edma_adapter_valid_id(id)) { \ + RTE_EDEV_LOG_ERR("Invalid DMA adapter id =3D %d\n",= id); \ + return retval; \ + } \ + } while (0) WARNING:STRCPY: Prefer strscpy over strcpy - see: https://github.com/KSPP/linux/issues/88 #302: FILE: lib/eventdev/rte_event_dma_adapter.c:261: + strcpy(adapter->mem_name, name); total: 0 errors, 2 warnings, 349 lines checked Rest of the chages looks good to me. Good to merge next version.