[dpdk-dev] [PATCH] maintainers: resign from vhost and vdev

2018-05-03 Thread Jianfeng Tan
Signed-off-by: Jianfeng Tan --- MAINTAINERS | 3 --- 1 file changed, 3 deletions(-) diff --git a/MAINTAINERS b/MAINTAINERS index ce06e93..a482470 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -393,7 +393,6 @@ PCI bus driver F: drivers/bus/pci/ VDEV bus driver -M: Jianfeng Tan F: drivers

[dpdk-dev] [PATCH v3] eal: fix use-after-free issue on thread creation

2018-05-02 Thread Jianfeng Tan
it's caused by use-after-free. Fixes: 3d09a6e26d8b ("eal: fix threads block on barrier") Reported-by: Maxime Coquelin Reported-by: Lei Yao Suggested-by: Stephen Hemminger Signed-off-by: Jianfeng Tan Suggested-by: Olivier Matz --- v1->v2: - Destroy barrier if failur

[dpdk-dev] [PATCH] eal: fix memory leak

2018-05-02 Thread Jianfeng Tan
params is not freed if pthread_create() fails. The fix is straight-forward. Fixes: 3d09a6e26d8b ("eal: fix threads block on barrier") Reported-by: Olivier Matz Signed-off-by: Jianfeng Tan --- lib/librte_eal/common/eal_common_thread.c | 4 +++- 1 file changed, 3 insertions(+),

[dpdk-dev] [PATCH v2] eal: fix use-after-free issue on thread creation

2018-05-02 Thread Jianfeng Tan
it's caused by use-after-free. Fixes: 3d09a6e26d8b ("eal: fix threads block on barrier") Reported-by: Maxime Coquelin Reported-by: Lei Yao Suggested-by: Stephen Hemminger Signed-off-by: Jianfeng Tan --- v1->v2: - Destroy barrier if failure happens. lib/librte_eal/common/e

[dpdk-dev] [PATCH] eal: fix use-after-free issue on thread creation

2018-05-02 Thread Jianfeng Tan
it's caused by use-after-free. Fixes: 3d09a6e26d8b ("eal: fix threads block on barrier") Reported-by: Maxime Coquelin Reported-by: Lei Yao Suggested-by: Stephen Hemminger Signed-off-by: Jianfeng Tan --- lib/librte_eal/common/eal_common_thread.c | 14 +++--- 1 f

[dpdk-dev] [PATCH] eal: fix threads block on barrier

2018-04-27 Thread Jianfeng Tan
ntrol threads") Cc: Olivier Matz Cc: Anatoly Burakov Signed-off-by: Jianfeng Tan --- lib/librte_eal/common/eal_common_thread.c | 20 +--- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/lib/librte_eal/common/eal_common_thread.c b/lib/librte_eal/common/eal_commo

[dpdk-dev] [PATCH] net/virtio-user: fix hugepage files enumeration

2018-04-26 Thread Jianfeng Tan
files; and adjust the size after the enumeration. Fixes: 6a84c37e3975 ("net/virtio-user: add vhost-user adapter layer") Signed-off-by: Jianfeng Tan --- .../howto/virtio_user_for_container_networking.rst | 3 ++- drivers/net/virtio/virtio_user/vhost_user.c| 28 +++

[dpdk-dev] [PATCH] mem: fix handling return value

2018-04-26 Thread Jianfeng Tan
resize_hugefile() returns either 0 (which indicates success) or -1 (which indicates failure). We failed to check the success as we use --single-file-segments option. Fixes: 2a04139f66b4 ("eal: add single file segments option") Cc: Anatoly Burakov Signed-off-by: Jianfeng Tan

[dpdk-dev] [PATCH v5 5/5] drivers/net: share vdev data to secondary process

2018-04-23 Thread Jianfeng Tan
which do not support multi-process. Reported-by: Signed-off-by: Vipin Varghese Signed-off-by: Jianfeng Tan Reviewed-by: Qi Zhang --- doc/guides/rel_notes/release_18_05.rst| 5 + drivers/net/af_packet/rte_eth_af_packet.c | 17 +++-- drivers/net/bonding/rte_eth_bond_pmd.c

[dpdk-dev] [PATCH v5 2/5] bus/vdev: add lock on vdev device list

2018-04-23 Thread Jianfeng Tan
As we could add virtual devices from different threads now, we add a spin lock to protect the vdev device list. Suggested-by: Anatoly Burakov Signed-off-by: Jianfeng Tan Reviewed-by: Qi Zhang Acked-by: Anatoly Burakov --- drivers/bus/vdev/vdev.c | 95

[dpdk-dev] [PATCH v5 3/5] bus/vdev: bus scan by multi-process channel

2018-04-23 Thread Jianfeng Tan
To scan the vdevs in primary, we send request to primary process to obtain the names for vdevs. Only the name is shared from the primary. In probe(), the device driver is supposed to locate (or request more) the detail information from the primary. Signed-off-by: Jianfeng Tan Reviewed-by: Qi

[dpdk-dev] [PATCH v5 1/5] eal: bring forward multi-process channel init

2018-04-23 Thread Jianfeng Tan
Adjust the init sequence: put mp channel init before bus scan so that we can init the vdev bus through mp channel in the secondary process before the bus scan. Signed-off-by: Jianfeng Tan Reviewed-by: Qi Zhang --- lib/librte_eal/bsdapp/eal/eal.c | 23 +-- lib/librte_eal

[dpdk-dev] [PATCH v5 4/5] drivers/net: not use private eth dev data

