[dpdk-dev] [PATCH v9 09/27] eal/dev: add device iterator interface

2018-07-03 Thread Gaetan Rivet
A device iterator allows iterating over a set of devices. This set is defined by the two descriptions offered, * rte_bus * rte_class Only one description can be provided, or both. It is not allowed to provide no description at all. Each layer of abstraction then performs a filter based on th

[dpdk-dev] [PATCH v9 11/27] eal/bus: add device iteration

2018-07-03 Thread Gaetan Rivet
Signed-off-by: Gaetan Rivet --- lib/librte_eal/common/include/rte_bus.h | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/librte_eal/common/include/rte_bus.h b/lib/librte_eal/common/include/rte_bus.h index eb9eded4e..747baf140 100644 --- a/lib/librte_eal/common/include/rte_bus.h +++ b/lib/

[dpdk-dev] [PATCH v9 10/27] eal/class: add device iteration

2018-07-03 Thread Gaetan Rivet
Signed-off-by: Gaetan Rivet --- lib/librte_eal/common/include/rte_class.h | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/librte_eal/common/include/rte_class.h b/lib/librte_eal/common/include/rte_class.h index e8176f5e1..9d5b06807 100644 --- a/lib/librte_eal/common/include/rte_class.h ++

[dpdk-dev] [PATCH v9 12/27] eal/dev: implement device iteration initialization

2018-07-03 Thread Gaetan Rivet
Parse a device description. Split this description in their relevant part for each layers. No dynamic allocation is performed. Signed-off-by: Gaetan Rivet --- lib/Makefile| 1 + lib/librte_eal/bsdapp/eal/Makefile | 1 + lib/librte_eal/common/eal_common_dev.c |

[dpdk-dev] [PATCH v9 13/27] eal/dev: implement device iteration

2018-07-03 Thread Gaetan Rivet
Use the iteration hooks in the abstraction layers to perform the requested filtering on the internal device lists. Signed-off-by: Gaetan Rivet --- lib/librte_eal/common/eal_common_dev.c | 168 lib/librte_eal/common/include/rte_dev.h | 26 + lib/librte_eal/r

[dpdk-dev] [PATCH v9 14/27] kvargs: add generic string matching callback

2018-07-03 Thread Gaetan Rivet
This function can be used as a callback to rte_kvargs_process. This should reduce code duplication. Signed-off-by: Gaetan Rivet --- lib/librte_kvargs/rte_kvargs.c | 10 ++ lib/librte_kvargs/rte_kvargs.h | 28 lib/librte_kvargs/rte_kvargs_

[dpdk-dev] [PATCH v9 17/27] bus/vdev: implement device iteration

2018-07-03 Thread Gaetan Rivet
Signed-off-by: Gaetan Rivet --- drivers/bus/vdev/Makefile | 3 ++- drivers/bus/vdev/vdev.c | 10 drivers/bus/vdev/vdev_params.c | 51 + drivers/bus/vdev/vdev_private.h | 26 + 4 files changed, 85 insertions(+), 5

[dpdk-dev] [PATCH v9 15/27] bus/pci: implement device iteration and comparison

2018-07-03 Thread Gaetan Rivet
Signed-off-by: Gaetan Rivet --- drivers/bus/pci/Makefile | 3 ++- drivers/bus/pci/pci_common.c | 1 + drivers/bus/pci/pci_params.c | 53 drivers/bus/pci/private.h| 25 + 4 files changed, 81 insertions(+), 1 deletion(-) cr

[dpdk-dev] [PATCH v9 16/27] bus/pci: add device matching field id

2018-07-03 Thread Gaetan Rivet
The PCI bus can now parse a matching field "id" as follows: "bus=pci,id=:00:00.0" or "bus=pci,id=00:00.0" Signed-off-by: Gaetan Rivet --- drivers/bus/pci/pci_params.c | 29 +++-- 1 file changed, 27 insertions(+), 2 deletions(-) diff --git a/driver

