From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thomas Monjalon Subject: Re: [PATCH v3] rte_delay_us can be replaced with user function Date: Mon, 26 Sep 2016 14:48:37 +0200 Message-ID: <2018407.6L6irO5Yoa@xps13> References: <1469016644-6521-1-git-send-email-jozmarti@cisco.com> <1474878909-15534-1-git-send-email-jozmarti@cisco.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7Bit Cc: dev@dpdk.org To: jozmarti@cisco.com 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) In-Reply-To: <1474878909-15534-1-git-send-email-jozmarti@cisco.com> List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 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