2018-04-23 Thread Jianfeng Tan
Signed-off-by: Jianfeng Tan Reviewed-by: Qi Zhang --- drivers/net/af_packet/rte_eth_af_packet.c | 26 +++--- drivers/net/cxgbe/cxgbe_main.c| 1 - drivers/net/kni/rte_eth_kni.c | 14 ++ drivers/net/null/rte_eth_null.c | 19

[dpdk-dev] [PATCH v5 0/5] allow procinfo and pdump on eth vdev

2018-04-23 Thread Jianfeng Tan
pmd with a vhost port and a VM connected to it. Step 1: try using dpdk-procinfo to get the stats. $(dpdk-procinfo) --log-level=8 --no-pci -- --stats Step 2: try using dpdk-pdump to dump the packets. $(dpdk-pdump) -- --pdump 'port=0,queue=*,rx-dev=/tmp/rx.pcap' Jianfeng Tan (5):

[dpdk-dev] [PATCH v4 4/5] drivers/net: not use private eth dev data

2018-04-20 Thread Jianfeng Tan
Signed-off-by: Jianfeng Tan Reviewed-by: Qi Zhang --- drivers/net/af_packet/rte_eth_af_packet.c | 26 +++--- drivers/net/cxgbe/cxgbe_main.c| 1 - drivers/net/kni/rte_eth_kni.c | 14 ++ drivers/net/null/rte_eth_null.c | 19

[dpdk-dev] [PATCH v4 5/5] drivers/net: share vdev data to secondary process

2018-04-20 Thread Jianfeng Tan
which do not support multi-process. Reported-by: Signed-off-by: Vipin Varghese Signed-off-by: Jianfeng Tan Reviewed-by: Qi Zhang --- doc/guides/rel_notes/release_18_05.rst| 5 + drivers/net/af_packet/rte_eth_af_packet.c | 17 +++-- drivers/net/bonding/rte_eth_bond_pmd.c

[dpdk-dev] [PATCH v4 3/5] bus/vdev: bus scan by multi-process channel

2018-04-20 Thread Jianfeng Tan
To scan the vdevs in primary, we send request to primary process to obtain the names for vdevs. Only the name is shared from the primary. In probe(), the device driver is supposed to locate (or request more) the detail information from the primary. Signed-off-by: Jianfeng Tan Reviewed-by: Qi

[dpdk-dev] [PATCH v4 2/5] bus/vdev: add lock on vdev device list

2018-04-20 Thread Jianfeng Tan
As we could add virtual devices from different threads now, we add a spin lock to protect the vdev device list. Suggested-by: Anatoly Burakov Signed-off-by: Jianfeng Tan Reviewed-by: Qi Zhang --- drivers/bus/vdev/vdev.c | 95 +++-- 1 file changed

[dpdk-dev] [PATCH v4 0/5] allow procinfo and pdump on eth vdev

2018-04-20 Thread Jianfeng Tan
the stats. $(dpdk-procinfo) --log-level=8 --no-pci -- --stats Step 2: try using dpdk-pdump to dump the packets. $(dpdk-pdump) -- --pdump 'port=0,queue=*,rx-dev=/tmp/rx.pcap' Jianfeng Tan (5): eal: bring forward multi-process channel init bus/vdev: add lock on vdev device list b

[dpdk-dev] [PATCH v4 1/5] eal: bring forward multi-process channel init

2018-04-20 Thread Jianfeng Tan
Adjust the init sequence: put mp channel init before bus scan so that we can init the vdev bus through mp channel in the secondary process before the bus scan. Signed-off-by: Jianfeng Tan Reviewed-by: Qi Zhang --- lib/librte_eal/bsdapp/eal/eal.c | 23 +-- lib/librte_eal

[dpdk-dev] [PATCH v2 2/2] ipc: fix timeout not properly handled in async

2018-04-20 Thread Jianfeng Tan
quest") Signed-off-by: Jianfeng Tan Signed-off-by: Anatoly Burakov Acked-by: Anatoly Burakov --- lib/librte_eal/common/eal_common_proc.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/lib/librte_eal/common/eal_common_proc.c b/lib/librte_eal/common/eal_common_proc.c index f8cb0e

[dpdk-dev] [PATCH v2 0/2] code clean up and fix in ipc

2018-04-20 Thread Jianfeng Tan
v2: - Fix typo. - Rebase on below patches: http://dpdk.org/dev/patchwork/patch/38358/ http://dpdk.org/dev/patchwork/patch/38359/ http://dpdk.org/dev/patchwork/patch/38360/ Patch 1 is to rename some variable names for better readability. Patch 2 is a bug fix. Jianfeng Tan (2

[dpdk-dev] [PATCH v2 1/2] ipc: clearn up code

2018-04-20 Thread Jianfeng Tan
Following below commit, we change some internal function and variable names: commit ce3a7312357b ("eal: rename IPC request as synchronous one") Also use calloc to supersede malloc + memset for code clean up. Signed-off-by: Jianfeng Tan Acked-by: Anatoly Burakov --- lib/librte_

[dpdk-dev] [PATCH 1/2] ipc: clearn up code

2018-04-19 Thread Jianfeng Tan
Following below commit, we change some internal function and variable names: commit ce3a7312357b ("eal: rename IPC request as synchronous one") Also use calloc to supersede malloc + memset for code clean up. Signed-off-by: Jianfeng Tan --- lib/librte_eal/common/eal_common_p

[dpdk-dev] [PATCH 2/2] ipc: fix timeout not properly handled in async

