[dpdk-dev] dpdk/vpp and cross-version migration for vhost

2016-11-16 Thread Maxime Coquelin
Hi Michael, On 10/13/2016 07:50 PM, Michael S. Tsirkin wrote: > Hi! > So it looks like we face a problem with cross-version > migration when using vhost. It's not new but became more > acute with the advent of vhost user. > > For users to be able to migrate between different versions > of the hype

[dpdk-dev] [PATCH 7/7] examples/eventdev_pipeline: adding example

2016-11-16 Thread Harry van Haaren
This patch adds a sample app to the examples/ directory, which can be used as a reference application and for general testing. The application requires two ethdev ports and expects traffic to be flowing. The application must be run with the --vdev flags as follows to indicate to EAL that a virtual

[dpdk-dev] [PATCH 6/7] test/eventdev: unit func makefiles

2016-11-16 Thread Harry van Haaren
Enable the functional and unit tests in the makefile. To run the unit tests, apply these patches, and run the test app with the following arguments and choose the unit or functional test to run: ./test --vdev evdev_sw0 RTE>> eventdev_func_autotest RTE>> eventdev_unit_autotest Signed

[dpdk-dev] [PATCH 5/7] test/eventdev: unit and functional tests

2016-11-16 Thread Harry van Haaren
This commit adds basic unit and functional tests for the eventdev API. The test code is added in this commit, but not yet enabled until the next commit. Signed-off-by: Gage Eads Signed-off-by: David Hunt Signed-off-by: Harry van Haaren --- app/test/test_eventdev_func.c | 1268 +

[dpdk-dev] [PATCH 4/7] event/sw: makefiles and config

2016-11-16 Thread Harry van Haaren
This commit modifies the existing Makefiles to have the sw_evdev instance compiled. At this point in the patchset, the infrastructure and sw_evdev pmd is compiled, which means that it can be instantiated and used successfully. Signed-off-by: Gage Eads Signed-off-by: Bruce Richardson Signed-off-

[dpdk-dev] [PATCH 3/7] event/sw: software eventdev implementation

2016-11-16 Thread Harry van Haaren
This commit adds a software implementation of the eventdev API. The implementation here is intended to enable the community to use the eventdev API, and test if the API serves the purpose that it is designed to. It should be noted this is an RFC implementation, and hence there should be no performa

[dpdk-dev] [PATCH 2/7] eventdev: makefiles

2016-11-16 Thread Harry van Haaren
Makefiles that compile the previously committed eventdev header and infrastructure files. This commit changes the Makefiles and config/base to add the config options of building the eventdev. Signed-off-by: Gage Eads Signed-off-by: Bruce Richardson Signed-off-by: Harry van Haaren --- config/c

[dpdk-dev] [PATCH 1/7] eventdev: header and implementation

2016-11-16 Thread Harry van Haaren
This commit adds the eventdev API header, and the library infrastructure necessary to work with an eventdev instance. The header is mostly the same as discussed on the mailing list, in particular see the libeventdev RFC thread[1]. A second thread[2] gathered input from the community, which result

[dpdk-dev] [RFC PATCH 0/7] RFC: EventDev Software PMD

2016-11-16 Thread Harry van Haaren
This series of RFC patches implements the libeventdev API and a software eventdev PMD. The implementation here is intended to enable the community to use the eventdev API, specifically to test if the API serves the purpose that it is designed to. It should be noted this is an RFC implementation, a

[dpdk-dev] [PATCH 22/22] app/testpmd: add queue actions to flow command

2016-11-16 Thread Adrien Mazarguil
- QUEUE: assign packets to a given queue index. - DUP: duplicate packets to a given queue index. - RSS: spread packets among several queues. Signed-off-by: Adrien Mazarguil --- app/test-pmd/cmdline_flow.c | 152 +++ 1 file changed, 152 insertions(+) diff --gi

[dpdk-dev] [PATCH 21/22] app/testpmd: add various actions to flow command

2016-11-16 Thread Adrien Mazarguil
- MARK: attach 32 bit value to packets. - FLAG: flag packets. - DROP: drop packets. - COUNT: enable counters for a rule. - PF: redirect packets to physical device function. - VF: redirect packets to virtual device function. Signed-off-by: Adrien Mazarguil --- app/test-pmd/cmdline_flow.c | 121 ++

[dpdk-dev] [PATCH 20/22] app/testpmd: add L4 items to flow command

2016-11-16 Thread Adrien Mazarguil
Add the ability to match a few properties of common L4[.5] protocol headers: - ICMP: type and code. - UDP: source and destination ports. - TCP: source and destination ports. - SCTP: source and destination ports. - VXLAN: network identifier. Signed-off-by: Adrien Mazarguil --- app/test-pmd/cmdli

