[dpdk-dev] [PATCH 1/5] ixgbe: avoid compiler error when RTE_IXGBE_INC_VECTOR=y and RTE_LIBRTE_IXGBE_RX_ALLOC_BULK_ALLOC=n

2014-06-26 Thread Cunming Liang
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

[dpdk-dev] [PATCH 2/5] ixgbe: fix vpmd compiling error when RTE_LIBRTE_IEEE1588=y

2014-06-26 Thread Cunming Liang
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

[dpdk-dev] [PATCH 0/5] ixgbe: vPMD compiling issue and testpmd default value change

2014-06-26 Thread Cunming Liang
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

[dpdk-dev] [PATCH 5/5] testpmd: change some of testpmd default parameter to well tuned value

2014-06-26 Thread Cunming Liang
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

[dpdk-dev] [PATCH 3/5] ixgbe: not 'DISABLE' may make confuse, change RTE_IXGBE_RX_OLFLAGS_DISABLE=n to RTE_IXGBE_RX_OLFLAGS_ENABLE=y

2014-06-26 Thread Cunming Liang
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

[dpdk-dev] [PATCH 4/5] ixgbe: set default burst size 32 in testpmd

2014-06-26 Thread Cunming Liang
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 ---

[dpdk-dev] [PATCH v7 0/7] app/test: unit test to measure cycles per packet

2014-11-12 Thread Cunming Liang
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

[dpdk-dev] [PATCH v7 1/7] app/test: allow to create packets in different sizes

2014-11-12 Thread Cunming Liang
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

[dpdk-dev] [PATCH v7 2/7] ixgbe:clean scattered_rx configure in dev_stop

2014-11-12 Thread Cunming Liang
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

[dpdk-dev] [PATCH v7 3/7] ether: new API to format eth_addr in string

2014-11-12 Thread Cunming Liang
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

[dpdk-dev] [PATCH v7 4/7] app/testpmd: cleanup eth_addr print

2014-11-12 Thread Cunming Liang
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

[dpdk-dev] [PATCH v7 6/7] app/test: measure the cost of rx/tx routines by cycle number

2014-11-12 Thread Cunming Liang
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

[dpdk-dev] [PATCH v7 7/7] ethdev: fix wrong error return refere to API definition

2014-11-12 Thread Cunming Liang
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

[dpdk-dev] [PATCH v7 5/7] examples: cleanup eth_addr print

2014-11-12 Thread Cunming Liang
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

[dpdk-dev] [PATCH v2] i40e: support autoneg or force link speed

2014-08-25 Thread Cunming Liang
- 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

[dpdk-dev] [PATCH 0/5] app/test: unit test to measure cycles per packet

2014-08-25 Thread Cunming Liang
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

[dpdk-dev] [PATCH 1/5] app/test: unit test for rx and tx cycles/packet

2014-08-25 Thread Cunming Liang
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

[dpdk-dev] [PATCH 2/5] app/test: measure standalone rx or tx cycles/packet

2014-08-25 Thread Cunming Liang
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

[dpdk-dev] [PATCH 5/5] app/test: allow to create packets in different sizes

2014-08-25 Thread Cunming Liang
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

[dpdk-dev] [PATCH 3/5] ixgbe/vpmd: add fix to store unaligned mbuf point array

2014-08-25 Thread Cunming Liang
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

[dpdk-dev] [PATCH 4/5] app/test: add unit test to measure RX burst cycles

2014-08-25 Thread Cunming Liang
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

[dpdk-dev] [RFC PATCH 0/7] support multi-phtread per lcore

2014-12-11 Thread Cunming Liang
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

[dpdk-dev] [RFC PATCH 1/7] eal: add linear thread id as pthread-local variable

2014-12-11 Thread Cunming Liang
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

[dpdk-dev] [RFC PATCH 2/7] mempool: use linear-tid as mempool cache index

2014-12-11 Thread Cunming Liang
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

[dpdk-dev] [RFC PATCH 3/7] ring: use linear-tid as ring debug stats index

2014-12-11 Thread Cunming Liang
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

[dpdk-dev] [RFC PATCH 4/7] eal: add simple API for multi-pthread

2014-12-11 Thread Cunming Liang
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

[dpdk-dev] [RFC PATCH 5/7] testpmd: support multi-pthread mode

2014-12-11 Thread Cunming Liang
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

[dpdk-dev] [RFC PATCH 6/7] sample: add new sample for multi-pthread

2014-12-11 Thread Cunming Liang
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

[dpdk-dev] [RFC PATCH 7/7] eal: macro for cpuset w/ or w/o CPU_ALLOC

2014-12-11 Thread Cunming Liang
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

[dpdk-dev] [PATCH] i40e: support autoneg or force link speed

2014-08-01 Thread Cunming Liang
- 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

[dpdk-dev] [PATCH v8 00/11] Interrupt mode PMD

2015-05-21 Thread Cunming Liang
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/

[dpdk-dev] [PATCH v8 01/11] eal/linux: add interrupt vectors support in intr_handle

2015-05-21 Thread Cunming Liang
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