2018-04-19 Thread Jianfeng Tan
quest") Signed-off-by: Jianfeng Tan Signed-off-by: Anatoly Burakov --- lib/librte_eal/common/eal_common_proc.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/lib/librte_eal/common/eal_common_proc.c b/lib/librte_eal/common/eal_common_proc.c index 070a075..27de16e 100644 --- a/lib/

[dpdk-dev] [PATCH 0/2] code clean up and fix in ipc

2018-04-19 Thread Jianfeng Tan
Patch 1 is to rename some variable names for better readability. Patch 2 is a bug fix. Jianfeng Tan (2): ipc: clearn up code ipc: fix timeout not properly handled in async lib/librte_eal/common/eal_common_proc.c | 88 - 1 file changed, 44 insertions(+), 44

[dpdk-dev] [PATCH v3 4/5] drivers/net: not use private eth dev data

2018-04-19 Thread Jianfeng Tan
Signed-off-by: Jianfeng Tan Reviewed-by: Qi Zhang --- drivers/net/af_packet/rte_eth_af_packet.c | 26 +++--- drivers/net/cxgbe/cxgbe_main.c| 1 - drivers/net/kni/rte_eth_kni.c | 14 ++ drivers/net/null/rte_eth_null.c | 19

[dpdk-dev] [PATCH v3 5/5] drivers/net: share vdev data to secondary process

2018-04-19 Thread Jianfeng Tan
which do not support multi-process. Reported-by: Signed-off-by: Vipin Varghese Signed-off-by: Jianfeng Tan Reviewed-by: Qi Zhang --- doc/guides/rel_notes/release_18_05.rst| 5 + drivers/net/af_packet/rte_eth_af_packet.c | 17 +++-- drivers/net/bonding/rte_eth_bond_pmd.c

[dpdk-dev] [PATCH v3 1/5] eal: bring forward multi-process channel init

2018-04-19 Thread Jianfeng Tan
Adjust the init sequence: put mp channel init before bus scan so that we can init the vdev bus through mp channel in the secondary process before the bus scan. Signed-off-by: Jianfeng Tan Reviewed-by: Qi Zhang --- lib/librte_eal/bsdapp/eal/eal.c | 23 +-- lib/librte_eal

[dpdk-dev] [PATCH v3 3/5] bus/vdev: bus scan by multi-process channel

2018-04-19 Thread Jianfeng Tan
To scan the vdevs in primary, we send request to primary process to obtain the names for vdevs. Only the name is shared from the primary. In probe(), the device driver is supposed to locate (or request more) the detail information from the primary. Signed-off-by: Jianfeng Tan Reviewed-by: Qi

[dpdk-dev] [PATCH v3 2/5] bus/vdev: add lock on vdev device list

2018-04-19 Thread Jianfeng Tan
As we could add virtual devices from different threads now, we add a spin lock to protect the vdev device list. Suggested-by: Anatoly Burakov Signed-off-by: Jianfeng Tan Reviewed-by: Qi Zhang --- drivers/bus/vdev/vdev.c | 61 + 1 file changed

[dpdk-dev] [PATCH v3 0/5] allow procinfo and pdump on eth vdev

2018-04-19 Thread Jianfeng Tan
he packets. $(dpdk-pdump) -- --pdump 'port=0,queue=*,rx-dev=/tmp/rx.pcap' Jianfeng Tan (5): eal: bring forward multi-process channel init bus/vdev: add lock on vdev device list bus/vdev: bus scan by multi-process channel drivers/net: not use private eth dev data drivers/net: share vd

[dpdk-dev] [RFC 8/8] ipc: remove IPC thread for message read

2018-04-19 Thread Jianfeng Tan
. Now, we change to make use of the IPC event callback mechanism (added in previous patch); in other words, we merge this into interrupt thread. Cc: Anatoly Burakov Suggested-by: Thomas Monjalon Signed-off-by: Jianfeng Tan --- lib/librte_eal/common/eal_common_proc.c | 38

[dpdk-dev] [RFC 7/8] eal: add IPC type for interrupt thread

2018-04-19 Thread Jianfeng Tan
We are going to merge IPC into interrupt thread. This patch adds IPC type for interrupt thread. Signed-off-by: Jianfeng Tan --- lib/librte_eal/common/include/rte_eal_interrupts.h | 1 + lib/librte_eal/linuxapp/eal/eal_interrupts.c | 5 test/test/test_interrupts.c

[dpdk-dev] [RFC 6/8] eal: bring forward init of interrupt handling

2018-04-19 Thread Jianfeng Tan
IPC will reply on interrupt handling, so we move forward the init of interrupt handling. Signed-off-by: Jianfeng Tan --- lib/librte_eal/linuxapp/eal/eal.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/lib/librte_eal/linuxapp/eal/eal.c b/lib/librte_eal/linuxapp

[dpdk-dev] [RFC 5/8] eal/linux: use glibc malloc in interrupt handling

2018-04-19 Thread Jianfeng Tan
We will rely on interrupt thread to implement IPC; and IPC initialization is in very early stage, when memory subsystem is not initialized yet. So we change to use glibc malloc/free. Signed-off-by: Jianfeng Tan --- lib/librte_eal/linuxapp/eal/eal_interrupts.c | 13 + 1 file changed

[dpdk-dev] [RFC 4/8] ipc: remove IPC thread for async request

2018-04-19 Thread Jianfeng Tan
, alarm will invoke the async_reply_handle() as the alarm callback. Cc: Anatoly Burakov Suggested-by: Thomas Monjalon Signed-off-by: Jianfeng Tan --- lib/librte_eal/common/eal_common_proc.c | 169 1 file changed, 43 insertions(+), 126 deletions(-) diff --git a/lib

