From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm0-f47.google.com (mail-wm0-f47.google.com [74.125.82.47]) by dpdk.org (Postfix) with ESMTP id 498C068F5 for ; Fri, 23 Sep 2016 16:03:20 +0200 (CEST) Received: by mail-wm0-f47.google.com with SMTP id l132so31963874wmf.1 for ; Fri, 23 Sep 2016 07:03:20 -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=z00gUmr1slrYBCo2iQpwqyLbebRyapWcgJ9+9K9IQkw=; b=qBBwkrPcVlah8pogpieXZHLICiB8pN9Rm9JwqJTKgOXeV5cwXSg3f+4EtApH4gNfyu rv8wVeWtGCyzqU4HRCfT7gHDDsiuOGHhVorWpFptS+UHXVaqC4nkMGd6FehgqRpTbEeY 5/Y9nNswCeGnYNxWVhbrRBqRqXKZ2ALP+eM+SycU93Y7NLtJ6rBJ+Q8KmJc7N6a94Vkt hVquPDAiSwlyiYx1k6EWoClGeYkKMJxzw9ZO+5zlGR9K+sUH4FT/bF0XSYKaWIhJKp5/ PyODfkpMLCLj+rgxndQK1kDAGhYogI6Z7vpccYSmGvGKW6VxzKRlBaJDDtZ/k2LWA3qr CA8g== 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=z00gUmr1slrYBCo2iQpwqyLbebRyapWcgJ9+9K9IQkw=; b=WwdtWSWJGmNxN8t0t1jPmAljKJGVkTUXDem4+Gm6+v4RVnPrPuH8bIx/ZLBPbH5VZG vPrQfQfWgpzgAx4BCQUcv/tKYz1fKLQ8P5kGhCsuEIWx5dv8EsAWlKMkbdp0yYy+erWJ xjhgki3jDJ/3fI4CPTOcPY3/1Ifk2/F0n1EZ3ZT2qJ5//lud8Z+AZQfj39+iYS2rw7i7 Xd0uCFPO1E7IpDzVSMmMQk8xErb/ZOEtPQYo5g+su4f8Wj1rAJd/9y/ruoJDndgJzb1G VHnQujf2R0k/jTWLjN+c3GXhItKnlVVSd+jXpx0cb8pbUsihscMbADSrNs6tANV08X66 73Xg== X-Gm-Message-State: AE9vXwOcfJ2SxsWTVQaQ+wJY315CCtCDHGc3ESnYpSgNpfXMCds3ppKENXhZg/v+9zfn/W++ X-Received: by 10.194.82.72 with SMTP id g8mr8041239wjy.214.1474639400016; Fri, 23 Sep 2016 07:03:20 -0700 (PDT) Received: from xps13.localnet (guy78-3-82-239-227-177.fbx.proxad.net. [82.239.227.177]) by smtp.gmail.com with ESMTPSA id pm1sm7374448wjb.40.2016.09.23.07.03.19 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 23 Sep 2016 07:03:19 -0700 (PDT) From: Thomas Monjalon To: jozmarti@cisco.com Cc: dev@dpdk.org Date: Fri, 23 Sep 2016 16:03:06 +0200 Message-ID: <24189082.EpCgmYOVsv@xps13> User-Agent: KMail/4.14.10 (Linux/4.5.4-1-ARCH; KDE/4.14.11; x86_64; ; ) In-Reply-To: <1474612743-27466-1-git-send-email-jozmarti@cisco.com> References: <1469016644-6521-1-git-send-email-jozmarti@cisco.com> <1474612743-27466-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: Fri, 23 Sep 2016 14:03:20 -0000 2016-09-23 08:39, jozmarti@cisco.com: > --- a/lib/librte_eal/common/include/generic/rte_cycles.h > +++ b/lib/librte_eal/common/include/generic/rte_cycles.h > @@ -180,15 +180,17 @@ rte_get_timer_hz(void) > default: rte_panic("Invalid timer source specified\n"); > } > } > - > /** > + * > * Wait at least us microseconds. > + * This function can be replaced with user-defined function. > + * @see rte_delay_us_callback_register > * > * @param us > * The number of microseconds to wait. > */ > void > -rte_delay_us(unsigned us); > +(*rte_delay_us)(unsigned int us); > > /** > * Wait at least ms milliseconds. > @@ -202,4 +204,22 @@ rte_delay_ms(unsigned ms) > rte_delay_us(ms * 1000); > } > > +/** > + * Blocking delay function. > + * > + * @param us > + * Number of microseconds to wait. > + */ > +void rte_delay_us_block(unsigned int us); > +/** > + * Replace rte_delay_us with user defined function. > + * > + * @param userfunc > + * User function which replaces rte_delay_us. NULL restores > + * buildin block delay function. > + */ The comment about NULL value is not valid anymore. > +void rte_delay_us_callback_register(void(*userfunc)(unsigned int)); > + > + > + > #endif /* _RTE_CYCLES_H_ */ There are extra or missing blank lines in this chunk. Except these and the above comment, it looks good to me.