[dpdk-dev] [PATCH v8 03/11] eal/linux: add API to set rx interrupt event monitor

2015-05-21 Thread Cunming Liang
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

[dpdk-dev] [PATCH v8 04/11] eal/linux: fix comments typo on vfio msi

2015-05-21 Thread Cunming Liang
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

[dpdk-dev] [PATCH v8 05/11] eal/linux: add interrupt vectors handling on VFIO

2015-05-21 Thread Cunming Liang
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

[dpdk-dev] [PATCH v8 06/11] eal/linux: standalone intr event fd create support

2015-05-21 Thread Cunming Liang
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

[dpdk-dev] [PATCH v8 07/11] eal/bsd: dummy for new intr definition

2015-05-21 Thread Cunming Liang
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

[dpdk-dev] [PATCH v8 08/11] ethdev: add rx intr enable, disable and ctl functions

2015-05-21 Thread Cunming Liang
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

[dpdk-dev] [PATCH v8 09/11] ixgbe: enable rx queue interrupts for both PF and VF

2015-05-21 Thread Cunming Liang
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

[dpdk-dev] [PATCH v8 10/11] igb: enable rx queue interrupts for PF

2015-05-21 Thread Cunming Liang
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

[dpdk-dev] [PATCH v8 02/11] eal/linux: add rte_epoll_wait/ctl support

2015-05-21 Thread Cunming Liang
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)

[dpdk-dev] [PATCH v8 11/11] l3fwd-power: enable one-shot rx interrupt and polling/interrupt mode switch

2015-05-21 Thread Cunming Liang
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

[dpdk-dev] [PATCH] i40e: fix no effect wait_to_complete on link_get

2015-04-01 Thread Cunming Liang
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 ---

[dpdk-dev] [PATCH v2] ixgbe: remove vector pmd burst size restriction

2015-08-04 Thread Cunming Liang
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-

[dpdk-dev] [PATCH v3] ixgbe: remove vector pmd burst size restriction

2015-08-04 Thread Cunming Liang
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-

[dpdk-dev] [PATCH v1] doc: prog_guide update for RX interrupt event

2015-08-06 Thread Cunming Liang
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

[dpdk-dev] [PATCH v1] eal: fix negative value incorrectly being used defect

2015-12-11 Thread Cunming Liang
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

[dpdk-dev] [PATCH v4 00/17] support multi-pthread per core

2015-02-02 Thread Cunming Liang
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

[dpdk-dev] [PATCH v4 01/17] eal: add cpuset into per EAL thread lcore_config

2015-02-02 Thread Cunming Liang
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

[dpdk-dev] [PATCH v4 04/17] eal: add support parsing socket_id from cpuset

2015-02-02 Thread Cunming Liang
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

[dpdk-dev] [PATCH v4 03/17] eal: fix wrong strnlen() return value in 32bit icc

2015-02-02 Thread Cunming Liang
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

[dpdk-dev] [PATCH v4 05/17] eal: new TLS definition and API declaration

2015-02-02 Thread Cunming Liang
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

[dpdk-dev] [PATCH v4 06/17] eal: add eal_common_thread.c for common thread API

2015-02-02 Thread Cunming Liang
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

[dpdk-dev] [PATCH v4 02/17] eal: new eal option '--lcores' for cpu assignment

2015-02-02 Thread Cunming Liang
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 +++

[dpdk-dev] [PATCH v4 07/17] eal: add rte_gettid() to acquire unique system tid

2015-02-02 Thread Cunming Liang
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

[dpdk-dev] [PATCH v4 08/17] eal: apply affinity of EAL thread by assigned cpuset

2015-02-02 Thread Cunming Liang
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 +

[dpdk-dev] [PATCH v4 09/17] enic: fix re-define freebsd compile complain

2015-02-02 Thread Cunming Liang
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

[dpdk-dev] [PATCH v4 10/17] malloc: fix the issue of SOCKET_ID_ANY

2015-02-02 Thread Cunming Liang
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

[dpdk-dev] [PATCH v4 11/17] log: fix the gap to support non-EAL thread

2015-02-02 Thread Cunming Liang
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

[dpdk-dev] [PATCH v4 13/17] eal: fix recursive spinlock in non-EAL thraed

2015-02-02 Thread Cunming Liang
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(-)

[dpdk-dev] [PATCH v4 12/17] eal: set _lcore_id and _socket_id to (-1) by default

2015-02-02 Thread Cunming Liang
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

[dpdk-dev] [PATCH v4 15/17] ring: add support to non-EAL thread

2015-02-02 Thread Cunming Liang
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

[dpdk-dev] [PATCH v4 17/17] timer: add support to non-EAL thread

2015-02-02 Thread Cunming Liang
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/

[dpdk-dev] [PATCH v4 16/17] ring: add sched_yield to avoid spin forever

2015-02-02 Thread Cunming Liang
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

[dpdk-dev] [PATCH v4 14/17] mempool: add support to non-EAL thread

2015-02-02 Thread 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

[dpdk-dev] [PATCH v1 00/15] support multi-pthread per core

2015-01-22 Thread Cunming Liang
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 '