[dpdk-dev] [RFC 3/8] eal/linux: use glibc malloc in alarm

2018-04-19 Thread Jianfeng Tan
We will reply on alarm API for async IPC request as following patch indicates. rte_malloc could require async IPC request. To avoid such chicken or the egg causality dilemma, we change to use glibc malloc in alarm implimentation. Signed-off-by: Jianfeng Tan --- lib/librte_eal/linuxapp/eal

[dpdk-dev] [RFC 1/8] ipc: clearn up code

2018-04-19 Thread Jianfeng Tan
Following below commit, we change some internal function and variable names: commit ce3a7312357b ("eal: rename IPC request as synchronous one") Also use calloc to supersede malloc + memset for code clean up. Signed-off-by: Jianfeng Tan --- lib/librte_eal/common/eal_common_p

[dpdk-dev] [RFC 2/8] ipc: fix timeout not properly handled in async

2018-04-19 Thread Jianfeng Tan
quest") Signed-off-by: Jianfeng Tan Signed-off-by: Anatoly Burakov --- lib/librte_eal/common/eal_common_proc.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/lib/librte_eal/common/eal_common_proc.c b/lib/librte_eal/common/eal_common_proc.c index 070a075..27de16e 100644 --- a/lib/

[dpdk-dev] [RFC 0/8] remove IPC threads

2018-04-19 Thread Jianfeng Tan
t handling thread and alarm. It's OK for Linux-specific subsystem/feature, like memory hotplug and vfio; while pdump and vdev auto discovery could be on FreeBSD. So it's like that we also need to implement interrupt handling thread and alarm for FreeBSD. Jianfeng Tan (8): ipc:

[dpdk-dev] [PATCH v7] vfio: change to use generic multi-process channel

2018-04-15 Thread Jianfeng Tan
-- -p 3 --num-procs=2 --proc-id=0 $ (symmetric_mp) -c 4 --proc-type=auto -- -p 3 \ --num-procs=2 --proc-id=1 Cc: anatoly.bura...@intel.com Signed-off-by: Jianfeng Tan Acked-by: Anatoly Burakov --- lib/librte_eal/linuxapp/eal/eal.c | 22 +- lib

[dpdk-dev] [PATCH v2 5/5] drivers/net: share vdev data to secondary process

2018-04-05 Thread Jianfeng Tan
which do not support multi-process. Reported-by: Signed-off-by: Vipin Varghese Signed-off-by: Jianfeng Tan --- drivers/net/af_packet/rte_eth_af_packet.c | 17 +++-- drivers/net/bonding/rte_eth_bond_pmd.c| 13 + drivers/net/failsafe/failsafe.c | 14

[dpdk-dev] [PATCH v2 4/5] drivers/net: not use private eth dev data

2018-04-05 Thread Jianfeng Tan
Signed-off-by: Jianfeng Tan --- drivers/net/af_packet/rte_eth_af_packet.c | 26 +++--- drivers/net/cxgbe/cxgbe_main.c| 1 - drivers/net/kni/rte_eth_kni.c | 14 ++ drivers/net/null/rte_eth_null.c | 19 --- drivers/net

[dpdk-dev] [PATCH v2 0/5] allow procinfo and pdump on eth vdev

2018-04-05 Thread Jianfeng Tan
-- --pdump 'port=0,queue=*,rx-dev=/tmp/rx.pcap' Jianfeng Tan (5): eal: bring forward multi-process channel init bus/vdev: add lock on vdev device list bus/vdev: bus scan by multi-process channel drivers/net: not use private eth dev data drivers/net: share vdev data to secondary p

[dpdk-dev] [PATCH v2 2/5] bus/vdev: add lock on vdev device list

2018-04-05 Thread Jianfeng Tan
As we could add virtual devices from different threads now, we add a spin lock to protect the vdev device list. Suggested-by: Anatoly Burakov Signed-off-by: Jianfeng Tan --- drivers/bus/vdev/vdev.c | 61 + 1 file changed, 47 insertions(+), 14

[dpdk-dev] [PATCH v2 3/5] bus/vdev: bus scan by multi-process channel

2018-04-05 Thread Jianfeng Tan
To scan the vdevs in primary, we send request to primary process to obtain the names for vdevs. Only the name is shared from the primary. In probe(), the device driver is supposed to locate (or request more) the detail information from the primary. Signed-off-by: Jianfeng Tan --- drivers/bus

[dpdk-dev] [PATCH v2 1/5] eal: bring forward multi-process channel init

2018-04-05 Thread Jianfeng Tan
Adjust the init sequence: put mp channel init before bus scan so that we can init the vdev bus through mp channel in the secondary process before the bus scan. Signed-off-by: Jianfeng Tan --- lib/librte_eal/bsdapp/eal/eal.c | 23 +-- lib/librte_eal/linuxapp/eal/eal.c | 23

[dpdk-dev] [PATCH v4] pdump: change to use generic multi-process channel

2018-04-05 Thread Jianfeng Tan
The original code replies on the private channel for primary and secondary communication. Change to use the generic multi-process channel. Note with this change, dpdk-pdump will be not compatible with old version DPDK applications. Cc: reshma.pat...@intel.com Signed-off-by: Jianfeng Tan --- v4

[dpdk-dev] [PATCH v3] pdump: change to use generic multi-process channel

2018-04-05 Thread Jianfeng Tan
The original code replies on the private channel for primary and secondary communication. Change to use the generic multi-process channel. Note with this change, dpdk-pdump will be not compatible with old version DPDK applications. Cc: reshma.pat...@intel.com Signed-off-by: Jianfeng Tan --- v3

