* [dpdk-dev] [RFC 0/2] CPU non-blocking delay
[not found] <CGME20180831124358eucas1p22a0f8a7d0ae34dfad73b3b9e819366ec@eucas1p2.samsung.com>
@ 2018-08-31 12:45 ` Ilya Maximets
2018-08-31 13:01 ` Bruce Richardson
` (2 more replies)
0 siblings, 3 replies; 24+ messages in thread
From: Ilya Maximets @ 2018-08-31 12:45 UTC (permalink / raw)
To: dev
Cc: Jingjing Wu, Konstantin Ananyev, Wenzhuo Lu, Beilei Xing,
Qi Zhang, Xiao Wang, Bruce Richardson, Ilya Maximets
Sending as RFC because I failed to force meson to
build without deprecation warnings. I tried a lot
of different combinations of 'allow_experimental_apis'
and '-DALLOW_EXPERIMENTAL_APIS' without success.
Any help appreciated.
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/i40e/base/i40e_osdep.h | 6 +--
drivers/net/ifc/base/ifcvf_osdep.h | 2 +-
drivers/net/ixgbe/base/ixgbe_osdep.h | 2 +-
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 ++++++++++++++-----
13 files changed, 85 insertions(+), 22 deletions(-)
--
2.17.1
^ permalink raw reply [flat|nested] 24+ messages in thread
* Re: [dpdk-dev] [RFC 0/2] CPU non-blocking delay
2018-08-31 12:45 ` [dpdk-dev] [RFC 0/2] CPU non-blocking delay Ilya Maximets
@ 2018-08-31 13:01 ` Bruce Richardson
2018-08-31 13:39 ` Bruce Richardson
[not found] ` <CGME20180903144311eucas1p2b6499c49dbd0d54334e973113cdc5ad6@eucas1p2.samsung.com>
2 siblings, 0 replies; 24+ messages in thread
From: Bruce Richardson @ 2018-08-31 13:01 UTC (permalink / raw)
To: Ilya Maximets
Cc: dev, Jingjing Wu, Konstantin Ananyev, Wenzhuo Lu, Beilei Xing,
Qi Zhang, Xiao Wang
On Fri, Aug 31, 2018 at 03:45:15PM +0300, Ilya Maximets wrote:
> Sending as RFC because I failed to force meson to
> build without deprecation warnings. I tried a lot
> of different combinations of 'allow_experimental_apis'
> and '-DALLOW_EXPERIMENTAL_APIS' without success.
> Any help appreciated.
>
I'll try and take a look.
/Bruce
^ permalink raw reply [flat|nested] 24+ messages in thread
* Re: [dpdk-dev] [RFC 0/2] CPU non-blocking delay
2018-08-31 12:45 ` [dpdk-dev] [RFC 0/2] CPU non-blocking delay Ilya Maximets
2018-08-31 13:01 ` Bruce Richardson
@ 2018-08-31 13:39 ` Bruce Richardson
2018-09-03 14:41 ` Ilya Maximets
[not found] ` <CGME20180903144311eucas1p2b6499c49dbd0d54334e973113cdc5ad6@eucas1p2.samsung.com>
2 siblings, 1 reply; 24+ messages in thread
From: Bruce Richardson @ 2018-08-31 13:39 UTC (permalink / raw)
To: Ilya Maximets
Cc: dev, Jingjing Wu, Konstantin Ananyev, Wenzhuo Lu, Beilei Xing,
Qi Zhang, Xiao Wang
On Fri, Aug 31, 2018 at 03:45:15PM +0300, Ilya Maximets wrote:
> Sending as RFC because I failed to force meson to
> build without deprecation warnings. I tried a lot
> of different combinations of 'allow_experimental_apis'
> and '-DALLOW_EXPERIMENTAL_APIS' without success.
> Any help appreciated.
>
See patch: http://patches.dpdk.org/patch/44129/
Basically, the experimental_apis setting was not getting passed through and
used by the base code libraries when set at the higher level, since they
were being built individually by the respective base/meson.build files,
rather than by the main driver build loop. Putting in an explicit check for
the value in the base code files should make your life easier here. You
just need to ensure that the "allow_experimental_apis" setting is set
*before* the call to "subdir(base)" e.g. in ixgbe, it's currently after and
needs to be moved by your patchset.
Regards,
/Bruce
PS: I also notice that i40e is using the experimental APIs cflags directly,
rather than the variable, I'll have to fix that in a later patch.
^ permalink raw reply [flat|nested] 24+ messages in thread
* Re: [dpdk-dev] [RFC 0/2] CPU non-blocking delay
2018-08-31 13:39 ` Bruce Richardson
@ 2018-09-03 14:41 ` Ilya Maximets
0 siblings, 0 replies; 24+ messages in thread
From: Ilya Maximets @ 2018-09-03 14:41 UTC (permalink / raw)
To: Bruce Richardson
Cc: dev, Jingjing Wu, Konstantin Ananyev, Wenzhuo Lu, Beilei Xing,
Qi Zhang, Xiao Wang
On 31.08.2018 16:39, Bruce Richardson wrote:
> On Fri, Aug 31, 2018 at 03:45:15PM +0300, Ilya Maximets wrote:
>> Sending as RFC because I failed to force meson to
>> build without deprecation warnings. I tried a lot
>> of different combinations of 'allow_experimental_apis'
>> and '-DALLOW_EXPERIMENTAL_APIS' without success.
>> Any help appreciated.
>>
>
> See patch: http://patches.dpdk.org/patch/44129/
>
> Basically, the experimental_apis setting was not getting passed through and
> used by the base code libraries when set at the higher level, since they
> were being built individually by the respective base/meson.build files,
> rather than by the main driver build loop. Putting in an explicit check for
> the value in the base code files should make your life easier here. You
> just need to ensure that the "allow_experimental_apis" setting is set
> *before* the call to "subdir(base)" e.g. in ixgbe, it's currently after and
> needs to be moved by your patchset.
Thanks. It works.
Best regards, Ilya Maximets.
>
> Regards,
> /Bruce
>
> PS: I also notice that i40e is using the experimental APIs cflags directly,
> rather than the variable, I'll have to fix that in a later patch.
>
>
^ permalink raw reply [flat|nested] 24+ messages in thread
* [dpdk-dev] [PATCH v1 0/2] CPU non-blocking delay
[not found] ` <CGME20180903144311eucas1p2b6499c49dbd0d54334e973113cdc5ad6@eucas1p2.samsung.com>
@ 2018-09-03 14:44 ` Ilya Maximets
[not found] ` <CGME20180903144615eucas1p1d7377fa285a86f522f29c2a9528a638e@eucas1p1.samsung.com>
` (3 more replies)
0 siblings, 4 replies; 24+ messages in thread
From: Ilya Maximets @ 2018-09-03 14:44 UTC (permalink / raw)
To: dev
Cc: Jingjing Wu, Konstantin Ananyev, Wenzhuo Lu, Beilei Xing,
Qi Zhang, Xiao Wang, Bruce Richardson, Ilya Maximets
For meson build without deprecation warnings following
patch should be applied first:
http://patches.dpdk.org/patch/44129/
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
^ permalink raw reply [flat|nested] 24+ messages in thread
* [dpdk-dev] [PATCH v1 1/2] eal: add nanosleep based delay function
[not found] ` <CGME20180903144615eucas1p1d7377fa285a86f522f29c2a9528a638e@eucas1p1.samsung.com>
@ 2018-09-03 14:47 ` Ilya Maximets
2018-09-05 13:10 ` Stephen Hemminger
0 siblings, 1 reply; 24+ messages in thread
From: Ilya Maximets @ 2018-09-03 14:47 UTC (permalink / raw)
To: dev
Cc: Jingjing Wu, Konstantin Ananyev, Wenzhuo Lu, Beilei Xing,
Qi Zhang, Xiao Wang, Bruce Richardson, Ilya Maximets
Add a new rte_delay_us_sleep() function that uses nanosleep().
This function can be used by applications to not implement
their own nanosleep() based callback and by internal DPDK
code if CPU non-blocking delay needed.
Signed-off-by: Ilya Maximets <i.maximets@samsung.com>
---
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 ++++++++++++++-----
6 files changed, 75 insertions(+), 14 deletions(-)
diff --git a/lib/librte_eal/common/eal_common_timer.c b/lib/librte_eal/common/eal_common_timer.c
index 2e2b770fb..4a00525ca 100644
--- a/lib/librte_eal/common/eal_common_timer.c
+++ b/lib/librte_eal/common/eal_common_timer.c
@@ -7,9 +7,11 @@
#include <unistd.h>
#include <inttypes.h>
#include <sys/types.h>
+#include <time.h>
#include <errno.h>
#include <rte_common.h>
+#include <rte_compat.h>
#include <rte_log.h>
#include <rte_cycles.h>
#include <rte_pause.h>
@@ -31,6 +33,23 @@ rte_delay_us_block(unsigned int us)
rte_pause();
}
+void __rte_experimental
+rte_delay_us_sleep(unsigned int us)
+{
+ struct timespec wait[2];
+ int ind = 0;
+
+ wait[0].tv_sec = 0;
+ if (us >= US_PER_S) {
+ wait[0].tv_sec = us / US_PER_S;
+ us -= wait[0].tv_sec * US_PER_S;
+ }
+ wait[0].tv_nsec = 1000 * us;
+
+ while (nanosleep(&wait[ind], &wait[1 - ind]) == EINTR)
+ ind = 1 - ind;
+}
+
uint64_t
rte_get_tsc_hz(void)
{
diff --git a/lib/librte_eal/common/include/generic/rte_cycles.h b/lib/librte_eal/common/include/generic/rte_cycles.h
index 0ff1af504..ac379e878 100644
--- a/lib/librte_eal/common/include/generic/rte_cycles.h
+++ b/lib/librte_eal/common/include/generic/rte_cycles.h
@@ -13,6 +13,7 @@
*/
#include <stdint.h>
+#include <rte_compat.h>
#include <rte_debug.h>
#include <rte_atomic.h>
@@ -157,6 +158,16 @@ rte_delay_ms(unsigned ms)
*/
void rte_delay_us_block(unsigned int us);
+/**
+ * Delay function that uses system sleep.
+ * Does not block the CPU core.
+ *
+ * @param us
+ * Number of microseconds to wait.
+ */
+void __rte_experimental
+rte_delay_us_sleep(unsigned int us);
+
/**
* Replace rte_delay_us with user defined function.
*
diff --git a/lib/librte_eal/rte_eal_version.map b/lib/librte_eal/rte_eal_version.map
index 344a43d32..d68777ce0 100644
--- a/lib/librte_eal/rte_eal_version.map
+++ b/lib/librte_eal/rte_eal_version.map
@@ -270,6 +270,7 @@ EXPERIMENTAL {
rte_class_register;
rte_class_unregister;
rte_ctrl_thread_create;
+ rte_delay_us_sleep;
rte_dev_event_callback_register;
rte_dev_event_callback_unregister;
rte_dev_event_monitor_start;
diff --git a/test/test/autotest_data.py b/test/test/autotest_data.py
index f68d9b111..874d0cb53 100644
--- a/test/test/autotest_data.py
+++ b/test/test/autotest_data.py
@@ -278,6 +278,12 @@
"Func": default_autotest,
"Report": None,
},
+ {
+ "Name": "Sleep delay",
+ "Command": "delay_us_sleep_autotest",
+ "Func": default_autotest,
+ "Report": None,
+ },
{
"Name": "Rawdev autotest",
"Command": "rawdev_autotest",
diff --git a/test/test/meson.build b/test/test/meson.build
index b1dd6eca2..0078aea30 100644
--- a/test/test/meson.build
+++ b/test/test/meson.build
@@ -143,6 +143,7 @@ test_names = [
'cryptodev_dpaa_sec_autotest',
'cycles_autotest',
'debug_autotest',
+ 'delay_us_sleep_autotest',
'devargs_autotest',
'distributor_autotest',
'distributor_perf_autotest',
diff --git a/test/test/test_cycles.c b/test/test/test_cycles.c
index 149f60b07..c78e6a5b1 100644
--- a/test/test/test_cycles.c
+++ b/test/test/test_cycles.c
@@ -23,6 +23,30 @@
* of cycles is correct with regard to the frequency of the timer.
*/
+static int
+check_wait_one_second(void)
+{
+ uint64_t cycles, prev_cycles;
+ uint64_t hz = rte_get_timer_hz();
+ uint64_t max_inc = (hz / 100); /* 10 ms max between 2 reads */
+
+ /* check that waiting 1 second is precise */
+ prev_cycles = rte_get_timer_cycles();
+ rte_delay_us(1000000);
+ cycles = rte_get_timer_cycles();
+
+ if ((uint64_t)(cycles - prev_cycles) > (hz + max_inc)) {
+ printf("delay_us is not accurate: too long\n");
+ return -1;
+ }
+ if ((uint64_t)(cycles - prev_cycles) < (hz - max_inc)) {
+ printf("delay_us is not accurate: too short\n");
+ return -1;
+ }
+
+ return 0;
+}
+
static int
test_cycles(void)
{
@@ -43,24 +67,23 @@ test_cycles(void)
prev_cycles = cycles;
}
- /* check that waiting 1 second is precise */
- prev_cycles = rte_get_timer_cycles();
- rte_delay_us(1000000);
- cycles = rte_get_timer_cycles();
+ return check_wait_one_second();
+}
- if ((uint64_t)(cycles - prev_cycles) > (hz + max_inc)) {
- printf("delay_us is not accurate: too long\n");
- return -1;
- }
- if ((uint64_t)(cycles - prev_cycles) < (hz - max_inc)) {
- printf("delay_us is not accurate: too short\n");
- return -1;
- }
+REGISTER_TEST_COMMAND(cycles_autotest, test_cycles);
- return 0;
+/*
+ * One second precision test with rte_delay_us_sleep.
+ */
+
+static int
+test_delay_us_sleep(void)
+{
+ rte_delay_us_callback_register(rte_delay_us_sleep);
+ return check_wait_one_second();
}
-REGISTER_TEST_COMMAND(cycles_autotest, test_cycles);
+REGISTER_TEST_COMMAND(delay_us_sleep_autotest, test_delay_us_sleep);
/*
* rte_delay_us_callback test
--
2.17.1
^ permalink raw reply [flat|nested] 24+ messages in thread
* [dpdk-dev] [PATCH v1 2/2] drivers/net: use sleep delay by default for intel NICs
[not found] ` <CGME20180903144704eucas1p1d469c23bc22f25af27f00d94aaf8a660@eucas1p1.samsung.com>
@ 2018-09-03 14:48 ` Ilya Maximets
0 siblings, 0 replies; 24+ messages in thread
From: Ilya Maximets @ 2018-09-03 14:48 UTC (permalink / raw)
To: dev
Cc: Jingjing Wu, Konstantin Ananyev, Wenzhuo Lu, Beilei Xing,
Qi Zhang, Xiao Wang, Bruce Richardson, Ilya Maximets
NICs uses different delays up to a second during their
configuration. It makes no sense to busy-wait so long wasting
CPU cycles and preventing any other threads to execute on the
same CPU core. These busy polling are the rudiments that came
from the kernel drivers where you can not sleep in interrupt
context, but as we're in userspace, we're able and should
sleep to allow other threads to run.
Delays never called on rx/tx path, so this should not affect
performance.
Signed-off-by: Ilya Maximets <i.maximets@samsung.com>
---
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 ++-
9 files changed, 14 insertions(+), 9 deletions(-)
diff --git a/drivers/net/avf/Makefile b/drivers/net/avf/Makefile
index 3f815bbc4..8ee707529 100644
--- a/drivers/net/avf/Makefile
+++ b/drivers/net/avf/Makefile
@@ -9,6 +9,7 @@ include $(RTE_SDK)/mk/rte.vars.mk
LIB = librte_pmd_avf.a
CFLAGS += -O3
+CFLAGS += -DALLOW_EXPERIMENTAL_API
LDLIBS += -lrte_eal -lrte_mbuf -lrte_mempool -lrte_ring
LDLIBS += -lrte_ethdev -lrte_net -lrte_kvargs -lrte_hash
LDLIBS += -lrte_bus_pci
diff --git a/drivers/net/avf/base/avf_osdep.h b/drivers/net/avf/base/avf_osdep.h
index 9ef45968e..442a5acd0 100644
--- a/drivers/net/avf/base/avf_osdep.h
+++ b/drivers/net/avf/base/avf_osdep.h
@@ -93,8 +93,8 @@ typedef uint64_t u64;
#define avf_memset(a, b, c, d) memset((a), (b), (c))
#define avf_memcpy(a, b, c, d) rte_memcpy((a), (b), (c))
-#define avf_usec_delay(x) rte_delay_us(x)
-#define avf_msec_delay(x) rte_delay_us(1000*(x))
+#define avf_usec_delay(x) rte_delay_us_sleep(x)
+#define avf_msec_delay(x) avf_usec_delay(1000 * (x))
#define AVF_PCI_REG(reg) rte_read32(reg)
#define AVF_PCI_REG_ADDR(a, reg) \
diff --git a/drivers/net/e1000/Makefile b/drivers/net/e1000/Makefile
index 9c87e883b..0ed627656 100644
--- a/drivers/net/e1000/Makefile
+++ b/drivers/net/e1000/Makefile
@@ -10,6 +10,7 @@ LIB = librte_pmd_e1000.a
CFLAGS += -O3
CFLAGS += $(WERROR_FLAGS)
+CFLAGS += -DALLOW_EXPERIMENTAL_API
LDLIBS += -lrte_eal -lrte_mbuf -lrte_mempool -lrte_ring
LDLIBS += -lrte_ethdev -lrte_net -lrte_kvargs
LDLIBS += -lrte_bus_pci
diff --git a/drivers/net/e1000/base/e1000_osdep.h b/drivers/net/e1000/base/e1000_osdep.h
index b8868049f..5958ea157 100644
--- a/drivers/net/e1000/base/e1000_osdep.h
+++ b/drivers/net/e1000/base/e1000_osdep.h
@@ -48,7 +48,7 @@
#include "../e1000_logs.h"
-#define DELAY(x) rte_delay_us(x)
+#define DELAY(x) rte_delay_us_sleep(x)
#define usec_delay(x) DELAY(x)
#define usec_delay_irq(x) DELAY(x)
#define msec_delay(x) DELAY(1000*(x))
diff --git a/drivers/net/e1000/meson.build b/drivers/net/e1000/meson.build
index cf456995c..d0901d377 100644
--- a/drivers/net/e1000/meson.build
+++ b/drivers/net/e1000/meson.build
@@ -1,6 +1,8 @@
# SPDX-License-Identifier: BSD-3-Clause
# Copyright(c) 2017 Intel Corporation
+allow_experimental_apis = true
+
subdir('base')
objs = [base_objs]
diff --git a/drivers/net/i40e/base/i40e_osdep.h b/drivers/net/i40e/base/i40e_osdep.h
index 8e5c593c9..a6072e153 100644
--- a/drivers/net/i40e/base/i40e_osdep.h
+++ b/drivers/net/i40e/base/i40e_osdep.h
@@ -233,9 +233,9 @@ struct i40e_spinlock {
#define i40e_memcpy(a, b, c, d) rte_memcpy((a), (b), (c))
#define DIV_ROUND_UP(n,d) (((n) + (d) - 1) / (d))
-#define DELAY(x) rte_delay_us(x)
-#define i40e_usec_delay(x) rte_delay_us(x)
-#define i40e_msec_delay(x) rte_delay_us(1000*(x))
+#define DELAY(x) rte_delay_us_sleep(x)
+#define i40e_usec_delay(x) DELAY(x)
+#define i40e_msec_delay(x) DELAY(1000 * (x))
#define udelay(x) DELAY(x)
#define msleep(x) DELAY(1000*(x))
#define usleep_range(min, max) msleep(DIV_ROUND_UP(min, 1000))
diff --git a/drivers/net/ifc/base/ifcvf_osdep.h b/drivers/net/ifc/base/ifcvf_osdep.h
index cf151ef52..6aef25ea4 100644
--- a/drivers/net/ifc/base/ifcvf_osdep.h
+++ b/drivers/net/ifc/base/ifcvf_osdep.h
@@ -17,7 +17,7 @@
#define DEBUGOUT(S, args...) RTE_LOG(DEBUG, PMD, S, ##args)
#define STATIC static
-#define msec_delay rte_delay_ms
+#define msec_delay(x) rte_delay_us_sleep(1000 * (x))
#define IFCVF_READ_REG8(reg) rte_read8(reg)
#define IFCVF_WRITE_REG8(val, reg) rte_write8((val), (reg))
diff --git a/drivers/net/ixgbe/base/ixgbe_osdep.h b/drivers/net/ixgbe/base/ixgbe_osdep.h
index bb5dfd2af..94ede9bc2 100644
--- a/drivers/net/ixgbe/base/ixgbe_osdep.h
+++ b/drivers/net/ixgbe/base/ixgbe_osdep.h
@@ -51,7 +51,7 @@
#define ASSERT(x) if(!(x)) rte_panic("IXGBE: x")
-#define DELAY(x) rte_delay_us(x)
+#define DELAY(x) rte_delay_us_sleep(x)
#define usec_delay(x) DELAY(x)
#define msec_delay(x) DELAY(1000*(x))
diff --git a/drivers/net/ixgbe/meson.build b/drivers/net/ixgbe/meson.build
index 02d5ef5e4..544a14148 100644
--- a/drivers/net/ixgbe/meson.build
+++ b/drivers/net/ixgbe/meson.build
@@ -5,10 +5,11 @@ version = 2
cflags += ['-DRTE_LIBRTE_IXGBE_BYPASS']
+allow_experimental_apis = true
+
subdir('base')
objs = [base_objs]
-allow_experimental_apis = true
sources = files(
'ixgbe_82599_bypass.c',
'ixgbe_bypass.c',
--
2.17.1
^ permalink raw reply [flat|nested] 24+ messages in thread
* Re: [dpdk-dev] [PATCH v1 1/2] eal: add nanosleep based delay function
2018-09-03 14:47 ` [dpdk-dev] [PATCH v1 1/2] eal: add nanosleep based delay function Ilya Maximets
@ 2018-09-05 13:10 ` Stephen Hemminger
2018-09-10 15:11 ` Ilya Maximets
0 siblings, 1 reply; 24+ messages in thread
From: Stephen Hemminger @ 2018-09-05 13:10 UTC (permalink / raw)
To: Ilya Maximets
Cc: dev, Jingjing Wu, Konstantin Ananyev, Wenzhuo Lu, Beilei Xing,
Qi Zhang, Xiao Wang, Bruce Richardson
On Mon, 3 Sep 2018 17:47:42 +0300
Ilya Maximets <i.maximets@samsung.com> wrote:
>
> +void __rte_experimental
> +rte_delay_us_sleep(unsigned int us)
> +{
> + struct timespec wait[2];
> + int ind = 0;
> +
> + wait[0].tv_sec = 0;
> + if (us >= US_PER_S) {
> + wait[0].tv_sec = us / US_PER_S;
> + us -= wait[0].tv_sec * US_PER_S;
> + }
> + wait[0].tv_nsec = 1000 * us;
> +
> + while (nanosleep(&wait[ind], &wait[1 - ind]) == EINTR)
> + ind = 1 - ind;
> +}
> +
This seems like a complex/tricky way to handle the case where
nanosleep is interrupted. It needs a comment.
^ permalink raw reply [flat|nested] 24+ messages in thread
* Re: [dpdk-dev] [PATCH v1 1/2] eal: add nanosleep based delay function
2018-09-05 13:10 ` Stephen Hemminger
@ 2018-09-10 15:11 ` Ilya Maximets
0 siblings, 0 replies; 24+ messages in thread
From: Ilya Maximets @ 2018-09-10 15:11 UTC (permalink / raw)
To: Stephen Hemminger
Cc: dev, Jingjing Wu, Konstantin Ananyev, Wenzhuo Lu, Beilei Xing,
Qi Zhang, Xiao Wang, Bruce Richardson
On 05.09.2018 16:10, Stephen Hemminger wrote:
> On Mon, 3 Sep 2018 17:47:42 +0300
> Ilya Maximets <i.maximets@samsung.com> wrote:
>
>>
>> +void __rte_experimental
>> +rte_delay_us_sleep(unsigned int us)
>> +{
>> + struct timespec wait[2];
>> + int ind = 0;
>> +
>> + wait[0].tv_sec = 0;
>> + if (us >= US_PER_S) {
>> + wait[0].tv_sec = us / US_PER_S;
>> + us -= wait[0].tv_sec * US_PER_S;
>> + }
>> + wait[0].tv_nsec = 1000 * us;
>> +
>> + while (nanosleep(&wait[ind], &wait[1 - ind]) == EINTR)
>> + ind = 1 - ind;
>> +}
>> +
>
> This seems like a complex/tricky way to handle the case where
> nanosleep is interrupted. It needs a comment.
OK. I can add some comment here.
Best regards, Ilya Maximets.
^ permalink raw reply [flat|nested] 24+ messages in thread
* [dpdk-dev] [PATCH v2 0/2] CPU non-blocking delay
[not found] ` <CGME20180914105928eucas1p2be05dc93e02df94e895de24d5564927c@eucas1p2.samsung.com>
@ 2018-09-14 11:01 ` Ilya Maximets
[not found] ` <CGME20180914105950eucas1p1391d6eccd8ccd5a03e7f742f1d12bb9d@eucas1p1.samsung.com>
` (3 more replies)
0 siblings, 4 replies; 24+ messages in thread
From: Ilya Maximets @ 2018-09-14 11:01 UTC (permalink / raw)
To: dev
Cc: Jingjing Wu, Konstantin Ananyev, Wenzhuo Lu, Beilei Xing,
Qi Zhang, Xiao Wang, Bruce Richardson, Stephen Hemminger,
Keith Wiles, Ilya Maximets
For meson build without deprecation warnings following
patch should be applied first:
http://patches.dpdk.org/patch/44129/
Version 2:
* Added comment for EINTR handling for nanosleep. [Stephen Hemminger]
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 | 24 +++++++++
.../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, 94 insertions(+), 23 deletions(-)
--
2.17.1
^ permalink raw reply [flat|nested] 24+ messages in thread
* [dpdk-dev] [PATCH v2 1/2] eal: add nanosleep based delay function
[not found] ` <CGME20180914105950eucas1p1391d6eccd8ccd5a03e7f742f1d12bb9d@eucas1p1.samsung.com>
@ 2018-09-14 11:01 ` Ilya Maximets
0 siblings, 0 replies; 24+ messages in thread
From: Ilya Maximets @ 2018-09-14 11:01 UTC (permalink / raw)
To: dev
Cc: Jingjing Wu, Konstantin Ananyev, Wenzhuo Lu, Beilei Xing,
Qi Zhang, Xiao Wang, Bruce Richardson, Stephen Hemminger,
Keith Wiles, Ilya Maximets
Add a new rte_delay_us_sleep() function that uses nanosleep().
This function can be used by applications to not implement
their own nanosleep() based callback and by internal DPDK
code if CPU non-blocking delay needed.
Signed-off-by: Ilya Maximets <i.maximets@samsung.com>
---
lib/librte_eal/common/eal_common_timer.c | 24 +++++++++
.../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 ++++++++++++++-----
6 files changed, 80 insertions(+), 14 deletions(-)
diff --git a/lib/librte_eal/common/eal_common_timer.c b/lib/librte_eal/common/eal_common_timer.c
index 2e2b770fb..c6344ca87 100644
--- a/lib/librte_eal/common/eal_common_timer.c
+++ b/lib/librte_eal/common/eal_common_timer.c
@@ -7,9 +7,11 @@
#include <unistd.h>
#include <inttypes.h>
#include <sys/types.h>
+#include <time.h>
#include <errno.h>
#include <rte_common.h>
+#include <rte_compat.h>
#include <rte_log.h>
#include <rte_cycles.h>
#include <rte_pause.h>
@@ -31,6 +33,28 @@ rte_delay_us_block(unsigned int us)
rte_pause();
}
+void __rte_experimental
+rte_delay_us_sleep(unsigned int us)
+{
+ struct timespec wait[2];
+ int ind = 0;
+
+ wait[0].tv_sec = 0;
+ if (us >= US_PER_S) {
+ wait[0].tv_sec = us / US_PER_S;
+ us -= wait[0].tv_sec * US_PER_S;
+ }
+ wait[0].tv_nsec = 1000 * us;
+
+ while (nanosleep(&wait[ind], &wait[1 - ind]) == EINTR) {
+ /*
+ * Sleep was interrupted. Flip the index, so the 'remainder'
+ * will become the 'request' for a next call.
+ */
+ ind = 1 - ind;
+ }
+}
+
uint64_t
rte_get_tsc_hz(void)
{
diff --git a/lib/librte_eal/common/include/generic/rte_cycles.h b/lib/librte_eal/common/include/generic/rte_cycles.h
index 0ff1af504..ac379e878 100644
--- a/lib/librte_eal/common/include/generic/rte_cycles.h
+++ b/lib/librte_eal/common/include/generic/rte_cycles.h
@@ -13,6 +13,7 @@
*/
#include <stdint.h>
+#include <rte_compat.h>
#include <rte_debug.h>
#include <rte_atomic.h>
@@ -157,6 +158,16 @@ rte_delay_ms(unsigned ms)
*/
void rte_delay_us_block(unsigned int us);
+/**
+ * Delay function that uses system sleep.
+ * Does not block the CPU core.
+ *
+ * @param us
+ * Number of microseconds to wait.
+ */
+void __rte_experimental
+rte_delay_us_sleep(unsigned int us);
+
/**
* Replace rte_delay_us with user defined function.
*
diff --git a/lib/librte_eal/rte_eal_version.map b/lib/librte_eal/rte_eal_version.map
index 344a43d32..d68777ce0 100644
--- a/lib/librte_eal/rte_eal_version.map
+++ b/lib/librte_eal/rte_eal_version.map
@@ -270,6 +270,7 @@ EXPERIMENTAL {
rte_class_register;
rte_class_unregister;
rte_ctrl_thread_create;
+ rte_delay_us_sleep;
rte_dev_event_callback_register;
rte_dev_event_callback_unregister;
rte_dev_event_monitor_start;
diff --git a/test/test/autotest_data.py b/test/test/autotest_data.py
index f68d9b111..874d0cb53 100644
--- a/test/test/autotest_data.py
+++ b/test/test/autotest_data.py
@@ -278,6 +278,12 @@
"Func": default_autotest,
"Report": None,
},
+ {
+ "Name": "Sleep delay",
+ "Command": "delay_us_sleep_autotest",
+ "Func": default_autotest,
+ "Report": None,
+ },
{
"Name": "Rawdev autotest",
"Command": "rawdev_autotest",
diff --git a/test/test/meson.build b/test/test/meson.build
index b1dd6eca2..0078aea30 100644
--- a/test/test/meson.build
+++ b/test/test/meson.build
@@ -143,6 +143,7 @@ test_names = [
'cryptodev_dpaa_sec_autotest',
'cycles_autotest',
'debug_autotest',
+ 'delay_us_sleep_autotest',
'devargs_autotest',
'distributor_autotest',
'distributor_perf_autotest',
diff --git a/test/test/test_cycles.c b/test/test/test_cycles.c
index 149f60b07..c78e6a5b1 100644
--- a/test/test/test_cycles.c
+++ b/test/test/test_cycles.c
@@ -23,6 +23,30 @@
* of cycles is correct with regard to the frequency of the timer.
*/
+static int
+check_wait_one_second(void)
+{
+ uint64_t cycles, prev_cycles;
+ uint64_t hz = rte_get_timer_hz();
+ uint64_t max_inc = (hz / 100); /* 10 ms max between 2 reads */
+
+ /* check that waiting 1 second is precise */
+ prev_cycles = rte_get_timer_cycles();
+ rte_delay_us(1000000);
+ cycles = rte_get_timer_cycles();
+
+ if ((uint64_t)(cycles - prev_cycles) > (hz + max_inc)) {
+ printf("delay_us is not accurate: too long\n");
+ return -1;
+ }
+ if ((uint64_t)(cycles - prev_cycles) < (hz - max_inc)) {
+ printf("delay_us is not accurate: too short\n");
+ return -1;
+ }
+
+ return 0;
+}
+
static int
test_cycles(void)
{
@@ -43,24 +67,23 @@ test_cycles(void)
prev_cycles = cycles;
}
- /* check that waiting 1 second is precise */
- prev_cycles = rte_get_timer_cycles();
- rte_delay_us(1000000);
- cycles = rte_get_timer_cycles();
+ return check_wait_one_second();
+}
- if ((uint64_t)(cycles - prev_cycles) > (hz + max_inc)) {
- printf("delay_us is not accurate: too long\n");
- return -1;
- }
- if ((uint64_t)(cycles - prev_cycles) < (hz - max_inc)) {
- printf("delay_us is not accurate: too short\n");
- return -1;
- }
+REGISTER_TEST_COMMAND(cycles_autotest, test_cycles);
- return 0;
+/*
+ * One second precision test with rte_delay_us_sleep.
+ */
+
+static int
+test_delay_us_sleep(void)
+{
+ rte_delay_us_callback_register(rte_delay_us_sleep);
+ return check_wait_one_second();
}
-REGISTER_TEST_COMMAND(cycles_autotest, test_cycles);
+REGISTER_TEST_COMMAND(delay_us_sleep_autotest, test_delay_us_sleep);
/*
* rte_delay_us_callback test
--
2.17.1
^ permalink raw reply [flat|nested] 24+ messages in thread
* [dpdk-dev] [PATCH v2 2/2] drivers/net: use sleep delay by default for intel NICs
[not found] ` <CGME20180914105954eucas1p1662492cee6b5387cd4655ec940619ea8@eucas1p1.samsung.com>
@ 2018-09-14 11:01 ` Ilya Maximets
0 siblings, 0 replies; 24+ messages in thread
From: Ilya Maximets @ 2018-09-14 11:01 UTC (permalink / raw)
To: dev
Cc: Jingjing Wu, Konstantin Ananyev, Wenzhuo Lu, Beilei Xing,
Qi Zhang, Xiao Wang, Bruce Richardson, Stephen Hemminger,
Keith Wiles, Ilya Maximets
NICs uses different delays up to a second during their
configuration. It makes no sense to busy-wait so long wasting
CPU cycles and preventing any other threads to execute on the
same CPU core. These busy polling are the rudiments that came
from the kernel drivers where you can not sleep in interrupt
context, but as we're in userspace, we're able and should
sleep to allow other threads to run.
Delays never called on rx/tx path, so this should not affect
performance.
Signed-off-by: Ilya Maximets <i.maximets@samsung.com>
---
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 ++-
9 files changed, 14 insertions(+), 9 deletions(-)
diff --git a/drivers/net/avf/Makefile b/drivers/net/avf/Makefile
index 3f815bbc4..8ee707529 100644
--- a/drivers/net/avf/Makefile
+++ b/drivers/net/avf/Makefile
@@ -9,6 +9,7 @@ include $(RTE_SDK)/mk/rte.vars.mk
LIB = librte_pmd_avf.a
CFLAGS += -O3
+CFLAGS += -DALLOW_EXPERIMENTAL_API
LDLIBS += -lrte_eal -lrte_mbuf -lrte_mempool -lrte_ring
LDLIBS += -lrte_ethdev -lrte_net -lrte_kvargs -lrte_hash
LDLIBS += -lrte_bus_pci
diff --git a/drivers/net/avf/base/avf_osdep.h b/drivers/net/avf/base/avf_osdep.h
index 9ef45968e..442a5acd0 100644
--- a/drivers/net/avf/base/avf_osdep.h
+++ b/drivers/net/avf/base/avf_osdep.h
@@ -93,8 +93,8 @@ typedef uint64_t u64;
#define avf_memset(a, b, c, d) memset((a), (b), (c))
#define avf_memcpy(a, b, c, d) rte_memcpy((a), (b), (c))
-#define avf_usec_delay(x) rte_delay_us(x)
-#define avf_msec_delay(x) rte_delay_us(1000*(x))
+#define avf_usec_delay(x) rte_delay_us_sleep(x)
+#define avf_msec_delay(x) avf_usec_delay(1000 * (x))
#define AVF_PCI_REG(reg) rte_read32(reg)
#define AVF_PCI_REG_ADDR(a, reg) \
diff --git a/drivers/net/e1000/Makefile b/drivers/net/e1000/Makefile
index 9c87e883b..0ed627656 100644
--- a/drivers/net/e1000/Makefile
+++ b/drivers/net/e1000/Makefile
@@ -10,6 +10,7 @@ LIB = librte_pmd_e1000.a
CFLAGS += -O3
CFLAGS += $(WERROR_FLAGS)
+CFLAGS += -DALLOW_EXPERIMENTAL_API
LDLIBS += -lrte_eal -lrte_mbuf -lrte_mempool -lrte_ring
LDLIBS += -lrte_ethdev -lrte_net -lrte_kvargs
LDLIBS += -lrte_bus_pci
diff --git a/drivers/net/e1000/base/e1000_osdep.h b/drivers/net/e1000/base/e1000_osdep.h
index b8868049f..5958ea157 100644
--- a/drivers/net/e1000/base/e1000_osdep.h
+++ b/drivers/net/e1000/base/e1000_osdep.h
@@ -48,7 +48,7 @@
#include "../e1000_logs.h"
-#define DELAY(x) rte_delay_us(x)
+#define DELAY(x) rte_delay_us_sleep(x)
#define usec_delay(x) DELAY(x)
#define usec_delay_irq(x) DELAY(x)
#define msec_delay(x) DELAY(1000*(x))
diff --git a/drivers/net/e1000/meson.build b/drivers/net/e1000/meson.build
index cf456995c..d0901d377 100644
--- a/drivers/net/e1000/meson.build
+++ b/drivers/net/e1000/meson.build
@@ -1,6 +1,8 @@
# SPDX-License-Identifier: BSD-3-Clause
# Copyright(c) 2017 Intel Corporation
+allow_experimental_apis = true
+
subdir('base')
objs = [base_objs]
diff --git a/drivers/net/i40e/base/i40e_osdep.h b/drivers/net/i40e/base/i40e_osdep.h
index 8e5c593c9..a6072e153 100644
--- a/drivers/net/i40e/base/i40e_osdep.h
+++ b/drivers/net/i40e/base/i40e_osdep.h
@@ -233,9 +233,9 @@ struct i40e_spinlock {
#define i40e_memcpy(a, b, c, d) rte_memcpy((a), (b), (c))
#define DIV_ROUND_UP(n,d) (((n) + (d) - 1) / (d))
-#define DELAY(x) rte_delay_us(x)
-#define i40e_usec_delay(x) rte_delay_us(x)
-#define i40e_msec_delay(x) rte_delay_us(1000*(x))
+#define DELAY(x) rte_delay_us_sleep(x)
+#define i40e_usec_delay(x) DELAY(x)
+#define i40e_msec_delay(x) DELAY(1000 * (x))
#define udelay(x) DELAY(x)
#define msleep(x) DELAY(1000*(x))
#define usleep_range(min, max) msleep(DIV_ROUND_UP(min, 1000))
diff --git a/drivers/net/ifc/base/ifcvf_osdep.h b/drivers/net/ifc/base/ifcvf_osdep.h
index cf151ef52..6aef25ea4 100644
--- a/drivers/net/ifc/base/ifcvf_osdep.h
+++ b/drivers/net/ifc/base/ifcvf_osdep.h
@@ -17,7 +17,7 @@
#define DEBUGOUT(S, args...) RTE_LOG(DEBUG, PMD, S, ##args)
#define STATIC static
-#define msec_delay rte_delay_ms
+#define msec_delay(x) rte_delay_us_sleep(1000 * (x))
#define IFCVF_READ_REG8(reg) rte_read8(reg)
#define IFCVF_WRITE_REG8(val, reg) rte_write8((val), (reg))
diff --git a/drivers/net/ixgbe/base/ixgbe_osdep.h b/drivers/net/ixgbe/base/ixgbe_osdep.h
index bb5dfd2af..94ede9bc2 100644
--- a/drivers/net/ixgbe/base/ixgbe_osdep.h
+++ b/drivers/net/ixgbe/base/ixgbe_osdep.h
@@ -51,7 +51,7 @@
#define ASSERT(x) if(!(x)) rte_panic("IXGBE: x")
-#define DELAY(x) rte_delay_us(x)
+#define DELAY(x) rte_delay_us_sleep(x)
#define usec_delay(x) DELAY(x)
#define msec_delay(x) DELAY(1000*(x))
diff --git a/drivers/net/ixgbe/meson.build b/drivers/net/ixgbe/meson.build
index 02d5ef5e4..544a14148 100644
--- a/drivers/net/ixgbe/meson.build
+++ b/drivers/net/ixgbe/meson.build
@@ -5,10 +5,11 @@ version = 2
cflags += ['-DRTE_LIBRTE_IXGBE_BYPASS']
+allow_experimental_apis = true
+
subdir('base')
objs = [base_objs]
-allow_experimental_apis = true
sources = files(
'ixgbe_82599_bypass.c',
'ixgbe_bypass.c',
--
2.17.1
^ permalink raw reply [flat|nested] 24+ messages in thread
* Re: [dpdk-dev] [PATCH v2 0/2] CPU non-blocking delay
2018-09-14 11:01 ` [dpdk-dev] [PATCH v2 0/2] CPU non-blocking delay Ilya Maximets
[not found] ` <CGME20180914105950eucas1p1391d6eccd8ccd5a03e7f742f1d12bb9d@eucas1p1.samsung.com>
[not found] ` <CGME20180914105954eucas1p1662492cee6b5387cd4655ec940619ea8@eucas1p1.samsung.com>
@ 2018-09-28 11:38 ` Ilya Maximets
[not found] ` <CGME20181004143338eucas1p2690a63adeb26785846ad0ea71b695215@eucas1p2.samsung.com>
3 siblings, 0 replies; 24+ messages in thread
From: Ilya Maximets @ 2018-09-28 11:38 UTC (permalink / raw)
To: dev
Cc: Jingjing Wu, Konstantin Ananyev, Wenzhuo Lu, Beilei Xing,
Qi Zhang, Xiao Wang, Bruce Richardson, Stephen Hemminger,
Keith Wiles, Ferruh Yigit
Any thoughts on this?
Best regards, Ilya Maximets.
On 14.09.2018 14:01, Ilya Maximets wrote:
> For meson build without deprecation warnings following
> patch should be applied first:
> http://patches.dpdk.org/patch/44129/
This patch already accepted. I could rebase on latest
dpdk-next-net or dpdk-next-net-intel if required (it's trivial).
>
> Version 2:
> * Added comment for EINTR handling for nanosleep. [Stephen Hemminger]
>
> 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 | 24 +++++++++
> .../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, 94 insertions(+), 23 deletions(-)
>
^ permalink raw reply [flat|nested] 24+ messages in thread
* [dpdk-dev] [PATCH v3 0/2] CPU non-blocking delay
[not found] ` <CGME20181004143338eucas1p2690a63adeb26785846ad0ea71b695215@eucas1p2.samsung.com>
@ 2018-10-04 14:35 ` Ilya Maximets
[not found] ` <CGME20181004143343eucas1p2e4d18dbed12ac9cebc6ea1af599f751a@eucas1p2.samsung.com>
` (2 more replies)
0 siblings, 3 replies; 24+ messages in thread
From: Ilya Maximets @ 2018-10-04 14:35 UTC (permalink / raw)
To: dev
Cc: Jingjing Wu, Konstantin Ananyev, Wenzhuo Lu, Beilei Xing,
Qi Zhang, Xiao Wang, Bruce Richardson, Stephen Hemminger,
Keith Wiles, Ilya Maximets
For meson build without deprecation warnings following
patch should be applied first:
http://patches.dpdk.org/patch/46064/
Version 3:
* Minor rebase on top of current master.
Version 2:
* Added comment for EINTR handling for nanosleep. [Stephen Hemminger]
Ilya Maximets (2):
eal: add nanosleep based delay function
drivers/net: use sleep delay by default for intel NICs
drivers/net/avf/Makefile | 2 +-
drivers/net/avf/base/avf_osdep.h | 4 +-
drivers/net/avf/meson.build | 2 +
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 | 24 +++++++++
.../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 ++++++++++++++-----
16 files changed, 96 insertions(+), 24 deletions(-)
--
2.17.1
^ permalink raw reply [flat|nested] 24+ messages in thread
* [dpdk-dev] [PATCH v3 1/2] eal: add nanosleep based delay function
[not found] ` <CGME20181004143343eucas1p2e4d18dbed12ac9cebc6ea1af599f751a@eucas1p2.samsung.com>
@ 2018-10-04 14:35 ` Ilya Maximets
0 siblings, 0 replies; 24+ messages in thread
From: Ilya Maximets @ 2018-10-04 14:35 UTC (permalink / raw)
To: dev
Cc: Jingjing Wu, Konstantin Ananyev, Wenzhuo Lu, Beilei Xing,
Qi Zhang, Xiao Wang, Bruce Richardson, Stephen Hemminger,
Keith Wiles, Ilya Maximets
Add a new rte_delay_us_sleep() function that uses nanosleep().
This function can be used by applications to not implement
their own nanosleep() based callback and by internal DPDK
code if CPU non-blocking delay needed.
Signed-off-by: Ilya Maximets <i.maximets@samsung.com>
---
lib/librte_eal/common/eal_common_timer.c | 24 +++++++++
.../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 ++++++++++++++-----
6 files changed, 80 insertions(+), 14 deletions(-)
diff --git a/lib/librte_eal/common/eal_common_timer.c b/lib/librte_eal/common/eal_common_timer.c
index 2e2b770fb..c6344ca87 100644
--- a/lib/librte_eal/common/eal_common_timer.c
+++ b/lib/librte_eal/common/eal_common_timer.c
@@ -7,9 +7,11 @@
#include <unistd.h>
#include <inttypes.h>
#include <sys/types.h>
+#include <time.h>
#include <errno.h>
#include <rte_common.h>
+#include <rte_compat.h>
#include <rte_log.h>
#include <rte_cycles.h>
#include <rte_pause.h>
@@ -31,6 +33,28 @@ rte_delay_us_block(unsigned int us)
rte_pause();
}
+void __rte_experimental
+rte_delay_us_sleep(unsigned int us)
+{
+ struct timespec wait[2];
+ int ind = 0;
+
+ wait[0].tv_sec = 0;
+ if (us >= US_PER_S) {
+ wait[0].tv_sec = us / US_PER_S;
+ us -= wait[0].tv_sec * US_PER_S;
+ }
+ wait[0].tv_nsec = 1000 * us;
+
+ while (nanosleep(&wait[ind], &wait[1 - ind]) == EINTR) {
+ /*
+ * Sleep was interrupted. Flip the index, so the 'remainder'
+ * will become the 'request' for a next call.
+ */
+ ind = 1 - ind;
+ }
+}
+
uint64_t
rte_get_tsc_hz(void)
{
diff --git a/lib/librte_eal/common/include/generic/rte_cycles.h b/lib/librte_eal/common/include/generic/rte_cycles.h
index 0ff1af504..ac379e878 100644
--- a/lib/librte_eal/common/include/generic/rte_cycles.h
+++ b/lib/librte_eal/common/include/generic/rte_cycles.h
@@ -13,6 +13,7 @@
*/
#include <stdint.h>
+#include <rte_compat.h>
#include <rte_debug.h>
#include <rte_atomic.h>
@@ -157,6 +158,16 @@ rte_delay_ms(unsigned ms)
*/
void rte_delay_us_block(unsigned int us);
+/**
+ * Delay function that uses system sleep.
+ * Does not block the CPU core.
+ *
+ * @param us
+ * Number of microseconds to wait.
+ */
+void __rte_experimental
+rte_delay_us_sleep(unsigned int us);
+
/**
* Replace rte_delay_us with user defined function.
*
diff --git a/lib/librte_eal/rte_eal_version.map b/lib/librte_eal/rte_eal_version.map
index 73282bbb0..56a1a0520 100644
--- a/lib/librte_eal/rte_eal_version.map
+++ b/lib/librte_eal/rte_eal_version.map
@@ -277,6 +277,7 @@ EXPERIMENTAL {
rte_class_register;
rte_class_unregister;
rte_ctrl_thread_create;
+ rte_delay_us_sleep;
rte_dev_event_callback_register;
rte_dev_event_callback_unregister;
rte_dev_event_monitor_start;
diff --git a/test/test/autotest_data.py b/test/test/autotest_data.py
index f68d9b111..874d0cb53 100644
--- a/test/test/autotest_data.py
+++ b/test/test/autotest_data.py
@@ -278,6 +278,12 @@
"Func": default_autotest,
"Report": None,
},
+ {
+ "Name": "Sleep delay",
+ "Command": "delay_us_sleep_autotest",
+ "Func": default_autotest,
+ "Report": None,
+ },
{
"Name": "Rawdev autotest",
"Command": "rawdev_autotest",
diff --git a/test/test/meson.build b/test/test/meson.build
index bacb5b144..9eb15d21a 100644
--- a/test/test/meson.build
+++ b/test/test/meson.build
@@ -147,6 +147,7 @@ test_names = [
'cryptodev_dpaa_sec_autotest',
'cycles_autotest',
'debug_autotest',
+ 'delay_us_sleep_autotest',
'devargs_autotest',
'distributor_autotest',
'distributor_perf_autotest',
diff --git a/test/test/test_cycles.c b/test/test/test_cycles.c
index 149f60b07..c78e6a5b1 100644
--- a/test/test/test_cycles.c
+++ b/test/test/test_cycles.c
@@ -23,6 +23,30 @@
* of cycles is correct with regard to the frequency of the timer.
*/
+static int
+check_wait_one_second(void)
+{
+ uint64_t cycles, prev_cycles;
+ uint64_t hz = rte_get_timer_hz();
+ uint64_t max_inc = (hz / 100); /* 10 ms max between 2 reads */
+
+ /* check that waiting 1 second is precise */
+ prev_cycles = rte_get_timer_cycles();
+ rte_delay_us(1000000);
+ cycles = rte_get_timer_cycles();
+
+ if ((uint64_t)(cycles - prev_cycles) > (hz + max_inc)) {
+ printf("delay_us is not accurate: too long\n");
+ return -1;
+ }
+ if ((uint64_t)(cycles - prev_cycles) < (hz - max_inc)) {
+ printf("delay_us is not accurate: too short\n");
+ return -1;
+ }
+
+ return 0;
+}
+
static int
test_cycles(void)
{
@@ -43,24 +67,23 @@ test_cycles(void)
prev_cycles = cycles;
}
- /* check that waiting 1 second is precise */
- prev_cycles = rte_get_timer_cycles();
- rte_delay_us(1000000);
- cycles = rte_get_timer_cycles();
+ return check_wait_one_second();
+}
- if ((uint64_t)(cycles - prev_cycles) > (hz + max_inc)) {
- printf("delay_us is not accurate: too long\n");
- return -1;
- }
- if ((uint64_t)(cycles - prev_cycles) < (hz - max_inc)) {
- printf("delay_us is not accurate: too short\n");
- return -1;
- }
+REGISTER_TEST_COMMAND(cycles_autotest, test_cycles);
- return 0;
+/*
+ * One second precision test with rte_delay_us_sleep.
+ */
+
+static int
+test_delay_us_sleep(void)
+{
+ rte_delay_us_callback_register(rte_delay_us_sleep);
+ return check_wait_one_second();
}
-REGISTER_TEST_COMMAND(cycles_autotest, test_cycles);
+REGISTER_TEST_COMMAND(delay_us_sleep_autotest, test_delay_us_sleep);
/*
* rte_delay_us_callback test
--
2.17.1
^ permalink raw reply [flat|nested] 24+ messages in thread
* [dpdk-dev] [PATCH v3 2/2] drivers/net: use sleep delay by default for intel NICs
[not found] ` <CGME20181004143345eucas1p2f9dfea7ea41111c2ce9cab98434339d0@eucas1p2.samsung.com>
@ 2018-10-04 14:35 ` Ilya Maximets
0 siblings, 0 replies; 24+ messages in thread
From: Ilya Maximets @ 2018-10-04 14:35 UTC (permalink / raw)
To: dev
Cc: Jingjing Wu, Konstantin Ananyev, Wenzhuo Lu, Beilei Xing,
Qi Zhang, Xiao Wang, Bruce Richardson, Stephen Hemminger,
Keith Wiles, Ilya Maximets
NICs uses different delays up to a second during their
configuration. It makes no sense to busy-wait so long wasting
CPU cycles and preventing any other threads to execute on the
same CPU core. These busy polling are the rudiments that came
from the kernel drivers where you can not sleep in interrupt
context, but as we're in userspace, we're able and should
sleep to allow other threads to run.
Delays never called on rx/tx path, so this should not affect
performance.
Signed-off-by: Ilya Maximets <i.maximets@samsung.com>
---
drivers/net/avf/Makefile | 2 +-
drivers/net/avf/base/avf_osdep.h | 4 ++--
drivers/net/avf/meson.build | 2 ++
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 ++-
10 files changed, 16 insertions(+), 10 deletions(-)
diff --git a/drivers/net/avf/Makefile b/drivers/net/avf/Makefile
index 0a142c104..aec6e4cba 100644
--- a/drivers/net/avf/Makefile
+++ b/drivers/net/avf/Makefile
@@ -8,7 +8,7 @@ include $(RTE_SDK)/mk/rte.vars.mk
#
LIB = librte_pmd_avf.a
-CFLAGS += -O3 $(WERROR_FLAGS) -Wno-strict-aliasing
+CFLAGS += -O3 $(WERROR_FLAGS) -Wno-strict-aliasing -DALLOW_EXPERIMENTAL_API
LDLIBS += -lrte_eal -lrte_mbuf -lrte_mempool -lrte_ring
LDLIBS += -lrte_ethdev -lrte_net -lrte_kvargs -lrte_hash
LDLIBS += -lrte_bus_pci
diff --git a/drivers/net/avf/base/avf_osdep.h b/drivers/net/avf/base/avf_osdep.h
index 9ef45968e..442a5acd0 100644
--- a/drivers/net/avf/base/avf_osdep.h
+++ b/drivers/net/avf/base/avf_osdep.h
@@ -93,8 +93,8 @@ typedef uint64_t u64;
#define avf_memset(a, b, c, d) memset((a), (b), (c))
#define avf_memcpy(a, b, c, d) rte_memcpy((a), (b), (c))
-#define avf_usec_delay(x) rte_delay_us(x)
-#define avf_msec_delay(x) rte_delay_us(1000*(x))
+#define avf_usec_delay(x) rte_delay_us_sleep(x)
+#define avf_msec_delay(x) avf_usec_delay(1000 * (x))
#define AVF_PCI_REG(reg) rte_read32(reg)
#define AVF_PCI_REG_ADDR(a, reg) \
diff --git a/drivers/net/avf/meson.build b/drivers/net/avf/meson.build
index 9a05ebbf4..2dfda9d4e 100644
--- a/drivers/net/avf/meson.build
+++ b/drivers/net/avf/meson.build
@@ -3,6 +3,8 @@
cflags += ['-Wno-strict-aliasing']
+allow_experimental_apis = true
+
subdir('base')
objs = [base_objs]
diff --git a/drivers/net/e1000/Makefile b/drivers/net/e1000/Makefile
index 9c87e883b..0ed627656 100644
--- a/drivers/net/e1000/Makefile
+++ b/drivers/net/e1000/Makefile
@@ -10,6 +10,7 @@ LIB = librte_pmd_e1000.a
CFLAGS += -O3
CFLAGS += $(WERROR_FLAGS)
+CFLAGS += -DALLOW_EXPERIMENTAL_API
LDLIBS += -lrte_eal -lrte_mbuf -lrte_mempool -lrte_ring
LDLIBS += -lrte_ethdev -lrte_net -lrte_kvargs
LDLIBS += -lrte_bus_pci
diff --git a/drivers/net/e1000/base/e1000_osdep.h b/drivers/net/e1000/base/e1000_osdep.h
index b8868049f..5958ea157 100644
--- a/drivers/net/e1000/base/e1000_osdep.h
+++ b/drivers/net/e1000/base/e1000_osdep.h
@@ -48,7 +48,7 @@
#include "../e1000_logs.h"
-#define DELAY(x) rte_delay_us(x)
+#define DELAY(x) rte_delay_us_sleep(x)
#define usec_delay(x) DELAY(x)
#define usec_delay_irq(x) DELAY(x)
#define msec_delay(x) DELAY(1000*(x))
diff --git a/drivers/net/e1000/meson.build b/drivers/net/e1000/meson.build
index cf456995c..d0901d377 100644
--- a/drivers/net/e1000/meson.build
+++ b/drivers/net/e1000/meson.build
@@ -1,6 +1,8 @@
# SPDX-License-Identifier: BSD-3-Clause
# Copyright(c) 2017 Intel Corporation
+allow_experimental_apis = true
+
subdir('base')
objs = [base_objs]
diff --git a/drivers/net/i40e/base/i40e_osdep.h b/drivers/net/i40e/base/i40e_osdep.h
index 8e5c593c9..a6072e153 100644
--- a/drivers/net/i40e/base/i40e_osdep.h
+++ b/drivers/net/i40e/base/i40e_osdep.h
@@ -233,9 +233,9 @@ struct i40e_spinlock {
#define i40e_memcpy(a, b, c, d) rte_memcpy((a), (b), (c))
#define DIV_ROUND_UP(n,d) (((n) + (d) - 1) / (d))
-#define DELAY(x) rte_delay_us(x)
-#define i40e_usec_delay(x) rte_delay_us(x)
-#define i40e_msec_delay(x) rte_delay_us(1000*(x))
+#define DELAY(x) rte_delay_us_sleep(x)
+#define i40e_usec_delay(x) DELAY(x)
+#define i40e_msec_delay(x) DELAY(1000 * (x))
#define udelay(x) DELAY(x)
#define msleep(x) DELAY(1000*(x))
#define usleep_range(min, max) msleep(DIV_ROUND_UP(min, 1000))
diff --git a/drivers/net/ifc/base/ifcvf_osdep.h b/drivers/net/ifc/base/ifcvf_osdep.h
index cf151ef52..6aef25ea4 100644
--- a/drivers/net/ifc/base/ifcvf_osdep.h
+++ b/drivers/net/ifc/base/ifcvf_osdep.h
@@ -17,7 +17,7 @@
#define DEBUGOUT(S, args...) RTE_LOG(DEBUG, PMD, S, ##args)
#define STATIC static
-#define msec_delay rte_delay_ms
+#define msec_delay(x) rte_delay_us_sleep(1000 * (x))
#define IFCVF_READ_REG8(reg) rte_read8(reg)
#define IFCVF_WRITE_REG8(val, reg) rte_write8((val), (reg))
diff --git a/drivers/net/ixgbe/base/ixgbe_osdep.h b/drivers/net/ixgbe/base/ixgbe_osdep.h
index e648ea462..ea8dc1cbe 100644
--- a/drivers/net/ixgbe/base/ixgbe_osdep.h
+++ b/drivers/net/ixgbe/base/ixgbe_osdep.h
@@ -21,7 +21,7 @@
#define ASSERT(x) if(!(x)) rte_panic("IXGBE: x")
-#define DELAY(x) rte_delay_us(x)
+#define DELAY(x) rte_delay_us_sleep(x)
#define usec_delay(x) DELAY(x)
#define msec_delay(x) DELAY(1000*(x))
diff --git a/drivers/net/ixgbe/meson.build b/drivers/net/ixgbe/meson.build
index 02d5ef5e4..544a14148 100644
--- a/drivers/net/ixgbe/meson.build
+++ b/drivers/net/ixgbe/meson.build
@@ -5,10 +5,11 @@ version = 2
cflags += ['-DRTE_LIBRTE_IXGBE_BYPASS']
+allow_experimental_apis = true
+
subdir('base')
objs = [base_objs]
-allow_experimental_apis = true
sources = files(
'ixgbe_82599_bypass.c',
'ixgbe_bypass.c',
--
2.17.1
^ permalink raw reply [flat|nested] 24+ messages in thread
* Re: [dpdk-dev] [PATCH v1 0/2] CPU non-blocking delay
2018-09-03 14:44 ` [dpdk-dev] [PATCH v1 " Ilya Maximets
` (2 preceding siblings ...)
[not found] ` <CGME20180914105928eucas1p2be05dc93e02df94e895de24d5564927c@eucas1p2.samsung.com>
@ 2018-10-05 14:09 ` Wiles, Keith
2018-10-05 14:44 ` Ilya Maximets
3 siblings, 1 reply; 24+ messages in thread
From: Wiles, Keith @ 2018-10-05 14:09 UTC (permalink / raw)
To: Ilya Maximets
Cc: dev, Wu, Jingjing, Ananyev, Konstantin, Lu, Wenzhuo, Xing,
Beilei, Zhang, Qi Z, Wang, Xiao W, Richardson, Bruce
> On Sep 3, 2018, at 9:44 AM, Ilya Maximets <i.maximets@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.
>
> 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
^ permalink raw reply [flat|nested] 24+ messages in thread
* Re: [dpdk-dev] [PATCH v1 0/2] CPU non-blocking delay
2018-10-05 14:09 ` [dpdk-dev] [PATCH v1 " Wiles, Keith
@ 2018-10-05 14:44 ` Ilya Maximets
2018-10-05 15:04 ` Wiles, Keith
0 siblings, 1 reply; 24+ messages in thread
From: Ilya Maximets @ 2018-10-05 14:44 UTC (permalink / raw)
To: Wiles, Keith
Cc: dev, Wu, Jingjing, Ananyev, Konstantin, Lu, Wenzhuo, Xing,
Beilei, Zhang, Qi Z, Wang, Xiao W, Richardson, Bruce
On 05.10.2018 17:09, Wiles, Keith wrote:
>
>
>> On Sep 3, 2018, at 9:44 AM, Ilya Maximets <i.maximets@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?
>>
>> 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
>
>
>
^ permalink raw reply [flat|nested] 24+ messages in thread
* Re: [dpdk-dev] [PATCH v1 0/2] CPU non-blocking delay
2018-10-05 14:44 ` Ilya Maximets
@ 2018-10-05 15:04 ` Wiles, Keith
0 siblings, 0 replies; 24+ messages in thread
From: Wiles, Keith @ 2018-10-05 15:04 UTC (permalink / raw)
To: Ilya Maximets
Cc: dev, Wu, Jingjing, Ananyev, Konstantin, Lu, Wenzhuo, Xing,
Beilei, Zhang, Qi Z, Wang, Xiao W, Richardson, Bruce
> On Oct 5, 2018, at 9:44 AM, Ilya Maximets <i.maximets@samsung.com> wrote:
>
> On 05.10.2018 17:09, Wiles, Keith wrote:
>>
>>
>>> On Sep 3, 2018, at 9:44 AM, Ilya Maximets <i.maximets@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
^ permalink raw reply [flat|nested] 24+ messages in thread
* [dpdk-dev] [PATCH v4 0/2] CPU non-blocking delay
[not found] ` <CGME20181010140956eucas1p2720bbf053c9dd0ebbafbc99bb1dd6e1d@eucas1p2.samsung.com>
@ 2018-10-10 14:12 ` Ilya Maximets
[not found] ` <CGME20181010141003eucas1p23e7bdfaad8cd676549f1cae42b6a8e40@eucas1p2.samsung.com>
` (2 more replies)
0 siblings, 3 replies; 24+ messages in thread
From: Ilya Maximets @ 2018-10-10 14:12 UTC (permalink / raw)
To: dev
Cc: Jingjing Wu, Konstantin Ananyev, Wenzhuo Lu, Beilei Xing,
Qi Zhang, Xiao Wang, Bruce Richardson, Stephen Hemminger,
Keith Wiles, Wei Zhao1, Ilya Maximets
For meson build without deprecation warnings following
patch should be applied first:
http://patches.dpdk.org/patch/46064/
Version 4:
* Fixed return value checking for nanosleep().
It doesn't return EINTR, it sets the errno.
Version 3:
* Minor rebase on top of current master.
Version 2:
* Added comment for EINTR handling for nanosleep. [Stephen Hemminger]
Ilya Maximets (2):
eal: add nanosleep based delay function
drivers/net: use sleep delay by default for intel NICs
drivers/net/avf/Makefile | 2 +-
drivers/net/avf/base/avf_osdep.h | 4 +-
drivers/net/avf/meson.build | 2 +
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 | 24 +++++++++
.../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 ++++++++++++++-----
16 files changed, 96 insertions(+), 24 deletions(-)
--
2.17.1
^ permalink raw reply [flat|nested] 24+ messages in thread
* [dpdk-dev] [PATCH v4 1/2] eal: add nanosleep based delay function
[not found] ` <CGME20181010141003eucas1p23e7bdfaad8cd676549f1cae42b6a8e40@eucas1p2.samsung.com>
@ 2018-10-10 14:12 ` Ilya Maximets
0 siblings, 0 replies; 24+ messages in thread
From: Ilya Maximets @ 2018-10-10 14:12 UTC (permalink / raw)
To: dev
Cc: Jingjing Wu, Konstantin Ananyev, Wenzhuo Lu, Beilei Xing,
Qi Zhang, Xiao Wang, Bruce Richardson, Stephen Hemminger,
Keith Wiles, Wei Zhao1, Ilya Maximets
Add a new rte_delay_us_sleep() function that uses nanosleep().
This function can be used by applications to not implement
their own nanosleep() based callback and by internal DPDK
code if CPU non-blocking delay needed.
Signed-off-by: Ilya Maximets <i.maximets@samsung.com>
---
lib/librte_eal/common/eal_common_timer.c | 24 +++++++++
.../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 ++++++++++++++-----
6 files changed, 80 insertions(+), 14 deletions(-)
diff --git a/lib/librte_eal/common/eal_common_timer.c b/lib/librte_eal/common/eal_common_timer.c
index 2e2b770fb..dcf26bfea 100644
--- a/lib/librte_eal/common/eal_common_timer.c
+++ b/lib/librte_eal/common/eal_common_timer.c
@@ -7,9 +7,11 @@
#include <unistd.h>
#include <inttypes.h>
#include <sys/types.h>
+#include <time.h>
#include <errno.h>
#include <rte_common.h>
+#include <rte_compat.h>
#include <rte_log.h>
#include <rte_cycles.h>
#include <rte_pause.h>
@@ -31,6 +33,28 @@ rte_delay_us_block(unsigned int us)
rte_pause();
}
+void __rte_experimental
+rte_delay_us_sleep(unsigned int us)
+{
+ struct timespec wait[2];
+ int ind = 0;
+
+ wait[0].tv_sec = 0;
+ if (us >= US_PER_S) {
+ wait[0].tv_sec = us / US_PER_S;
+ us -= wait[0].tv_sec * US_PER_S;
+ }
+ wait[0].tv_nsec = 1000 * us;
+
+ while (nanosleep(&wait[ind], &wait[1 - ind]) && errno == EINTR) {
+ /*
+ * Sleep was interrupted. Flip the index, so the 'remainder'
+ * will become the 'request' for a next call.
+ */
+ ind = 1 - ind;
+ }
+}
+
uint64_t
rte_get_tsc_hz(void)
{
diff --git a/lib/librte_eal/common/include/generic/rte_cycles.h b/lib/librte_eal/common/include/generic/rte_cycles.h
index 0ff1af504..ac379e878 100644
--- a/lib/librte_eal/common/include/generic/rte_cycles.h
+++ b/lib/librte_eal/common/include/generic/rte_cycles.h
@@ -13,6 +13,7 @@
*/
#include <stdint.h>
+#include <rte_compat.h>
#include <rte_debug.h>
#include <rte_atomic.h>
@@ -157,6 +158,16 @@ rte_delay_ms(unsigned ms)
*/
void rte_delay_us_block(unsigned int us);
+/**
+ * Delay function that uses system sleep.
+ * Does not block the CPU core.
+ *
+ * @param us
+ * Number of microseconds to wait.
+ */
+void __rte_experimental
+rte_delay_us_sleep(unsigned int us);
+
/**
* Replace rte_delay_us with user defined function.
*
diff --git a/lib/librte_eal/rte_eal_version.map b/lib/librte_eal/rte_eal_version.map
index 73282bbb0..56a1a0520 100644
--- a/lib/librte_eal/rte_eal_version.map
+++ b/lib/librte_eal/rte_eal_version.map
@@ -277,6 +277,7 @@ EXPERIMENTAL {
rte_class_register;
rte_class_unregister;
rte_ctrl_thread_create;
+ rte_delay_us_sleep;
rte_dev_event_callback_register;
rte_dev_event_callback_unregister;
rte_dev_event_monitor_start;
diff --git a/test/test/autotest_data.py b/test/test/autotest_data.py
index f68d9b111..874d0cb53 100644
--- a/test/test/autotest_data.py
+++ b/test/test/autotest_data.py
@@ -278,6 +278,12 @@
"Func": default_autotest,
"Report": None,
},
+ {
+ "Name": "Sleep delay",
+ "Command": "delay_us_sleep_autotest",
+ "Func": default_autotest,
+ "Report": None,
+ },
{
"Name": "Rawdev autotest",
"Command": "rawdev_autotest",
diff --git a/test/test/meson.build b/test/test/meson.build
index bacb5b144..9eb15d21a 100644
--- a/test/test/meson.build
+++ b/test/test/meson.build
@@ -147,6 +147,7 @@ test_names = [
'cryptodev_dpaa_sec_autotest',
'cycles_autotest',
'debug_autotest',
+ 'delay_us_sleep_autotest',
'devargs_autotest',
'distributor_autotest',
'distributor_perf_autotest',
diff --git a/test/test/test_cycles.c b/test/test/test_cycles.c
index 149f60b07..c78e6a5b1 100644
--- a/test/test/test_cycles.c
+++ b/test/test/test_cycles.c
@@ -23,6 +23,30 @@
* of cycles is correct with regard to the frequency of the timer.
*/
+static int
+check_wait_one_second(void)
+{
+ uint64_t cycles, prev_cycles;
+ uint64_t hz = rte_get_timer_hz();
+ uint64_t max_inc = (hz / 100); /* 10 ms max between 2 reads */
+
+ /* check that waiting 1 second is precise */
+ prev_cycles = rte_get_timer_cycles();
+ rte_delay_us(1000000);
+ cycles = rte_get_timer_cycles();
+
+ if ((uint64_t)(cycles - prev_cycles) > (hz + max_inc)) {
+ printf("delay_us is not accurate: too long\n");
+ return -1;
+ }
+ if ((uint64_t)(cycles - prev_cycles) < (hz - max_inc)) {
+ printf("delay_us is not accurate: too short\n");
+ return -1;
+ }
+
+ return 0;
+}
+
static int
test_cycles(void)
{
@@ -43,24 +67,23 @@ test_cycles(void)
prev_cycles = cycles;
}
- /* check that waiting 1 second is precise */
- prev_cycles = rte_get_timer_cycles();
- rte_delay_us(1000000);
- cycles = rte_get_timer_cycles();
+ return check_wait_one_second();
+}
- if ((uint64_t)(cycles - prev_cycles) > (hz + max_inc)) {
- printf("delay_us is not accurate: too long\n");
- return -1;
- }
- if ((uint64_t)(cycles - prev_cycles) < (hz - max_inc)) {
- printf("delay_us is not accurate: too short\n");
- return -1;
- }
+REGISTER_TEST_COMMAND(cycles_autotest, test_cycles);
- return 0;
+/*
+ * One second precision test with rte_delay_us_sleep.
+ */
+
+static int
+test_delay_us_sleep(void)
+{
+ rte_delay_us_callback_register(rte_delay_us_sleep);
+ return check_wait_one_second();
}
-REGISTER_TEST_COMMAND(cycles_autotest, test_cycles);
+REGISTER_TEST_COMMAND(delay_us_sleep_autotest, test_delay_us_sleep);
/*
* rte_delay_us_callback test
--
2.17.1
^ permalink raw reply [flat|nested] 24+ messages in thread
* [dpdk-dev] [PATCH v4 2/2] drivers/net: use sleep delay by default for intel NICs
[not found] ` <CGME20181010141007eucas1p2a8039d5e180738a93a8b1e2991d68220@eucas1p2.samsung.com>
@ 2018-10-10 14:12 ` Ilya Maximets
0 siblings, 0 replies; 24+ messages in thread
From: Ilya Maximets @ 2018-10-10 14:12 UTC (permalink / raw)
To: dev
Cc: Jingjing Wu, Konstantin Ananyev, Wenzhuo Lu, Beilei Xing,
Qi Zhang, Xiao Wang, Bruce Richardson, Stephen Hemminger,
Keith Wiles, Wei Zhao1, Ilya Maximets
NICs uses different delays up to a second during their
configuration. It makes no sense to busy-wait so long wasting
CPU cycles and preventing any other threads to execute on the
same CPU core. These busy polling are the rudiments that came
from the kernel drivers where you can not sleep in interrupt
context, but as we're in userspace, we're able and should
sleep to allow other threads to run.
Delays never called on rx/tx path, so this should not affect
performance.
Signed-off-by: Ilya Maximets <i.maximets@samsung.com>
---
drivers/net/avf/Makefile | 2 +-
drivers/net/avf/base/avf_osdep.h | 4 ++--
drivers/net/avf/meson.build | 2 ++
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 ++-
10 files changed, 16 insertions(+), 10 deletions(-)
diff --git a/drivers/net/avf/Makefile b/drivers/net/avf/Makefile
index 0a142c104..aec6e4cba 100644
--- a/drivers/net/avf/Makefile
+++ b/drivers/net/avf/Makefile
@@ -8,7 +8,7 @@ include $(RTE_SDK)/mk/rte.vars.mk
#
LIB = librte_pmd_avf.a
-CFLAGS += -O3 $(WERROR_FLAGS) -Wno-strict-aliasing
+CFLAGS += -O3 $(WERROR_FLAGS) -Wno-strict-aliasing -DALLOW_EXPERIMENTAL_API
LDLIBS += -lrte_eal -lrte_mbuf -lrte_mempool -lrte_ring
LDLIBS += -lrte_ethdev -lrte_net -lrte_kvargs -lrte_hash
LDLIBS += -lrte_bus_pci
diff --git a/drivers/net/avf/base/avf_osdep.h b/drivers/net/avf/base/avf_osdep.h
index 9ef45968e..442a5acd0 100644
--- a/drivers/net/avf/base/avf_osdep.h
+++ b/drivers/net/avf/base/avf_osdep.h
@@ -93,8 +93,8 @@ typedef uint64_t u64;
#define avf_memset(a, b, c, d) memset((a), (b), (c))
#define avf_memcpy(a, b, c, d) rte_memcpy((a), (b), (c))
-#define avf_usec_delay(x) rte_delay_us(x)
-#define avf_msec_delay(x) rte_delay_us(1000*(x))
+#define avf_usec_delay(x) rte_delay_us_sleep(x)
+#define avf_msec_delay(x) avf_usec_delay(1000 * (x))
#define AVF_PCI_REG(reg) rte_read32(reg)
#define AVF_PCI_REG_ADDR(a, reg) \
diff --git a/drivers/net/avf/meson.build b/drivers/net/avf/meson.build
index 9a05ebbf4..2dfda9d4e 100644
--- a/drivers/net/avf/meson.build
+++ b/drivers/net/avf/meson.build
@@ -3,6 +3,8 @@
cflags += ['-Wno-strict-aliasing']
+allow_experimental_apis = true
+
subdir('base')
objs = [base_objs]
diff --git a/drivers/net/e1000/Makefile b/drivers/net/e1000/Makefile
index 9c87e883b..0ed627656 100644
--- a/drivers/net/e1000/Makefile
+++ b/drivers/net/e1000/Makefile
@@ -10,6 +10,7 @@ LIB = librte_pmd_e1000.a
CFLAGS += -O3
CFLAGS += $(WERROR_FLAGS)
+CFLAGS += -DALLOW_EXPERIMENTAL_API
LDLIBS += -lrte_eal -lrte_mbuf -lrte_mempool -lrte_ring
LDLIBS += -lrte_ethdev -lrte_net -lrte_kvargs
LDLIBS += -lrte_bus_pci
diff --git a/drivers/net/e1000/base/e1000_osdep.h b/drivers/net/e1000/base/e1000_osdep.h
index b8868049f..5958ea157 100644
--- a/drivers/net/e1000/base/e1000_osdep.h
+++ b/drivers/net/e1000/base/e1000_osdep.h
@@ -48,7 +48,7 @@
#include "../e1000_logs.h"
-#define DELAY(x) rte_delay_us(x)
+#define DELAY(x) rte_delay_us_sleep(x)
#define usec_delay(x) DELAY(x)
#define usec_delay_irq(x) DELAY(x)
#define msec_delay(x) DELAY(1000*(x))
diff --git a/drivers/net/e1000/meson.build b/drivers/net/e1000/meson.build
index cf456995c..d0901d377 100644
--- a/drivers/net/e1000/meson.build
+++ b/drivers/net/e1000/meson.build
@@ -1,6 +1,8 @@
# SPDX-License-Identifier: BSD-3-Clause
# Copyright(c) 2017 Intel Corporation
+allow_experimental_apis = true
+
subdir('base')
objs = [base_objs]
diff --git a/drivers/net/i40e/base/i40e_osdep.h b/drivers/net/i40e/base/i40e_osdep.h
index 8e5c593c9..a6072e153 100644
--- a/drivers/net/i40e/base/i40e_osdep.h
+++ b/drivers/net/i40e/base/i40e_osdep.h
@@ -233,9 +233,9 @@ struct i40e_spinlock {
#define i40e_memcpy(a, b, c, d) rte_memcpy((a), (b), (c))
#define DIV_ROUND_UP(n,d) (((n) + (d) - 1) / (d))
-#define DELAY(x) rte_delay_us(x)
-#define i40e_usec_delay(x) rte_delay_us(x)
-#define i40e_msec_delay(x) rte_delay_us(1000*(x))
+#define DELAY(x) rte_delay_us_sleep(x)
+#define i40e_usec_delay(x) DELAY(x)
+#define i40e_msec_delay(x) DELAY(1000 * (x))
#define udelay(x) DELAY(x)
#define msleep(x) DELAY(1000*(x))
#define usleep_range(min, max) msleep(DIV_ROUND_UP(min, 1000))
diff --git a/drivers/net/ifc/base/ifcvf_osdep.h b/drivers/net/ifc/base/ifcvf_osdep.h
index cf151ef52..6aef25ea4 100644
--- a/drivers/net/ifc/base/ifcvf_osdep.h
+++ b/drivers/net/ifc/base/ifcvf_osdep.h
@@ -17,7 +17,7 @@
#define DEBUGOUT(S, args...) RTE_LOG(DEBUG, PMD, S, ##args)
#define STATIC static
-#define msec_delay rte_delay_ms
+#define msec_delay(x) rte_delay_us_sleep(1000 * (x))
#define IFCVF_READ_REG8(reg) rte_read8(reg)
#define IFCVF_WRITE_REG8(val, reg) rte_write8((val), (reg))
diff --git a/drivers/net/ixgbe/base/ixgbe_osdep.h b/drivers/net/ixgbe/base/ixgbe_osdep.h
index e648ea462..ea8dc1cbe 100644
--- a/drivers/net/ixgbe/base/ixgbe_osdep.h
+++ b/drivers/net/ixgbe/base/ixgbe_osdep.h
@@ -21,7 +21,7 @@
#define ASSERT(x) if(!(x)) rte_panic("IXGBE: x")
-#define DELAY(x) rte_delay_us(x)
+#define DELAY(x) rte_delay_us_sleep(x)
#define usec_delay(x) DELAY(x)
#define msec_delay(x) DELAY(1000*(x))
diff --git a/drivers/net/ixgbe/meson.build b/drivers/net/ixgbe/meson.build
index 02d5ef5e4..544a14148 100644
--- a/drivers/net/ixgbe/meson.build
+++ b/drivers/net/ixgbe/meson.build
@@ -5,10 +5,11 @@ version = 2
cflags += ['-DRTE_LIBRTE_IXGBE_BYPASS']
+allow_experimental_apis = true
+
subdir('base')
objs = [base_objs]
-allow_experimental_apis = true
sources = files(
'ixgbe_82599_bypass.c',
'ixgbe_bypass.c',
--
2.17.1
^ permalink raw reply [flat|nested] 24+ messages in thread
* Re: [dpdk-dev] [PATCH v4 0/2] CPU non-blocking delay
2018-10-10 14:12 ` [dpdk-dev] [PATCH v4 0/2] CPU non-blocking delay Ilya Maximets
[not found] ` <CGME20181010141003eucas1p23e7bdfaad8cd676549f1cae42b6a8e40@eucas1p2.samsung.com>
[not found] ` <CGME20181010141007eucas1p2a8039d5e180738a93a8b1e2991d68220@eucas1p2.samsung.com>
@ 2018-10-25 13:27 ` Ferruh Yigit
2018-10-26 14:23 ` Ferruh Yigit
2 siblings, 1 reply; 24+ messages in thread
From: Ferruh Yigit @ 2018-10-25 13:27 UTC (permalink / raw)
To: Ilya Maximets, dev
Cc: Jingjing Wu, Konstantin Ananyev, Wenzhuo Lu, Beilei Xing,
Qi Zhang, Xiao Wang, Bruce Richardson, Stephen Hemminger,
Keith Wiles, Wei Zhao1
On 10/10/2018 3:12 PM, Ilya Maximets wrote:
> For meson build without deprecation warnings following
> patch should be applied first:
> http://patches.dpdk.org/patch/46064/
>
> Version 4:
> * Fixed return value checking for nanosleep().
> It doesn't return EINTR, it sets the errno.
>
> Version 3:
> * Minor rebase on top of current master.
>
> Version 2:
> * Added comment for EINTR handling for nanosleep. [Stephen Hemminger]
>
> Ilya Maximets (2):
> eal: add nanosleep based delay function
> drivers/net: use sleep delay by default for intel NICs
Looks like good idea.
For series,
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
^ permalink raw reply [flat|nested] 24+ messages in thread
* Re: [dpdk-dev] [PATCH v4 0/2] CPU non-blocking delay
2018-10-25 13:27 ` [dpdk-dev] [PATCH v4 0/2] CPU non-blocking delay Ferruh Yigit
@ 2018-10-26 14:23 ` Ferruh Yigit
0 siblings, 0 replies; 24+ messages in thread
From: Ferruh Yigit @ 2018-10-26 14:23 UTC (permalink / raw)
To: Ilya Maximets, dev
Cc: Jingjing Wu, Konstantin Ananyev, Wenzhuo Lu, Beilei Xing,
Qi Zhang, Xiao Wang, Bruce Richardson, Stephen Hemminger,
Keith Wiles, Wei Zhao1
On 10/25/2018 2:27 PM, Ferruh Yigit wrote:
> On 10/10/2018 3:12 PM, Ilya Maximets wrote:
>> For meson build without deprecation warnings following
>> patch should be applied first:
>> http://patches.dpdk.org/patch/46064/
>>
>> Version 4:
>> * Fixed return value checking for nanosleep().
>> It doesn't return EINTR, it sets the errno.
>>
>> Version 3:
>> * Minor rebase on top of current master.
>>
>> Version 2:
>> * Added comment for EINTR handling for nanosleep. [Stephen Hemminger]
>>
>> Ilya Maximets (2):
>> eal: add nanosleep based delay function
>> drivers/net: use sleep delay by default for intel NICs
>
> Looks like good idea.
>
> For series,
> Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
Series applied to dpdk-next-net/master, thanks.
^ permalink raw reply [flat|nested] 24+ messages in thread
end of thread, other threads:[~2018-10-26 14:23 UTC | newest]
Thread overview: 24+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <CGME20180831124358eucas1p22a0f8a7d0ae34dfad73b3b9e819366ec@eucas1p2.samsung.com>
2018-08-31 12:45 ` [dpdk-dev] [RFC 0/2] CPU non-blocking delay Ilya Maximets
2018-08-31 13:01 ` Bruce Richardson
2018-08-31 13:39 ` Bruce Richardson
2018-09-03 14:41 ` Ilya Maximets
[not found] ` <CGME20180903144311eucas1p2b6499c49dbd0d54334e973113cdc5ad6@eucas1p2.samsung.com>
2018-09-03 14:44 ` [dpdk-dev] [PATCH v1 " Ilya Maximets
[not found] ` <CGME20180903144615eucas1p1d7377fa285a86f522f29c2a9528a638e@eucas1p1.samsung.com>
2018-09-03 14:47 ` [dpdk-dev] [PATCH v1 1/2] eal: add nanosleep based delay function Ilya Maximets
2018-09-05 13:10 ` Stephen Hemminger
2018-09-10 15:11 ` Ilya Maximets
[not found] ` <CGME20180903144704eucas1p1d469c23bc22f25af27f00d94aaf8a660@eucas1p1.samsung.com>
2018-09-03 14:48 ` [dpdk-dev] [PATCH v1 2/2] drivers/net: use sleep delay by default for intel NICs Ilya Maximets
[not found] ` <CGME20180914105928eucas1p2be05dc93e02df94e895de24d5564927c@eucas1p2.samsung.com>
2018-09-14 11:01 ` [dpdk-dev] [PATCH v2 0/2] CPU non-blocking delay Ilya Maximets
[not found] ` <CGME20180914105950eucas1p1391d6eccd8ccd5a03e7f742f1d12bb9d@eucas1p1.samsung.com>
2018-09-14 11:01 ` [dpdk-dev] [PATCH v2 1/2] eal: add nanosleep based delay function Ilya Maximets
[not found] ` <CGME20180914105954eucas1p1662492cee6b5387cd4655ec940619ea8@eucas1p1.samsung.com>
2018-09-14 11:01 ` [dpdk-dev] [PATCH v2 2/2] drivers/net: use sleep delay by default for intel NICs Ilya Maximets
2018-09-28 11:38 ` [dpdk-dev] [PATCH v2 0/2] CPU non-blocking delay Ilya Maximets
[not found] ` <CGME20181004143338eucas1p2690a63adeb26785846ad0ea71b695215@eucas1p2.samsung.com>
2018-10-04 14:35 ` [dpdk-dev] [PATCH v3 " Ilya Maximets
[not found] ` <CGME20181004143343eucas1p2e4d18dbed12ac9cebc6ea1af599f751a@eucas1p2.samsung.com>
2018-10-04 14:35 ` [dpdk-dev] [PATCH v3 1/2] eal: add nanosleep based delay function Ilya Maximets
[not found] ` <CGME20181004143345eucas1p2f9dfea7ea41111c2ce9cab98434339d0@eucas1p2.samsung.com>
2018-10-04 14:35 ` [dpdk-dev] [PATCH v3 2/2] drivers/net: use sleep delay by default for intel NICs Ilya Maximets
[not found] ` <CGME20181010140956eucas1p2720bbf053c9dd0ebbafbc99bb1dd6e1d@eucas1p2.samsung.com>
2018-10-10 14:12 ` [dpdk-dev] [PATCH v4 0/2] CPU non-blocking delay Ilya Maximets
[not found] ` <CGME20181010141003eucas1p23e7bdfaad8cd676549f1cae42b6a8e40@eucas1p2.samsung.com>
2018-10-10 14:12 ` [dpdk-dev] [PATCH v4 1/2] eal: add nanosleep based delay function Ilya Maximets
[not found] ` <CGME20181010141007eucas1p2a8039d5e180738a93a8b1e2991d68220@eucas1p2.samsung.com>
2018-10-10 14:12 ` [dpdk-dev] [PATCH v4 2/2] drivers/net: use sleep delay by default for intel NICs Ilya Maximets
2018-10-25 13:27 ` [dpdk-dev] [PATCH v4 0/2] CPU non-blocking delay Ferruh Yigit
2018-10-26 14:23 ` Ferruh Yigit
2018-10-05 14:09 ` [dpdk-dev] [PATCH v1 " Wiles, Keith
2018-10-05 14:44 ` Ilya Maximets
2018-10-05 15:04 ` Wiles, Keith
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).