From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-lf0-f49.google.com (mail-lf0-f49.google.com [209.85.215.49]) by dpdk.org (Postfix) with ESMTP id 067DC2BB4 for ; Mon, 26 Sep 2016 14:48:40 +0200 (CEST) Received: by mail-lf0-f49.google.com with SMTP id l131so140547153lfl.2 for ; Mon, 26 Sep 2016 05:48:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=6wind-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:user-agent:in-reply-to :references:mime-version:content-transfer-encoding; bh=R5fvrcGVcHgxmYsThd/TYEK042UO8S5ap/WKPEFxebo=; b=FJrhZr0yrTE4a6yWDJHxPqWWWowGe0URjs3OPwIcdCR8Mdiv34kjHM6fwrfV3/6ibV qnR1DVDPrk8eds/Co+MbFHKgrCp/NnQEoiyzYQHtj20xJlMTB2d3uAclThy67tvDyiR3 BL9iJNPhwO5C8A4YDcGL3l/CuFtTozuaDw1+xOH2yIpyCbIRXWI8k1s5GqQk9aa+yL7H 6ZYi8WvE+I+5lVH+oLj1rk0sd2v8ao5R9Sjk6/SXgDAyruTMlR7odiSkTdMAJ1VniiH6 skUhRgLrmea5dDyf9OpNaFQ2yw0N8RHdUpiofyWihd0LudiUdV/XisJGr3MAnoZpeLy6 Tntw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:user-agent :in-reply-to:references:mime-version:content-transfer-encoding; bh=R5fvrcGVcHgxmYsThd/TYEK042UO8S5ap/WKPEFxebo=; b=VB4PoB+M785ZprTb5AAfRVaPTkp1+yOKQK3iwi86Ssyj2ScFkwT4tM7jwYFWejA2ZI R3IHS4Abg4HOt4As5/0a8+3+tuhQm2pXfdbdLnPIsOjIU0a1HtQ3uhVmJgYmmkSPO1ZT C+gb+14Uo+EePDNNxgXsYXWCOKya9tzHAFxDn0rdO+3NC/p0lMrZMov8/A1Mev2bPcfm OB4+hVzauVng6qFEdhVz1HF79BBS1pTEPEW3ANWUiduBiz8zwI9yy/CboAyC2eFQFf8Z 9Ov8Vhl3aPkCHrLKgQ4LFnlzPvB8eNG8ihKTrrpwfXx15uVPTeQsW7iFVNgYICrr3ab7 RIAg== X-Gm-Message-State: AE9vXwO4VqBcgAfZBNRPg7X0AkszT191+YdjSB8c80GqgKiUYapvIief9H3/sd9JX7YQgMnK X-Received: by 10.194.148.145 with SMTP id ts17mr18064762wjb.91.1474894119666; Mon, 26 Sep 2016 05:48:39 -0700 (PDT) Received: from xps13.localnet (184.203.134.77.rev.sfr.net. [77.134.203.184]) by smtp.gmail.com with ESMTPSA id xy4sm22256475wjc.2.2016.09.26.05.48.38 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 26 Sep 2016 05:48:38 -0700 (PDT) From: Thomas Monjalon To: jozmarti@cisco.com Cc: dev@dpdk.org Date: Mon, 26 Sep 2016 14:48:37 +0200 Message-ID: <2018407.6L6irO5Yoa@xps13> User-Agent: KMail/4.14.10 (Linux/4.5.4-1-ARCH; KDE/4.14.11; x86_64; ; ) In-Reply-To: <1474878909-15534-1-git-send-email-jozmarti@cisco.com> References: <1469016644-6521-1-git-send-email-jozmarti@cisco.com> <1474878909-15534-1-git-send-email-jozmarti@cisco.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Subject: Re: [dpdk-dev] [PATCH v3] rte_delay_us can be replaced with user function X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Sep 2016 12:48:40 -0000 2016-09-26 10:35, jozmarti@cisco.com: > From: Jozef Martiniak > > When running single-core, some drivers tend to call rte_delay_us for a > long time, and that is causing packet drops. > To avoid this, rte_delay_us can be replaced with user-defined delay > function with: > > void rte_delay_us_callback_register(void(*userfunc)(unsigned)); > > When userfunc==rte_delay_us_block build-in blocking delay function is > restored. > > Signed-off-by: Jozef Martiniak Applied, thanks. Just 2 details (below) were fixed when applying. > --- a/lib/librte_eal/common/include/generic/rte_cycles.h > +++ b/lib/librte_eal/common/include/generic/rte_cycles.h > @@ -180,15 +180,16 @@ rte_get_timer_hz(void) > default: rte_panic("Invalid timer source specified\n"); > } > } > - This blank line should remain. > /** > * Wait at least us microseconds. > + * This function can be replaced with user-defined function. > + * @see rte_delay_us_callback_register [...] > + * @param userfunc > + * User function which replaces rte_delay_us. rte_delay_us_block restores > + * buildin block delay function. buildin -> builtin