[dpdk-dev] [PATCH v2] pdump: change to use generic multi-process channel

2018-04-04 Thread Jianfeng Tan
The original code replies on the private channel for primary and secondary communication. Change to use the generic multi-process channel. Note with this change, dpdk-pdump will be not compatible with old version DPDK applications. Cc: reshma.pat...@intel.com Signed-off-by: Jianfeng Tan

[dpdk-dev] [PATCH v2] vhost: avoid populate guest memory

2018-03-27 Thread Jianfeng Tan
It's not necessary to populate guest memory from vhost side unless zerocopy is enabled or users want better performance. Update the doc for guest memory requirement clarification. Cc: maxime.coque...@redhat.com Signed-off-by: Jianfeng Tan --- doc/guides/prog_guide/vhost_lib.rst

[dpdk-dev] [PATCH v6] vfio: change to use generic multi-process channel

2018-03-20 Thread Jianfeng Tan
-- -p 3 --num-procs=2 --proc-id=0 $ (symmetric_mp) -c 4 --proc-type=auto -- -p 3 \ --num-procs=2 --proc-id=1 Cc: anatoly.bura...@intel.com Signed-off-by: Jianfeng Tan --- v5->v6: (Address comments from Anatoly) - Naming, return checking, logging. - Move v

[dpdk-dev] [PATCH 3/4] drivers/net: do not allocate rte_eth_dev_data privately

2018-03-04 Thread Jianfeng Tan
in secondary, we must allocate from the pre-defined array so that we can find it. Suggested-by: Bruce Richardson Signed-off-by: Jianfeng Tan --- drivers/net/af_packet/rte_eth_af_packet.c | 25 +++-- drivers/net/kni/rte_eth_kni.c | 13 ++--- drivers/net

[dpdk-dev] [PATCH 4/4] drivers/net: share vdev data to secondary process

2018-03-04 Thread Jianfeng Tan
which do not support multi-process. Reported-by: Signed-off-by: Vipin Varghese Signed-off-by: Jianfeng Tan --- drivers/net/af_packet/rte_eth_af_packet.c | 17 +++-- drivers/net/bonding/rte_eth_bond_pmd.c| 13 + drivers/net/failsafe/failsafe.c | 14

[dpdk-dev] [PATCH 2/4] bus/vdev: bus scan by multi-process channel

2018-03-04 Thread Jianfeng Tan
To scan the vdevs in primary, we send request to primary process to obtain the names for vdevs. Only the name is shared from the primary. In probe(), the device driver is supposed to locate (or request more) the detail information from the primary. Signed-off-by: Jianfeng Tan --- drivers/bus

[dpdk-dev] [PATCH 0/4] allow procinfo and pdump on eth vdev

2018-03-04 Thread Jianfeng Tan
the stats. $(dpdk-procinfo) --log-level=8 --no-pci -- --stats Step 2: try using dpdk-pdump to dump the packets. $(dpdk-pdump) -- --pdump 'port=0,queue=*,rx-dev=/tmp/rx.pcap' Jianfeng Tan (4): eal: bring forward multi-process channel init bus/vdev: bus scan by multi-process chann

[dpdk-dev] [PATCH 1/4] eal: bring forward multi-process channel init

2018-03-04 Thread Jianfeng Tan
Adjust the init sequence: put mp channel init before bus scan so that we can init the vdev bus through mp channel in the secondary process before the bus scan. Signed-off-by: Jianfeng Tan --- lib/librte_eal/bsdapp/eal/eal.c | 23 +-- lib/librte_eal/linuxapp/eal/eal.c | 23

[dpdk-dev] [PATCH] pdump: change to use generic multi-process channel

2018-03-04 Thread Jianfeng Tan
The original code replies on the private channel for primary and secondary communication. Change to use the generic multi-process channel. Note with this change, dpdk-pdump will be not compatible with old version DPDK applications. Cc: reshma.pat...@intel.com Signed-off-by: Jianfeng Tan

[dpdk-dev] [PATCH v5] vfio: change to use generic multi-process channel

2018-03-04 Thread Jianfeng Tan
-- -p 3 --num-procs=2 --proc-id=0 $ (symmetric_mp) -c 4 --proc-type=auto -- -p 3 \ --num-procs=2 --proc-id=1 Cc: anatoly.bura...@intel.com Signed-off-by: Jianfeng Tan --- lib/librte_eal/linuxapp/eal/eal.c | 14 +- lib/librte_eal/linuxapp/eal

[dpdk-dev] [RFC] testpmd: handle UFO packets

2018-02-24 Thread Jianfeng Tan
. start vm1 connected to vhost1; $ ifconfig xxx 1.1.1.2/24 up $ ethtool -K xxx ufo on $ (Fill a large file named 1.txt) $ cat 1.txt | socat - udp-sendto:1.1.1.1:5000 Signed-off-by: Jianfeng Tan --- app/test-pmd/csumonly.c | 98 + 1 file changed, 98

[dpdk-dev] [PATCH v2] app/testpmd: add option to avoid lock all memory

2018-02-23 Thread Jianfeng Tan
In some cases, we don't want to lock all memory. Add an option --no-mlockall to avoid lock all memory. Cc: wenzhuo...@intel.com Cc: jingjing...@intel.com Signed-off-by: Jianfeng Tan --- app/test-pmd/parameters.c | 5 - app/test-pmd/testpmd.c

[dpdk-dev] [PATCH 3/4] app/testpmd: add option to avoid lock all memory

