From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM01-BN3-obe.outbound.protection.outlook.com (mail-bn3nam01on0043.outbound.protection.outlook.com [104.47.33.43]) by dpdk.org (Postfix) with ESMTP id 1CEC61B00F for ; Thu, 14 Dec 2017 16:02:23 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=CAVIUMNETWORKS.onmicrosoft.com; s=selector1-cavium-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=LPYdUCymF98aPTLCXP6Y1HBrUphpO3Xs+uhb8Xt/4+0=; b=A1gpRevvvcnE8cYaRePc0ntJ9oFUrhi+eAMtWY589eGN/wwQXAWMkrucfJ9VOZxvltLer1seohYP1r5aGbAyWyEVaZmgg1B0uvj+xrfRvCy/K9NN0KhVpMXrEh7Ni01wPK+7U9AM7HFwkqVMVTqTfSGEcKVuf8gGkrjMe0JAumM= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Pavan.Bhagavatula@cavium.com; Received: from Pavan-LT.caveonetworks.com (111.93.218.67) by BN6PR07MB3460.namprd07.prod.outlook.com (10.161.153.23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.302.9; Thu, 14 Dec 2017 15:02:17 +0000 From: Pavan Nikhilesh To: jerin.jacob@caviumnetworks.com, santosh.shukla@caviumnetworks.com, bruce.richardson@intel.com, harry.van.haaren@intel.com, gage.eads@intel.com, hemant.agrawal@nxp.com, nipun.gupta@nxp.com, liang.j.ma@intel.com Cc: dev@dpdk.org, Pavan Nikhilesh Date: Thu, 14 Dec 2017 20:31:29 +0530 Message-Id: <20171214150138.25667-3-pbhagavatula@caviumnetworks.com> X-Mailer: git-send-email 2.14.1 In-Reply-To: <20171214150138.25667-1-pbhagavatula@caviumnetworks.com> References: <20171212192713.17620-1-pbhagavatula@caviumnetworks.com> <20171214150138.25667-1-pbhagavatula@caviumnetworks.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [111.93.218.67] X-ClientProxiedBy: MWHPR17CA0079.namprd17.prod.outlook.com (10.173.237.145) To BN6PR07MB3460.namprd07.prod.outlook.com (10.161.153.23) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 7e89a0ef-371e-4e44-edb4-08d54303ace9 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(5600026)(4604075)(4534020)(4602075)(4627115)(201703031133081)(201702281549075)(2017052603307); SRVR:BN6PR07MB3460; X-Microsoft-Exchange-Diagnostics: 1; BN6PR07MB3460; 3:MfiNfKkkyZ9rEe+kF8Qlk2HolmDTXn2ft9ZF1XuNs5TZmkpWbvJHEdEaPaV8sghnrtxgIsSIU5/6qRcWcK0kYm2FuGB9DrDdOpvvjG866rNuJimtjF5iJO9GbiLZdYkkCNzLovRTuKOTUZRZ4tKsSiIFIsWlX+IKApbG54nNzdN8FphQlM440rc9aW3u4251PyIy47nxT3pWGIGoumNrlqf0CTHuFIk/dK5dsevhgjxOEpXjyIUREhOAfEurow6u; 25:qiHWJt32kFIE4sBMsVGe0rAs5qDuuxe8OqbzpKs1Myz+fpcEGKNIXCoPP2T/WLeyhjnCLxO7AkZiwwdzDtrmhUo+nJFj9SFak9mS/FuGN5w4T3PPLmexWL/Jm0zXvqD1ypVmx2evSRQhDKqH2GsdgxJzApCfNbwUvo350for6tXDPOgOR6rB/jDONaHbbTd2MXypbSbYeICXM6LKGS05Ax/eebIxWY1XO5uaXaHeKxTp2Id629IJGg8+UX9WttLB7wDlfGZISMJKTxcYbnz9dfwOQDQ8WSk46+9VMOy7WQKYRLgCWNNbNlf/lQgd7/gnHPmFjoQgRhrO5/O5G4uZow==; 31:yre6RJgSc5InrT1iTuSpvOVOJoBjkrSBMtaeh0HGZ+i8xlViOTrdJwTX5m75Nod+F3ryFxs+DNHYVU8eCnNAcdF0X3g1DQ0/Nepbq/PTfkxEMGod2rTWW5P4Str6EWcl8zoKgckuJXbojuF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ft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040450)(2401047)(8121501046)(5005006)(3002001)(3231023)(93006095)(10201501046)(6041248)(20161123560025)(20161123564025)(20161123555025)(20161123558100)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123562025)(6072148)(201708071742011); SRVR:BN6PR07MB3460; BCL:0; PCL:0; RULEID:(100000803101)(100110400095); SRVR:BN6PR07MB3460; X-Forefront-PRVS: 05214FD68E X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(396003)(366004)(39860400002)(346002)(376002)(189003)(199004)(66066001)(42882006)(6666003)(2950100002)(305945005)(97736004)(72206003)(478600001)(2906002)(6486002)(47776003)(69596002)(107886003)(6512007)(575784001)(4326008)(25786009)(53936002)(48376002)(105586002)(36756003)(106356001)(50466002)(5660300001)(53416004)(5009440100003)(6116002)(3846002)(1076002)(16586007)(59450400001)(68736007)(6506007)(386003)(16526018)(316002)(52116002)(50226002)(76176011)(8656006)(7736002)(8936002)(8676002)(81156014)(51416003)(81166006)(42262002); DIR:OUT; SFP:1101; SCL:1; SRVR:BN6PR07MB3460; H:Pavan-LT.caveonetworks.com; FPR:; SPF:None; PTR:InfoNoRecords; MX:1; A:1; LANG:en; Received-SPF: None (protection.outlook.com: cavium.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; BN6PR07MB3460; 23:ZrzaKvwDDph6tTeBHDojHIWAzGcuVzV2VM3XWRYWv?= =?us-ascii?Q?gXwGZBNoVkMbOFq5LZdmZVnLHvu5c4LTs7MHnYhuIWe7o/L6z6YSacdO5UPB?= =?us-ascii?Q?UYKVEm863n+rI4Lgm/ZnZZwz/cd0HFUW3mCSHolRBwF+0qgoD0v58H7D3iX/?= =?us-ascii?Q?LEoPZbJ5dTQnCVf+wAfyvApoaGgIGjlMymwQxDPlOOUsl0izqWs3KKzWsFDA?= =?us-ascii?Q?X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2lQxuNvt6NU/360dF7qw970MNZj8uLeMyQiIdjwyf35NiEzDLpug78edVdtBAx17gi5HpSKHAew/Ufu SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 14 Dec 2017 15:02:17.2455 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 7e89a0ef-371e-4e44-edb4-08d54303ace9 X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 711e4ccf-2e9b-4bcf-a551-4094005b6194 X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN6PR07MB3460 Subject: [dpdk-dev] [PATCH v2 02/11] eventdev: add API to perform 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: , X-List-Received-Date: Thu, 14 Dec 2017 15:02:23 -0000 Add API to perform self test on the underlying event device driver. Signed-off-by: Pavan Nikhilesh --- lib/librte_eventdev/rte_eventdev.c | 10 ++++++++++ lib/librte_eventdev/rte_eventdev.h | 12 ++++++++++++ lib/librte_eventdev/rte_eventdev_pmd.h | 11 +++++++++++ lib/librte_eventdev/rte_eventdev_version.map | 6 ++++++ 4 files changed, 39 insertions(+) diff --git a/lib/librte_eventdev/rte_eventdev.c b/lib/librte_eventdev/rte_eventdev.c index e0c2a7876..66650c32b 100644 --- a/lib/librte_eventdev/rte_eventdev.c +++ b/lib/librte_eventdev/rte_eventdev.c @@ -1092,6 +1092,16 @@ int rte_event_dev_xstats_reset(uint8_t dev_id, return -ENOTSUP; } +int rte_event_dev_selftest(uint8_t dev_id) +{ + RTE_EVENTDEV_VALID_DEVID_OR_ERR_RET(dev_id, -EINVAL); + struct rte_eventdev *dev = &rte_eventdevs[dev_id]; + + if (dev->dev_ops->dev_selftest != NULL) + return (*dev->dev_ops->dev_selftest)(); + return -ENOTSUP; +} + int rte_event_dev_start(uint8_t dev_id) { diff --git a/lib/librte_eventdev/rte_eventdev.h b/lib/librte_eventdev/rte_eventdev.h index f1949ff7d..4f6465cc3 100644 --- a/lib/librte_eventdev/rte_eventdev.h +++ b/lib/librte_eventdev/rte_eventdev.h @@ -1762,6 +1762,18 @@ rte_event_dev_xstats_reset(uint8_t dev_id, const uint32_t ids[], uint32_t nb_ids); +/** + * Trigger the eventdev self test. + * + * @param dev_id + * The identifier of the device + * @return + * - 0: Selftest successful + * - -ENOTSUP if the device doesn't support selftest + * - other values < 0 on failure. + */ +int rte_event_dev_selftest(uint8_t dev_id); + #ifdef __cplusplus } #endif diff --git a/lib/librte_eventdev/rte_eventdev_pmd.h b/lib/librte_eventdev/rte_eventdev_pmd.h index 6ed40cd38..8bf0462f6 100644 --- a/lib/librte_eventdev/rte_eventdev_pmd.h +++ b/lib/librte_eventdev/rte_eventdev_pmd.h @@ -603,6 +603,14 @@ typedef int (*eventdev_eth_rx_adapter_stats_get) typedef int (*eventdev_eth_rx_adapter_stats_reset) (const struct rte_eventdev *dev, const struct rte_eth_dev *eth_dev); +/** + * Start eventdev selftest. + * + * @return + * Return 0 on success. + */ +typedef int (*eventdev_selftest) + (void); /** Event device operations function pointer table */ struct rte_eventdev_ops { @@ -658,6 +666,9 @@ struct rte_eventdev_ops { /**< Get ethernet Rx stats */ eventdev_eth_rx_adapter_stats_reset eth_rx_adapter_stats_reset; /**< Reset ethernet Rx stats */ + + eventdev_selftest dev_selftest; + /**< Start eventdev Selftest */ }; /** diff --git a/lib/librte_eventdev/rte_eventdev_version.map b/lib/librte_eventdev/rte_eventdev_version.map index 108ae61fb..2aef470b5 100644 --- a/lib/librte_eventdev/rte_eventdev_version.map +++ b/lib/librte_eventdev/rte_eventdev_version.map @@ -68,3 +68,9 @@ DPDK_17.11 { rte_event_eth_rx_adapter_stop; } DPDK_17.08; + +DPDK_18.02 { + global: + + rte_event_dev_selftest; +} DPDK_17.11; -- 2.14.1