[dpdk-dev] [PATCH 19/22] app/testpmd: add items ipv4/ipv6 to flow command

2016-11-16 Thread Adrien Mazarguil
Add the ability to match basic fields from IPv4 and IPv6 headers (source and destination addresses only). Signed-off-by: Adrien Mazarguil --- app/test-pmd/cmdline_flow.c | 177 +++ 1 file changed, 177 insertions(+) diff --git a/app/test-pmd/cmdline_flow.c b/a

[dpdk-dev] [PATCH 18/22] app/testpmd: add items eth/vlan to flow command

2016-11-16 Thread Adrien Mazarguil
These pattern items match basic Ethernet headers (source, destination and type) and related 802.1Q/ad VLAN headers. Signed-off-by: Adrien Mazarguil --- app/test-pmd/cmdline_flow.c | 126 +++ 1 file changed, 126 insertions(+) diff --git a/app/test-pmd/cmdline_

[dpdk-dev] [PATCH 17/22] app/testpmd: add item raw to flow command

2016-11-16 Thread Adrien Mazarguil
Matches arbitrary byte strings with properties: - relative: look for pattern after the previous item. - search: search pattern from offset (see also limit). - offset: absolute or relative offset for pattern. - limit: search area limit for start of pattern. - length: pattern length. - pattern: byte

[dpdk-dev] [PATCH 16/22] app/testpmd: add various items to flow command

2016-11-16 Thread Adrien Mazarguil
- PF: match packets addressed to the physical function. - VF: match packets addressed to a virtual function ID. - PORT: device-specific physical port index to use. Signed-off-by: Adrien Mazarguil --- app/test-pmd/cmdline_flow.c | 53 1 file changed, 53 in

[dpdk-dev] [PATCH 15/22] app/testpmd: add item any to flow command

2016-11-16 Thread Adrien Mazarguil
This pattern item matches any protocol in place of the current layer and has two properties: - min: minimum number of layers covered (0 or more). - max: maximum number of layers covered (0 means infinity). Signed-off-by: Adrien Mazarguil --- app/test-pmd/cmdline_flow.c | 30

[dpdk-dev] [PATCH 14/22] app/testpmd: add rte_flow bit-field support

2016-11-16 Thread Adrien Mazarguil
Several rte_flow structures expose bit-fields that cannot be set in a generic fashion at byte level. Add bit-mask support to handle them. Signed-off-by: Adrien Mazarguil --- app/test-pmd/cmdline_flow.c | 59 1 file changed, 59 insertions(+) diff --git a/

[dpdk-dev] [PATCH 13/22] app/testpmd: add rte_flow item spec prefix length

2016-11-16 Thread Adrien Mazarguil
Generating bit-masks from prefix lengths is often more convenient than providing them entirely (e.g. to define IPv4 and IPv6 subnets). This commit adds the "prefix" operator that assigns generated bit-masks to any pattern item specification field. Signed-off-by: Adrien Mazarguil --- app/test-pm

[dpdk-dev] [PATCH 12/22] app/testpmd: add rte_flow item spec handler

2016-11-16 Thread Adrien Mazarguil
Add parser code to fully set individual fields of pattern item specification structures, using the following operators: - fix: sets field and applies full bit-mask for perfect matching. - spec: sets field without modifying its bit-mask. - last: sets upper value of the spec => last range. - mask: s

[dpdk-dev] [PATCH 11/22] app/testpmd: add flow query command