2018-02-13 Thread Jianfeng Tan
In some cases, we don't want to lock all memory. Add an option --no-mlockall to avoid lock all memory. Cc: wenzhuo...@intel.com Cc: jingjing...@intel.com Signed-off-by: Jianfeng Tan --- app/test-pmd/parameters.c | 5 - app/test-pmd/testpmd.c| 32 ++--

[dpdk-dev] [PATCH 4/4] vhost: avoid populate guest memory

2018-02-13 Thread Jianfeng Tan
It's not necessary to polulate guest memory from vhost side. Cc: maxime.coque...@redhat.com Cc: y...@fridaylinux.org Signed-off-by: Jianfeng Tan --- lib/librte_vhost/vhost_user.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/librte_vhost/vhost_user.c

[dpdk-dev] [PATCH 2/4] vhost: avoid function call in data path

2018-02-13 Thread Jianfeng Tan
Previously, get_device() is a function call. It's OK for slow path configuration, but takes some cycles for data path. To avoid that, we turn this function to inline type. Cc: maxime.coque...@redhat.com Cc: y...@fridaylinux.org Signed-off-by: Jianfeng Tan --- lib/librte_vhost/vhost.c

[dpdk-dev] [PATCH 1/4] vhost: remove unused macro

2018-02-13 Thread Jianfeng Tan
Cc: tomaszx.kula...@intel.com Cc: maxime.coque...@redhat.com Cc: y...@fridaylinux.org Signed-off-by: Jianfeng Tan --- lib/librte_vhost/vhost.h | 2 -- 1 file changed, 2 deletions(-) diff --git a/lib/librte_vhost/vhost.h b/lib/librte_vhost/vhost.h index d947bc9..ecd5b7b 100644 --- a/lib

[dpdk-dev] [PATCH 0/4] some fixes target for 18.05

2018-02-13 Thread Jianfeng Tan
Some trivial fixes, and a vhost memory optimization to avoid polulating guest memory. Jianfeng Tan (4): vhost: remove unused macro vhost: avoid function call in data path app/testpmd: add option to avoid lock all memory vhost: avoid populate guest memory app/test-pmd/parameters.c

[dpdk-dev] [PATCH 2/3] net/virtio-user: fix not working with vhost kernel

2018-02-11 Thread Jianfeng Tan
ed. Fixes: 0d6a8752ac9d ("net/virtio-user: fix crash as features change") Cc: sta...@dpdk.org Signed-off-by: Jianfeng Tan --- drivers/net/virtio/virtio_user/virtio_user_dev.c | 4 1 file changed, 4 insertions(+) diff --git a/drivers/net/virtio/virtio_user/virtio_user_dev.c

[dpdk-dev] [PATCH 3/3] net/virtio-user: fix not proper initialized

2018-02-11 Thread Jianfeng Tan
intr_handle->fd was wrongly initialized as 0 (usually as the stdio fd) when virtio-user is used with vhost-kernel. So the interrupt thread might wrongly treat stdin events as LSC interrupts. Fixes: 3d4fb6fd2505 ("net/virtio-user: support Rx interrupt") Cc: sta...@dpdk.org Signed-off

[dpdk-dev] [PATCH 1/3] net/vhost: fix incorrect log info

2018-02-11 Thread Jianfeng Tan
The original words are not accurate. For example, as destroy_device callback gets called, it does not necessarily mean that the connection is closed. Fixes: ee584e9710b9 ("vhost: add driver on top of the library") Cc: sta...@dpdk.org Cc: mtetsu...@gmail.com Signed-off-by: Ji

[dpdk-dev] [PATCH 0/3] Some fixes on virtio-user/vhost

2018-02-11 Thread Jianfeng Tan
Patch 1: a trivial fix on reword a log message. Patch 2: fix the rxq interrupt mode when virtio-user is used with vhost kernel. Patch 3: a trivial fix on LSC fd init when virtio-user is used with vhost kernel. Jianfeng Tan (3): net/vhost: fix incorrect log info net/virtio

[dpdk-dev] [PATCH] maintainers: update vhost lib and pmd

2018-02-10 Thread Jianfeng Tan
Signed-off-by: Jianfeng Tan --- MAINTAINERS | 2 ++ 1 file changed, 2 insertions(+) diff --git a/MAINTAINERS b/MAINTAINERS index 4f1f33b..38e5fb8 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -559,6 +559,7 @@ F: doc/guides/nics/features/vmxnet3.ini Vhost-user M: Yuanhan Liu M: Maxime

[dpdk-dev] [PATCH v7 2/2] eal: add synchronous multi-process communication

2018-01-29 Thread Jianfeng Tan
s sending request, thread-m of that process can send request at the same time. * For pair , we guarantee that only one such request is on the fly. Suggested-by: Anatoly Burakov Suggested-by: Konstantin Ananyev Signed-off-by: Jianfeng Tan Reviewed-by: Anatoly Burakov Acked-by: Konstanti

[dpdk-dev] [PATCH v7 0/2] generic channel for multi-process communication

2018-01-29 Thread Jianfeng Tan
ncrhonous way for the requests which need a immediate response. Jianfeng Tan (2): eal: add channel for multi-process communication eal: add synchronous multi-process communication doc/guides/rel_notes/release_18_02.rst | 11 + lib/librte_eal/bsdapp/eal/eal.c | 10 +-

[dpdk-dev] [PATCH v7 1/2] eal: add channel for multi-process communication

2018-01-29 Thread Jianfeng Tan
r the action if the calling component does not want to response the messages. 3. rte_eal_mp_sendmsg() is used to send a message, and returns immediately. If there are n secondary processes, the primary process will send n messages. Suggested-by: Konstantin Ananyev Signed-off-by: Jia

