[dpdk-dev] [PATCH v2 2/3] examples/l2fwd: Handle SIGINT and SIGTERM in l2fwd

2015-12-28 Thread Wang, Zhihong
Hi Stephen, Really appreciate the detailed review! Please see comments below. > > +static int force_quit = -1; > > +static int signo_quit = -1; > > These need to be volatile otherwise you risk compiler optimizing away your > checks. Yes. Don't wanna take chances here. > > Also, don't use -1/

[dpdk-dev] [PATCH v2 1/3] app/test-pmd: Handle SIGINT and SIGTERM in testpmd

2015-12-28 Thread Wang, Zhihong
> > - cl = cmdline_stdin_new(main_ctx, "testpmd> "); > > - if (cl == NULL) { > > + testpmd_cl = cmdline_stdin_new(main_ctx, "testpmd> "); > > + if (testpmd_cl == NULL) { > > return; > > } > > Style nit: don't need {} around single statement. > > > +static void > > +sigint_

[dpdk-dev] [RFC PATCH 0/6] General tunneling APIs

2015-12-28 Thread Liu, Jijiang
> -Original Message- > From: Stephen Hemminger [mailto:stephen at networkplumber.org] > Sent: Thursday, December 24, 2015 2:31 AM > To: Liu, Jijiang > Cc: dev at dpdk.org > Subject: Re: [dpdk-dev] [RFC PATCH 0/6] General tunneling APIs > > On Wed, 23 Dec 2015 16:49:46 +0800 > Jijiang Liu

[dpdk-dev] [PATCH 0/4] check if any kernel driver is manipulating the virtio device

2015-12-28 Thread Peter Xu
On Fri, Dec 25, 2015 at 02:38:08AM +0800, Huawei Xie wrote: > virtio PMD doesn't set RTE_PCI_DRV_NEED_MAPPING in drv_flags of its > eth_driver. It will try igb_uio and PORT IO in turn to configure > virtio device. Even user in guest VM doesn't want to use virtio for > DPDK, virtio PMD will take ove

[dpdk-dev] [PATCH v2 0/3] Handle SIGINT and SIGTERM in DPDK examples

2015-12-28 Thread Qiu, Michael
On 2015/12/25 17:40, Wang, Zhihong wrote: > This patch handles SIGINT and SIGTERM in testpmd, l2fwd, and l3fwd, make sure > all ports are properly stopped and closed. > For virtual ports, the stop and close function may deal with resource > cleanup, such as socket files unlinking. > > ---

[dpdk-dev] [PATCH] mk: fix examples build failure

2015-12-28 Thread Qiu, Michael
On 12/24/2015 8:38 PM, steeven lee wrote: > 1. Fix examples build failure > 2. make build as default output folder name > > Signed-off-by: steeven > --- > mk/internal/rte.extvars.mk | 4 ++-- > mk/rte.extsubdir.mk| 2 +- > 2 files changed, 3 insertions(+), 3 deletions(-) > > diff --git a/

[dpdk-dev] [PATCH 1/3] librte_ether: remove RTE_PROC_PRIMARY_OR_ERR_RET and RTE_PROC_PRIMARY_OR_RET

2015-12-28 Thread Qiu, Michael
On 12/25/2015 1:40 AM, Pattan, Reshma wrote: > >> -Original Message- >> From: Qiu, Michael >> On 12/23/2015 8:19 PM, Reshma Pattan wrote: >>> Macros RTE_PROC_PRIMARY_OR_ERR_RET and >> RTE_PROC_PRIMARY_OR_RET are >>> blocking the secondary process from using the APIs. >>> API access should b

[dpdk-dev] [PATCH] mk: fix examples build failure

2015-12-28 Thread Yuanhan Liu
On Thu, Dec 24, 2015 at 08:38:07PM +0800, steeven lee wrote: > 1. Fix examples build failure Paste the build error here, so that we know you are acutally fixing a build error. And if it's a build error specific to some GCC, or Linux distribution, please also note it in the commit log. > 2. make b

[dpdk-dev] [RFC PATCH 0/2] Virtio-net PMD Extension to work on host.

2015-12-28 Thread Qiu, Michael
Hi, Tetsuya I have a question about your solution, as I know you plan to run qemu and dpdk both in container right? If so, I think it's a bit tricky, DPDK is a lib, and qemu is a App, seems it is not suitable to let a lib depends on Apps. Also, till now I don't see any usecase to run qemu inside

[dpdk-dev] [PATCH 3/4] virtio: return 1 to tell the upper layer we don't take over this device

2015-12-28 Thread Yuanhan Liu
On Fri, Dec 25, 2015 at 02:38:11AM +0800, Huawei Xie wrote: > if virtio_resource_init fails, cleanup the resource and return 1 to > tell the upper layer we don't take over this device. > return -1 means error and DPDK will exit. > > Signed-off-by: Huawei Xie > --- > drivers/net/virtio/virtio_eth

[dpdk-dev] [PATCH 4/4] virtio: check if any kernel driver is manipulating the device

2015-12-28 Thread Yuanhan Liu
On Fri, Dec 25, 2015 at 02:38:12AM +0800, Huawei Xie wrote: > virtio PMD could use IO port to configure the virtio device without > using uio driver. > > There are two issues with previous implementation: > 1) virtio PMD will take over each virtio device blindly even if some > are not intended for