2016-11-16 Thread Adrien Mazarguil
Syntax: flow query {port_id} {rule_id} {action} Query a specific action of an existing flow rule. Signed-off-by: Adrien Mazarguil --- app/test-pmd/cmdline.c | 3 + app/test-pmd/cmdline_flow.c | 121 ++- 2 files changed, 123 insertions(+), 1 deletion(

[dpdk-dev] [PATCH 10/22] app/testpmd: add flow validate/create commands

2016-11-16 Thread Adrien Mazarguil
Syntax: flow (validate|create) {port_id} [group {group_id}] [priority {level}] [ingress] [egress] pattern {item} [/ {item} [...]] / end actions {action} [/ {action} [...]] / end Either check the validity of a flow rule or create it. Any number of pattern items and actions can be prov

[dpdk-dev] [PATCH 09/22] app/testpmd: add flow destroy command

2016-11-16 Thread Adrien Mazarguil
Syntax: flow destroy {port_id} rule {rule_id} [...] Destroy a given set of flow rules associated with a port. Signed-off-by: Adrien Mazarguil --- app/test-pmd/cmdline.c | 3 ++ app/test-pmd/cmdline_flow.c | 106 ++- 2 files changed, 108 insertions(+)

[dpdk-dev] [PATCH 08/22] app/testpmd: add flow flush command

2016-11-16 Thread Adrien Mazarguil
Syntax: flow flush {port_id} Destroy all flow rules on a port. Signed-off-by: Adrien Mazarguil --- app/test-pmd/cmdline.c | 3 +++ app/test-pmd/cmdline_flow.c | 43 +++- 2 files changed, 45 insertions(+), 1 deletion(-) diff --git a/app/test-pmd/cmdli

[dpdk-dev] [PATCH 07/22] app/testpmd: add flow list command

2016-11-16 Thread Adrien Mazarguil
Syntax: flow list {port_id} [group {group_id}] [...] List configured flow rules on a port. Output can optionally be limited to a given set of group identifiers. Signed-off-by: Adrien Mazarguil --- app/test-pmd/cmdline.c | 4 ++ app/test-pmd/cmdline_flow.c | 141

[dpdk-dev] [PATCH 06/22] app/testpmd: add rte_flow integer support

2016-11-16 Thread Adrien Mazarguil
Parse all integer types and handle conversion to network byte order in a single function. Signed-off-by: Adrien Mazarguil --- app/test-pmd/cmdline_flow.c | 148 +++ 1 file changed, 148 insertions(+) diff --git a/app/test-pmd/cmdline_flow.c b/app/test-pmd/cmdl

[dpdk-dev] [PATCH 05/22] app/testpmd: add flow command

2016-11-16 Thread Adrien Mazarguil
Managing generic flow API functions from command line requires the use of dynamic tokens for convenience as flow rules are not fixed and cannot be defined statically. This commit adds specific flexible parser code and object for a new "flow" command in separate file. Signed-off-by: Adrien Mazargu

[dpdk-dev] [PATCH 04/22] app/testpmd: implement basic support for rte_flow

2016-11-16 Thread Adrien Mazarguil
Add basic management functions for the generic flow API (validate, create, destroy, flush, query and list). Flow rule objects and properties are arranged in lists associated with each port. Signed-off-by: Adrien Mazarguil --- app/test-pmd/cmdline.c | 1 + app/test-pmd/config.c | 484 +

[dpdk-dev] [PATCH 03/22] cmdline: add alignment constraint

2016-11-16 Thread Adrien Mazarguil
This prevents sigbus errors on architectures that cannot handle unexpected unaligned accesses to the output buffer. Signed-off-by: Adrien Mazarguil --- lib/librte_cmdline/cmdline_parse.c | 9 ++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/lib/librte_cmdline/cmdline_parse

[dpdk-dev] [PATCH 02/22] cmdline: add support for dynamic tokens

2016-11-16 Thread Adrien Mazarguil
Considering tokens must be hard-coded in a list part of the instruction structure, context-dependent tokens cannot be expressed. This commit adds support for building dynamic token lists through a user-provided function, which is called when the static token list is empty (a single NULL entry). B

[dpdk-dev] [PATCH 01/22] ethdev: introduce generic flow API

2016-11-16 Thread Adrien Mazarguil
This new API supersedes all the legacy filter types described in rte_eth_ctrl.h. It is slightly higher level and as a result relies more on PMDs to process and validate flow rules. Benefits: - A unified API is easier to program for, applications do not have to be written for a specific filter t

[dpdk-dev] [PATCH 00/22] Generic flow API (rte_flow)

2016-11-16 Thread Adrien Mazarguil
As previously discussed in RFC v1 [1], RFC v2 [2], with changes described in [3] (also pasted below), here is the first non-draft series for this new API. Its capabilities are so generic that its name had to be vague, it may be called "Generic flow API", "Generic flow interface" (possibly shortene

[dpdk-dev] [PATCH] eal: define generic vector types

2016-11-16 Thread Nelio Laranjeiro
Add common vector type definitions to all CPU architectures. Signed-off-by: Nelio Laranjeiro --- lib/librte_eal/common/Makefile | 1 + lib/librte_eal/common/include/arch/arm/rte_vect.h | 1 + .../common/include/arch/ppc_64/rte_vect.h | 1 + lib/librte_eal/comm

[dpdk-dev] [PATCH v2] eal/linuxapp: fix return value check of mknod()

2016-11-16 Thread Dai, Wei
Thanks to David, I will submit v3 patch to indicate correct Fixes. > -Original Message- > From: David Marchand [mailto:david.marchand at 6wind.com] > Sent: Wednesday, November 16, 2016 7:24 PM > To: Dai, Wei > Cc: dev at dpdk.org; Burakov, Anatoly > Subject: Re: [PATCH v2] eal/linuxapp:

[dpdk-dev] [PATCH v2] eal/linuxapp: fix return value check of mknod()

2016-11-16 Thread Dai, Wei
Thanks to Yigit Ferruh and Wenzhuo for your guide. Several months ago, I download checkpatch.pl and put it in /root/bin/. In /root/.bash_profile in my server, there is line :export DPDK_CHECKPATCH_PATH=/root/bin/checkpatch.pl Before I send this patch, I have run checkpath.sh to check it and it sh

[dpdk-dev] [PATCH v2] eal/linuxapp: fix return value check of mknod()

2016-11-16 Thread David Marchand
Hello Wei, On Wed, Nov 16, 2016 at 3:40 AM, Wei Dai wrote: > In function pci_mknod_uio_dev() in lib/librte_eal/eal/eal_pci_uio.c, > The return value of mknod() is ret, not f got by fopen(). > So the value of ret should be checked for mknod(). > > Fixes: 67c536bdad93 ("pci: move uio mapping in a d

[dpdk-dev] [PATCH] cryptodev: fix crash on null dereference

2016-11-16 Thread Kusztal, ArkadiuszX
> -Original Message- > From: dev [mailto:dev-bounces at dpdk.org] On Behalf Of Jerin Jacob > Sent: Tuesday, November 15, 2016 7:12 PM > To: dev at dpdk.org > Cc: Doherty, Declan ; Jerin Jacob > > Subject: [dpdk-dev] [PATCH] cryptodev: fix crash on null dereference > > crypodev->data->na

[dpdk-dev] [PATCH v2] eal/linuxapp: fix return value check of mknod()

2016-11-16 Thread Ferruh Yigit
Hi Wenzhuo, On 11/16/2016 3:28 AM, Lu, Wenzhuo wrote: > Hi Wei, > >> -Original Message- >> From: dev [mailto:dev-bounces at dpdk.org] On Behalf Of Wei Dai >> Sent: Wednesday, November 16, 2016 10:41 AM >> To: dev at dpdk.org; Burakov, Anatoly; david.marchand at 6wind.com; Dai, Wei >> Subj

[dpdk-dev] [PATCH v2] eal/linuxapp: fix return value check of mknod()

2016-11-16 Thread Wei Dai
In function pci_mknod_uio_dev() in lib/librte_eal/eal/eal_pci_uio.c, The return value of mknod() is ret, not f got by fopen(). So the value of ret should be checked for mknod(). Fixes: 67c536bdad93 ("pci: move uio mapping in a dedicated file") Signed-off-by: Wei Dai --- fix my local git setting

[dpdk-dev] Clarification for eth_driver changes

2016-11-16 Thread Shreyansh Jain
On Monday 14 November 2016 11:08 PM, Ferruh Yigit wrote: [...] > What I was thinking is: > > rte_device/driver are not abstract classes. > > rte_bus device/driver is an abstract class and any bus inherited from > this class. > rte_func device/driver is and abstract class and eth/crypto inherited >

[dpdk-dev] [PATCH] eal/linuxapp: fix return value check of mknod()

2016-11-16 Thread Zhiyong Yang
From: Wei Dai In function pci_mknod_uio_dev() in lib/librte_eal/eal/eal_pci_uio.c, The return value of mknod() is ret, not f got by fopen(). So the value of ret should be checked for mknod(). Fixes: 67c536bdad93 ("pci: move uio mapping in a dedicated file") Signed-off-by: Wei Dai --- lib/libr

[dpdk-dev] [PATCH v2] eal/linuxapp: fix return value check of mknod()

2016-11-16 Thread Lu, Wenzhuo
Hi Wei, > -Original Message- > From: dev [mailto:dev-bounces at dpdk.org] On Behalf Of Wei Dai > Sent: Wednesday, November 16, 2016 10:41 AM > To: dev at dpdk.org; Burakov, Anatoly; david.marchand at 6wind.com; Dai, Wei > Subject: [dpdk-dev] [PATCH v2] eal/linuxapp: fix return value check

[dpdk-dev] [PATCH] cryptodev: fix crash on null dereference

2016-11-16 Thread Jerin Jacob
crypodev->data->name will be null when rte_cryptodev_get_dev_id() invoked without a valid crypto device instance. Signed-off-by: Jerin Jacob --- lib/librte_cryptodev/rte_cryptodev.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/librte_cryptodev/rte_cryptodev.c b/l