[dpdk-dev] [PATCH v1 01/15] eal: add cpuset into per EAL thread lcore_config

2015-01-22 Thread Cunming Liang
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

[dpdk-dev] [PATCH v1 04/15] eal: new TLS definition and API declaration

2015-01-22 Thread Cunming Liang
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

[dpdk-dev] [PATCH v1 02/15] eal: new eal option '--lcores' for cpu assignment

2015-01-22 Thread Cunming Liang
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

[dpdk-dev] [PATCH v1 05/15] eal: add eal_common_thread.c for common thread API

2015-01-22 Thread Cunming Liang
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

[dpdk-dev] [PATCH v1 03/15] eal: add support parsing socket_id from cpuset

2015-01-22 Thread Cunming Liang
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

[dpdk-dev] [PATCH v1 06/15] eal: add rte_gettid() to acquire unique system tid

2015-01-22 Thread Cunming Liang
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

[dpdk-dev] [PATCH v1 07/15] eal: apply affinity of EAL thread by assigned cpuset

2015-01-22 Thread Cunming Liang
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 +

[dpdk-dev] [PATCH v1 10/15] log: fix the gap to support non-EAL thread

2015-01-22 Thread Cunming Liang
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

[dpdk-dev] [PATCH v1 08/15] enic: fix re-define freebsd compile complain

2015-01-22 Thread Cunming Liang
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

[dpdk-dev] [PATCH v1 09/15] malloc: fix the issue of SOCKET_ID_ANY

2015-01-22 Thread Cunming Liang
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

[dpdk-dev] [PATCH v1 11/15] eal: set _lcore_id and _socket_id to (-1) by default

2015-01-22 Thread Cunming Liang
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

[dpdk-dev] [PATCH v1 12/15] eal: fix recursive spinlock in non-EAL thraed

2015-01-22 Thread Cunming Liang
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(-)

[dpdk-dev] [PATCH v1 13/15] mempool: add support to non-EAL thread

2015-01-22 Thread 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

[dpdk-dev] [PATCH v1 14/15] ring: add support to non-EAL thread

2015-01-22 Thread Cunming Liang
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

[dpdk-dev] [PATCH v1 15/15] timer: add support to non-EAL thread

2015-01-22 Thread Cunming Liang
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/

[dpdk-dev] [PATCH v2 00/15] support multi-pthread per core

2015-01-28 Thread Cunming Liang
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):

[dpdk-dev] [PATCH v2 01/15] eal: add cpuset into per EAL thread lcore_config

2015-01-28 Thread Cunming Liang
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

[dpdk-dev] [PATCH v2 02/15] eal: new eal option '--lcores' for cpu assignment

2015-01-28 Thread Cunming Liang
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 +++

[dpdk-dev] [PATCH v2 03/15] eal: add support parsing socket_id from cpuset

2015-01-28 Thread Cunming Liang
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

[dpdk-dev] [PATCH v2 04/15] eal: new TLS definition and API declaration

2015-01-28 Thread Cunming Liang
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

[dpdk-dev] [PATCH v2 05/15] eal: add eal_common_thread.c for common thread API

2015-01-28 Thread Cunming Liang
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

[dpdk-dev] [PATCH v2 07/15] eal: apply affinity of EAL thread by assigned cpuset

2015-01-28 Thread Cunming Liang
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 +

[dpdk-dev] [PATCH v2 08/15] enic: fix re-define freebsd compile complain

2015-01-28 Thread Cunming Liang
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

[dpdk-dev] [PATCH v2 11/15] eal: set _lcore_id and _socket_id to (-1) by default

2015-01-28 Thread Cunming Liang
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

[dpdk-dev] [PATCH v2 12/15] eal: fix recursive spinlock in non-EAL thraed

2015-01-28 Thread Cunming Liang
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(-)

[dpdk-dev] [PATCH v2 13/15] mempool: add support to non-EAL thread

2015-01-28 Thread 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

[dpdk-dev] [PATCH v2 06/15] eal: add rte_gettid() to acquire unique system tid

2015-01-28 Thread Cunming Liang
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

[dpdk-dev] [PATCH v2 14/15] ring: add support to non-EAL thread

2015-01-28 Thread Cunming Liang
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

[dpdk-dev] [PATCH v2 15/15] timer: add support to non-EAL thread

2015-01-28 Thread Cunming Liang
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/

[dpdk-dev] [PATCH v2 10/15] log: fix the gap to support non-EAL thread

2015-01-28 Thread Cunming Liang
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

[dpdk-dev] [PATCH v2 09/15] malloc: fix the issue of SOCKET_ID_ANY

2015-01-28 Thread Cunming Liang
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

[dpdk-dev] [PATCH v3 00/16] support multi-pthread per core

2015-01-29 Thread Cunming Liang
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

[dpdk-dev] [PATCH v3 01/16] eal: add cpuset into per EAL thread lcore_config

2015-01-29 Thread Cunming Liang
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

[dpdk-dev] [PATCH v3 02/16] eal: new eal option '--lcores' for cpu assignment

2015-01-29 Thread Cunming Liang
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   2   3   4   5   >