[dpdk-dev] [PATCH 4/4] virtio: check if any kernel driver is manipulating the device

2015-12-28 Thread Xie, Huawei
> -Original Message- > From: Yuanhan Liu [mailto:yuanhan.liu at linux.intel.com] > Sent: Monday, December 28, 2015 1:27 PM > To: Xie, Huawei > Cc: dev at dpdk.org; Jayakumar, Muthurajan; Troitsky, Nikita; > peterx at redhat.com; stephen at networkplumber.org; > Changchun.ouyang at hotmail

[dpdk-dev] [PATCH 3/4] virtio: return 1 to tell the upper layer we don't take over this device

2015-12-28 Thread Xie, Huawei
> -Original Message- > From: Yuanhan Liu [mailto:yuanhan.liu at linux.intel.com] > Sent: Monday, December 28, 2015 1:25 PM > To: Xie, Huawei > Cc: dev at dpdk.org; Jayakumar, Muthurajan; Troitsky, Nikita; > peterx at redhat.com; stephen at networkplumber.org; > Changchun.ouyang at hotmail

[dpdk-dev] [RFC PATCH 0/6] General tunneling APIs

2015-12-28 Thread Liu, Jijiang
Hi Miroslaw, The partial answer is below. > -Original Message- > From: Walukiewicz, Miroslaw > Sent: Wednesday, December 23, 2015 7:18 PM > To: Liu, Jijiang; dev at dpdk.org > Subject: RE: [dpdk-dev] [RFC PATCH 0/6] General tunneling APIs > > Hi Jijang, > > I like an idea of tunnel API

[dpdk-dev] [PATCH v5 0/2] provide rte_pktmbuf_alloc_bulk API and call it in vhost dequeue

2015-12-28 Thread Huawei Xie
v5 changes: add comment about duff's device and our variant implementation v4 changes: fix a silly typo in error handling when rte_pktmbuf_alloc fails v3 changes: move while after case 0 add context about duff's device and why we use while loop in the commit message v2 changes: unroll the l

[dpdk-dev] [PATCH v5 1/2] mbuf: provide rte_pktmbuf_alloc_bulk API

2015-12-28 Thread Huawei Xie
v5 changes: add comment about duff's device and our variant implementation revise the code style a bit v3 changes: move while after case 0 add context about duff's device and why we use while loop in the commit message v2 changes: unroll the loop a bit to help the performance rte_pktmbuf_al

