From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id E5F6CA04F7; Tue, 7 Jan 2020 03:43:09 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 227BB1D8EE; Tue, 7 Jan 2020 03:43:09 +0100 (CET) Received: from EUR05-AM6-obe.outbound.protection.outlook.com (mail-am6eur05on2042.outbound.protection.outlook.com [40.107.22.42]) by dpdk.org (Postfix) with ESMTP id 673581D8EB for ; Tue, 7 Jan 2020 03:43:07 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=armh.onmicrosoft.com; s=selector2-armh-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=wfQVCiXkQRn2kYAqzMooKRm9p9XfqHtNzF8pczamUdA=; b=93paGVKRJlyz/5zLyNsgkafolibf+0oQT4Uilip95yPjJw5zU97jrdox2cpzDovkkUTy2LbEgJgpM9s84fI9le80tStseJfhH2DMsqlQ5dM3LW3CYyZgEAZCnB6nkUddzSptyqYdxWeqRuh6DwxbwML0mRKtnX8+cTUpPHL1sdg= Received: from HE1PR0802CA0009.eurprd08.prod.outlook.com (2603:10a6:3:bd::19) by DB8PR08MB5035.eurprd08.prod.outlook.com (2603:10a6:10:eb::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2623.8; Tue, 7 Jan 2020 02:43:05 +0000 Received: from VE1EUR03FT055.eop-EUR03.prod.protection.outlook.com (2a01:111:f400:7e09::205) by HE1PR0802CA0009.outlook.office365.com (2603:10a6:3:bd::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2623.8 via Frontend Transport; Tue, 7 Jan 2020 02:43:05 +0000 Authentication-Results: spf=pass (sender IP is 63.35.35.123) smtp.mailfrom=arm.com; dpdk.org; dkim=pass (signature was verified) header.d=armh.onmicrosoft.com;dpdk.org; dmarc=bestguesspass action=none header.from=arm.com; Received-SPF: Pass (protection.outlook.com: domain of arm.com designates 63.35.35.123 as permitted sender) receiver=protection.outlook.com; client-ip=63.35.35.123; helo=64aa7808-outbound-1.mta.getcheckrecipient.com; Received: from 64aa7808-outbound-1.mta.getcheckrecipient.com (63.35.35.123) by VE1EUR03FT055.mail.protection.outlook.com (10.152.19.158) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2602.11 via Frontend Transport; Tue, 7 Jan 2020 02:43:05 +0000 Received: ("Tessian outbound 0eaff1016ea4:v40"); Tue, 07 Jan 2020 02:43:05 +0000 X-CR-MTA-TID: 64aa7808 Received: from 8b7c51499924.1 by 64aa7808-outbound-1.mta.getcheckrecipient.com id 64ECC81F-4D8C-45A2-B624-1ECEC44D3025.1; Tue, 07 Jan 2020 02:42:59 +0000 Received: from EUR05-DB8-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id 8b7c51499924.1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Tue, 07 Jan 2020 02:42:59 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=eGd+22uaqZqT2YVvecyP4J/w0aOgkk89Wjui/1Dc9dxx1YAcvUFvrU6KkSSfy2W5HTY55bmQYj/L4Hn8gXZpzRyAAjkc28pqF26BrgwBtVVsbX8/uH6wKfdjOgsrs0yTf27uRRV0/yjcAAgTf2+xwfEeSn/h+hIfagmQemD/v65vvfhOr7Nmw5r6pGw7Uc7tIlACu3oxZELoRiizkErMQvnlsnB434P8RBvckQBNCgY+q5Uy/OfeCPNLPSf7yvzd7pnrAdLlQBSbTlxuyNIwTbYi0hCNkzRqy2dZUS7AMp8ic3F5BUF0oN+dGLB8tKyf0BQmeXIWJvRfls4cIMbRCA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=wfQVCiXkQRn2kYAqzMooKRm9p9XfqHtNzF8pczamUdA=; b=fBJPt2R4cY0tysUQFxm00uC0X5gg14fvqKeYIYBNBKwiBKY0TxySa3/DyHE1cJsR3Cmwvsv+eyCTkoAYyny5QiT3WUW+Le77bqLZr8dHyglvfkl6sbXyx5n4IS5yiWDb9tuSwsnjcFHVwTjc8+fN5oBmhn8OFVxgfE7SCutt/Bu/Sus5u9KSOUol4DsGKoC2io2nP2/krCZywWdyPjRSVDd2Xm2utjyuckP95kZBqpOyRDKi3uCB1BXtZaGSjIu8jS5tTF+xu995ndTaQ9RlJsBvTFWbiLz67y7B7QcDmDUyC3vDRCboAOClNbuyKOpm0nPSorfQUuj8yXEN2WNK1A== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=arm.com; dmarc=pass action=none header.from=arm.com; dkim=pass header.d=arm.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=armh.onmicrosoft.com; s=selector2-armh-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=wfQVCiXkQRn2kYAqzMooKRm9p9XfqHtNzF8pczamUdA=; b=93paGVKRJlyz/5zLyNsgkafolibf+0oQT4Uilip95yPjJw5zU97jrdox2cpzDovkkUTy2LbEgJgpM9s84fI9le80tStseJfhH2DMsqlQ5dM3LW3CYyZgEAZCnB6nkUddzSptyqYdxWeqRuh6DwxbwML0mRKtnX8+cTUpPHL1sdg= Received: from VI1PR08MB5376.eurprd08.prod.outlook.com (10.255.196.79) by VI1PR08MB2894.eurprd08.prod.outlook.com (10.170.238.12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2602.15; Tue, 7 Jan 2020 02:42:58 +0000 Received: from VI1PR08MB5376.eurprd08.prod.outlook.com ([fe80::e080:9698:5896:6837]) by VI1PR08MB5376.eurprd08.prod.outlook.com ([fe80::e080:9698:5896:6837%5]) with mapi id 15.20.2602.016; Tue, 7 Jan 2020 02:42:58 +0000 From: Gavin Hu To: Mahipal Challa , "dev@dpdk.org" CC: "jerinj@marvell.com" , "pathreya@marvell.com" , "snilla@marvell.com" , "venkatn@marvell.com" , nd Thread-Topic: [dpdk-dev] [PATCH v3 6/6] raw/octeontx2_ep: add driver self test Thread-Index: AQHVxIntV99JI9G1O0adhhWbRZh4lqfeft2g Date: Tue, 7 Jan 2020 02:42:58 +0000 Message-ID: References: <1578312447-17277-1-git-send-email-mchalla@marvell.com> <1578312447-17277-7-git-send-email-mchalla@marvell.com> In-Reply-To: <1578312447-17277-7-git-send-email-mchalla@marvell.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ts-tracking-id: 10fc3c17-9f6e-4760-a062-52fa2065dc92.0 x-checkrecipientchecked: true Authentication-Results-Original: spf=none (sender IP is ) smtp.mailfrom=Gavin.Hu@arm.com; x-originating-ip: [113.29.88.7] x-ms-publictraffictype: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: 11af5395-43be-4b22-40ac-08d7931b5287 X-MS-TrafficTypeDiagnostic: VI1PR08MB2894:|DB8PR08MB5035: x-ld-processed: f34e5979-57d9-4aaa-ad4d-b122a662184d,ExtAddr X-Microsoft-Antispam-PRVS: x-checkrecipientrouted: true x-ms-oob-tlc-oobclassifiers: OLM:7691;OLM:7691; x-forefront-prvs: 027578BB13 X-Forefront-Antispam-Report-Untrusted: SFV:NSPM; SFS:(10009020)(4636009)(346002)(136003)(39860400002)(376002)(366004)(396003)(189003)(13464003)(199004)(7696005)(110136005)(2906002)(86362001)(316002)(5660300002)(76116006)(33656002)(66946007)(81166006)(54906003)(66446008)(64756008)(66556008)(66476007)(478600001)(26005)(55016002)(81156014)(6506007)(186003)(71200400001)(8676002)(9686003)(8936002)(55236004)(53546011)(52536014)(4326008); DIR:OUT; SFP:1101; SCL:1; SRVR:VI1PR08MB2894; H:VI1PR08MB5376.eurprd08.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; MX:1; A:1; received-spf: None (protection.outlook.com: arm.com does not designate permitted sender hosts) X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam-Untrusted: BCL:0; X-Microsoft-Antispam-Message-Info-Original: YRfW8OIkaj6W/BfztOilv2C7cPGWaRi31A7bJ48binuZjxN5v1po+gokN8EAFha0oHO89fL12KGKpyt+RApdaGbqOf5qXAJG74wNJ4wOFK4JGXbqwE+ktJtDDglaJUfCSxBxhtKeQmN9L6Fg7iG9CX6jjX/dz2L+WSLmtebSukHZARBrBqkwbwvDLYROxJcLnpmIaw1jx6f6mW2/XUVoP8POwtt9VjOYFAyzQtsGNJkFnjWqTOiRMBwMf/L9ckQVK4DsLKQKIbyo0FkW08NO+a+JFtdvkZalYNrZ2scoEvGt2fQRcht6i+Spn/QGiugIGfJy2sx4f2Vy60hufui7aJy+80d+k7OpYZA1Q4NXhJfho+P+VqPxfivlGHyEA7DW6AZtvFtqW3bE2arPLGWsiTbKuBaJRa38QAbK2ldHJLJ1xEX5+cM3x6+pPmoJ0COy2RIlaz3e7NQOAAfzJUKhSv80/0dv50S2RuA6h0FvHUWut6u4IPvw+JDPWFpWxhRP x-ms-exchange-transport-forked: True Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR08MB2894 Original-Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Gavin.Hu@arm.com; X-EOPAttributedMessage: 0 X-MS-Exchange-Transport-CrossTenantHeadersStripped: VE1EUR03FT055.eop-EUR03.prod.protection.outlook.com X-Forefront-Antispam-Report: CIP:63.35.35.123; IPV:CAL; SCL:-1; CTRY:IE; EFV:NLI; SFV:NSPM; SFS:(10009020)(4636009)(39860400002)(376002)(346002)(136003)(396003)(13464003)(199004)(189003)(356004)(26005)(5660300002)(316002)(52536014)(26826003)(186003)(8676002)(81166006)(81156014)(2906002)(7696005)(478600001)(36906005)(9686003)(55016002)(110136005)(70206006)(54906003)(86362001)(4326008)(33656002)(8936002)(6506007)(53546011)(70586007)(336012); DIR:OUT; SFP:1101; SCL:1; SRVR:DB8PR08MB5035; H:64aa7808-outbound-1.mta.getcheckrecipient.com; FPR:; SPF:Pass; LANG:en; PTR:ec2-63-35-35-123.eu-west-1.compute.amazonaws.com; A:1; MX:1; X-MS-Office365-Filtering-Correlation-Id-Prvs: 3c02d950-c9a7-4f99-6676-08d7931b4e61 NoDisclaimer: True X-Forefront-PRVS: 027578BB13 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: F7mWg/F/LWDOGvU8SBOomRtuJURfNPU6B+hiKCpQz9ccDT8R4h8vGWa+f0nSdYxKwjMboUhcyZG7h/QTd9xMQ0O+UzHV8TJJkc+gUCcJ5MAsZ9EKpJcwUYFLPBQ/OZ3qXLyPzpvv9BFhRX8N2+Na8j+coLoNFxsnSz1Q2BHkWZPIPnsdKzqTo0UQ5TLTAVmnUmjcytzs7256EokxZU2rE0PDDmIosY4bikxS+xU6f/HUuqXwMRz0aVAHqjGFGMwGUGWVEUtTOGmOouih65NbBnc2T8rm1wkodI7PTG3UjlCkmNICG5A6/ARyMIxulpm+fEvWgOflql9LiLAbtK2EWNFn761lUugAh1DfDU2dLgt4zlaBP0jo0V2qqouk0LtAUj/08JNEW6iqbWRS1PueZaTlG8XyhePA7UQQWy04+GVXSNBxngKerEoQGwNKTe1PElx5B5qIOYfkhmwBc182BqauJ3k4pAkOj6pQEypdvwB6NTDyoNpxpZ9rud/bKRrB X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 Jan 2020 02:43:05.0487 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 11af5395-43be-4b22-40ac-08d7931b5287 X-MS-Exchange-CrossTenant-Id: f34e5979-57d9-4aaa-ad4d-b122a662184d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=f34e5979-57d9-4aaa-ad4d-b122a662184d; Ip=[63.35.35.123]; Helo=[64aa7808-outbound-1.mta.getcheckrecipient.com] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB8PR08MB5035 Subject: Re: [dpdk-dev] [PATCH v3 6/6] raw/octeontx2_ep: add driver self test X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Hi Mahipal, > -----Original Message----- > From: Mahipal Challa > Sent: Monday, January 6, 2020 8:07 PM > To: dev@dpdk.org > Cc: jerinj@marvell.com; pathreya@marvell.com; snilla@marvell.com; > venkatn@marvell.com; Gavin Hu > Subject: [dpdk-dev] [PATCH v3 6/6] raw/octeontx2_ep: add driver self test >=20 > Add rawdev's selftest feature in SDP VF driver, which > verifies the EP mode functionality test. >=20 > Signed-off-by: Mahipal Challa > --- > doc/guides/rawdevs/octeontx2_ep.rst | 13 +++ > drivers/raw/octeontx2_ep/Makefile | 1 + > drivers/raw/octeontx2_ep/meson.build | 1 + > drivers/raw/octeontx2_ep/otx2_ep_rawdev.c | 1 + > drivers/raw/octeontx2_ep/otx2_ep_rawdev.h | 2 + > drivers/raw/octeontx2_ep/otx2_ep_test.c | 166 > ++++++++++++++++++++++++++++++ > 6 files changed, 184 insertions(+) >=20 > diff --git a/doc/guides/rawdevs/octeontx2_ep.rst > b/doc/guides/rawdevs/octeontx2_ep.rst > index 39a7c29..bbcf530 100644 > --- a/doc/guides/rawdevs/octeontx2_ep.rst > +++ b/doc/guides/rawdevs/octeontx2_ep.rst > @@ -74,3 +74,16 @@ Performing Data Transfer > To perform data transfer using SDP VF EP rawdev devices use standard > ``rte_rawdev_enqueue_buffers()`` and ``rte_rawdev_dequeue_buffers()`` > APIs. >=20 > +Self test > +--------- > + > +On EAL initialization, SDP VF devices will be probed and populated into = the > +raw devices. The rawdev ID of the device can be obtained using > + > +* Invoke ``rte_rawdev_get_dev_id("SDPEP:x")`` from the test application > + where x is the VF device's bus id specified in "bus:device.func"(BDF) > + format. Use this index for further rawdev function calls. > + > +* The driver's selftest rawdev API can be used to verify the SDP EP mode > + functional tests which can send/receive the raw data packets to/from t= he > + EP device. > diff --git a/drivers/raw/octeontx2_ep/Makefile > b/drivers/raw/octeontx2_ep/Makefile > index 02853fb..44fdf89 100644 > --- a/drivers/raw/octeontx2_ep/Makefile > +++ b/drivers/raw/octeontx2_ep/Makefile > @@ -37,6 +37,7 @@ LIBABIVER :=3D 1 > # > SRCS-$(CONFIG_RTE_LIBRTE_PMD_OCTEONTX2_EP_RAWDEV) +=3D > otx2_ep_rawdev.c > SRCS-$(CONFIG_RTE_LIBRTE_PMD_OCTEONTX2_EP_RAWDEV) +=3D > otx2_ep_enqdeq.c > +SRCS-$(CONFIG_RTE_LIBRTE_PMD_OCTEONTX2_EP_RAWDEV) +=3D > otx2_ep_test.c > SRCS-$(CONFIG_RTE_LIBRTE_PMD_OCTEONTX2_EP_RAWDEV) +=3D > otx2_ep_vf.c >=20 >=20 > diff --git a/drivers/raw/octeontx2_ep/meson.build > b/drivers/raw/octeontx2_ep/meson.build > index 99e6c6d..0e6338f 100644 > --- a/drivers/raw/octeontx2_ep/meson.build > +++ b/drivers/raw/octeontx2_ep/meson.build > @@ -5,4 +5,5 @@ > deps +=3D ['bus_pci', 'common_octeontx2', 'rawdev'] > sources =3D files('otx2_ep_rawdev.c', > 'otx2_ep_enqdeq.c', > + 'otx2_ep_test.c', > 'otx2_ep_vf.c') > diff --git a/drivers/raw/octeontx2_ep/otx2_ep_rawdev.c > b/drivers/raw/octeontx2_ep/otx2_ep_rawdev.c > index 7158b97..0778603 100644 > --- a/drivers/raw/octeontx2_ep/otx2_ep_rawdev.c > +++ b/drivers/raw/octeontx2_ep/otx2_ep_rawdev.c > @@ -253,6 +253,7 @@ > .dev_close =3D sdp_rawdev_close, > .enqueue_bufs =3D sdp_rawdev_enqueue, > .dequeue_bufs =3D sdp_rawdev_dequeue, > + .dev_selftest =3D sdp_rawdev_selftest, > }; >=20 > static int > diff --git a/drivers/raw/octeontx2_ep/otx2_ep_rawdev.h > b/drivers/raw/octeontx2_ep/otx2_ep_rawdev.h > index a77cbab..dab2fb7 100644 > --- a/drivers/raw/octeontx2_ep/otx2_ep_rawdev.h > +++ b/drivers/raw/octeontx2_ep/otx2_ep_rawdev.h > @@ -494,4 +494,6 @@ int sdp_rawdev_enqueue(struct rte_rawdev *dev, > struct rte_rawdev_buf **buffers, > int sdp_rawdev_dequeue(struct rte_rawdev *dev, struct rte_rawdev_buf > **buffers, > unsigned int count, rte_rawdev_obj_t context); >=20 > +int sdp_rawdev_selftest(uint16_t dev_id); > + > #endif /* _OTX2_EP_RAWDEV_H_ */ > diff --git a/drivers/raw/octeontx2_ep/otx2_ep_test.c > b/drivers/raw/octeontx2_ep/otx2_ep_test.c > new file mode 100644 > index 0000000..fc913a6 > --- /dev/null > +++ b/drivers/raw/octeontx2_ep/otx2_ep_test.c > @@ -0,0 +1,166 @@ > +/* SPDX-License-Identifier: BSD-3-Clause > + * Copyright(C) 2019 Marvell International Ltd. > + */ > + > +#include > +#include > +#include > +#include > + > +#include > +#include > +#include > +#include > + > +#include > +#include > + > +#include "otx2_common.h" > +#include "otx2_ep_rawdev.h" > + > +#define SDP_IOQ_NUM_BUFS (4 * 1024) > +#define SDP_IOQ_BUF_SIZE (2 * 1024) > + > +#define SDP_TEST_PKT_FSZ (0) > +#define SDP_TEST_PKT_SIZE (1024) > + > +static int > +sdp_validate_data(struct sdp_droq_pkt *oq_pkt, uint8_t *iq_pkt, > + uint32_t pkt_len) > +{ > + if (!oq_pkt) > + return -EINVAL; > + > + if (pkt_len !=3D oq_pkt->len) { > + otx2_err("Invalid packet length"); > + return -EINVAL; > + } > + > + if (memcmp(oq_pkt->data, iq_pkt, pkt_len) !=3D 0) { > + otx2_err("Data validation failed"); > + return -EINVAL; > + } > + otx2_sdp_dbg("Data validation successful"); > + > + return 0; > +} > + > +static void > +sdp_ioq_buffer_fill(uint8_t *addr, uint32_t len) > +{ > + uint32_t idx; > + > + memset(addr, 0, len); > + > + for (idx =3D 0; idx < len; idx++) > + addr[idx] =3D idx; > +} > + > +static struct rte_mempool* > +sdp_ioq_mempool_create(void) > +{ > + struct rte_mempool *mpool; > + > + mpool =3D rte_mempool_create("ioqbuf_pool", > + SDP_IOQ_NUM_BUFS /*num elt*/, > + SDP_IOQ_BUF_SIZE /*elt size*/, > + 0 /*cache_size*/, > + 0 /*private_data_size*/, > + NULL /*mp_init*/, > + NULL /*mp_init arg*/, > + NULL /*obj_init*/, > + NULL /*obj_init arg*/, > + rte_socket_id() /*socket id*/, > + (MEMPOOL_F_SP_PUT | > MEMPOOL_F_SC_GET)); > + > + return mpool; > +} > + > + > +int > +sdp_rawdev_selftest(uint16_t dev_id) > +{ > + struct sdp_rawdev_info app_info =3D {0}; > + struct rte_rawdev_info dev_info =3D {0}; > + > + struct rte_rawdev_buf *d_buf[1]; > + struct sdp_droq_pkt oq_pkt; > + struct sdp_soft_instr si; > + struct sdp_device sdpvf; > + > + uint32_t buf_size; > + int ret =3D 0; > + void *buf; > + > + otx2_info("SDP RAWDEV Self Test: Started"); > + > + memset(&oq_pkt, 0x00, sizeof(oq_pkt)); > + d_buf[0] =3D (struct rte_rawdev_buf *)&oq_pkt; > + > + struct rte_mempool *ioq_mpool =3D sdp_ioq_mempool_create(); > + if (!ioq_mpool) { > + otx2_err("IOQ mpool creation failed"); > + return -ENOMEM; > + } > + > + app_info.enqdeq_mpool =3D ioq_mpool; > + app_info.app_conf =3D NULL; /* Use default conf */ > + > + dev_info.dev_private =3D &app_info; > + > + ret =3D rte_rawdev_configure(dev_id, &dev_info); > + if (ret) { > + otx2_err("Unable to configure SDP_VF %d", dev_id); The ioq_mpool was still not freed in the failure path?=20 I see similar possible leakage in the other patches. > + return -ENOMEM; > + } > + otx2_info("SDP VF rawdev[%d] configured successfully", dev_id); > + > + memset(&si, 0x00, sizeof(si)); > + memset(&sdpvf, 0x00, sizeof(sdpvf)); > + > + buf_size =3D SDP_TEST_PKT_SIZE; > + > + si.q_no =3D 0; > + si.reqtype =3D SDP_REQTYPE_NORESP; > + si.rptr =3D NULL; > + > + si.ih.fsz =3D SDP_TEST_PKT_FSZ; > + si.ih.tlen =3D buf_size; > + si.ih.gather =3D 0; > + > + /* Enqueue raw pkt data */ > + rte_mempool_get(ioq_mpool, &buf); > + if (!buf) { > + otx2_err("Buffer allocation failed"); > + return -ENOMEM; > + } > + > + sdp_ioq_buffer_fill(buf, buf_size); > + si.dptr =3D (uint8_t *)buf; > + > + rte_rawdev_enqueue_buffers(dev_id, NULL, 1, &si); > + usleep(10000); > + > + /* Dequeue raw pkt data */ > + ret =3D 0; > + while (ret < 1) { > + ret =3D rte_rawdev_dequeue_buffers(dev_id, &d_buf[0], 1, > &si); > + rte_pause(); > + } > + > + /* Validate the dequeued raw pkt data */ > + if (sdp_validate_data((struct sdp_droq_pkt *)d_buf[0], > + buf, buf_size) !=3D 0) { > + otx2_err("Data invalid"); > + return -EINVAL; > + } > + > + rte_mempool_put(ioq_mpool, ((struct sdp_droq_pkt *)d_buf[0])- > >data); > + if (ioq_mpool) > + rte_mempool_free(ioq_mpool); > + > + otx2_info("SDP RAWDEV Self Test: Successful"); > + > + return 0; > +} > + > -- > 1.8.3.1