[dpdk-dev] [PATCH v6 2/2] eal: add synchronous multi-process communication

2018-01-25 Thread Jianfeng Tan
s sending request, thread-m of that process can send request at the same time. * For pair , we guarantee that only one such request is on the fly. Suggested-by: Anatoly Burakov Suggested-by: Konstantin Ananyev Signed-off-by: Jianfeng Tan Reviewed-by: Anatoly Burakov Acked-by: Konstanti

[dpdk-dev] [PATCH v6 1/2] eal: add channel for multi-process communication

2018-01-25 Thread Jianfeng Tan
r the action if the calling component does not want to response the messages. 3. rte_eal_mp_sendmsg() is used to send a message, and returns immediately. If there are n secondary processes, the primary process will send n messages. Suggested-by: Konstantin Ananyev Signed-off-by: Jia

[dpdk-dev] [PATCH v6 0/2] generic channel for multi-process communication

2018-01-25 Thread Jianfeng Tan
t/rte_eal_mp_reply. - Formalize the errno handle. - Some other small issues. This patchset adds a generic channel for multi-process (primary/secondary) communication. Patch 1: addess the purpose and howto; Patch 2: add a syncrhonous way for the requests which need a immediate response. Jianfeng T

[dpdk-dev] [PATCH v5 2/2] eal: add synchronous multi-process communication

2018-01-25 Thread Jianfeng Tan
s sending request, thread-m of that process can send request at the same time. * For pair , we guarantee that only one such request is on the fly. Suggested-by: Anatoly Burakov Suggested-by: Konstantin Ananyev Signed-off-by: Jianfeng Tan Reviewed-by: Anatoly Burakov Acked-by: Konstanti

[dpdk-dev] [PATCH v5 0/2] generic channel for multi-process communication

2018-01-25 Thread Jianfeng Tan
l issues. This patchset adds a generic channel for multi-process (primary/secondary) communication. Patch 1: addess the purpose and howto; Patch 2: add a syncrhonous way for the requests which need a immediate response. Jianfeng Tan (2): eal: add channel for multi-process communication eal:

[dpdk-dev] [PATCH v5 1/2] eal: add channel for multi-process communication

2018-01-25 Thread Jianfeng Tan
r the action if the calling component does not want to response the messages. 3. rte_eal_mp_sendmsg() is used to send a message, and returns immediately. If there are n secondary processes, the primary process will send n messages. Suggested-by: Konstantin Ananyev Signed-off-by: Jia

[dpdk-dev] [PATCH v4 2/2] vfio: use the generic multi-process channel

2018-01-25 Thread Jianfeng Tan
-- -p 3 --num-procs=2 --proc-id=0 $ (symmetric_mp) -c 4 --proc-type=auto -- -p 3 \ --num-procs=2 --proc-id=1 Signed-off-by: Jianfeng Tan --- lib/librte_eal/linuxapp/eal/eal.c | 14 +- lib/librte_eal/linuxapp/eal/eal_vfio.c | 169

[dpdk-dev] [PATCH v4 1/2] eal: add synchronous multi-process communication

2018-01-25 Thread Jianfeng Tan
s sending request, thread-m of that process can send request at the same time. * For pair , we guarantee that only one such request is on the fly. Suggested-by: Anatoly Burakov Suggested-by: Konstantin Ananyev Signed-off-by: Jianfeng Tan Reviewed-by: Anatoly Burakov Acked-by: Konstanti

[dpdk-dev] [PATCH v4 0/2] generic channel for multi-process communication

2018-01-25 Thread Jianfeng Tan
el for multi-process (primary/secondary) communication. Patch 1: addess the purpose and howto; Patch 2: add a syncrhonous way for the requests which need a immediate response. Jianfeng Tan (2): eal: add synchronous multi-process communication vfio: use the generic multi-process channel doc/guid

[dpdk-dev] [PATCH v3 3/3] vfio: use the generic multi-process channel

2018-01-24 Thread Jianfeng Tan
-- -p 3 --num-procs=2 --proc-id=0 $ (symmetric_mp) -c 4 --proc-type=auto -- -p 3 --num-procs=2 --proc-id=1 Signed-off-by: Jianfeng Tan --- lib/librte_eal/linuxapp/eal/eal.c | 14 +- lib/librte_eal/linuxapp/eal/eal_vfio.c | 172 +-- lib/librte_eal/linuxapp/eal

[dpdk-dev] [PATCH v3 0/3] generic channel for multi-process communication

2018-01-24 Thread Jianfeng Tan
tchset adds a generic channel for multi-process (primary/secondary) communication. Patch 1: addess the purpose and howto; Patch 2: add a syncrhonous way for the requests which need a immediate response. Patch 3: Rework vfio to use this generic communication channel. Jianfeng Tan (3): eal: add c

[dpdk-dev] [PATCH v3 1/3] eal: add channel for multi-process communication

2018-01-24 Thread Jianfeng Tan
r the action if the calling component does not want to response the messages. 3. rte_eal_mp_sendmsg() is used to send a message, and returns immediately. If there are n secondary processes, the primary process will send n messages. Suggested-by: Konstantin Ananyev Signed-off-by: Jia

[dpdk-dev] [PATCH v3 2/3] eal: add synchronous multi-process communication

2018-01-24 Thread Jianfeng Tan
s sending request, thread-m of that process can send request at the same time. * For pair , we guarantee that only one such request is on the fly. Suggested-by: Anatoly Burakov Suggested-by: Konstantin Ananyev Signed-off-by: Jianfeng Tan --- doc/guides/rel_notes/release_18_02.rst | 1