[dpdk-dev] [PATCH v5 2/2] vhost: call rte_pktmbuf_alloc_bulk in vhost dequeue

2015-12-28 Thread Huawei Xie
v4 changes: fix a silly typo in error handling when rte_pktmbuf_alloc fails reported by haifeng pre-allocate a bulk of mbufs instead of allocating one mbuf a time on demand Signed-off-by: Gerald Rogers Signed-off-by: Huawei Xie Acked-by: Konstantin Ananyev Acked-by: Yuanhan Liu Tested-by: Yu

[dpdk-dev] [PATCH] remove redundant __func__ in PMD_INIT_LOG and PMD_RX_LOG

2015-12-28 Thread Huawei Xie
Signed-off-by: Huawei Xie --- drivers/net/virtio/virtio_ethdev.c | 12 +--- drivers/net/vmxnet3/vmxnet3_ethdev.c | 6 +++--- drivers/net/vmxnet3/vmxnet3_rxtx.c | 2 +- 3 files changed, 9 insertions(+), 11 deletions(-) diff --git a/drivers/net/virtio/virtio_ethdev.c b/drivers/net/

[dpdk-dev] [PATCH] remove redundant __func__ in PMD_INIT_LOG and PMD_RX_LOG

2015-12-28 Thread Huawei Xie
Signed-off-by: Huawei Xie --- drivers/net/virtio/virtio_ethdev.c | 12 +--- drivers/net/vmxnet3/vmxnet3_ethdev.c | 6 +++--- drivers/net/vmxnet3/vmxnet3_rxtx.c | 2 +- 3 files changed, 9 insertions(+), 11 deletions(-) diff --git a/drivers/net/virtio/virtio_ethdev.c b/drivers/net/

[dpdk-dev] [PATCH v2 0/3] Handle SIGINT and SIGTERM in DPDK examples

2015-12-28 Thread Wang, Zhihong
> -Original Message- > From: Qiu, Michael > Sent: Monday, December 28, 2015 12:18 PM > To: Wang, Zhihong ; dev at dpdk.org > Cc: Ananyev, Konstantin ; > stephen at networkplumber.org > Subject: Re: [PATCH v2 0/3] Handle SIGINT and SIGTERM in DPDK examples > > On 2015/12/25 17:40, Wang, Z

[dpdk-dev] [PATCH v1 0/2] Virtio-net PMD Extension to work on host

2015-12-28 Thread Tetsuya Mukawa
On 2015/12/24 23:05, Tan, Jianfeng wrote: > Hi Tetsuya, > > After several days' studying your patch, I have some questions as follows: > > 1. Is physically-contig memory really necessary? > This is a too strong requirement IMHO. IVSHMEM doesn't require this in its > original meaning. So how do you

[dpdk-dev] [RFC PATCH 0/2] Virtio-net PMD Extension to work on host.

2015-12-28 Thread Tetsuya Mukawa
On 2015/12/28 14:15, Qiu, Michael wrote: > Hi, Tetsuya > > I have a question about your solution, as I know you plan to run qemu > and dpdk both in container right? Hi Michael, Thanks for your comments. It depends on use cases. For example, if we want to use vhost-user, we need to invoke 3 proce

[dpdk-dev] [PATCH v1 2/2] virtio: Extend virtio-net PMD to support container environment

2015-12-28 Thread Pavel Fedin
Hello! > -Original Message- > From: dev [mailto:dev-bounces at dpdk.org] On Behalf Of Tetsuya Mukawa > Sent: Wednesday, December 16, 2015 11:37 AM > To: dev at dpdk.org > Cc: nakajima.yoshihiro at lab.ntt.co.jp; mst at redhat.com > Subject: [dpdk-dev] [PATCH v1 2/2] virtio: Extend virtio-

[dpdk-dev] [PATCH] remove redundant __func__ in PMD_INIT_LOG and PMD_RX_LOG

