imple).
Signed-off-by: Cunming Liang
Acked-by: Bruce Richardson
Acked-by: Yong Liu
Tested-by: Zhaochen Zhan
---
lib/librte_pmd_ixgbe/ixgbe_rxtx.h | 2 ++
1 file changed, 2 insertions(+)
diff --git a/lib/librte_pmd_ixgbe/ixgbe_rxtx.h
b/lib/librte_pmd_ixgbe/ixgbe_rxtx.h
index 26de64b..64c0695 1
Signed-off-by: Cunming Liang
Acked-by: Bruce Richardson
Acked-by: Yong Liu
Tested-by: Zhaochen Zhan
---
lib/librte_pmd_ixgbe/ixgbe_rxtx_vec.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/lib/librte_pmd_ixgbe/ixgbe_rxtx_vec.c
b/lib/librte_pmd_ixgbe/ixgbe_rxtx_vec.c
index b8721dd
erformance with vPMD.
*** BLURB HERE ***
Cunming Liang (5):
ixgbe: avoid compiler error when RTE_IXGBE_INC_VECTOR=y and
RTE_LIBRTE_IXGBE_RX_ALLOC_BULK_ALLOC=n
ixgbe: fix vpmd compiling error when RTE_LIBRTE_IEEE1588=y
ixgbe: not 'DISABLE' may make confuse, change
RTE_IXGB
registers: pthresh=8 hthresh=8 wthresh=0
TX threshold registers: pthresh=32 hthresh=0 wthresh=0
Signed-off-by: Cunming Liang
Acked-by: Bruce Richardson
Acked-by: Yong Liu
Tested-by: Zhaochen Zhan
---
app/test-pmd/testpmd.c | 6 +++---
app/test-pmd/testpmd.h | 2 ++
2 files changed, 5
RTE_IXGBE_RX_OLFLAGS_ENABLE gives a hint whick keeping packet type in RX
ol_flags or not.
By default it is set to update ol_flags in RX mbuf header.
If unset it, will gain addtional performance, but will lose packet type
information.
Signed-off-by: Cunming Liang
Acked-by: Bruce Richardson
The vpmd RX don't accept burst size less than 32.
As vPMD is set =y by default, while default testpmd burst size is 16.
Which will cause RX nothing if not assign burst size correctly.
Signed-off-by: Cunming Liang
Acked-by: Bruce Richardson
Acked-by: Yong Liu
Tested-by: Zhaochen Zhan
---
as below one.
http://dpdk.org/dev/patchwork/patch/817
*** BLURB HERE ***
Cunming Liang (7):
app/test: allow to create packets in different sizes
ixgbe:clean scattered_rx configure in dev_stop
ether: new API to format eth_addr in string
app/testpmd: cleanup eth_addr print
examples: clea
adding support to allow packet burst generator to create packets in differenct
sizes
Signed-off-by: Cunming Liang
---
app/test/packet_burst_generator.c | 26
app/test/packet_burst_generator.h | 11 +++--
app/test/test_link_bonding.c | 39
Signed-off-by: Cunming Liang
---
lib/librte_pmd_ixgbe/ixgbe_ethdev.c |6 ++
1 files changed, 6 insertions(+), 0 deletions(-)
diff --git a/lib/librte_pmd_ixgbe/ixgbe_ethdev.c
b/lib/librte_pmd_ixgbe/ixgbe_ethdev.c
index 9c73a30..05490dc 100644
--- a/lib/librte_pmd_ixgbe/ixgbe_ethdev.c
Signed-off-by: Cunming Liang
---
lib/librte_ether/rte_ether.h | 25 +
1 files changed, 25 insertions(+), 0 deletions(-)
diff --git a/lib/librte_ether/rte_ether.h b/lib/librte_ether/rte_ether.h
index f173509..187608d 100644
--- a/lib/librte_ether/rte_ether.h
+++ b/lib
Signed-off-by: Cunming Liang
---
app/test-pmd/config.c | 10 +++---
app/test-pmd/icmpecho.c | 16 ++--
app/test-pmd/rxonly.c | 11 +++
3 files changed, 8 insertions(+), 29 deletions(-)
diff --git a/app/test-pmd/config.c b/app/test-pmd/config.c
index 9bc08f4
epeat re-send recevied packets.
Now it measures two situations, poll before/after xmit(w or w/o desc. cache
conflict)
Usage Example:
Set stream control mode, by default is continuous
set_rxtx_sc [continuous|poll_before_xmit|poll_after_xmit]
Signed-off-by: Cunming Liang
---
app/test/Makefile
Per definition, rte_eth_rx_burst/rte_eth_tx_burst/rte_eth_rx_queue_count
returns the packet number
When RTE_LIBRTE_ETHDEV_DEBUG turns on, retval of FUNC_PTR_OR_ERR_RTE was set to
-ENOTSUP.
It makes confusing.
The patch always return 0 no matter no packet or there's error.
Signed-off-by: Cu
Signed-off-by: Cunming Liang
---
examples/dpdk_qat/main.c | 10 +++---
examples/ip_fragmentation/main.c | 10 +++---
examples/ip_reassembly/main.c| 10 +++---
examples/ipv4_multicast/main.c | 10 +++---
examples/l3fwd-acl/main.c| 10
- i40e force link up/down
- i40e autoneg/force speed
v2, fix warnning complain on gcc 4.6.3
Signed-off-by: Cunming Liang
Acked-by: Helin Zhang
Acked-by: Chen Jing D(Mark)
Tested-by: Xu HuilongX
---
app/test-pmd/cmdline.c| 17 +++--
lib/librte_pmd_i40e/i40e_ethdev.c | 141
n and wait for the result
pmd_perf_autotest
For who simply just want to see how much cycles cost per packet.
Compile DPDK, Run 'app/test', and type 'pmd_perf_autotest', that's it.
Nothing else needs to configure.
Using other options when you understand and what to me
Signed-off-by: Cunming Liang
Acked-by: Bruce Richardson
---
app/test/Makefile | 1 +
app/test/commands.c | 41 +++
app/test/packet_burst_generator.c | 4 +-
app/test/test.h | 6 +
app/test/test_pmd_perf.c| 620
Signed-off-by: Cunming Liang
Acked-by: Bruce Richardson
---
app/test/commands.c | 38 ++
app/test/test.h | 1 +
app/test/test_pmd_perf.c | 175 +++
3 files changed, 185 insertions(+), 29 deletions(-)
diff --git a/app/test
adding support to allow packet burst generator to create packets of differenct
sizes
Signed-off-by: Cunming Liang
Acked-by: Declan Doherty
---
app/test/packet_burst_generator.c | 26 +-
app/test/packet_burst_generator.h | 11 ---
app/test/test_link_bonding.c
Signed-off-by: Cunming Liang
Acked-by: Bruce Richardson
---
lib/librte_pmd_ixgbe/ixgbe_rxtx_vec.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/lib/librte_pmd_ixgbe/ixgbe_rxtx_vec.c
b/lib/librte_pmd_ixgbe/ixgbe_rxtx_vec.c
index fe39ca2..92e07de 100644
--- a/lib
Signed-off-by: Cunming Liang
---
app/test/commands.c | 43 +-
app/test/test.h | 1 +
app/test/test_pmd_perf.c | 214 +++
3 files changed, 237 insertions(+), 21 deletions(-)
diff --git a/app/test/commands.c b/app/test
mkdir /sys/fs/cgroup/cpu/dpdk/thread3
> cd /sys/fs/cgroup/cpu/dpdk
> echo 256 > thread0/cpu.shares
> echo 256 > thread1/cpu.shares
> echo 512 > thread2/cpu.shares
> echo 1024 > thread3/cpu.shares
-END-
Any comments are welcome.
Thanks
*** BLURB HERE ***
Cunming Lian
Signed-off-by: Cunming Liang
---
lib/librte_eal/common/include/rte_eal.h | 5 ++
lib/librte_eal/common/include/rte_lcore.h | 12
lib/librte_eal/linuxapp/eal/eal_thread.c | 115 --
3 files changed, 126 insertions(+), 6 deletions(-)
diff --git a/lib
Signed-off-by: Cunming Liang
---
lib/librte_mempool/rte_mempool.h | 22 +++---
1 file changed, 11 insertions(+), 11 deletions(-)
diff --git a/lib/librte_mempool/rte_mempool.h b/lib/librte_mempool/rte_mempool.h
index 3314651..bf4117b 100644
--- a/lib/librte_mempool/rte_mempool.h
Signed-off-by: Cunming Liang
---
lib/librte_ring/rte_ring.h | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/lib/librte_ring/rte_ring.h b/lib/librte_ring/rte_ring.h
index 3920830..c038a4f 100644
--- a/lib/librte_ring/rte_ring.h
+++ b/lib/librte_ring/rte_ring.h
@@ -189,9
Signed-off-by: Cunming Liang
---
config/common_linuxapp | 1 +
lib/librte_eal/common/include/rte_eal.h | 10 +++
lib/librte_eal/linuxapp/eal/eal_thread.c | 105 ++-
3 files changed, 115 insertions(+), 1 deletion(-)
diff --git a/config
Signed-off-by: Cunming Liang
---
app/test-pmd/cmdline.c | 41
app/test-pmd/testpmd.c | 84 +-
app/test-pmd/testpmd.h | 1 +
3 files changed, 125 insertions(+), 1 deletion(-)
diff --git a/app/test-pmd/cmdline.c b/app/test
Signed-off-by: Cunming Liang
---
examples/multi-pthread/Makefile | 57 ++
examples/multi-pthread/main.c | 232
examples/multi-pthread/main.h | 46
3 files changed, 335 insertions(+)
create mode 100644 examples/multi-pthread
Signed-off-by: Cunming Liang
---
lib/librte_eal/linuxapp/eal/eal_thread.c | 144 +--
1 file changed, 81 insertions(+), 63 deletions(-)
diff --git a/lib/librte_eal/linuxapp/eal/eal_thread.c
b/lib/librte_eal/linuxapp/eal/eal_thread.c
index a584e3b..05cebe4 100644
- i40e force link up/down
- i40e autoneg/force speed
Signed-off-by: Cunming Liang
Acked-by: Helin Zhang
Acked-by: Chen Jing D(Mark)
Tested-by: Xu HuilongX
---
app/test-pmd/cmdline.c| 17 +++--
lib/librte_pmd_i40e/i40e_ethdev.c | 139 ++
2
ed
in L3fwd-power now. Feel free to turn in on if you want to support both LSC
and rx queue interrupts on a PF.
Cunming Liang (11):
eal/linux: add interrupt vectors support in intr_handle
eal/linux: add rte_epoll_wait/ctl support
eal/linux: add API to set rx interrupt event monitor
eal/
e event fds add to a specified epoll instance, 'elist' will hold the
rte_epoll_event object pointer.
Signed-off-by: Danny Zhou
Signed-off-by: Cunming Liang
---
v7 changes:
- add eptrs[], it's used to store the register rte_epoll_event instances.
- add vec_en, to log the vector cap
The patch adds 'rte_intr_rx_ctl' to add or delete interrupt vector events
monitor on specified epoll instance.
Signed-off-by: Cunming Liang
---
v8 changes
- fix EWOULDBLOCK and EINTR processing
- add event status check
v7 changes
- rename rte_intr_rx_set to rte_i
Signed-off-by: Cunming Liang
---
lib/librte_eal/linuxapp/eal/eal_interrupts.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/lib/librte_eal/linuxapp/eal/eal_interrupts.c
b/lib/librte_eal/linuxapp/eal/eal_interrupts.c
index 6fb7fc7..59f4214 100644
--- a/lib/librte_eal
This patch does below:
- Create VFIO eventfds for each interrupt vector (move to next)
- Assign per interrupt vector's eventfd to VFIO by ioctl
Signed-off-by: Danny Zhou
Signed-off-by: Cunming Liang
---
v8 changes
- move eventfd creation out of the setup_interrupts to a standalone fun
The patch exposes intr event fd create and release for PMD.
The device driver can assign the number of event associated with interrupt
vector.
It also provides misc funtions to check 1) allows other slowpath intr(e.g. lsc);
2) intr event on fastpath is enabled or not.
Signed-off-by: Cunming
To make bsd compiling happy with new intr changes.
Signed-off-by: Cunming Liang
---
v8 changes
- add stub for new function
v7 changes
- remove stub 'linux only' function from source file
lib/librte_eal/bsdapp/eal/eal_interrupts.c | 20 ++
.../bsdapp/eal/includ
The patch adds two dev_ops functions to enable and disable rx queue interrupts.
In addtion, it adds rte_eth_dev_rx_intr_ctl/rx_intr_q to support per port or
per queue rx intr event set.
Signed-off-by: Danny Zhou
Signed-off-by: Cunming Liang
---
v8 changes
- add addtion check for EEXIT
v7
The patch does below things for ixgbe PF and VF:
- Setup NIC to generate MSI-X interrupts
- Set the IVAR register to map interrupt causes to vectors
- Implement interrupt enable/disable functions
Signed-off-by: Danny Zhou
Signed-off-by: Yong Liu
Signed-off-by: Cunming Liang
---
v8 changes
The patch does below for igb PF:
- Setup NIC to generate MSI-X interrupts
- Set the IVAR register to map interrupt causes to vectors
- Implement interrupt enable/disable functions
Signed-off-by: Danny Zhou
Signed-off-by: Cunming Liang
---
v8 changes
- add vfio-msi/vfio-legacy and uio-legacy
llback
which is exectuted during wakeup.
Signed-off-by: Cunming Liang
---
v8 changes
- support delete event in safety during the wakeup execution
- add EINTR process during epoll_wait
v7 changes
- split v6[4/8] into two patches, one for epoll event(this one)
another for rx intr(next patch)
kernel, so one-shot interrupt is used here to guarantee minimum
overhead and DPDK polling thread returns to polling mode immediately
once it receives an interrupt notificaiton for incoming packet.
Signed-off-by: Danny Zhou
Signed-off-by: Cunming Liang
---
v7 changes
- using new APIs
- demo
wrong
intermediate link status.
Signed-off-by: Cunming Liang
---
lib/librte_pmd_i40e/i40e_ethdev.c | 29 +++--
1 file changed, 19 insertions(+), 10 deletions(-)
diff --git a/lib/librte_pmd_i40e/i40e_ethdev.c
b/lib/librte_pmd_i40e/i40e_ethdev.c
index 00d044f..6b8f96e 100644
---
re than 32(RTE_IXGBE_RXQ_REARM_THRESH) packets.
On transmit side, the max burst size no longer bind with a constant, however it
still
require to check the cross tx_rs_thresh violation.
There's no obvious performance drop found on both recv_pkts_vec
and recv_scattered_pkts_vec on burst size 32.
Signed-
re than 32(RTE_IXGBE_RXQ_REARM_THRESH) packets.
On transmit side, the max burst size no longer bind with a constant, however it
still
require to check the cross tx_rs_thresh violation.
There's no obvious performance drop found on both recv_pkts_vec
and recv_scattered_pkts_vec on burst size 32.
Signed-
The patch updates the env_abstraction_layer.rst part in prog_guide.
It adds the RX interrupt event declaration and revises the others in interrupt
event section.
Signed-off-by: Cunming Liang
---
doc/guides/prog_guide/env_abstraction_layer.rst | 34 ++---
1 file changed, 31
meter
that cannot be negative.
928bytes_read = read(fd, &buf, bytes_read);
Fixes: c9f3ec1a0f3f ("eal/linux: add Rx interrupt control function")
Signed-off-by: Cunming Liang
---
lib/librte_eal/linuxapp/eal/eal_interrupts.c | 7 ---
1 file changed, 4 insertion
ted by user).
Each fix libraries take care the case of rte_lcore_id() >= RTE_MAX_LCORE.
Thanks a million for the comments from Konstantin, Bruce, Mirek and Stephen in
RFC review.
*** BLURB HERE ***
Cunming Liang (17):
eal: add cpuset into per EAL thread lcore_config
eal: new eal op
he EAL thread to multiple cpus.
Signed-off-by: Cunming Liang
---
lib/librte_eal/bsdapp/eal/eal_lcore.c | 7 +++
lib/librte_eal/bsdapp/eal/eal_memory.c| 2 ++
lib/librte_eal/common/include/rte_lcore.h | 8
lib/librte_eal/linuxapp/eal/Makefile | 1 +
lib/librte_eal/linux
It returns the socket_id if all cpus in the cpuset belongs
to the same NUMA node, otherwise it will return SOCKET_ID_ANY.
Signed-off-by: Cunming Liang
---
lib/librte_eal/bsdapp/eal/eal_lcore.c | 7 +
lib/librte_eal/common/eal_thread.h | 52 +
lib
The problem is that strnlen() here may return invalid value with 32bit icc.
(actually it returns it?s second parameter,e.g: sysconf(_SC_ARG_MAX)).
It starts to manifest hwen max_len parameter is > 2M and using icc ?m32 ?O2 (or
above).
Suggested-by: Konstantin Ananyev
Signed-off-by: Cunm
1. add two TLS *_socket_id* and *_cpuset*
2. add two external API rte_thread_set/get_affinity
3. add one internal API eal_thread_dump_affinity
Signed-off-by: Cunming Liang
---
lib/librte_eal/bsdapp/eal/eal_thread.c| 2 ++
lib/librte_eal/common/eal_thread.h| 14 ++
lib
The API works for both EAL thread and none EAL thread.
When calling rte_thread_set_affinity, the *_socket_id* and
*_cpuset* of calling thread will be updated if the thread
successful set the cpu affinity.
Signed-off-by: Cunming Liang
---
lib/librte_eal/bsdapp/eal/Makefile| 1 +
lib
4,5 runs on cpuset 0x5 (cpu 0,2)
lcore 6 runs on cpuset 0x41 (cpu 0,6)
lcore 7 runs on cpuset 0x80 (cpu 7)
lcore 8 runs on cpuset 0x100 (cpu 8)
Signed-off-by: Cunming Liang
---
lib/librte_eal/common/eal_common_launch.c | 1 -
lib/librte_eal/common/eal_common_options.c | 300 +++
The rte_gettid() wraps the linux and freebsd syscall gettid().
It provides a persistent unique thread id for the calling thread.
It will save the unique id in TLS on the first time.
Signed-off-by: Cunming Liang
---
lib/librte_eal/bsdapp/eal/eal_thread.c | 9 +
lib/librte_eal/common
EAL threads use assigned cpuset to set core affinity during startup.
It keeps 1:1 mapping, if no '--lcores' option is used.
Signed-off-by: Cunming Liang
---
lib/librte_eal/bsdapp/eal/eal.c | 13 ---
lib/librte_eal/bsdapp/eal/eal_thread.c | 63 +
Some macro already been defined by freebsd 'sys/param.h'.
Signed-off-by: Cunming Liang
---
lib/librte_pmd_enic/enic.h| 1 +
lib/librte_pmd_enic/enic_compat.h | 1 +
2 files changed, 2 insertions(+)
diff --git a/lib/librte_pmd_enic/enic.h b/lib/librte_pmd_enic/enic.h
ind
Add check for rte_socket_id(), avoid get unexpected return like (-1).
Signed-off-by: Cunming Liang
---
lib/librte_malloc/malloc_heap.h | 7 ++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/lib/librte_malloc/malloc_heap.h b/lib/librte_malloc/malloc_heap.h
index b4aec45
For those non-EAL thread, *_lcore_id* is invalid and probably larger than
RTE_MAX_LCORE.
The patch adds the check and allows only EAL thread using EAL per thread log
level and log type.
Others shares the global log level.
Signed-off-by: Cunming Liang
---
lib/librte_eal/common/eal_common_log.c
In non-EAL thread, lcore_id alrways be LCORE_ID_ANY.
It cann't be used as unique id for recursive spinlock.
Then use rte_gettid() to replace it.
Signed-off-by: Cunming Liang
---
lib/librte_eal/common/include/generic/rte_spinlock.h | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
For those none EAL thread, *_lcore_id* shall always be LCORE_ID_ANY.
The libraries using *_lcore_id* as index need to take care.
*_socket_id* always be SOCKET_ID_ANY unitl the thread changes the affinity
by rte_thread_set_affinity()
Signed-off-by: Cunming Liang
---
lib/librte_eal/bsdapp/eal
ring debug stat won't take care non-EAL thread.
Signed-off-by: Cunming Liang
---
lib/librte_ring/rte_ring.h | 10 ++
1 file changed, 6 insertions(+), 4 deletions(-)
diff --git a/lib/librte_ring/rte_ring.h b/lib/librte_ring/rte_ring.h
index 7cd5f2d..39bacdd 100644
--- a/lib/librte
uld simply do nothing and return
straightway.
Signed-off-by: Cunming Liang
---
lib/librte_timer/rte_timer.c | 40 +++-
lib/librte_timer/rte_timer.h | 2 +-
2 files changed, 32 insertions(+), 10 deletions(-)
diff --git a/lib/librte_timer/rte_timer.c b/
Add a sched_yield() syscall if the thread spins for too long, waiting other
thread to finish its operations on the ring.
That gives pre-empted thread a chance to proceed and finish with ring
enqnue/dequeue operation.
The purpose is to reduce contention on the ring.
Signed-off-by: Cunming Liang
l.
It will get bad performance and has critical risk if scheduling policy is RT.
Signed-off-by: Cunming Liang
---
lib/librte_mempool/rte_mempool.h | 18 +++---
1 file changed, 11 insertions(+), 7 deletions(-)
diff --git a/lib/librte_mempool/rte_mempool.h b/lib/librte_mempool/rte_mempo
user).
Each fix libraries take care the case of rte_lcore_id() >= RTE_MAX_LCORE.
Thanks a million for the comments from Konstantin, Bruce, Mirek and Stephen in
RFC review.
*** BLURB HERE ***
Cunming Liang (15):
eal: add cpuset into per EAL thread lcore_config
eal: new eal option '
he EAL thread to multiple cpus.
Signed-off-by: Cunming Liang
---
lib/librte_eal/bsdapp/eal/eal_lcore.c | 7 +++
lib/librte_eal/bsdapp/eal/eal_memory.c| 2 ++
lib/librte_eal/common/include/rte_lcore.h | 8
lib/librte_eal/linuxapp/eal/Makefile | 1 +
lib/librte_eal/linux
1. add two TLS *_socket_id* and *_cpuset*
2. add two external API rte_thread_set/get_affinity
3. add one internal API eal_thread_dump_affinity
Signed-off-by: Cunming Liang
---
lib/librte_eal/bsdapp/eal/eal_thread.c| 2 ++
lib/librte_eal/common/eal_thread.h| 14 ++
lib
et 0x5 (cpu 0,2)
lcore 6 runs on cpuset 0x41 (cpu 0,6)
Signed-off-by: Cunming Liang
---
lib/librte_eal/common/eal_common_launch.c | 1 -
lib/librte_eal/common/eal_common_options.c | 262 -
lib/librte_eal/common/eal_options.h| 2 +
lib/librte_eal/lin
The API works for both EAL thread and none EAL thread.
When calling rte_thread_set_affinity, the *_socket_id* and
*_cpuset* of calling thread will be updated if the thread
successful set the cpu affinity.
Signed-off-by: Cunming Liang
---
lib/librte_eal/bsdapp/eal/Makefile| 1 +
lib
It returns the socket_id if all cpus in the cpuset belongs
to the same NUMA node, otherwise it will return SOCKET_ID_ANY.
Signed-off-by: Cunming Liang
---
lib/librte_eal/bsdapp/eal/eal_lcore.c | 7 +
lib/librte_eal/common/eal_thread.h | 52 +
lib
The rte_gettid() wraps the linux and freebsd syscall gettid().
It provides a persistent unique thread id for the calling thread.
It will save the unique id in TLS on the first time.
Signed-off-by: Cunming Liang
---
lib/librte_eal/bsdapp/eal/eal_thread.c | 9 +
lib/librte_eal/common
EAL threads use assigned cpuset to set core affinity during startup.
It keeps 1:1 mapping, if no '--lcores' option is used.
Signed-off-by: Cunming Liang
---
lib/librte_eal/bsdapp/eal/eal.c | 13 ---
lib/librte_eal/bsdapp/eal/eal_thread.c | 63 +
For those non-EAL thread, *_lcore_id* is invalid and probably larger than
RTE_MAX_LCORE.
The patch adds the check and allows only EAL thread using EAL per thread log
level and log type.
Others shares the global log level.
Signed-off-by: Cunming Liang
---
lib/librte_eal/common/eal_common_log.c
Some macro already been defined by freebsd 'sys/param.h'.
Signed-off-by: Cunming Liang
---
lib/librte_pmd_enic/enic.h| 1 +
lib/librte_pmd_enic/enic_compat.h | 1 +
2 files changed, 2 insertions(+)
diff --git a/lib/librte_pmd_enic/enic.h b/lib/librte_pmd_enic/enic.h
ind
Add check for rte_socket_id(), avoid get unexpected return like (-1).
Signed-off-by: Cunming Liang
---
lib/librte_malloc/malloc_heap.h | 7 ++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/lib/librte_malloc/malloc_heap.h b/lib/librte_malloc/malloc_heap.h
index b4aec45
For those none EAL thread, *_lcore_id* shall always be LCORE_ID_ANY.
The libraries using *_lcore_id* as index need to take care.
*_socket_id* always be SOCKET_ID_ANY unitl the thread changes the affinity
by rte_thread_set_affinity()
Signed-off-by: Cunming Liang
---
lib/librte_eal/bsdapp/eal
In non-EAL thread, lcore_id alrways be LCORE_ID_ANY.
It cann't be used as unique id for recursive spinlock.
Then use rte_gettid() to replace it.
Signed-off-by: Cunming Liang
---
lib/librte_eal/common/include/generic/rte_spinlock.h | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
l.
It will get bad performance and has critical risk if scheduling policy is RT.
Signed-off-by: Cunming Liang
---
lib/librte_mempool/rte_mempool.h | 18 +++---
1 file changed, 11 insertions(+), 7 deletions(-)
diff --git a/lib/librte_mempool/rte_mempool.h b/lib/librte_mempool/rte_mempo
ring debug stat won't take care non-EAL thread.
Signed-off-by: Cunming Liang
---
lib/librte_ring/rte_ring.h | 10 ++
1 file changed, 6 insertions(+), 4 deletions(-)
diff --git a/lib/librte_ring/rte_ring.h b/lib/librte_ring/rte_ring.h
index 7cd5f2d..39bacdd 100644
--- a/lib/librte
uld simply do nothing and return
straightway.
Signed-off-by: Cunming Liang
---
lib/librte_timer/rte_timer.c | 40 +++-
lib/librte_timer/rte_timer.h | 2 +-
2 files changed, 32 insertions(+), 10 deletions(-)
diff --git a/lib/librte_timer/rte_timer.c b/
thread.
It fix the gaps running libraries in non-EAL thread(dynamic created by user).
Each fix libraries take care the case of rte_lcore_id() >= RTE_MAX_LCORE.
Thanks a million for the comments from Konstantin, Bruce, Mirek and Stephen in
RFC review.
*** BLURB HERE ***
Cunming Liang (15):
he EAL thread to multiple cpus.
Signed-off-by: Cunming Liang
---
lib/librte_eal/bsdapp/eal/eal_lcore.c | 7 +++
lib/librte_eal/bsdapp/eal/eal_memory.c| 2 ++
lib/librte_eal/common/include/rte_lcore.h | 8
lib/librte_eal/linuxapp/eal/Makefile | 1 +
lib/librte_eal/linux
4,5 runs on cpuset 0x5 (cpu 0,2)
lcore 6 runs on cpuset 0x41 (cpu 0,6)
lcore 7 runs on cpuset 0x80 (cpu 7)
lcore 8 runs on cpuset 0x100 (cpu 8)
Signed-off-by: Cunming Liang
---
lib/librte_eal/common/eal_common_launch.c | 1 -
lib/librte_eal/common/eal_common_options.c | 300 +++
It returns the socket_id if all cpus in the cpuset belongs
to the same NUMA node, otherwise it will return SOCKET_ID_ANY.
Signed-off-by: Cunming Liang
---
lib/librte_eal/bsdapp/eal/eal_lcore.c | 7 +
lib/librte_eal/common/eal_thread.h | 52 +
lib
1. add two TLS *_socket_id* and *_cpuset*
2. add two external API rte_thread_set/get_affinity
3. add one internal API eal_thread_dump_affinity
Signed-off-by: Cunming Liang
---
lib/librte_eal/bsdapp/eal/eal_thread.c| 2 ++
lib/librte_eal/common/eal_thread.h| 14 ++
lib
The API works for both EAL thread and none EAL thread.
When calling rte_thread_set_affinity, the *_socket_id* and
*_cpuset* of calling thread will be updated if the thread
successful set the cpu affinity.
Signed-off-by: Cunming Liang
---
lib/librte_eal/bsdapp/eal/Makefile| 1 +
lib
EAL threads use assigned cpuset to set core affinity during startup.
It keeps 1:1 mapping, if no '--lcores' option is used.
Signed-off-by: Cunming Liang
---
lib/librte_eal/bsdapp/eal/eal.c | 13 ---
lib/librte_eal/bsdapp/eal/eal_thread.c | 63 +
Some macro already been defined by freebsd 'sys/param.h'.
Signed-off-by: Cunming Liang
---
lib/librte_pmd_enic/enic.h| 1 +
lib/librte_pmd_enic/enic_compat.h | 1 +
2 files changed, 2 insertions(+)
diff --git a/lib/librte_pmd_enic/enic.h b/lib/librte_pmd_enic/enic.h
ind
For those none EAL thread, *_lcore_id* shall always be LCORE_ID_ANY.
The libraries using *_lcore_id* as index need to take care.
*_socket_id* always be SOCKET_ID_ANY unitl the thread changes the affinity
by rte_thread_set_affinity()
Signed-off-by: Cunming Liang
---
lib/librte_eal/bsdapp/eal
In non-EAL thread, lcore_id alrways be LCORE_ID_ANY.
It cann't be used as unique id for recursive spinlock.
Then use rte_gettid() to replace it.
Signed-off-by: Cunming Liang
---
lib/librte_eal/common/include/generic/rte_spinlock.h | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
l.
It will get bad performance and has critical risk if scheduling policy is RT.
Signed-off-by: Cunming Liang
---
lib/librte_mempool/rte_mempool.h | 18 +++---
1 file changed, 11 insertions(+), 7 deletions(-)
diff --git a/lib/librte_mempool/rte_mempool.h b/lib/librte_mempool/rte_mempo
The rte_gettid() wraps the linux and freebsd syscall gettid().
It provides a persistent unique thread id for the calling thread.
It will save the unique id in TLS on the first time.
Signed-off-by: Cunming Liang
---
lib/librte_eal/bsdapp/eal/eal_thread.c | 9 +
lib/librte_eal/common
ring debug stat won't take care non-EAL thread.
Signed-off-by: Cunming Liang
---
lib/librte_ring/rte_ring.h | 10 ++
1 file changed, 6 insertions(+), 4 deletions(-)
diff --git a/lib/librte_ring/rte_ring.h b/lib/librte_ring/rte_ring.h
index 7cd5f2d..39bacdd 100644
--- a/lib/librte
uld simply do nothing and return
straightway.
Signed-off-by: Cunming Liang
---
lib/librte_timer/rte_timer.c | 40 +++-
lib/librte_timer/rte_timer.h | 2 +-
2 files changed, 32 insertions(+), 10 deletions(-)
diff --git a/lib/librte_timer/rte_timer.c b/
For those non-EAL thread, *_lcore_id* is invalid and probably larger than
RTE_MAX_LCORE.
The patch adds the check and allows only EAL thread using EAL per thread log
level and log type.
Others shares the global log level.
Signed-off-by: Cunming Liang
---
lib/librte_eal/common/eal_common_log.c
Add check for rte_socket_id(), avoid get unexpected return like (-1).
Signed-off-by: Cunming Liang
---
lib/librte_malloc/malloc_heap.h | 7 ++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/lib/librte_malloc/malloc_heap.h b/lib/librte_malloc/malloc_heap.h
index b4aec45
rek and Stephen in
RFC review.
*** BLURB HERE ***
Cunming Liang (16):
eal: add cpuset into per EAL thread lcore_config
eal: new eal option '--lcores' for cpu assignment
eal: add support parsing socket_id from cpuset
eal: new TLS definition and API declaration
eal: add eal_comm
he EAL thread to multiple cpus.
Signed-off-by: Cunming Liang
---
lib/librte_eal/bsdapp/eal/eal_lcore.c | 7 +++
lib/librte_eal/bsdapp/eal/eal_memory.c| 2 ++
lib/librte_eal/common/include/rte_lcore.h | 8
lib/librte_eal/linuxapp/eal/Makefile | 1 +
lib/librte_eal/linux
4,5 runs on cpuset 0x5 (cpu 0,2)
lcore 6 runs on cpuset 0x41 (cpu 0,6)
lcore 7 runs on cpuset 0x80 (cpu 7)
lcore 8 runs on cpuset 0x100 (cpu 8)
Signed-off-by: Cunming Liang
---
lib/librte_eal/common/eal_common_launch.c | 1 -
lib/librte_eal/common/eal_common_options.c | 300 +++
1 - 100 of 410 matches
Mail list logo