[dpdk-dev] [PATCH v9 18/27] bus/vdev: add device matching field driver

2018-07-03 Thread Gaetan Rivet
The vdev bus parses a field "driver", matching a vdev driver name with one passed as follows: "bus=vdev,driver=" Signed-off-by: Gaetan Rivet --- drivers/bus/vdev/vdev_params.c | 15 +-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/drivers/bus/vdev/vdev_param

[dpdk-dev] [PATCH v9 19/27] ethdev: add private generic device iterator

2018-07-03 Thread Gaetan Rivet
This iterator can be customized with a comparison function that will trigger a stopping condition. It can be leveraged to write several different iterators that have similar but non-identical purposes. It is private to librte_ethdev. Signed-off-by: Gaetan Rivet --- lib/librte_ethdev/Makefile

[dpdk-dev] [PATCH v9 21/27] ethdev: add device matching field name

2018-07-03 Thread Gaetan Rivet
The eth device class can now parse a field name, matching the eth_dev name with one passed as "class=eth,name=xx" Signed-off-by: Gaetan Rivet --- lib/librte_ethdev/rte_class_eth.c | 7 +++ 1 file changed, 7 insertions(+) diff --git a/lib/librte_ethdev/rte_class_eth.c b/lib/librte_e

[dpdk-dev] [PATCH v9 20/27] ethdev: register ether layer as a class

2018-07-03 Thread Gaetan Rivet
Signed-off-by: Gaetan Rivet --- lib/librte_ethdev/Makefile| 3 +- lib/librte_ethdev/rte_class_eth.c | 79 +++ 2 files changed, 81 insertions(+), 1 deletion(-) create mode 100644 lib/librte_ethdev/rte_class_eth.c diff --git a/lib/librte_ethdev/Makefil

[dpdk-dev] [PATCH v9 22/27] app/testpmd: add show device command

2018-07-03 Thread Gaetan Rivet
A new interactive command is offered: show device This commands lists all rte_device element matching the device description. e.g.: show device bus=pci show device bus=vdev show device bus=vdev/class=eth show device bus=vdev,driver=net_ring/class=eth show device bus=vdev/class

[dpdk-dev] [PATCH v9 23/27] bus/pci: pre-process declarative PCI devargs

2018-07-03 Thread Gaetan Rivet
The new devargs format does not recognize a particular device name. Each bus uses its specific format. Instead of introducing a new bus API, process those devargs privately for the moment. Prepare them for matching during scan against the bus devices. Signed-off-by: Gaetan Rivet --- drivers/bus

[dpdk-dev] [PATCH v9 25/27] bus/pci: process declarative PCI devargs

2018-07-03 Thread Gaetan Rivet
Introduce the facility to process future PCI parameters. Once the matching between PCI devices and devargs has been done, it is possible to process each devargs. New parameters would have the PCI device handle to work with when parsing the device (bus specific) parameters. Signed-off-by: Gaetan R

[dpdk-dev] [PATCH v9 24/27] bus/vdev: pre-process declarative vdev devargs

2018-07-03 Thread Gaetan Rivet
The new devargs format does not recognize a particular device name. Each bus uses its specific format. Process each devargs privately prior to attempting a bus scan. Prepare them if they are using the new devargs format. Signed-off-by: Gaetan Rivet --- drivers/bus/vdev/vdev.c | 10 +

[dpdk-dev] [PATCH v9 27/27] eal: add generic dev parameter

2018-07-03 Thread Gaetan Rivet
Add the --dev parameter to the EAL. This new parameter takes a generic device declaration as argument. It uses the new devargs parsing API. Signed-off-by: Gaetan Rivet --- lib/librte_eal/common/eal_common_devargs.c | 4 lib/librte_eal/common/eal_common_options.c | 36 +

[dpdk-dev] [PATCH v9 26/27] ethdev: process declarative eth devargs

