[dpdk-dev] [PATCH v1 0/2] CPU non-blocking delay

Wiles, Keith keith.wiles at intel.com
Fri Oct 5 17:04:57 CEST 2018



> On Oct 5, 2018, at 9:44 AM, Ilya Maximets <i.maximets at samsung.com> wrote:
> 
> On 05.10.2018 17:09, Wiles, Keith wrote:
>> 
>> 
>>> On Sep 3, 2018, at 9:44 AM, Ilya Maximets <i.maximets at samsung.com> wrote:
>>> 
>>> For meson build without deprecation warnings following
>>> patch should be applied first:
>>>   http://patches.dpdk.org/patch/44129/
>> 
>> Not to be super picky (OK I am super picky sometimes) can we change the name of the function rte_delay_us_sleep() to rte_sleep_us() the reason is delay and sleep conflict IMO. The rte_sleep_us() tells me it sleeps, which is a form of delay, but delay in DPDK assume busy wait.
> 
> I'm not sure about this, because this function intended to be used
> as 'rte_delay_us_callback', i.e. as implementation of 'rte_delay_us()'.
> IMO, it should state that it is the part of this API and that it
> sleeps internally at the same time. So I tried to combine both "delay"
> and "sleep" in one function name.
> 
> If we'll change the name to 'rte_sleep_us' it will look like alternative
> to 'rte_delay_us', but it's one of its implementations.
> 'rte_delay_us_sleep' should be alternative to 'rte_delay_us_block()'.
> 
> I'd like to call it 'rte_delay_us_nonblock()', but it may be way more
> confusing.
> 
> What do you think?

I personally do not see the big tie to delay and callback as the rte_delay_us() is not rte_delay_us_with_callback() :-) Yes the code maybe doing a callback, but that has nothing to do with the API name IMO.

Anyone else care about the name?

> 
>>> 
>>> Ilya Maximets (2):
>>> eal: add nanosleep based delay function
>>> drivers/net: use sleep delay by default for intel NICs
>>> 
>>> drivers/net/avf/Makefile                      |  1 +
>>> drivers/net/avf/base/avf_osdep.h              |  4 +-
>>> drivers/net/e1000/Makefile                    |  1 +
>>> drivers/net/e1000/base/e1000_osdep.h          |  2 +-
>>> drivers/net/e1000/meson.build                 |  2 +
>>> drivers/net/i40e/base/i40e_osdep.h            |  6 +--
>>> drivers/net/ifc/base/ifcvf_osdep.h            |  2 +-
>>> drivers/net/ixgbe/base/ixgbe_osdep.h          |  2 +-
>>> drivers/net/ixgbe/meson.build                 |  3 +-
>>> lib/librte_eal/common/eal_common_timer.c      | 19 +++++++
>>> .../common/include/generic/rte_cycles.h       | 11 ++++
>>> lib/librte_eal/rte_eal_version.map            |  1 +
>>> test/test/autotest_data.py                    |  6 +++
>>> test/test/meson.build                         |  1 +
>>> test/test/test_cycles.c                       | 51 ++++++++++++++-----
>>> 15 files changed, 89 insertions(+), 23 deletions(-)
>>> 
>>> -- 
>>> 2.17.1
>>> 
>> 
>> Regards,
>> Keith
>> 
>> 
>> 

Regards,
Keith



More information about the dev mailing list