From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM01-SN1-obe.outbound.protection.outlook.com (mail-sn1nam01on0080.outbound.protection.outlook.com [104.47.32.80]) by dpdk.org (Postfix) with ESMTP id 01124FAC5 for ; Fri, 3 Mar 2017 18:30:16 +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=cABheEsmvtNAm1JvOsUvc84vJlcDuqdu52qVR3803Fk=; b=STrr31EsWRSBi6jMOtBTinl+e9LN4rU2/I9AV3K644aFOPPK/m0wasPpvKe4QorhY05VWyDowDcDbyA3eWKMoPr3+Zc8t9KabUy8Ax/tAgpGfEY46enoDhPQV9gHfN+P9Ioy/YkAKP0uOGOAqeytG3xy9aawmj60IDNEtOW2t1Y= Authentication-Results: dpdk.org; dkim=none (message not signed) header.d=none;dpdk.org; dmarc=none action=none header.from=caviumnetworks.com; Received: from localhost.localdomain.localdomain (14.140.2.178) by BN3PR0701MB1719.namprd07.prod.outlook.com (10.163.39.18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.933.12; Fri, 3 Mar 2017 17:30:09 +0000 From: Jerin Jacob To: dev@dpdk.org Cc: thomas.monjalon@6wind.com, bruce.richardson@intel.com, harry.van.haaren@intel.com, hemant.agrawal@nxp.com, gage.eads@intel.com, nipun.gupta@nxp.com, santosh.shukla@caviumnetworks.com, Jerin Jacob Date: Fri, 3 Mar 2017 22:58:01 +0530 Message-Id: <1488562101-6658-20-git-send-email-jerin.jacob@caviumnetworks.com> X-Mailer: git-send-email 2.5.5 In-Reply-To: <1488562101-6658-1-git-send-email-jerin.jacob@caviumnetworks.com> References: <1488562101-6658-1-git-send-email-jerin.jacob@caviumnetworks.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [14.140.2.178] X-ClientProxiedBy: BMXPR01CA0021.INDPRD01.PROD.OUTLOOK.COM (10.174.214.159) To BN3PR0701MB1719.namprd07.prod.outlook.com (10.163.39.18) X-MS-Office365-Filtering-Correlation-Id: 73016404-a025-42be-0b34-08d4625af324 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001); SRVR:BN3PR0701MB1719; X-Microsoft-Exchange-Diagnostics: 1; BN3PR0701MB1719; 3:/rnMRdtrb5YoAWZHTC4ujWUhGETI9ECxX2grnheneWd3hXcK8qeTwUeznEzr1d0wU02TC7kxVJOxGYD4p/sAgzo47I5TYRjdgXDSINbwPmux6oNIb9Vg/Nh6uQln2CBUqeJoZ0fXHn+BLHJbSfdOseTHzSYA00oQpWHzFAJYy7Bylg6UELm+SuWT846C5WjqtbTsKSCUcrct2pFZeO8d+QfLbEif8FQ5kXgPf/ssuUPiMe6cZ1YyztR3dv7N+Az1BZg+ulVWrof2JlTMSUiyOg==; 25:oHJSWm3tgxQBnuDE9lG7J5E/uRTL7TX6KtBqeSs5zsZfcgK2PqAOye9ZJLQuzOmt1/eAzQvmYOXgh7YLJ5/o8gE7UyQHrKFhjvY7L1T78vbL9Wnr0NyCHGgwFzJducOjyNnRMM+Ui8nTnYlMKgy3it0JWb1Up0ebWF9fyxE57YE2wEcb+BBeoEEeObtnjPCvKfFdkdzZuNogQdyDuK8ldihpb80hQFfHNSpk0p7WxcEsn+Gcn8z3S3fCJgqkAbIbSFoqejGwUO+VcwOH4EFA/La/zfK91vv8Y0ykfR3x1yixftzCyXwoISIll1GG9pFsrF0opCy4hizSd/t+mTRw6raZDZjaFyf9ERzJkMlUSoVcvTKCkZ7WOP86R5PKm1BgZTjJa4HrB7thtio1PAvWtXDNz7QIb+VbzRdJP3V/6gpwdAthUngP5NqoVjyWeSRLEWV+E5RqFjgH1+rIrtfRYQ== X-Microsoft-Exchange-Diagnostics: 1; BN3PR0701MB1719; 31:3eK206p5H10yioukGZc7A23wOGM/1tCBxIaAmHAm3wDfGYujdB/g8mOgwdTWJQMfO+0iB1/9B51CiBOTcgxVDPt4UUh5DeZCzZ8jGTlhPt3qgasYYeuP34D0Vkk4xJMWRMOrDcWjRpveTpU6chPQTlXUAlMqA/NpnNyrA6V9wISQkLWJqWJ240FeaHlII2X0RqLg5F/fycQf3H7ANWAgwYMBkQrWXXZ8heQTMYvNIXs=; 20:xDCdx4VnyhW1kCtmK3Yy/f43zcc7LJz25yRVRkMS8OHX3WpNGxB2zRuCLtxjJ7QbwZAni/bUR/aenv0h0sExpRW5j/IBo3q/vtlTeOr0mSMGqXzn4vn8tKXmw/mXqe6zVkDxQsbi6XyGE+UMkIcS3ojeTJdL0vIdbpVQRIA+H7SV3hWtRcgPxJQXDYFTcEH9/ZbCoTtBeNX3BGI+xknprkpNiZFUplS4Au0vq2XkPWMB54yk9PfntcTrQraBf/L/PDlodbyhJVROR6L2Y994KVl4CzfaO2k2btZpLIAv5ZjhvnzjA5ArGfrSA8IFhgHOEZLH1/n07sWN1msGvCb5PHFL0sTTi+eVzsUwz2NQqjlfHVye3fRYy+pA0BxE+qYhGCSJoQ0tlezajB8raIdMnrir7bFVza3c31Aba2aSbVtFWkDyUfs49Fa3+EXcuaBxSvOw77U7VP2DGoVjIyKNEPE+XYBaBocO5uFxD9IAYUBFIzTB5nMmWaF0WY/zx6VZqC7ZpyuZz6v2hs37eQCr2o04cYQ5V/jHlIL+sYO7GUYcrXKYeZaeVXoI3sNiwIlhZbgkSEW3p8hmtkXKHwHGzuBn7Hn01aMkp6GSw1IVtrQ= X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040375)(601004)(2401047)(8121501046)(5005006)(10201501046)(3002001)(6041248)(20161123555025)(20161123560025)(20161123562025)(20161123558025)(20161123564025)(6072148); SRVR:BN3PR0701MB1719; BCL:0; PCL:0; RULEID:; SRVR:BN3PR0701MB1719; X-Microsoft-Exchange-Diagnostics: 1; BN3PR0701MB1719; 4:4zOh/srBL8Nc+YnBrLmCgOo97xzN0XYKwHo3Uytr45qKiU8HAPw/XcWGc7nlX8wpo9WjRQfVN02Sdx0pFQkgAYoahmpNukbMJ4MYlfLeik9gUMIBqpYTJAQTXSaAarQanx1iTZ68amXkigyur+QUOaeFrmhYHxacHrY5IWDQJtUnQVX1UCzEiC4LYO2IrMgEHoCV6wCLDTEy1MNn0IzZzvNdobO2nFX9UOEUIex+R5IKDFT/dGgd5dqtNxoLpA471d8fNEqw55Od3nG/aQMGSfZd3DkuxCMA4ZDWsef6C8DKQphWZ80gZbzAOc8lK8Sb+1lkvk3gWAhUKbRIrB0zg9+VZS9k2jsabVDCx9x6lOeryakvwWh5Zjgln0AxMR9kgeKo1Kr6DOXpysI4FYDMt2ew3DAPhInWnnG3EdnpE/5fClifyWkOfTrR0AIC9VHlqDg2MovUTQepdq3xMlPodCgvE7TL96pkkaTBfNCWUSh8flrT5YGH90BDFccoacVo0qI6rVRKOLlTeE6QqiEL8UebOzP9JNw7ERgS7WC5v3rUIqD7AL/V/b+cGAT5Tp/K5wLYVl0XaXOy06c+lrQGbFwxw7JgNIGOOZQiLuA7kDY= X-Forefront-PRVS: 0235CBE7D0 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(4630300001)(979002)(6069001)(6009001)(7916002)(39450400003)(3846002)(50986999)(6116002)(36756003)(81166006)(6512007)(97736004)(2361001)(2351001)(6506006)(575784001)(5660300001)(42186005)(50226002)(8676002)(6666003)(106356001)(8656002)(2950100002)(2906002)(25786008)(47776003)(6486002)(76176999)(33646002)(7736002)(107886003)(42882006)(66066001)(110136004)(4326008)(38730400002)(6916009)(305945005)(48376002)(92566002)(5009440100003)(5003940100001)(50466002)(189998001)(53936002)(7099028)(110426004)(969003)(989001)(999001)(1009001)(1019001); DIR:OUT; SFP:1101; SCL:1; SRVR:BN3PR0701MB1719; H:localhost.localdomain.localdomain; FPR:; SPF:None; MLV:ovr; PTR:InfoNoRecords; LANG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FFykPZwiOqLITt2VWBbAaEndC9WFtp/1/Uamezu2yxlWfGoUfSbhwYBJSgIVWJZ7xw+fikXotgxlnQ2JgmToaiQzD6LYVE4k7AhBuQ==; 24:KomBG9A1EJ/ivftokyxJtmybLYz78HYQQRGsdH4d48qzckwMt1a/ZLnNZ5SsWLOm6bi5kCFmxPqDSE/yE/Vhy5pbTOH5YXeUFq+perex+wg= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; BN3PR0701MB1719; 7:pF9oJz3GQVBLdqEjwyaj0EVKO62Uk5l+sy5osrGMeMbw6K9Gi7VJ+g5deKjjCAy439ffdrC29VvqfBr89JODWI2tO37+b8C2zLedwIyjszOxJZE9a7kie2Z58fZDrLpeUq2j9oNBIrWb5wJr8DE19HUMRWBGekuVCSKH6krATLsKhWFwgJrxaxjkvX7jwHKR/7TIB1OUPtntVFXbhe7QQ2EAZNua2b1sGRnvRlrufUmbvbk2xvY4SmbOGzTwwEq60szTt32B+e/F6Ys6OZ6vDD/nkmIk2euDM29fkyaCUjEQtAWJjl2pY+LHBG8jMGptfHPV1Z0SG3G5ung3aE1cvw== X-OriginatorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 03 Mar 2017 17:30:09.6417 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN3PR0701MB1719 Subject: [dpdk-dev] [PATCH 19/39] event/octeontx: add support worker dequeue function 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: Fri, 03 Mar 2017 17:30:16 -0000 If device is configured with RTE_EVENT_DEV_CFG_PER_DEQUEUE_TIMEOUT configuration then use different fast path dequeue handler to wait till requested amount of nanosecond if the event is not available. Signed-off-by: Jerin Jacob Signed-off-by: Santosh Shukla --- drivers/event/octeontx/ssovf_evdev.h | 7 +++++ drivers/event/octeontx/ssovf_worker.c | 52 +++++++++++++++++++++++++++++++++++ 2 files changed, 59 insertions(+) diff --git a/drivers/event/octeontx/ssovf_evdev.h b/drivers/event/octeontx/ssovf_evdev.h index fac42f5..2cd9147 100644 --- a/drivers/event/octeontx/ssovf_evdev.h +++ b/drivers/event/octeontx/ssovf_evdev.h @@ -190,5 +190,12 @@ ssovf_pmd_priv(const struct rte_eventdev *eventdev) uint16_t ssows_enq(void *port, const struct rte_event *ev); uint16_t ssows_enq_burst(void *port, const struct rte_event ev[], uint16_t nb_events); +uint16_t ssows_deq(void *port, struct rte_event *ev, uint64_t timeout_ticks); +uint16_t ssows_deq_burst(void *port, struct rte_event ev[], + uint16_t nb_events, uint64_t timeout_ticks); +uint16_t ssows_deq_timeout(void *port, struct rte_event *ev, + uint64_t timeout_ticks); +uint16_t ssows_deq_timeout_burst(void *port, struct rte_event ev[], + uint16_t nb_events, uint64_t timeout_ticks); #endif /* __SSOVF_EVDEV_H__ */ diff --git a/drivers/event/octeontx/ssovf_worker.c b/drivers/event/octeontx/ssovf_worker.c index 7ec78b4..e0d17b9 100644 --- a/drivers/event/octeontx/ssovf_worker.c +++ b/drivers/event/octeontx/ssovf_worker.c @@ -226,6 +226,58 @@ ssows_release_event(struct ssows *ws) } force_inline uint16_t __hot +ssows_deq(void *port, struct rte_event *ev, uint64_t timeout_ticks) +{ + struct ssows *ws = port; + + RTE_SET_USED(timeout_ticks); + + ssows_swtag_wait(ws); + if (ws->swtag_req) { + ws->swtag_req = 0; + return 1; + } else { + return ssows_get_work(ws, ev); + } +} + +force_inline uint16_t __hot +ssows_deq_timeout(void *port, struct rte_event *ev, uint64_t timeout_ticks) +{ + struct ssows *ws = port; + uint64_t iter; + uint16_t ret = 1; + + ssows_swtag_wait(ws); + if (ws->swtag_req) { + ws->swtag_req = 0; + } else { + ret = ssows_get_work(ws, ev); + for (iter = 1; iter < timeout_ticks && (ret == 0); iter++) + ret = ssows_get_work(ws, ev); + } + return ret; +} + +uint16_t __hot +ssows_deq_burst(void *port, struct rte_event ev[], uint16_t nb_events, + uint64_t timeout_ticks) +{ + RTE_SET_USED(nb_events); + + return ssows_deq(port, ev, timeout_ticks); +} + +uint16_t __hot +ssows_deq_timeout_burst(void *port, struct rte_event ev[], uint16_t nb_events, + uint64_t timeout_ticks) +{ + RTE_SET_USED(nb_events); + + return ssows_deq_timeout(port, ev, timeout_ticks); +} + +force_inline uint16_t __hot ssows_enq(void *port, const struct rte_event *ev) { struct ssows *ws = port; -- 2.5.5