2018-07-03 Thread Gaetan Rivet
Process the class-specific arguments in a devargs. This processing takes the form of setting the proper eth_dev fields when relevant. Signed-off-by: Gaetan Rivet --- lib/librte_ethdev/eth_private.h | 5 lib/librte_ethdev/rte_class_eth.c | 61 +++ lib/l

Re: [dpdk-dev] [PATCH V4 1/9] bus: introduce hotplug failure handler

2018-07-03 Thread Thomas Monjalon
29/06/2018 12:30, Jeff Guo: > /** > + * Implementation a specific hot plug handler, which is responsible > + * for handle the failure when hot remove the device, guaranty the system > + * would not crash in the case. > + * @param dev > + * Pointer of the device structure. > + * > + * @return > +

Re: [dpdk-dev] [PATCH v2 04/20] net/mlx5: support flow Ethernet item among with drop action

2018-07-03 Thread Yongseok Koh
On Wed, Jun 27, 2018 at 05:07:36PM +0200, Nelio Laranjeiro wrote: net/mlx5: support flow Ethernet item among with drop action Typo? "among" -> "along"? > Signed-off-by: Nelio Laranjeiro > --- > drivers/net/mlx5/mlx5.c | 1 + > drivers/net/mlx5/mlx5_flow.c | 671 +

Re: [dpdk-dev] [PATCH v8 03/19] ethdev: enable hotplug on multi-process

2018-07-03 Thread Thomas Monjalon
03/07/2018 23:57, Thomas Monjalon: > 03/07/2018 17:03, Zhang, Qi Z: > > From: Thomas Monjalon [mailto:tho...@monjalon.net] > > > 03/07/2018 14:59, Zhang, Qi Z: > > > > > > +do_eth_dev_attach(const char *devargs, uint16_t *port_id); > > > > > > > > > > So you are duplicating rte_eth_dev_attach which

Re: [dpdk-dev] [PATCH V4 8/9] app/testpmd: show example to handle hot unplug

2018-07-03 Thread Thomas Monjalon
03/07/2018 11:35, Guo, Jia: > On 7/1/2018 3:46 PM, Matan Azrad wrote: > > From: Jeff Guo > >> --- a/app/test-pmd/testpmd.c > >> +++ b/app/test-pmd/testpmd.c > >> @@ -2206,9 +2209,12 @@ eth_dev_event_callback(char *device_name, enum > >> rte_dev_event_type type, > >>case RTE_DEV_EVENT_REMOVE: >

Re: [dpdk-dev] [PATCH v2 05/20] net/mlx5: add flow queue action

2018-07-03 Thread Yongseok Koh
On Wed, Jun 27, 2018 at 05:07:37PM +0200, Nelio Laranjeiro wrote: > Signed-off-by: Nelio Laranjeiro > --- Acked-by: Yongseok Koh Thanks

Re: [dpdk-dev] [PATCH v2 06/20] net/mlx5: add flow stop/start

2018-07-03 Thread Yongseok Koh
On Wed, Jun 27, 2018 at 05:07:38PM +0200, Nelio Laranjeiro wrote: > Signed-off-by: Nelio Laranjeiro > --- Acked-by: Yongseok Koh Thanks

Re: [dpdk-dev] [PATCH v2 07/20] net/mlx5: add flow VLAN item

2018-07-03 Thread Yongseok Koh
On Wed, Jun 27, 2018 at 05:07:39PM +0200, Nelio Laranjeiro wrote: > Signed-off-by: Nelio Laranjeiro > --- > drivers/net/mlx5/mlx5_flow.c | 123 +++ > 1 file changed, 123 insertions(+) > > diff --git a/drivers/net/mlx5/mlx5_flow.c b/drivers/net/mlx5/mlx5_flow.c > i

Re: [dpdk-dev] [PATCH v2 08/20] net/mlx5: add flow IPv4 item

2018-07-03 Thread Yongseok Koh
On Wed, Jun 27, 2018 at 05:07:40PM +0200, Nelio Laranjeiro wrote: > Signed-off-by: Nelio Laranjeiro > --- > drivers/net/mlx5/mlx5_flow.c | 83 > 1 file changed, 83 insertions(+) > > diff --git a/drivers/net/mlx5/mlx5_flow.c b/drivers/net/mlx5/mlx5_flow.c > in

Re: [dpdk-dev] [PATCH v2 09/20] net/mlx5: add flow IPv6 item

2018-07-03 Thread Yongseok Koh
On Wed, Jun 27, 2018 at 05:07:41PM +0200, Nelio Laranjeiro wrote: > Signed-off-by: Nelio Laranjeiro > --- Acked-by: Yongseok Koh Thanks

Re: [dpdk-dev] [PATCH v2 10/20] net/mlx5: add flow UDP item

2018-07-03 Thread Yongseok Koh
On Wed, Jun 27, 2018 at 05:07:42PM +0200, Nelio Laranjeiro wrote: > Signed-off-by: Nelio Laranjeiro > --- Acked-by: Yongseok Koh Thanks

Re: [dpdk-dev] [PATCH v2 11/20] net/mlx5: add flow TCP item

2018-07-03 Thread Yongseok Koh
On Wed, Jun 27, 2018 at 05:07:43PM +0200, Nelio Laranjeiro wrote: > Signed-off-by: Nelio Laranjeiro > --- Acked-by: Yongseok Koh Thanks

Re: [dpdk-dev] [PATCH v8 02/19] eal: enable multi process init callback

2018-07-03 Thread Zhang, Qi Z
> -Original Message- > From: Thomas Monjalon [mailto:tho...@monjalon.net] > Sent: Wednesday, July 4, 2018 5:51 AM > To: Zhang, Qi Z > Cc: dev@dpdk.org; Burakov, Anatoly ; Ananyev, > Konstantin ; Richardson, Bruce > ; Yigit, Ferruh ; Shelton, > Benjamin H ; Vangati, Narender > > Subject

Re: [dpdk-dev] [RFC 0/3] ethdev: add IP address and TCP/UDP port rewrite actions to flow API

2018-07-03 Thread Jack Min
Rahul, Thank you 😊! -Jack > -Original Message- > From: Rahul Lakkireddy > Sent: July 3, 2018 21:39 > To: Jack Min > Cc: dev@dpdk.org; Shagun Agarwal ; Indranil Choudhury > ; Nirranjan Kirubaharan ; Shahaf > Shuler ; Xueming(Steven) Li > Subject: Re: [dpdk-dev] [RFC 0/3] ethdev: add IP

[dpdk-dev] [PATCH] test/virtual_pmd: Add DEV_RX_OFFLOAD_CRC_STRIP to virtual driver

2018-07-03 Thread Phil Yang
Add DEV_RX_OFFLOAD_CRC_STRIP to virtual drivers since they don't use CRC at all, when an application requires this offload virtual PMDs should not return error. Fixes: b219c8c("test: enable HW CRC strip by default") Signed-off-by: Phil Yang --- test/test/virtual_pmd.c | 1 + 1 file changed, 1 i

Re: [dpdk-dev] [PATCH 1/2] test/link_bonding: disable HW CRC strip by default.

2018-07-03 Thread Phil Yang
Hi Ferruh, Thanks for you patch. > -Original Message- > From: Ferruh Yigit > Sent: Monday, July 2, 2018 6:00 PM > To: dev-boun...@dpdk.org; dev@dpdk.org > Cc: nd ; Phil Yang > Subject: Re: [dpdk-dev] [PATCH 1/2] test/link_bonding: disable HW CRC strip by > default. > > On 7/2/2018 9:26

Re: [dpdk-dev] [PATCH v8 04/19] ethdev: introduce device lock

2018-07-03 Thread Zhang, Qi Z
> -Original Message- > From: Thomas Monjalon [mailto:tho...@monjalon.net] > Sent: Wednesday, July 4, 2018 6:14 AM > To: Zhang, Qi Z > Cc: dev@dpdk.org; Burakov, Anatoly ; Ananyev, > Konstantin ; Richardson, Bruce > ; Yigit, Ferruh ; Shelton, > Benjamin H ; Vangati, Narender > > Subject

Re: [dpdk-dev] [PATCH v8 04/19] ethdev: introduce device lock

2018-07-03 Thread Yuanhan Liu
On Mon, Jul 2, 2018, at 1:44 PM, Qi Zhang wrote: > Introduce API rte_eth_dev_lock and rte_eth_dev_unlock to let > application lock or unlock on specific ethdev, a locked device > can't be detached, this help applicaiton to prevent unexpected > device detaching, especially in multi-process envrio

Re: [dpdk-dev] [PATCH v8 03/19] ethdev: enable hotplug on multi-process

2018-07-03 Thread Zhang, Qi Z
> -Original Message- > From: Thomas Monjalon [mailto:tho...@monjalon.net] > Sent: Wednesday, July 4, 2018 6:36 AM > To: Zhang, Qi Z > Cc: dev@dpdk.org; Burakov, Anatoly ; Ananyev, > Konstantin ; Richardson, Bruce > ; Yigit, Ferruh ; Shelton, > Benjamin H ; Vangati, Narender > > Subject

[dpdk-dev] [PATCH v2] net/bonding: don't clear active slave count

2018-07-03 Thread Chas Williams
From: "Charles (Chas) Williams" When the bond PMD is stopped, the active slave count is reset. For 802.3ad mode this potentially leaks memory and clears state since a second sequential activate_slave() will occur when the bond PMD is restarted and the LSC callback is triggered while the active sl

[dpdk-dev] [PATCH] net/virtio: fix build with gcc optimization on

2018-07-03 Thread Marvin Liu
build error on gcc version 8.1.1 20180502 (Red Hat 8.1.1-1), with optimization level >= O2 .../drivers/net/virtio/virtio_rxtx.c: In function ‘virtio_xmit_cleanup_inorder’: .../drivers/net/virtio/virtio_rxtx.c:195:24: error: ‘desc_idx’ may be used uninitialized in this function [-Werror=ma

Re: [dpdk-dev] [PATCH v8 04/19] ethdev: introduce device lock

2018-07-03 Thread Zhang, Qi Z
Hi Yuanhan: > -Original Message- > From: Yuanhan Liu [mailto:y...@fridaylinux.org] > Sent: Wednesday, July 4, 2018 10:20 AM > To: Zhang, Qi Z ; tho...@monjalon.net; Burakov, > Anatoly > Cc: Ananyev, Konstantin ; dev@dpdk.org; > Richardson, Bruce ; Yigit, Ferruh > ; Shelton, Benjamin H > ;

Re: [dpdk-dev] [PATCH V4 8/9] app/testpmd: show example to handle hot unplug

2018-07-03 Thread Guo, Jia
hi, thomas On 7/4/2018 6:44 AM, Thomas Monjalon wrote: 03/07/2018 11:35, Guo, Jia: On 7/1/2018 3:46 PM, Matan Azrad wrote: From: Jeff Guo --- a/app/test-pmd/testpmd.c +++ b/app/test-pmd/testpmd.c @@ -2206,9 +2209,12 @@ eth_dev_event_callback(char *device_name, enum rte_dev_event_type type,

Re: [dpdk-dev] [PATCH v4 0/4] net/virtio: Tx simple path removal and offload improvements

2018-07-03 Thread Tiwei Bie
On Mon, Jul 02, 2018 at 05:25:43PM +0200, Maxime Coquelin wrote: > In this v3, the main change is the removal of the Tx simple path. > Indeed, this path is not compliant with the Virtio specification, > so could cause problems with some host implementations. > > Since Marvin has introduced the in-

Re: [dpdk-dev] [PATCH v6 01/15] vhost: add virtio packed virtqueue defines

2018-07-03 Thread Tiwei Bie
On Mon, Jul 02, 2018 at 10:16:15AM +0200, Maxime Coquelin wrote: > From: Jens Freimann > > Signed-off-by: Jens Freimann > --- > lib/librte_vhost/vhost.h | 3 +++ > lib/librte_vhost/virtio-packed.h | 22 ++ > 2 files changed, 25 insertions(+) > create mode 100644 li

Re: [dpdk-dev] [PATCH v6 02/15] vhost: add helpers for packed virtqueues

2018-07-03 Thread Tiwei Bie
On Mon, Jul 02, 2018 at 10:16:16AM +0200, Maxime Coquelin wrote: > From: Jens Freimann > > Add some helper functions to check descriptor flags > and check if a vring is of type packed. > > Signed-off-by: Jens Freimann > Signed-off-by: Maxime Coquelin > --- > lib/librte_vhost/vhost.h |

Re: [dpdk-dev] [PATCH v6 13/15] vhost: add Tx support for packed ring

2018-07-03 Thread Tiwei Bie
On Mon, Jul 02, 2018 at 10:16:27AM +0200, Maxime Coquelin wrote: > Signed-off-by: Maxime Coquelin > --- > lib/librte_vhost/vhost.h | 1 + > lib/librte_vhost/virtio_net.c | 121 > +- > 2 files changed, 121 insertions(+), 1 deletion(-) > > diff --git

Re: [dpdk-dev] [PATCH v6 11/15] vhost: add vector filling support for packed ring

2018-07-03 Thread Tiwei Bie
On Mon, Jul 02, 2018 at 10:16:25AM +0200, Maxime Coquelin wrote: [...] > +static __rte_always_inline int > +fill_vec_buf_packed_indirect(struct virtio_net *dev, > + struct vhost_virtqueue *vq, > + struct vring_desc_packed *desc, uint16_t *vec_idx, > +

Re: [dpdk-dev] [PATCH v6 10/15] vhost: create descriptor mapping function

2018-07-03 Thread Tiwei Bie
On Mon, Jul 02, 2018 at 10:16:24AM +0200, Maxime Coquelin wrote: > Signed-off-by: Maxime Coquelin > --- > lib/librte_vhost/virtio_net.c | 61 > ++- > 1 file changed, 37 insertions(+), 24 deletions(-) > > diff --git a/lib/librte_vhost/virtio_net.c b/lib/li

Re: [dpdk-dev] [PATCH v6 14/15] vhost: add notification for packed ring

2018-07-03 Thread Tiwei Bie
On Mon, Jul 02, 2018 at 10:16:28AM +0200, Maxime Coquelin wrote: > Signed-off-by: Maxime Coquelin > --- > lib/librte_vhost/vhost.c | 73 > > lib/librte_vhost/vhost.h | 71 ++ > lib/librte_vhost/vhost_use

Re: [dpdk-dev] [PATCH v2 02/20] net/mlx5: handle drop queues are regular queues

2018-07-03 Thread Nélio Laranjeiro
On Tue, Jul 03, 2018 at 10:05:05AM -0700, Yongseok Koh wrote: > On Tue, Jul 03, 2018 at 09:17:56AM +0200, Nélio Laranjeiro wrote: > > On Mon, Jul 02, 2018 at 06:07:03PM -0700, Yongseok Koh wrote: > > > On Wed, Jun 27, 2018 at 05:07:34PM +0200, Nelio Laranjeiro wrote: > [...] > > flow_drop_queue is

Re: [dpdk-dev] [PATCH v6 07/15] vhost: extract split ring handling from Rx and Tx functions

2018-07-03 Thread Tiwei Bie
On Mon, Jul 02, 2018 at 10:16:21AM +0200, Maxime Coquelin wrote: [...] > + > + if (unlikely(vq->access_ok == 0)) > + if (unlikely(vring_translate(dev, vq) < 0)) > + goto out; > + > + Please just keep one blank line. > + /* > + * Construct a RARP broadc

<    1   2