From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM02-BL2-obe.outbound.protection.outlook.com (mail-bl2nam02on0084.outbound.protection.outlook.com [104.47.38.84]) by dpdk.org (Postfix) with ESMTP id DFC33FE5 for ; Fri, 31 Mar 2017 21:36:42 +0200 (CEST) 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=5poMno4Uhilpu+bMxBppAHfOgIRLsDuITBr0jwIomZQ=; b=Ejt9FkvXlTw7CTLikhI12Gw0jU3OhMqNXh9031vbNiNYt7Ff56I6WTI+B/DAF8rYzFI5YKqiJU/oXM/nwUjB/bg5wnwm4glgcjVdMHFzUiiarQp0cW5vPWeg578A0c6TtSQsq6MRnfHr6WJiBhX2VXBV+z2wzt5xNjBG7mmw2Wo= 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 (14.140.2.178) by BY1PR0701MB1723.namprd07.prod.outlook.com (10.162.111.142) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.991.14; Fri, 31 Mar 2017 19:36:38 +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: Sat, 1 Apr 2017 01:04:43 +0530 Message-Id: <1490988905-12584-17-git-send-email-jerin.jacob@caviumnetworks.com> X-Mailer: git-send-email 2.5.5 In-Reply-To: <1490988905-12584-1-git-send-email-jerin.jacob@caviumnetworks.com> References: <1488562101-6658-1-git-send-email-jerin.jacob@caviumnetworks.com> <1490988905-12584-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: MAXPR01CA0058.INDPRD01.PROD.OUTLOOK.COM (10.164.146.158) To BY1PR0701MB1723.namprd07.prod.outlook.com (10.162.111.142) X-MS-Office365-Filtering-Correlation-Id: 416f08f1-2e2f-40d2-41d5-08d4786d41c4 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(201703131423075)(201703031133081); SRVR:BY1PR0701MB1723; X-Microsoft-Exchange-Diagnostics: 1; BY1PR0701MB1723; 3:NgMr3w6fntuXdLjLXbnMMLC2p2oZYX54kvwUCtNVlKMxNOjQBG814XitpXgV1Qz6IzPryYyBU+Jh4lwQw+Jt5RnINbvCLTPmOXPz1Y6SA7SaBffiVGqB91rYvQlECYnK9hUL+sSle0j++9MnHC1oVe/0SzNHk16Gv4oIXX05nBWaG+KffPjvoekXT3iW3sB50u2BkA0hJ92T0eBfvQ+foB3mqrMO1cS1mqzgmdh+JwVjDy/CPKRBJVDsGBLbl/T/cXXpr08s39whZAyic2em30F3iJUeQMq36BOZk2JMUt1rB6mrF5UeWWC9nMsddxLawfbCfmHYJymR8uHY0PVBLQ==; 25:at7p5wk6VyPRTGJ5BNeUaD76uU0CCBOX3q9KM8m6qQ3J7iiFm14+XL9xoaE5CCha80/5RWXZvGDG61T9RcCmX+/Q0t9Y1hchuiLbrE4j9IANYfaObILpHKWryYjPaxEgekp+ctecqjaY32X+QTAPBPwmeiRp2CBMu47xVU8jgxk/fP2sEX/0pP+4xbQpr8fhh/N9NnzsabrPkni5WmxoO0CZMaNstTkzO9X/HYo8Ag7RNFlBGU07mioP6NmYLblj9OIggow6vgfuATV3Nq7wuxSFdaPDcXNp1f942s1ULyl8UI23ziViXu4hAMR5k0GGN8f5tFVY1dfZULI+4qyiUlvuj3+e8SrhldayDN4VnH6qTJDwGaZ4+g1ciLel3cU9uZ8xdc9xqEKLwqaHp/8F49A+oi/UYklfVaBN1kBBsBboPdkoCMloIta/+f7/jScyrR0NLk+c3Yu1kn1nC9PvbA== X-Microsoft-Exchange-Diagnostics: 1; BY1PR0701MB1723; 31:2BHMpYd1j0/awp/F8GF3GmIFtUweIXAOPTf6w3XegqN7LUDhJ7RK1jsBEPi4lZcMKZjBPymxst8xsZ0lQZwHhjgTQIep1Jnmd3Anuy1bwhC+21AOVciBZ1JsGrfFK6yvcrRMOxDOJC6NhrzZG3ygDAySf3N5lpd0wa2SvWI8R0gxmKemy00ziq2H1NaztJJog2rsdEH2by85usqRzAmZ4+leHJclSmL980Sg05eEMmg=; 20:qglCBvuM1/AGKETHtTweVBCkxLzgJfpD6Qjk2uzFETb3XKxF47iDIti+1l48LNO4cYRf2sUVbe4wELGamLPNcaaPEypTYVW1Bu5RbdZfAoX1kZX+HM4rNhSPLIG7BO2rmTCiB3D6U6z0WrYfHmo6mQYmzFmgH76wD46v0GZdNuFzgt5c9BA37kkeB9GL/yDwjgZgnKvobtWp9rLP7wWvKBMI88VbI5Ew3ytOg80QlfCD9rweUxVhOGYpWq6r4iaJjdEr1tmto9TMD/E71vqdV26BpFTTj5M9oZM7ee3OKc1cySMfRZoPNBJcbCxhD0gzQmi8N/o/SPC9UfOi+ncQx4Tvmfar1d7ADt26vwErxrHyjFti7+GHZukmR1iwVD+JX7CUIkkSaMv5BRgd3iJagT5z5NSJ6jrbqkP35dqNSw4o8PbNpx/oaDZFiEJdSTf0Iu4gDnRjrZxS26DSgdJySnD7N1YTQIhgyB+VWj43IFDAk4QTYT4QRoZjJ49T65jfH3+3ZtxkTYKqJHF4Kkzd7G2TChGM8gULOgAiZWPH8M7g6yayn3h4Ic7GKpoNJrpn7V9l1/5xxJ+5pWhXT8OObeMwzefSwdMIqciex3T8sO0= X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040450)(601004)(2401047)(8121501046)(5005006)(10201501046)(93006095)(3002001)(6041248)(20161123555025)(20161123562025)(201703131423075)(201702281528075)(201703061421075)(20161123560025)(20161123564025)(6072148); SRVR:BY1PR0701MB1723; BCL:0; PCL:0; RULEID:; SRVR:BY1PR0701MB1723; X-Microsoft-Exchange-Diagnostics: 1; BY1PR0701MB1723; 4:SsZIV+N2lzifjly3jpGY/wN3+32ZOTlXv956lddEeUCQyxay6I4HImug8gJIi0+8ih0gNsfh6W/MU1/z/punpWa/cU2XvdNUuf0SavMaKaLDOSt2WtX9LnXQeT+j65m6x8qZWikhwHVvQohY0yq9FbWvrCGSVyWqCl6DjTKamriYHaJJyI0A8PZ8vyYfi6lga+/bfjk5bzM+kKrTYdVU+UYOVQ2Z8/y4uKvFrBhEMCPJ2G+N8FYFpKQNvCfc7YyVWTNW+PDufijXlsD2de6T0HJiUCTixd0EkIRFJGx78r1MzdDVNbIC3TBoShD6f0QECKQh1UAjrh/OO3YZqkpHbq7egWrhID3Ig+dp3VtJYqx4iCxPOgK8bysKcnPl/Sips8DIhdqyudjvwZLdv8MCIQ3pifDHXgQ3bgo2GUJDiVMcxRw2Gm9FcwKNnHAhK79CoTb8AnPqlZnPFKcHL8Tf36Zlrrcop5FLDooagu5OC3p21H9/ctUK3JYKu+ZQjd1UqUiBTe9FF7cN2xBeOugYNPi28cevwY7RJxOGPDMZGGfjdr/svSDLkMKcZgrr3/2KsBVZWXbeSCishpGBwxPQun317YfXBTbxwZYIoyVNWb9ICAXB31BXA2iWAOUnURon8lqopxf9rnCAW/9+XzKX4l2HAZtVivljAK4r5N5NuutR4KVTCJiAzjAtHJgOPSbO7Fw2WgSQO97h2NJcxi2VnA== X-Forefront-PRVS: 02638D901B X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(4630300001)(6069001)(6009001)(39450400003)(39410400002)(39400400002)(39850400002)(39840400002)(38730400002)(8676002)(107886003)(110136004)(50466002)(189998001)(305945005)(6506006)(36756003)(50226002)(25786009)(48376002)(6666003)(8656002)(6486002)(7736002)(2950100002)(5660300001)(53936002)(81156014)(81166006)(3846002)(42882006)(6916009)(6116002)(6512007)(42186005)(33646002)(2361001)(2351001)(76176999)(50986999)(5003940100001)(47776003)(2906002)(5009440100003)(4326008)(66066001)(110426004); DIR:OUT; SFP:1101; SCL:1; SRVR:BY1PR0701MB1723; H:localhost.localdomain; FPR:; SPF:None; MLV:nov; PTR:InfoNoRecords; LANG:en; X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; BY1PR0701MB1723; 23:GK5ucY6ipPuYj02Ggtm/WzbD8hn4LEV8ixMefxq?= =?us-ascii?Q?MLzTEt371OhNpLItIOUfQeDX1B+jdZC+pZnGOW0hEIMlGXikpwiqR4fnPKhx?= =?us-ascii?Q?nupMIew9bHZG9bNeNytMcN7D550b/6+0+VbdXW5MXY8cd7x/TkQ5/j63Yc3h?= =?us-ascii?Q?ka9y4DiFFRDUSttUztFP7E25JpfTBQG924nE4CT3770kChm8A3crQ+pVND5G?= =?us-ascii?Q?h1FxO7x0q7hGYGRtNxE+J+WaJs+CtR8iwf6I1gMHgjgidfKfNUJnybFkZ4IY?= =?us-ascii?Q?5YOJ7DBHVKcuefRIskN3wnZiBA5yq4LSmRrSgIvYPwRuWmcov5RTmzijOkcD?= =?us-ascii?Q?njYvlprA586dOk2uuxaJoR+vC/fCxYHuVaDUQFWn/bbkzy3kyjOdlpil/jH+?= =?us-ascii?Q?oclpNkKlpo/bTjk2JF9nekF9hRZ81m++vV+HdaJP1v8HztZMZ6CE5E/tBfDj?= =?us-ascii?Q?j+ofVLnYf1YqSk2tQ3MdYP/GiqIxeU8iH0Vp3QNWTiJTxvdiAXf1O9JXhtDH?= =?us-ascii?Q?TN1riVqCKn8IYwuVcnJVSxhJ/+pp4ntX8psmm1zTW1TELpMUfy+Pcp/zprQD?= =?us-ascii?Q?W/zv4EguMAWFGEnbOnWh4kpudROWp2kcRcSvcvo1vc0OgWVHSQ6Lwwu+ikWc?= =?us-ascii?Q?unckl/VZuhRoWYLFhh7baKCoXuL8Qg16oKOWFIZysu8nv/I8rSI6Gl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Q==; 5:N9DTk4FFWeM3fJXUFR0YChQ6lVOwv0bg3ax7IThk1ZBhj5PD2EBQLoqoh800hwQ4M1XDPDWeoXeA0DJfRlNm7EH7bzZmSOU0ABFvBWaImomJWehKwlO1FI9LrJIpPpAI5+zlWgimqLAfA6siwBHWnK4raXb86KXYldGVl53QMyU=; 24:vsPsKP2OTdhZMtaDi2z28ohG90ymRjTNgTTK5e3tVcJDUGhQwvxSACOIt4nQPIWMHfW8M3FP6t3igi+GmbZ144Qm9Yetb4uMAtX83ZAXGUo= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; BY1PR0701MB1723; 7:cJ8Fc687O0OhKy3TA0MnOGCTtM8soRhkYkD1se373v9gJey1sPP/DVg2YUwGitYwWIoxTeuLylmLYAfE7tZ0fcWHIZvursRR0iMwosztRJC0peJ62KxkMmuzy7H1FBv31NbqLSx0WNq0Ue7z3kDl9dpj78QCPAzn/oDUxKWSqXrqvdeKjnlXkimcFetBzZoxujqOVku1zOfrraHF3GCWPQpUOCkKp9hkMcBAefTg2+vMgXnFOYM9GtvKmuT5xii4IkNuvmSFR//3pRyuuQIoon0EJ6aAbHkhoQNphDP9rc5EBQpobWsv3/zyCGOEusHmxxSj7/asiDqc70+Hnu35hA== X-OriginatorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 31 Mar 2017 19:36:38.2771 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: BY1PR0701MB1723 Subject: [dpdk-dev] [PATCH v2 16/38] 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, 31 Mar 2017 19:36:43 -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 33ae912..13c7823 100644 --- a/drivers/event/octeontx/ssovf_worker.c +++ b/drivers/event/octeontx/ssovf_worker.c @@ -210,6 +210,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