2015-12-28 Thread Stephen Hemminger
On Mon, 28 Dec 2015 01:28:28 +0800 Huawei Xie wrote: > > Signed-off-by: Huawei Xie > --- > drivers/net/virtio/virtio_ethdev.c | 12 +--- > drivers/net/vmxnet3/vmxnet3_ethdev.c | 6 +++--- > drivers/net/vmxnet3/vmxnet3_rxtx.c | 2 +- > 3 files changed, 9 insertions(+), 11 deletion

[dpdk-dev] [PATCH 2/4] eal: set kdrv to RTE_KDRV_NONE if kernel driver isn't manipulating the device.

2015-12-28 Thread David Marchand
On Thu, Dec 24, 2015 at 7:38 PM, Huawei Xie wrote: > Use RTE_KDRV_NONE to indicate that kernel driver isn't manipulating the > device. > > Signed-off-by: Huawei Xie > --- > lib/librte_eal/linuxapp/eal/eal_pci.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/lib/librte_

[dpdk-dev] [PATCH v5 1/3] vhost: Add callback and private data for vhost PMD

2015-12-28 Thread Rich Lane
On Wed, Dec 23, 2015 at 11:58 PM, Tetsuya Mukawa wrote: > > Hi Rich and Yuanhan, > > I guess we have 2 implementations here. > > 1. rte_eth_vhost_get_queue_event() returns each event. > 2. rte_eth_vhost_get_queue_status() returns current status of the queues. > > I guess option "2" is more generic

[dpdk-dev] [PATCH 2/3] version: adjust printing for new version scheme

2015-12-28 Thread Thomas Monjalon
2015-12-21 13:26, Bruce Richardson: > Since we are now using a year-month numbering scheme, adjust > the printing of the version to always use 2-digits for YY.MM > format. Yes It must be done for "make showversion" also. > Also omit the patch version unless there is a patch version present, > sin

[dpdk-dev] [PATCH v3 0/3] Handle SIGINT and SIGTERM in DPDK examples

2015-12-28 Thread Zhihong Wang
This patch handles SIGINT and SIGTERM in testpmd, l2fwd, and l3fwd, make sure all ports are properly stopped and closed. For virtual ports, the stop and close function may deal with resource cleanup, such as socket files unlinking. -- Changes in v3: 1. Make sure correct port operati

[dpdk-dev] [PATCH v3 1/3] app/test-pmd: Handle SIGINT and SIGTERM in testpmd

2015-12-28 Thread Zhihong Wang
Handle SIGINT and SIGTERM in testpmd. Signed-off-by: Zhihong Wang Acked-by: Michael Qiu --- app/test-pmd/cmdline.c | 20 +--- app/test-pmd/testpmd.c | 39 +-- app/test-pmd/testpmd.h | 1 + 3 files changed, 47 insertions(+), 13 deletions(-) d

[dpdk-dev] [PATCH v3 2/3] examples/l2fwd: Handle SIGINT and SIGTERM in l2fwd

2015-12-28 Thread Zhihong Wang
Handle SIGINT and SIGTERM in l2fwd. Signed-off-by: Zhihong Wang Acked-by: Michael Qiu --- examples/l2fwd/main.c | 123 +- 1 file changed, 101 insertions(+), 22 deletions(-) diff --git a/examples/l2fwd/main.c b/examples/l2fwd/main.c index 720fd5a.

[dpdk-dev] [PATCH v3 3/3] examples/l3fwd: Handle SIGINT and SIGTERM in l3fwd

2015-12-28 Thread Zhihong Wang
Handle SIGINT and SIGTERM in l3fwd. Signed-off-by: Zhihong Wang Acked-by: Michael Qiu --- examples/l3fwd/main.c | 129 +- 1 file changed, 107 insertions(+), 22 deletions(-) diff --git a/examples/l3fwd/main.c b/examples/l3fwd/main.c index 5b0c2dd.