[dpdk-dev] [PATCH v2] net/virtio-user: fix segfault as features change

2018-01-23 Thread Jianfeng Tan
quot;net/virtio-user: fix not properly reset device") Reported-by: Lei Yao Reported-by: Tiwei Bie Signed-off-by: Jianfeng Tan --- v2: Correct commit reference number format. drivers/net/virtio/virtio_user/virtio_user_dev.c | 5 + 1 file changed, 5 insertions(+) diff --git a/drivers/ne

[dpdk-dev] [PATCH] net/virtio-user: fix segfault as features change

2018-01-23 Thread Jianfeng Tan
quot;net/virtio-user: fix not properly reset device") Reported-by: Lei Yao Reported-by: Tiwei Bie Signed-off-by: Jianfeng Tan --- drivers/net/virtio/virtio_user/virtio_user_dev.c | 5 + 1 file changed, 5 insertions(+) diff --git a/drivers/net/virtio/virtio_user/virtio_user_dev.c

[dpdk-dev] [PATCH v2 3/4] eal: add synchronous multi-process communication

2018-01-10 Thread Jianfeng Tan
processes. Suggested-by: Anatoly Burakov Signed-off-by: Jianfeng Tan --- lib/librte_eal/common/eal_common_proc.c | 144 +--- lib/librte_eal/common/include/rte_eal.h | 73 +++- lib/librte_eal/rte_eal_version.map | 2 + 3 files changed, 206 insertions

[dpdk-dev] [PATCH v2 4/4] vfio: use the generic multi-process channel

2018-01-10 Thread Jianfeng Tan
-- -p 3 --num-procs=2 --proc-id=0 $ (symmetric_mp) -c 4 --proc-type=auto -- -p 3 --num-procs=2 --proc-id=1 Signed-off-by: Jianfeng Tan --- lib/librte_eal/linuxapp/eal/eal.c | 14 +- lib/librte_eal/linuxapp/eal/eal_vfio.c | 133 ++-- lib/librte_eal/linuxapp/eal/eal_vfio.h

[dpdk-dev] [PATCH v2 2/4] eal: add and del secondary processes in the primary

2018-01-10 Thread Jianfeng Tan
AL: bind to /var/run/.rte_unix ... EAL: add secondary: /var/run/.testpmd_unix_(xxx) ... 3. Check the log of helloworld: ... EAL: bind to /var/run/.testpmd_unix_xxx EAL: bind to /var/run/.testpmd_unix_c_xxx ... Signed-off-by: Jianfeng Tan --- lib/librte_eal

[dpdk-dev] [PATCH v2 1/4] eal: add channel for multi-process communication

2018-01-10 Thread Jianfeng Tan
ff-by: Jianfeng Tan --- lib/librte_eal/common/eal_common_proc.c | 388 lib/librte_eal/common/eal_filesystem.h | 17 ++ lib/librte_eal/common/eal_private.h | 10 + lib/librte_eal/common/include/rte_eal.h | 69 ++ lib/librte_eal/linuxapp/eal/eal.c

[dpdk-dev] [PATCH v2 0/4] generic channel for multi-process communication

2018-01-10 Thread Jianfeng Tan
wto; Patch 2: secondary process add/del; Patch 3: add a syncrhonous way for the requests which need a immediate response. Patch 4: Rework vfio to use this generic communication channel. Jianfeng Tan (4): eal: add channel for multi-process communication eal: add and del secondary processes in

[dpdk-dev] [PATCH] bus/vdev: scan and probe vdev in secondary processes

2017-11-30 Thread Jianfeng Tan
Base on primary/secondary communication channel [1], we add vdev action to scan virtual devices in secondary processes. [1] http://dpdk.org/dev/patchwork/patch/31838/ Signed-off-by: Jianfeng Tan --- drivers/bus/vdev/vdev.c | 104 ++-- 1 file

[dpdk-dev] [PATCH 1/3] eal: add channel for multi-process communication

2017-11-30 Thread Jianfeng Tan
. 2. rte_eal_mp_action_unregister is used to unregister the action if the calling component does not want to response the messages. 3. rte_eal_mp_sendmsg is used to send a message. Signed-off-by: Jianfeng Tan --- lib/librte_eal/common/eal_common_proc.c | 497 lib/librt

[dpdk-dev] [PATCH 0/3] generic channel for multi-process communication

2017-11-30 Thread Jianfeng Tan
This patchset adds a generic channel for multi-process (primary/secondary) communication. Patch 1: addess the purpose and howto; Patch 2: add a syncrhonous way for those messages which need a response immediately. Patch 3: Rework vfio to use this generic communication channel. Jianfeng Tan (3

[dpdk-dev] [PATCH 3/3] vfio: use the generic multi-process channel

2017-11-30 Thread Jianfeng Tan
Previously, vfio has its own channel for the secondary process to get container fd and group fd from the primary process. This patch changes to use the generic mp channel. Signed-off-by: Jianfeng Tan --- lib/librte_eal/linuxapp/eal/eal.c | 14 +- lib/librte_eal/linuxapp/eal

[dpdk-dev] [PATCH 2/3] eal: add synchronous multi-process communication

2017-11-30 Thread Jianfeng Tan
: Anatoly Burakov Signed-off-by: Jianfeng Tan --- lib/librte_eal/common/eal_common_proc.c | 53 +++-- lib/librte_eal/common/include/rte_eal.h | 5 +++- 2 files changed, 55 insertions(+), 3 deletions(-) diff --git a/lib/librte_eal/common/eal_common_proc.c b/lib

  1   2   3   4   5   6   7   >