From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM01-BN3-obe.outbound.protection.outlook.com (mail-bn3nam01on0078.outbound.protection.outlook.com [104.47.33.78]) by dpdk.org (Postfix) with ESMTP id 1815FFAC4 for ; Mon, 27 Mar 2017 15:51:10 +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=bEB1w+VCZ5Uv+BfC6B5sCZ6+EAYLTZeSUicxpt/Dc/o=; b=l+hFYHkscOlTAhdJGxv6FiiThC5br/1eh4JbE9We9JUNqh2ayz/3oRaoj+Rbqd+mxyrOb6ngk/XElddRrXSOvjVZ9np3zErz3asF829Jvvu9dRkqPocclCp1BspqPthMOeLu+zE4PsXdHiB1L6rPu00Saur1KVr+ZmuOXaUARRQ= Authentication-Results: intel.com; dkim=none (message not signed) header.d=none;intel.com; dmarc=none action=none header.from=caviumnetworks.com; Received: from localhost.localdomain (106.200.195.136) by BN3PR0701MB1719.namprd07.prod.outlook.com (10.163.39.18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.991.14; Mon, 27 Mar 2017 13:51:05 +0000 Date: Mon, 27 Mar 2017 19:20:50 +0530 From: Jerin Jacob To: Harry van Haaren Cc: dev@dpdk.org, Bruce Richardson , Gage Eads Message-ID: <20170327135048.5a6lqcc6pioriy2t@localhost.localdomain> References: <489175012-101439-1-git-send-email-harry.van.haaren@intel.com> <1490374395-149320-1-git-send-email-harry.van.haaren@intel.com> <1490374395-149320-10-git-send-email-harry.van.haaren@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1490374395-149320-10-git-send-email-harry.van.haaren@intel.com> User-Agent: NeoMutt/20170306 (1.8.0) X-Originating-IP: [106.200.195.136] X-ClientProxiedBy: PN1PR01CA0091.INDPRD01.PROD.OUTLOOK.COM (10.174.144.159) To BN3PR0701MB1719.namprd07.prod.outlook.com (10.163.39.18) X-MS-Office365-Filtering-Correlation-Id: e62d8743-b4c1-473d-ae9d-08d475185203 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001); SRVR:BN3PR0701MB1719; X-Microsoft-Exchange-Diagnostics: 1; BN3PR0701MB1719; 3:ENmcOVE8B2jYPtspSqS4OP9Kz8av/sGgClMPjeFpA0QoI/h9IDMaQa7az0JiseMupKzdRdtzDQbw2bLPZm/959NXy69tMrT9Z6aWMCkTiFB6HNHkn0XMNNVlLv/SuEUyshS2GIPVDAzyD6eWy73EhR9I2tFNDCM9h6WsopFp+G3pcovLQWb2S/sbqNgsZB7mcZ9KCrvq7fcobVE/8gMeHLk2TLrPot0mRqEa9dy2JWgExqt9lMFuPHMtyP/o5dbKbYx1w2cgnxhW8lIHa4xCKA==; 25:jVMNSW8hPMY+Wr6HXXbrQDYaIyN6LQnIKJCoopEDpy9V3llNwCrHRQ4D6nJa3iOUwVGV1hh00u3z4qkyEaLqbSz4E5J7bCpqjXmT9hy1Uxj51pyCsxA4906mVZJKD9NililefHz1ARkQLO7xoVlsb6/phW4vS3DfEEJ+l4I4uzHAf2CcMzQlaVYfTHFBbr7TGuJtuM7vKoVSjA6hFZloefezYhp9MnWCL1jG8JvLXuxe44/QrQdghmcIatp0iXklYAlKsvnJZh6oV2YmblpXhptCrOJ4KaEHKBprcDj3mUvxtLySJcSqnvvFbjDANc4+x5wmKFHtA9VENZ51OVWgMz3r9pLp1o+atvjVMmY6x4XrAd8d3+FSPhZZ12vaazDv7Ci76cwJZdNjWkCDqskn1IIVaIYmqBURyjfx1a862AK6sJ9WUUeSrJC7XT81R+ajEk1FJV64jC381jM4KFlfbQ== X-Microsoft-Exchange-Diagnostics: 1; BN3PR0701MB1719; 31:kuYYvc52HpdJfi3c+YtFZREWwgTnmMR3japThvaFew6fManvh+uIV0rFAnlFDxLo4ZoPs1Oax72Cpp/IkEa3ChYRZGwYAZnQ/yw1fqu1eEJp1jsD8fV96rL32wCdSpK9xjirxEe/WrRpLtYXVpbcsHI3Ym3bQcDo8gPrtoRKCynbpI7v3Ma1cKalhWGO9cn9OPYyHx/61atIpdb7/Jydq02iVD0POcpZjLseb7oK7rK7z0zduqctzNVrHawO44ZSBgAVc3LbhcsOAlOxZoUbCJ9qlqs0cp6BpKjb7Mzvsn8=; 20:wNG4L4BIyDstWYeo6OGEPBCK8St0vkxQwcySiVCGPNcFvzc97EDUM9cXTu+6UrG16P5qJjORlWH5U4SwLWCYzEgBAOdH0u9Cu+6xafrHED3TttonuI6PA2d7H33UyGzgoGEoATjblliCk72BfUOoaYZzfi4uWoUHaeUopX3Uf7R1yZ7cODs8Ow7Mt13W2par8cQ64rF5ziJ6WR7f53hQcopjAvSNFFTyISIlbPP5Pan09+dg7RGRbltA0HIDKxj5kwHX4HK4jaKON+L/pfCYcE+xBzC80WiLpzUwMMsW3CfvOIO0tu2/9xZq35XCYBFR1B1QbKhwACDtWHpeilaqpxtmt/Jx6jy9ADF++0SyBnTcvQzW4QTeUIs1X0Uuai+1ukhLPoVeOj3b860DC895KqA7xE3AosYxhKloW5Lh0QOahVbDJSQ2Y8GPg3t8haflSp2lFCxeAiDKkxzBG4XX1UrHdDL/kLrHjaLGdBZBP5kqK/n4o0wPS6SiGsvNsDuY4/k55ddiqeWF3trH7r7/0QqrO65PL4KkTbCZ9Cq1ZBeEb04EYh0uhGawe28/D5rZuKOIAc1qP5IysdIcqWD3E225ZdwbSJi7OjJmbfvZhWw= X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(228905959029699); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040375)(601004)(2401047)(8121501046)(5005006)(3002001)(10201501046)(6041248)(20161123564025)(20161123558025)(20161123560025)(20161123562025)(20161123555025)(6072148); SRVR:BN3PR0701MB1719; BCL:0; PCL:0; RULEID:; SRVR:BN3PR0701MB1719; X-Microsoft-Exchange-Diagnostics: 1; BN3PR0701MB1719; 4:wfbdKqQZfk92FsO3QAl/BN5fo9keVmmx/xW91IQ8HpVDKdz/AyOzW3fjZslBUBU11c7/RpWz0mKTPIqYMqdtva6j44y7OKQ8clsNGVLVaInXtjN3dn7rkO0xGDgg+uekn2bY3+hZG/Y7Gwm1q5NEQycOZOIgatVUJoZ+h2IdQlcBBOIocQBBi1nSFtEZE3ywg7AhwFttOILnz9eoiddBs0K6qxkNmBP/NRGaTFIoxVeBLf8M99yyNZkaLFz9ncqqfmCGtUOkCiG3pLJQXl0eiRfxa6aAC/yNIAsYMrVz1vnZD37tZWuaDx2FvNRFnjDOM4D49eiiScDmv59WGTsjaaXhwYlJ2r4tSmfupBdZQ2hXlkTsEy/yTjxAHNFWoOKl7SWhwFTFB0LwbbZTyoD2ezdS2Rqe632PpeXfhFjlVfGwAdkPzg8rTqw4TxE/rBBnPhS+0w9rxc5rYay5+m972nc0XlLEn4WQyvHKhIPN3aCuh4XE1UvFG+YWK1HMotCNDuloZGtSzsQOh/cH8d83WfWv3vPC1gmd1IYtia/5xBP9n4qYcKYIfJ3qpKQXbrSLfBZuTO1B2wqNv/ng1SJA7CzNk5Z/w8rM7rddherFnz6MBKkhZ6140B9kZZffVG1KcPzynqQX7TtnAmX/jxmoTA== X-Forefront-PRVS: 02596AB7DA X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(4630300001)(6069001)(6009001)(39450400003)(39840400002)(39410400002)(24454002)(53936002)(6506006)(2906002)(110136004)(229853002)(42186005)(189998001)(5660300001)(83506001)(38730400002)(55016002)(54906002)(4326008)(9686003)(6916009)(1076002)(61506002)(81166006)(305945005)(7736002)(33646002)(54356999)(4001350100001)(25786009)(47776003)(2950100002)(66066001)(6666003)(6246003)(3846002)(50986999)(6116002)(8676002)(76176999)(42882006)(23726003)(50466002); DIR:OUT; SFP:1101; SCL:1; SRVR:BN3PR0701MB1719; H:localhost.localdomain; FPR:; SPF:None; MLV:sfv; LANG:en; X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; BN3PR0701MB1719; 23:V/dm3oOzF7WVivN+Goxn2BscKgOcb+NDBbZjVf2?= =?us-ascii?Q?oCvP3BoOO10n/G5TgC6NSLD7hHJPihZ0JzdjORrFNMPade7POmQdORmMLvLz?= =?us-ascii?Q?Yh3ruCJ5q5kKDGw9EZkxvwfFq5+OVN8VvVeXaw3nUCdzCzuQxXKPJsNoA6jV?= =?us-ascii?Q?s2IrttW1ASfD/8IupJOekPRJWqkHg5jrCVqz7S5el4bVqujdKGb4R8SG21yf?= =?us-ascii?Q?K07YFDpZbxbtLS91NuuPSsDx1rzf2w7EaScUe4IP4SGQKLuXyUPsqsq+F2Fm?= =?us-ascii?Q?x3eBRoALB/Hr63J5rSxk57qxs8xpmP38bguCcgIqfbrbZKRfJIBNKtflSdjN?= =?us-ascii?Q?mmewjFxR3Db6H2BHcFmsPGg50vJAJ1R4fqZBZLclGvp7nX1BPL+p9lUBtnjB?= =?us-ascii?Q?goon7mpjAbqjDJw9E3AHozcQomK+FOLsZ1Mpe16CjL41iXsy1lXtXG9JrtRz?= =?us-ascii?Q?ZQzUfTKKhbSTABTAVjR9BoufPR6gKLXFcVZuC/4UBSW4Rf8dWSf9lXTQ6O9Q?= =?us-ascii?Q?j1rtCT4Jb1Arx0P9XdEhs+eb92gpUOsa5jqAvt6SS2rOkBh36NQZLaRQM5Zd?= =?us-ascii?Q?kH94VCKm8iUghIAzXAEgdGvbGuSrI6mQhPynuJ6Oiy6FK5BpqHxLz6saDGkd?= =?us-ascii?Q?9KdSYh6iurNdJso4W7mBLnjSV8gPLeDbuC1ZXjP2TFNehXr+JS730402PDUR?= =?us-ascii?Q?wjgzLFdXP97iVp0zyZeQLxQ2SSHsX0c2Xb5yUHnMws8hJIu8xMh4VSmk8Phx?= =?us-ascii?Q?TNPQBpASz60CFRDgjDIwyGY3i3DgiLgOPkwltTchSKdgukurUw31Af+Kvifg?= =?us-ascii?Q?fSWEImaUePGWGUhQ/wuMAp3g60Is8Cxox11geLGPVm2w49/ha51Y4l5aUS97?= =?us-ascii?Q?lXou3I0HZd89+YIEz6ziWrtpihfEIOVKNKeJ+Spvi6FcwgruqrhP0rHme2I4?= =?us-ascii?Q?+ZYKKuToZ6Xi/VENhrGGmKtff81tuvmf4qfSUHSfIbYWYyrxL0jGIGukIsqH?= =?us-ascii?Q?wmAURONbBk14k7SB9KkyZ3oWUzNySku085MOjCVm+ptvyqg5X72TPx5X1eE5?= =?us-ascii?Q?/dNGGZbsH1IBzRcxbHHM4AmafW2VUzQnVsMg9utKj80rbGvBvIg=3D=3D?= X-Microsoft-Exchange-Diagnostics: 1; BN3PR0701MB1719; 6:PP/h5W3ivk/70P/wrhLY1fzi7fOzow24v7TOjRQL08pKecZ/mZyCb5KtXka4FbYL+h6X46RZ9B8IEXLG8K4WUkQ+BPHlf/NSEDMqOPp0F0LoIPivmRg9VT02A7GMJ1XZ/SeZjG3wnuAbluXngf+edmhycv0pptePe2ukmHpiDDAvj+p664UcC1cGrUf9R5/F/jykbMxsM1uoBtSH7qaVopTcik7JDqBDy2GeYrU/d6PwpkTQbAq4cRmK3UAiblMYWHa6diI1tLvwvMl7o7Keixa2cvjnYgoBJ1nimgKxfIBiSjwdj/i8FZCDf3fqsOkwPtGZDAkt+t38YVI0yCMncFMnF40pQ5vAB61zsYN23oB77UUcqlVAprJIXAY7ixuS6YNWlfyASnfrG7xDFFO2wQ==; 5:3Y+x6ygmEavqU4kFfdKZZkZzKqCH2zSXTF6Rfy2TaojxAjPTHjE7dyRvy9v7dj0Jux0BddsWrGx+NWKQM/ZNqlN0KEc+QHroYsm6HG5pg+4EwxZ2OYBodsu6Q6aywoh8nVZei33IOLlOZV4LKHuzmw==; 24:/kzN8J8aoagqSA7sjGnlsRigQfZaWhHRIcbjVQ5vnn2O63X/PnvUdAgFqVopwV+P3dFbzoCV+1YpaJ48vj3nzZSyvKlhHcCvrlcumueczWE= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; BN3PR0701MB1719; 7:n2e3oEQkl6Ccy32vI0vBl96rQL70tqextGksu7u9EM9V3LiKDic3sYfX6HanWS3GZlhJNeKklqBGjABWg07SHaFznB9ryR7lL+gykSaQUse0FGS/Lsk14g9DyXqNnKhPc8vwv+6GsmQH17rMtw/zw4gpLfoRArPi7+V0cmzjs9c7AnxugHffAXaWcCRaJWXljKFRmnUlin6pklBeUUJv8cZ6qmoI6lz2/CSNQSjK89OWjBA7sQww1jhLZ3GYTLRcElGOpvvW6NM7PnpmMPE4+KDK6vTiRGs4XEoyU2XjQ3h764v48Kfp7M7CDvt5EQj9keUNfPEXGQBDWVgia3miOw== X-OriginatorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 27 Mar 2017 13:51:05.7661 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN3PR0701MB1719 Subject: Re: [dpdk-dev] [PATCH v5 09/20] event/sw: add worker core functions 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: Mon, 27 Mar 2017 13:51:11 -0000 On Fri, Mar 24, 2017 at 04:53:04PM +0000, Harry van Haaren wrote: > From: Bruce Richardson > > add the event enqueue, dequeue and release functions to the eventdev. > These also include tracking of stats for observability in the load of > the scheduler. > Internally in the enqueue function, the various types of enqueue > operations, to forward an existing event, to send a new event, to > drop a previous event, are converted to a series of flags which will > be used by the scheduler code to perform the needed actions for that > event. > > Signed-off-by: Bruce Richardson > Signed-off-by: Gage Eads > Signed-off-by: Harry van Haaren > --- > drivers/event/sw/Makefile | 1 + > drivers/event/sw/sw_evdev.c | 5 + > drivers/event/sw/sw_evdev.h | 32 +++++++ > drivers/event/sw/sw_evdev_worker.c | 188 +++++++++++++++++++++++++++++++++++++ > 4 files changed, 226 insertions(+) > create mode 100644 drivers/event/sw/sw_evdev_worker.c > > diff --git a/drivers/event/sw/Makefile b/drivers/event/sw/Makefile > index d6836e3..b6ecd91 100644 > --- a/drivers/event/sw/Makefile > +++ b/drivers/event/sw/Makefile > @@ -53,6 +53,7 @@ EXPORT_MAP := rte_pmd_evdev_sw_version.map > > # library source files > SRCS-$(CONFIG_RTE_LIBRTE_PMD_SW_EVENTDEV) += sw_evdev.c > +SRCS-$(CONFIG_RTE_LIBRTE_PMD_SW_EVENTDEV) += sw_evdev_worker.c > > # export include files > SYMLINK-y-include += > diff --git a/drivers/event/sw/sw_evdev.c b/drivers/event/sw/sw_evdev.c > index 82ac3bd..9b2816d 100644 > --- a/drivers/event/sw/sw_evdev.c > +++ b/drivers/event/sw/sw_evdev.c > @@ -412,6 +412,7 @@ sw_dev_configure(const struct rte_eventdev *dev) > sw->qid_count = conf->nb_event_queues; > sw->port_count = conf->nb_event_ports; > sw->nb_events_limit = conf->nb_events_limit; > + rte_atomic32_set(&sw->inflights, 0); > > return 0; > } > @@ -550,6 +551,10 @@ sw_probe(const char *name, const char *params) > return -EFAULT; > } > dev->dev_ops = &evdev_sw_ops; > + dev->enqueue = sw_event_enqueue; > + dev->enqueue_burst = sw_event_enqueue_burst; > + dev->dequeue = sw_event_dequeue; > + dev->dequeue_burst = sw_event_dequeue_burst; Is all the code in the sw_probe() valid for multi process? If not, after function pointer assignment it can return[1] from sw_probe. Just like another PMD's, we will support configuration API and fastpath API in primary process and secondary process will be limited to fast path functions. [1] if (rte_eal_process_type() != RTE_PROC_PRIMARY) return 0; > > sw = dev->data->dev_private; > sw->data = dev->data; > diff --git a/drivers/event/sw/sw_evdev.h b/drivers/event/sw/sw_evdev.h > index f5515e1..ab372fd 100644 > --- a/drivers/event/sw/sw_evdev.h > +++ b/drivers/event/sw/sw_evdev.h > @@ -55,12 +55,36 @@ > #define SCHED_DEQUEUE_BURST_SIZE 32 > > + > +static inline void > +sw_event_release(struct sw_port *p, uint8_t index) > +{ > + /* > + * Drops the next outstanding event in our history. Used on dequeue > + * to clear any history before dequeuing more events. > + */ > + RTE_SET_USED(index); > + > + /* create drop message */ > + struct rte_event ev = { > + .op = sw_qe_flag_map[RTE_EVENT_OP_RELEASE], > + }; > + > + uint16_t free_count; > + qe_ring_enqueue_burst(p->rx_worker_ring, &ev, 1, &free_count); > + > + /* each release returns one credit */ > + p->outstanding_releases--; > + p->inflight_credits++; > +} > + > +uint16_t > +sw_event_enqueue_burst(void *port, const struct rte_event ev[], uint16_t num) > +{ > + int32_t i; > + uint8_t new_ops[PORT_ENQUEUE_MAX_BURST_SIZE]; > + struct sw_port *p = port; > + struct sw_evdev *sw = (void *)p->sw; > + uint32_t sw_inflights = rte_atomic32_read(&sw->inflights); > + > + if (p->inflight_max < sw_inflights) > + return 0; likely and unlikely attributes are missing in fastpath functions. Worth to consider in using those in worker file. > + if (num > PORT_ENQUEUE_MAX_BURST_SIZE) > + num = PORT_ENQUEUE_MAX_BURST_SIZE; > + > + if (p->inflight_credits < num) { > + /* Check if sending events would bring instance over the > + * max events threshold > + */ > + uint32_t credit_update_quanta = sw->credit_update_quanta; > + if (sw_inflights + credit_update_quanta > sw->nb_events_limit) > + return 0; > + > + rte_atomic32_add(&sw->inflights, credit_update_quanta); > + p->inflight_credits += (credit_update_quanta); > + > + if (p->inflight_credits < num) > + return 0; > + } > + > + for (i = 0; i < num; i++) { > + int op = ev[i].op; > + int outstanding = p->outstanding_releases > 0; > + const uint8_t invalid_qid = (ev[i].queue_id >= sw->qid_count); > + > + p->inflight_credits -= (op == RTE_EVENT_OP_NEW); > + p->inflight_credits += (op == RTE_EVENT_OP_RELEASE) * > + outstanding; > + > + new_ops[i] = sw_qe_flag_map[op]; > + new_ops[i] &= ~(invalid_qid << QE_FLAG_VALID_SHIFT); > + > + /* FWD and RELEASE packets will both resolve to taken (assuming > + * correct usage of the API), providing very high correct > + * prediction rate. > + */ > + if ((new_ops[i] & QE_FLAG_COMPLETE) && outstanding) > + p->outstanding_releases--; > + /* Branch to avoid touching p->stats except error case */ > + if (invalid_qid) > + p->stats.rx_dropped++; > + } > + > + /* returns number of events actually enqueued */ > + uint32_t enq = qe_ring_enqueue_burst_with_ops(p->rx_worker_ring, ev, i, > + new_ops); > + if (p->outstanding_releases == 0 && p->last_dequeue_burst_sz != 0) { > + uint64_t burst_ticks = rte_get_timer_cycles() - > + p->last_dequeue_ticks; > + uint64_t burst_pkt_ticks = > + burst_ticks / p->last_dequeue_burst_sz; > + p->avg_pkt_ticks -= p->avg_pkt_ticks / NUM_SAMPLES; > + p->avg_pkt_ticks += burst_pkt_ticks / NUM_SAMPLES; > + p->last_dequeue_ticks = 0; > + } > + return enq; > +} > + > +uint16_t > +sw_event_enqueue(void *port, const struct rte_event *ev) > +{ > + return sw_event_enqueue_burst(port, ev, 1); > +} > + > +uint16_t > +sw_event_dequeue_burst(void *port, struct rte_event *ev, uint16_t num, > + uint64_t wait) > +{ > + RTE_SET_USED(wait); > + struct sw_port *p = (void *)port; > + struct sw_evdev *sw = (void *)p->sw; > + struct qe_ring *ring = p->cq_worker_ring; > + uint32_t credit_update_quanta = sw->credit_update_quanta; > + > + /* check that all previous dequeues have been released */ > + if (!p->is_directed) { > + uint16_t out_rels = p->outstanding_releases; > + uint16_t i; > + for (i = 0; i < out_rels; i++) > + sw_event_release(p, i); > + } > + > + /* Intel modification: may not be in final API */ > + if (ev == 0) > + return 0; May be we can remove this one in fastpath. Maybe under DEBUG in common code we can add this. > + > + /* returns number of events actually dequeued */ > + uint16_t ndeq = qe_ring_dequeue_burst(ring, ev, num); > + if (ndeq == 0) { > + p->outstanding_releases = 0; > + p->zero_polls++; > + p->total_polls++; > + goto end; > + } > + > + /* only add credits for directed ports - LB ports send RELEASEs */ > + p->inflight_credits += ndeq * p->is_directed; > + p->outstanding_releases = ndeq; > + p->last_dequeue_burst_sz = ndeq; > + p->last_dequeue_ticks = rte_get_timer_cycles(); > + p->poll_buckets[(ndeq - 1) >> SW_DEQ_STAT_BUCKET_SHIFT]++; > + p->total_polls++; > + > +end: > + if (p->inflight_credits >= credit_update_quanta * 2 && > + p->inflight_credits > credit_update_quanta + ndeq) { > + rte_atomic32_sub(&sw->inflights, credit_update_quanta); > + p->inflight_credits -= credit_update_quanta; > + } > + return ndeq; > +} > + > +uint16_t > +sw_event_dequeue(void *port, struct rte_event *ev, uint64_t wait) > +{ > + return sw_event_dequeue_burst(port, ev, 1, wait); > +} > -- > 2.7.4 >