Re: [dpdk-dev] [PATCH] net/virtio: fix an incorrect behavior of device stop/start

2017-09-01 Thread Tiwei Bie
On Fri, Sep 01, 2017 at 08:26:46AM +0200, Jens Freimann wrote: > On Wed, Aug 30, 2017 at 06:24:24PM +0800, Tiwei Bie wrote: > > Hi Jens, > > > > On Wed, Aug 30, 2017 at 11:13:06AM +0200, Jens Freimann wrote: > > > Hi Tiwei, > > > > > > On Tue, Aug 29, 2017 at 04:26:01PM +0800, Tiwei Bie wrote: >

Re: [dpdk-dev] [PATCH v4] ethdev: allow returning error on VLAN offload configuration

2017-09-01 Thread Hemant Agrawal
On 9/1/2017 8:06 AM, David Harton wrote: Some devices may not support or fail setting VLAN offload configuration based on dynamic circurmstances so the vlan_offload_set_t vector is modified to return an int so the caller can determine success or not. rte_eth_dev_set_vlan_offload is updated to re

Re: [dpdk-dev] [PATCH v5] ethdev: add return code to rte_eth_stats_reset()

2017-09-01 Thread Hemant Agrawal
On 9/1/2017 7:56 AM, David Harton wrote: Some devices do not support reset of eth stats. An application may need to know not to clear shadow stats if the device cannot. rte_eth_stats_reset is updated to provide a return code to share whether the device supports reset or not. Signed-off-by: Dav

Re: [dpdk-dev] [PATCH v3] ethdev: modifiy vlan_offload_set_t to return int

2017-09-01 Thread Thomas Monjalon
01/09/2017 02:40, David Harton (dharton): > From: Thomas Monjalon [mailto:tho...@monjalon.net] > > > --- a/doc/guides/rel_notes/release_17_11.rst > > > +++ b/doc/guides/rel_notes/release_17_11.rst > > > @@ -124,7 +124,7 @@ ABI Changes > > > Also, make sure to start the actual text at the margin

[dpdk-dev] [PATCH v2 01/51] net/mlx4: add consistency to copyright notices

2017-09-01 Thread Adrien Mazarguil
Copyright lasts long enough not to require notices to be updated yearly. The current approach of updating them occasionally while working on unrelated tasks should be deprecated in favor of dedicated commits updating all files at once when necessary. Standardize on a single year per copyright own

[dpdk-dev] [PATCH v2 00/51] net/mlx4: trim and refactor entire PMD

2017-09-01 Thread Adrien Mazarguil
The main purpose of this large series is to relieve the mlx4 PMD from its dependency on Mellanox OFED to instead rely on the standard rdma-core package provided by Linux distributions. While compatibility with Mellanox OFED is preserved, all nonstandard functionality has to be stripped from the PM

[dpdk-dev] [PATCH v2 03/51] net/mlx4: check max number of ports dynamically

2017-09-01 Thread Adrien Mazarguil
Use maximum number reported by hardware capabilities as replacement for the static check on MLX4_PMD_MAX_PHYS_PORTS. Cc: Gaëtan Rivet Cc: Allain Legacy Signed-off-by: Adrien Mazarguil --- drivers/net/mlx4/mlx4.c | 49 drivers/net/mlx4/mlx4.h | 3 --

[dpdk-dev] [PATCH v2 02/51] net/mlx4: remove limitation on number of instances

2017-09-01 Thread Adrien Mazarguil
The seemingly artificial limitation on the maximum number of instances for this PMD is an historical leftover that predates its first public release. It was used as a workaround to support multiple physical ports on a PCI device exposing a single bus address when mlx4 was implemented directly as a

[dpdk-dev] [PATCH v2 04/51] net/mlx4: remove useless compilation checks

2017-09-01 Thread Adrien Mazarguil
Verbs support for RSS, inline receive and extended device query calls has not been optional for a while. Their absence is untested and is therefore unsupported. Remove the related compilation checks and assume Mellanox OFED is up to date, as described in the documentation. Use this opportunity to

[dpdk-dev] [PATCH v2 06/51] net/mlx4: remove useless code

2017-09-01 Thread Adrien Mazarguil
Less code makes refactoring easier. No impact on functionality. Signed-off-by: Adrien Mazarguil --- drivers/net/mlx4/mlx4.c | 17 + drivers/net/mlx4/mlx4.h | 12 2 files changed, 1 insertion(+), 28 deletions(-) diff --git a/drivers/net/mlx4/mlx4.c b/drivers/net/mlx4

[dpdk-dev] [PATCH v2 05/51] net/mlx4: remove secondary process support

2017-09-01 Thread Adrien Mazarguil
Current implementation is partial (Tx only), not convenient to use and not of primary concern. Remove this feature before refactoring the PMD. Signed-off-by: Adrien Mazarguil --- doc/guides/nics/features/mlx4.ini | 1 - doc/guides/nics/mlx4.rst | 2 - drivers/net/mlx4/mlx4.c

[dpdk-dev] [PATCH v2 07/51] net/mlx4: remove soft counters compilation option

2017-09-01 Thread Adrien Mazarguil
Software counters are mandatory since hardware counters are not implemented. Signed-off-by: Adrien Mazarguil --- config/common_base| 1 - doc/guides/nics/mlx4.rst | 6 -- drivers/net/mlx4/Makefile | 4 drivers/net/mlx4/mlx4.c | 37 - dri

[dpdk-dev] [PATCH v2 08/51] net/mlx4: remove scatter mode compilation option

2017-09-01 Thread Adrien Mazarguil
This option both sets the maximum number of segments for Rx/Tx packets and whether scattered mode is supported at all. This commit removes the latter as well as configuration file exposure since the most appropriate value should be decided at run-time. Signed-off-by: Adrien Mazarguil --- config/

[dpdk-dev] [PATCH v2 09/51] net/mlx4: remove Tx inline compilation option

2017-09-01 Thread Adrien Mazarguil
This should be a run-time parameter. Signed-off-by: Adrien Mazarguil --- config/common_base| 1 - drivers/net/mlx4/Makefile | 4 drivers/net/mlx4/mlx4.c | 6 -- drivers/net/mlx4/mlx4.h | 4 4 files changed, 15 deletions(-) diff --git a/config/common_base b/config/commo

[dpdk-dev] [PATCH v2 11/51] net/mlx4: remove VLAN filter support

2017-09-01 Thread Adrien Mazarguil
This is done in preparation for a major refactoring. Signed-off-by: Adrien Mazarguil --- doc/guides/nics/features/mlx4.ini | 1 - doc/guides/nics/mlx4.rst | 1 - drivers/net/mlx4/mlx4.c | 206 +++-- drivers/net/mlx4/mlx4.h | 13 +-- 4

[dpdk-dev] [PATCH v2 10/51] net/mlx4: remove allmulti and promisc support

2017-09-01 Thread Adrien Mazarguil
This is done in preparation for a major refactoring. Signed-off-by: Adrien Mazarguil --- doc/guides/nics/features/mlx4.ini | 2 - doc/guides/nics/mlx4.rst | 2 - drivers/net/mlx4/mlx4.c | 311 - drivers/net/mlx4/mlx4.h | 4 - 4 f

[dpdk-dev] [PATCH v2 12/51] net/mlx4: remove MAC address configuration support

2017-09-01 Thread Adrien Mazarguil
Only the default port MAC address remains and is not configurable. This is done in preparation for a major refactoring. Signed-off-by: Adrien Mazarguil --- doc/guides/nics/features/mlx4.ini | 2 - doc/guides/nics/mlx4.rst | 1 - drivers/net/mlx4/mlx4.c | 322 --

[dpdk-dev] [PATCH v2 13/51] net/mlx4: drop MAC flows affecting all Rx queues

2017-09-01 Thread Adrien Mazarguil
Configuring several Rx queues enables RSS, which causes an additional special parent queue to be created to manage them. MAC flows are associated with the queue supposed to receive packets; either the parent one in case of RSS or the single orphan otherwise. For historical reasons the current imp

[dpdk-dev] [PATCH v2 15/51] net/mlx4: revert RSS parent queue refactoring

2017-09-01 Thread Adrien Mazarguil
This reverts commit ff00a0dc5600dbb0a29e4aa7fa4b078f98c7a360. Support for several RSS parent queues was necessary to implement the RSS flow rule action, dropped in a prior commit. Signed-off-by: Adrien Mazarguil --- drivers/net/mlx4/mlx4.c | 332 +++--- driv

[dpdk-dev] [PATCH v2 14/51] net/mlx4: revert flow API RSS support

2017-09-01 Thread Adrien Mazarguil
This reverts commit d7769c7c08cc08a9d1bc4e40b95524d9697707d9. Existing RSS features rely on experimental Verbs provided by Mellanox OFED. In order to replace this dependency with standard distribution packages, RSS support must be temporarily removed to be re-implemented using a different API. R

[dpdk-dev] [PATCH v2 17/51] net/mlx4: drop checksum offloads support

2017-09-01 Thread Adrien Mazarguil
The Verbs API used to implement Tx and Rx checksum offloads is deprecated. Support for these will be added back after refactoring the PMD. Signed-off-by: Adrien Mazarguil --- doc/guides/nics/features/mlx4.ini | 4 -- doc/guides/nics/mlx4.rst | 2 - drivers/net/mlx4/mlx4.c |

[dpdk-dev] [PATCH v2 16/51] net/mlx4: drop RSS support

2017-09-01 Thread Adrien Mazarguil
The Verbs RSS API used in this PMD is now obsolete. It is superseded by an enhanced API with fewer constraints already used in the mlx5 PMD. Drop RSS support in preparation for a major refactoring. The ability to configure several Rx queues is retained, these can be targeted directly by creating s

[dpdk-dev] [PATCH v2 18/51] net/mlx4: drop packet type recognition support

2017-09-01 Thread Adrien Mazarguil
The Verbs API used to implement packet type recognition is deprecated. Support will be added back after refactoring the PMD. Signed-off-by: Adrien Mazarguil --- doc/guides/nics/features/mlx4.ini | 1 - drivers/net/mlx4/mlx4.c | 70 +- 2 files changed, 2

[dpdk-dev] [PATCH v2 20/51] net/mlx4: drop inline receive support

2017-09-01 Thread Adrien Mazarguil
The Verbs API used to implement inline receive is deprecated. Support will be added back after refactoring the PMD. Signed-off-by: Moti Haimovsky Signed-off-by: Adrien Mazarguil --- drivers/net/mlx4/mlx4.c | 52 drivers/net/mlx4/mlx4.h | 1 - 2 file

[dpdk-dev] [PATCH v2 19/51] net/mlx4: drop scatter/gather support

2017-09-01 Thread Adrien Mazarguil
The Verbs API used to implement Tx and Rx burst functions is deprecated. Drop scatter/gather support to ease refactoring while maintaining basic single-segment Rx/Tx functionality in the meantime. Signed-off-by: Adrien Mazarguil --- doc/guides/nics/features/mlx4.ini | 1 - doc/guides/nics/mlx4

[dpdk-dev] [PATCH v2 21/51] net/mlx4: use standard QP attributes

2017-09-01 Thread Adrien Mazarguil
The Verbs API used to set QP attributes is deprecated. Revert to the standard API since it actually supports the remaining ones. Signed-off-by: Moti Haimovsky Signed-off-by: Adrien Mazarguil --- drivers/net/mlx4/mlx4.c | 25 +++-- 1 file changed, 11 insertions(+), 14 deletio

[dpdk-dev] [PATCH v2 23/51] net/mlx4: revert multicast echo prevention

2017-09-01 Thread Adrien Mazarguil
This reverts commit 8b3ffe95e75d6d305992505005cbb95969874a15. Multicast loopback prevention is not part of the standard Verbs interface. Remove it temporarily. Signed-off-by: Moti Haimovsky Signed-off-by: Adrien Mazarguil --- drivers/net/mlx4/Makefile | 6 +- drivers/net/mlx4/mlx4.c | 7

[dpdk-dev] [PATCH v2 25/51] net/mlx4: revert fast Verbs interface for Rx

2017-09-01 Thread Adrien Mazarguil
This reverts commit acac55f164128fc76da8d93cae1e8c1e560e99f6. "Fast Verbs" is a nonstandard experimental interface that must be reverted for compatibility reasons. Its replacement is slower but temporary, performance will be restored by a subsequent commit through an enhanced data path implementat

[dpdk-dev] [PATCH v2 22/51] net/mlx4: revert resource domain support

2017-09-01 Thread Adrien Mazarguil
This reverts commit 3e49c148b715c3c0a12c1200295bb9b312f7028e. Resource domains are not part of the standard Verbs interface. The performance improvement they bring will be restored later through a different data path implementation. This commit makes the PMD not rely on the non-standard QP alloca

[dpdk-dev] [PATCH v2 24/51] net/mlx4: revert fast Verbs interface for Tx

2017-09-01 Thread Adrien Mazarguil
This reverts commit 9980f81dc2623291b89cf1c281a6a9f116fd2394. "Fast Verbs" is a nonstandard experimental interface that must be reverted for compatibility reasons. Its replacement is slower but temporary, performance will be restored by a subsequent commit through an enhanced data path implementat

[dpdk-dev] [PATCH v2 29/51] net/mlx4: clean up coding style inconsistencies

2017-09-01 Thread Adrien Mazarguil
This addresses badly formatted comments and needless empty lines before refactoring functions into different files. Signed-off-by: Adrien Mazarguil --- drivers/net/mlx4/mlx4.c | 77 ++- drivers/net/mlx4/mlx4_flow.c | 1 - 2 files changed, 28 insertions(+

[dpdk-dev] [PATCH v2 26/51] net/mlx4: simplify Rx buffer handling

2017-09-01 Thread Adrien Mazarguil
Thanks to the fact the PMD temporarily uses a slower interface for Rx, removing the WR ID hack to instead store mbuf pointers directly makes the code simpler at no extra cost. Signed-off-by: Adrien Mazarguil --- drivers/net/mlx4/mlx4.c | 79 ++-- drivers/n

[dpdk-dev] [PATCH v2 28/51] net/mlx4: standardize on negative errno values

2017-09-01 Thread Adrien Mazarguil
Due to its reliance on system calls, the mlx4 PMD uses positive errno values internally and negative ones at the ethdev API border. Although most internal functions are documented, this mixed design is unusual and prone to mistakes (e.g. flow API implementation uses negative values exclusively). S

[dpdk-dev] [PATCH v2 27/51] net/mlx4: simplify link update function

2017-09-01 Thread Adrien Mazarguil
Returning a different value when the current link status differs from the previous one was probably useful at some point in the past but is now meaningless; this value is ignored both internally (mlx4 PMD) and externally (ethdev wrapper). Signed-off-by: Adrien Mazarguil --- drivers/net/mlx4/mlx4

[dpdk-dev] [PATCH v2 31/51] net/mlx4: remove unnecessary wrapper functions

2017-09-01 Thread Adrien Mazarguil
Wrapper functions whose main purpose was to take a lock on the private structure are no longer needed since this lock does not exist anymore. Signed-off-by: Adrien Mazarguil --- drivers/net/mlx4/mlx4.c | 61 -- drivers/net/mlx4/mlx4_flow.c | 106 +---

[dpdk-dev] [PATCH v2 32/51] net/mlx4: remove mbuf macro definitions

2017-09-01 Thread Adrien Mazarguil
These were originally used for compatibility between DPDK releases when this PMD was built out of tree. Signed-off-by: Adrien Mazarguil --- drivers/net/mlx4/mlx4.c | 29 ++--- 1 file changed, 10 insertions(+), 19 deletions(-) diff --git a/drivers/net/mlx4/mlx4.c b/driver

[dpdk-dev] [PATCH v2 30/51] net/mlx4: remove control path locks

2017-09-01 Thread Adrien Mazarguil
Concurrent use of various control path functions (e.g. configuring a queue and destroying it simultaneously) may lead to undefined behavior. PMD are not supposed to protect themselves from misbehaving applications, and mlx4 is one of the few with internal locks on most control path operations. Thi

[dpdk-dev] [PATCH v2 36/51] net/mlx4: rename alarm field

2017-09-01 Thread Adrien Mazarguil
Make clear this field is related to interrupt handling. Signed-off-by: Adrien Mazarguil --- drivers/net/mlx4/mlx4.c | 14 +++--- drivers/net/mlx4/mlx4.h | 6 +++--- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/drivers/net/mlx4/mlx4.c b/drivers/net/mlx4/mlx4.c index 2

[dpdk-dev] [PATCH v2 35/51] net/mlx4: use a single interrupt handle

2017-09-01 Thread Adrien Mazarguil
The reason one interrupt handle is currently used for RMV/LSC events and another one for Rx traffic is because these come from distinct file descriptors. This can be simplified however as Rx interrupt file descriptors are stored elsewhere and are registered separately. Modifying the interrupt han

[dpdk-dev] [PATCH v2 33/51] net/mlx4: use standard macro to get array size

2017-09-01 Thread Adrien Mazarguil
Signed-off-by: Adrien Mazarguil --- drivers/net/mlx4/mlx4.c | 11 ++- drivers/net/mlx4/mlx4.h | 3 --- 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/drivers/net/mlx4/mlx4.c b/drivers/net/mlx4/mlx4.c index a94f27e..51259d2 100644 --- a/drivers/net/mlx4/mlx4.c +++ b/driver

[dpdk-dev] [PATCH v2 37/51] net/mlx4: refactor interrupt FD settings

2017-09-01 Thread Adrien Mazarguil
File descriptors used for interrupts processing must be made non-blocking. Doing so as soon as they are opened instead of waiting until they are needed is more efficient as it avoids performing redundant system calls and run through their associated error-handling code later on. Signed-off-by: Ad

[dpdk-dev] [PATCH v2 34/51] net/mlx4: separate debugging macros

2017-09-01 Thread Adrien Mazarguil
The new definitions also rely on the existing DPDK logging subsystem instead of using fprintf() directly. Signed-off-by: Adrien Mazarguil --- drivers/net/mlx4/mlx4.c | 2 +- drivers/net/mlx4/mlx4.h | 52 drivers/net/mlx4/mlx4_flow.c | 1 + drivers/net/mlx4/mlx

[dpdk-dev] [PATCH v2 38/51] net/mlx4: clean up interrupt functions prototypes

2017-09-01 Thread Adrien Mazarguil
The naming scheme for these functions is overly verbose and not accurate enough, with too many "handler" functions that are difficult to differentiate (e.g. mlx4_dev_link_status_handler(), mlx4_dev_interrupt_handler() and priv_dev_status_handler()). This commit renames them and removes the unneces

[dpdk-dev] [PATCH v2 41/51] net/mlx4: separate Rx/Tx definitions

2017-09-01 Thread Adrien Mazarguil
Except for a minor documentation update on internal structure definitions to make them more Doxygen-friendly, there is no impact on functionality. Signed-off-by: Adrien Mazarguil --- drivers/net/mlx4/mlx4.c | 1 + drivers/net/mlx4/mlx4.h | 69 + drivers/net/mlx4/

[dpdk-dev] [PATCH v2 39/51] net/mlx4: compact interrupt functions

2017-09-01 Thread Adrien Mazarguil
Link status (LSC) and removal (RMV) interrupts share a common handler and are toggled simultaneously from common install/uninstall functions. Four additional wrapper functions (two for each interrupt type) are currently necessary because the PMD maintains an internal configuration state for interr

[dpdk-dev] [PATCH v2 40/51] net/mlx4: separate interrupt handling

2017-09-01 Thread Adrien Mazarguil
Private functions are now prefixed with "mlx4_" to prevent them from conflicting with their mlx5 PMD counterparts at link time. No impact on functionality. Signed-off-by: Adrien Mazarguil --- drivers/net/mlx4/Makefile| 1 + drivers/net/mlx4/mlx4.c | 340 +-

[dpdk-dev] [PATCH v2 42/51] net/mlx4: separate Rx/Tx functions

2017-09-01 Thread Adrien Mazarguil
This commit groups all data plane functions (Rx/Tx) into a separate file and adjusts header files accordingly. Private functions are now prefixed with "mlx4_" to prevent them from conflicting with their mlx5 PMD counterparts at link time. No impact on functionality. Signed-off-by: Adrien Mazargu

[dpdk-dev] [PATCH v2 44/51] net/mlx4: separate Tx configuration functions

2017-09-01 Thread Adrien Mazarguil
Private functions are now prefixed with "mlx4_" to prevent them from conflicting with their mlx5 PMD counterparts at link time. No impact on functionality. Signed-off-by: Adrien Mazarguil --- drivers/net/mlx4/Makefile| 1 + drivers/net/mlx4/mlx4.c | 421 +-

[dpdk-dev] [PATCH v2 43/51] net/mlx4: separate device control functions

2017-09-01 Thread Adrien Mazarguil
Private functions are now prefixed with "mlx4_" to prevent them from conflicting with their mlx5 PMD counterparts at link time. No impact on functionality. Signed-off-by: Adrien Mazarguil --- drivers/net/mlx4/Makefile | 1 + drivers/net/mlx4/mlx4.c| 752 +-

[dpdk-dev] [PATCH v2 46/51] net/mlx4: group flow API handlers in common file

2017-09-01 Thread Adrien Mazarguil
Only the common filter control operation callback needs to be exposed. No impact on functionality. Signed-off-by: Adrien Mazarguil --- drivers/net/mlx4/mlx4.c | 48 +- drivers/net/mlx4/mlx4_flow.c | 72 --- drivers/net/mlx4/mlx4_f

[dpdk-dev] [PATCH v2 45/51] net/mlx4: separate Rx configuration functions

2017-09-01 Thread Adrien Mazarguil
Private functions are now prefixed with "mlx4_" to prevent them from conflicting with their mlx5 PMD counterparts at link time. No impact on functionality. Signed-off-by: Adrien Mazarguil --- drivers/net/mlx4/Makefile| 1 + drivers/net/mlx4/mlx4.c | 541 +-

[dpdk-dev] [PATCH v2 48/51] net/mlx4: separate memory management functions

2017-09-01 Thread Adrien Mazarguil
No impact on functionality. Signed-off-by: Adrien Mazarguil --- drivers/net/mlx4/Makefile | 1 + drivers/net/mlx4/mlx4.c| 115 - drivers/net/mlx4/mlx4.h| 8 +- drivers/net/mlx4/mlx4_mr.c | 183 4 files changed, 188 ins

[dpdk-dev] [PATCH v2 49/51] net/mlx4: clean up includes and comments

2017-09-01 Thread Adrien Mazarguil
Add missing includes and sort them, then update/remove comments around them for consistency. Signed-off-by: Adrien Mazarguil --- drivers/net/mlx4/mlx4.c | 40 --- drivers/net/mlx4/mlx4.h | 3 +-- drivers/net/mlx4/mlx4_flow.c | 5 + drivers/net/

[dpdk-dev] [PATCH v2 47/51] net/mlx4: rename private functions in flow API

2017-09-01 Thread Adrien Mazarguil
While internal static functions do not cause link time conflicts, this differentiates them from their mlx5 PMD counterparts while debugging. No impact on functionality. Signed-off-by: Adrien Mazarguil --- drivers/net/mlx4/mlx4.c | 4 ++-- drivers/net/mlx4/mlx4_flow.c | 30 +++-

[dpdk-dev] [PATCH v2 50/51] net/mlx4: remove isolated mode constraint

2017-09-01 Thread Adrien Mazarguil
Considering the remaining functionality, the only difference between isolated and non-isolated mode is that a default MAC flow rule is present with the latter. The restriction on enabling isolated mode before creating any queues can therefore be lifted. Signed-off-by: Adrien Mazarguil --- drive

Re: [dpdk-dev] [PATCH 2/3] ethdev: add new rte_mtr API for traffic metering and policing

2017-09-01 Thread Hemant Agrawal
On 8/26/2017 5:36 AM, Cristian Dumitrescu wrote: Signed-off-by: Cristian Dumitrescu --- Changes in v1 (from RFC [1]): - Added EXPERIMENTAL tag in rte_mtr.h and MANTAINERS for this new API (input from Thomas) - Added more Doxygen comments to re-inforce relationship between MTR and flow (input

[dpdk-dev] [PATCH v2 51/51] net/mlx4: rely on ethdev for Tx/Rx queue arrays

2017-09-01 Thread Adrien Mazarguil
Allocation and management of Tx/Rx queue arrays is done by wrappers at the ethdev level. The resulting information is copied to the private structure while configuring the device, where it is managed separately by the PMD. This is redundant and consumes space in the private structure. Relying mor

[dpdk-dev] [PATCH v2 0/3] dynamic linking support

2017-09-01 Thread Xiaoyun Li
This patchset dynamically selects functions at run-time based on CPU flags that current machine supports. This patchset modifies mempcy, memcpy perf test and x86 EFD, using function pointers and bind them at constructor time. Then in the cloud environment, users can compiler once for the minimum ta

[dpdk-dev] [PATCH v2 2/3] app/test: run-time dispatch over memcpy perf test

2017-09-01 Thread Xiaoyun Li
This patch modifies assignment of alignment unit from build-time to run-time based on CPU flags that machine supports. Signed-off-by: Xiaoyun Li --- test/test/test_memcpy_perf.c | 40 +++- 1 file changed, 27 insertions(+), 13 deletions(-) diff --git a/test/te

[dpdk-dev] [PATCH v2 1/3] eal/x86: run-time dispatch over memcpy

2017-09-01 Thread Xiaoyun Li
This patch dynamically selects functions of memcpy at run-time based on CPU flags that current machine supports. This patch uses function pointers which are bind to the relative functions at constrctor time. In addition, AVX512 instructions set would be compiled only if users config it enabled and

[dpdk-dev] [PATCH v2 3/3] efd: run-time dispatch over x86 EFD functions

2017-09-01 Thread Xiaoyun Li
This patch dynamically selects x86 EFD functions at run-time. This patch uses function pointer and binds it to the relative function based on CPU flags at constructor time. Signed-off-by: Xiaoyun Li --- lib/librte_efd/rte_efd_x86.h | 41 ++--- 1 file changed,

Re: [dpdk-dev] [PATCH v2 1/3] eal/x86: run-time dispatch over memcpy

2017-09-01 Thread Ananyev, Konstantin
> -Original Message- > From: dev [mailto:dev-boun...@dpdk.org] On Behalf Of Xiaoyun Li > Sent: Friday, September 1, 2017 9:57 AM > To: Richardson, Bruce > Cc: dev@dpdk.org; Wang, Zhihong ; Zhang, Qi Z > ; Lu, Wenzhuo > ; Li, Xiaoyun > Subject: [dpdk-dev] [PATCH v2 1/3] eal/x86: run-tim

Re: [dpdk-dev] [PATCH 7/9] net/virtio: rationalize setting of Rx/Tx handlers

2017-09-01 Thread Yuanhan Liu
On Thu, Aug 31, 2017 at 03:40:13PM +0200, Olivier Matz wrote: > The selection of Rx/Tx handlers is done at several places, > group them in one function set_rxtx_funcs(). > > The update of hw->use_simple_rxtx is also rationalized: > - initialized to 1 (prefer simple path) > - in dev configure or rx

Re: [dpdk-dev] [PATCH 8/9] net/virtio: keep Rx handler whatever the Tx queue config

2017-09-01 Thread Yuanhan Liu
On Thu, Aug 31, 2017 at 03:40:14PM +0200, Olivier Matz wrote: > Split use_simple_rxtx into use_simple_rx and use_simple_tx, > and ensure that only use_simple_tx is updated when txq flags > forces to use the standard Tx handler. I think it's a good idea to split it. > This change is also useful fo

Re: [dpdk-dev] [PATCH v2 1/3] eal/x86: run-time dispatch over memcpy

2017-09-01 Thread Li, Xiaoyun
Hi I send an email just now. The original codes have so many functions because maybe other places (right now nowhere else) would need functions like rte_mov16. Then they can directly use it. So I am not sure if I need modify it. The performance haven't been tested. But it should be the same as be

Re: [dpdk-dev] dev Digest, Vol 159, Issue 119

2017-09-01 Thread Pierre
Hi This might not be a good idea. With these modifications, the functions are not inlined any more (attribute inline), and not post-optimized either (-f lto) As per ABI, most of the registers must be saved on the stack before invoking a function. This is not noticeable in isolated test/perf

Re: [dpdk-dev] [PATCH] vhost: adaptively batch small guest memory copies

2017-09-01 Thread Maxime Coquelin
On 08/24/2017 04:19 AM, Tiwei Bie wrote: This patch adaptively batches the small guest memory copies. By batching the small copies, the efficiency of executing the memory LOAD instructions can be improved greatly, because the memory LOAD latency can be effectively hidden by the pipeline. We saw

Re: [dpdk-dev] dev Digest, Vol 159, Issue 119

2017-09-01 Thread Ferruh Yigit
Hi Pierre, On 9/1/2017 10:36 AM, Pierre wrote: <..> > > > On 01/09/17 09:58, dev-requ...@dpdk.org wrote: >> Send dev mailing list submissions to >> dev@dpdk.org >> >> To subscribe or unsubscribe via the World Wide Web, visit >> http://dpdk.org/ml/listinfo/dev >> or, via email, send a m

Re: [dpdk-dev] [PATCH 7/9] net/virtio: rationalize setting of Rx/Tx handlers

2017-09-01 Thread Olivier MATZ
Hi Yuanhan, On Fri, Sep 01, 2017 at 05:19:16PM +0800, Yuanhan Liu wrote: > On Thu, Aug 31, 2017 at 03:40:13PM +0200, Olivier Matz wrote: > > The selection of Rx/Tx handlers is done at several places, > > group them in one function set_rxtx_funcs(). > > > > The update of hw->use_simple_rxtx is als

Re: [dpdk-dev] [PATCH 8/9] net/virtio: keep Rx handler whatever the Tx queue config

2017-09-01 Thread Olivier MATZ
On Fri, Sep 01, 2017 at 05:25:38PM +0800, Yuanhan Liu wrote: > On Thu, Aug 31, 2017 at 03:40:14PM +0200, Olivier Matz wrote: > > Split use_simple_rxtx into use_simple_rx and use_simple_tx, > > and ensure that only use_simple_tx is updated when txq flags > > forces to use the standard Tx handler. >

[dpdk-dev] [PATCH 00/17] build DPDK libs and some drivers with meson/ninja

2017-09-01 Thread Bruce Richardson
Following on from the two previous RFCs [1] [2], here is a cleaned up patchset to serve as a start-point for getting all of DPDK building with meson and ninja. What's covered: * Basic infrastructure for feature detection and DPDK compilation * Building of all DPDK libraries - as either static or s

[dpdk-dev] [PATCH 03/17] igb_uio: add igb_uio kmod to meson build

2017-09-01 Thread Bruce Richardson
Support building igb_uio using meson and ninja. For this, we still use the kernel's kbuild system, by calling out to make, since it's safer and easier than trying to reproduce that in meson. A list of suitable file dependencies is given so that we have a reasonable chance of a rebuild when necessar

[dpdk-dev] [PATCH 01/17] build: add initial infrastructure for meson & ninja builds

2017-09-01 Thread Bruce Richardson
To build with meson and ninja, we need some initial infrastructure in place. The build files for meson always need to be called "meson.build", and options get placed in meson_options.txt This commit adds a top-level meson.build file, which sets up the global variables for tracking drivers, librari

[dpdk-dev] [PATCH 02/17] eal: add eal library to meson build

2017-09-01 Thread Bruce Richardson
Support building the EAL with meson and ninja. This involves a number of different meson.build files for iterating through all the different subdirectories in the EAL. The library itself will be compiled on build but the header files are only copied from their initial location once "ninja install"

[dpdk-dev] [PATCH 05/17] build: add buildtools to meson build

2017-09-01 Thread Bruce Richardson
Add the buildtools folder, and more specifically the pmdinfogen binary to the meson and ninja build. This will be needed for building the PMDs in the driver folder later, as the pmd info output from the tool needs to be included in those libs. Signed-off-by: Bruce Richardson --- buildtools/gen-p

[dpdk-dev] [PATCH 06/17] build: add infrastructure for building PMDs

2017-09-01 Thread Bruce Richardson
Add in the top-level drivers meson.build file to start adding in building of PMDs. Since all PMDs are built in pretty much the same way, the logic for building each PMD, including extracting the pmdinfo, is included in the top level build file. This means that each individual driver class only need

[dpdk-dev] [PATCH 07/17] drivers/mempool: add SW mempool drivers to meson build

2017-09-01 Thread Bruce Richardson
With build infrastructure in place, add in mempool drivers to the build. Signed-off-by: Bruce Richardson --- drivers/mempool/meson.build | 35 +++ drivers/mempool/ring/meson.build | 32 drivers/mempool/stack/meson.build | 32

[dpdk-dev] [PATCH 04/17] build: add DPDK libraries to build

2017-09-01 Thread Bruce Richardson
Add non-EAL libraries to DPDK build. The compat lib is a special case, along with the previously-added EAL, but all other libs can be build using the same set of commands, where the individual meson.build files only need to specify their dependencies, source files, header files and ABI versions. S

[dpdk-dev] [PATCH 08/17] drivers/crypto: add crypto drv class and null PMD to meson

2017-09-01 Thread Bruce Richardson
Add in a crypto driver class, and implement compiling the null crypto instance. Signed-off-by: Bruce Richardson --- drivers/crypto/meson.build | 35 +++ drivers/crypto/null/meson.build | 33 + drivers/meson.build |

[dpdk-dev] [PATCH 09/17] crypto/openssl: add driver to meson build

2017-09-01 Thread Bruce Richardson
Signed-off-by: Bruce Richardson --- drivers/crypto/meson.build | 2 +- drivers/crypto/openssl/meson.build | 38 ++ 2 files changed, 39 insertions(+), 1 deletion(-) create mode 100644 drivers/crypto/openssl/meson.build diff --git a/drivers/crypto/meso

[dpdk-dev] [PATCH 10/17] crypto/qat: add driver to meson build

2017-09-01 Thread Bruce Richardson
Signed-off-by: Bruce Richardson --- config/rte_config.h| 8 drivers/crypto/meson.build | 2 +- drivers/crypto/qat/meson.build | 41 + 3 files changed, 50 insertions(+), 1 deletion(-) create mode 100644 drivers/crypto/qat/meson.bu

[dpdk-dev] [PATCH 11/17] drivers/net: add net driver support to meson build

2017-09-01 Thread Bruce Richardson
Signed-off-by: Bruce Richardson --- drivers/meson.build | 2 +- drivers/net/meson.build | 35 +++ 2 files changed, 36 insertions(+), 1 deletion(-) create mode 100644 drivers/net/meson.build diff --git a/drivers/meson.build b/drivers/meson.build index 515e3cb

[dpdk-dev] [PATCH 13/17] drivers/net: add drivers for Intel NICs to meson build

2017-09-01 Thread Bruce Richardson
Add the e1000, fm10k, i40e and ixgbe drivers to the meson & ninja build. Signed-off-by: Bruce Richardson --- config/rte_config.h| 12 +++ drivers/net/e1000/base/meson.build | 65 ++ drivers/net/e1000/meson.build | 44 ++

[dpdk-dev] [PATCH 12/17] drivers/net: add set of vdev PMDs to build

2017-09-01 Thread Bruce Richardson
Add the af_packet, null, pcap and ring PMDs to the meson build. Signed-off-by: Bruce Richardson --- config/rte_config.h | 4 drivers/net/af_packet/meson.build | 35 + drivers/net/meson.build | 2 +- drivers/net/null/meson.build

[dpdk-dev] [PATCH 14/17] app/test-pmd: add test-pmd to meson build

2017-09-01 Thread Bruce Richardson
Signed-off-by: Bruce Richardson --- app/meson.build | 32 + app/test-pmd/meson.build | 74 meson.build | 3 +- 3 files changed, 108 insertions(+), 1 deletion(-) create mode 100644 app/meson.build create

[dpdk-dev] [PATCH 15/17] usertools: add usertools installation to meson build

2017-09-01 Thread Bruce Richardson
Have the "usertools" scripts installed when doing a DPDK install using ninja. They will be copies to $prefix/bin, generally /usr/local/bin, alongside testpmd. Signed-off-by: Bruce Richardson --- meson.build | 3 ++- usertools/meson.build | 32 2 files

[dpdk-dev] [PATCH 16/17] build: add option to version libs using DPDK version

2017-09-01 Thread Bruce Richardson
Normally, each library has it's own version number based on the ABI. Add an option to have all libs just use the DPDK version number as the .so version. Signed-off-by: Bruce Richardson --- drivers/meson.build | 8 +++- lib/meson.build | 8 +++- meson_options.txt | 1 + 3 files chan

[dpdk-dev] [PATCH 17/17] doc: add documentation on how to add new components to DPDK

2017-09-01 Thread Bruce Richardson
Add to the contributors guide details on how to add libraries and drivers and integrate them with the DPDK build system(s). Signed-off-by: Bruce Richardson --- doc/guides/contributing/coding_style.rst | 214 +++ 1 file changed, 214 insertions(+) diff --git a/doc/guid

Re: [dpdk-dev] [PATCH v1 04/48] net/mlx4: remove useless compilation checks

2017-09-01 Thread Adrien Mazarguil
Hi Ferruh, On Fri, Aug 18, 2017 at 02:39:18PM +0100, Ferruh Yigit wrote: > On 8/1/2017 5:53 PM, Adrien Mazarguil wrote: > > Verbs support for RSS, inline receive and extended device query calls has > > not been optional for a while. Their absence is untested and is therefore > > unsupported. > >

Re: [dpdk-dev] [PATCH] vhost: adaptively batch small guest memory copies

2017-09-01 Thread Tiwei Bie
On Fri, Sep 01, 2017 at 11:45:42AM +0200, Maxime Coquelin wrote: > On 08/24/2017 04:19 AM, Tiwei Bie wrote: > > This patch adaptively batches the small guest memory copies. > > By batching the small copies, the efficiency of executing the > > memory LOAD instructions can be improved greatly, becaus

Re: [dpdk-dev] [PATCH] event: fix doxygen comment for rte_event_ring docs

2017-09-01 Thread Bruce Richardson
On Fri, Sep 01, 2017 at 11:28:54AM +0100, James Poole wrote: > Fixes: dc39e2f359b5 ("eventdev: add ring structure for events") > Cc: bruce.richard...@intel.com > > Signed-off-by: James Poole Acked-by: Bruce Richardson

Re: [dpdk-dev] [PATCH 00/17] build DPDK libs and some drivers with meson/ninja

2017-09-01 Thread Bruce Richardson
On Fri, Sep 01, 2017 at 11:03:59AM +0100, Bruce Richardson wrote: > Following on from the two previous RFCs [1] [2], here is a cleaned up > patchset to serve as a start-point for getting all of DPDK building with > meson and ninja. > Just for reference, I've test-compiled this on, Fedora 26 with

Re: [dpdk-dev] [PATCH v2 1/3] eal/x86: run-time dispatch over memcpy

2017-09-01 Thread Ananyev, Konstantin
> -Original Message- > From: Li, Xiaoyun > Sent: Friday, September 1, 2017 10:29 AM > To: Ananyev, Konstantin ; Richardson, Bruce > > Cc: dev@dpdk.org; Wang, Zhihong ; Zhang, Qi Z > ; Lu, Wenzhuo > > Subject: RE: [dpdk-dev] [PATCH v2 1/3] eal/x86: run-time dispatch over memcpy > > Hi

Re: [dpdk-dev] [dpdk-stable] [PATCH 2/2] net/mlx5: fix probe failure report

2017-09-01 Thread Ferruh Yigit
On 8/23/2017 10:44 AM, Nélio Laranjeiro wrote: > On Sun, Aug 13, 2017 at 03:25:12PM +0300, Matan Azrad wrote: >> The corrupted code doesn't return error when probe function >> fails due to error in device mac address getting. >> By this way, the probe function may return success even if the >> ETH

Re: [dpdk-dev] [PATCH v2 03/51] net/mlx4: check max number of ports dynamically

2017-09-01 Thread Legacy, Allain
> -Original Message- > From: Adrien Mazarguil [mailto:adrien.mazarg...@6wind.com] > Sent: Friday, September 01, 2017 4:06 AM > To: dev@dpdk.org > Cc: Gaëtan Rivet; Legacy, Allain > Subject: [PATCH v2 03/51] net/mlx4: check max number of ports dynamically > > Use maximum number reported by

Re: [dpdk-dev] [PATCH] net/liquidio: add API to set MTU

2017-09-01 Thread Ferruh Yigit
On 8/30/2017 8:11 AM, Shijith Thotton wrote: > Support MTU change in the range ETHER_MIN_MTU to PF_MTU. A drop in PF > MTU lowers VF MTU if it goes out of range. > > Signed-off-by: Shijith Thotton Applied to dpdk-next-net/master, thanks.

Re: [dpdk-dev] [PATCH v2 00/51] net/mlx4: trim and refactor entire PMD

2017-09-01 Thread Ferruh Yigit
Hi Adrien, On 9/1/2017 9:06 AM, Adrien Mazarguil wrote: > The main purpose of this large series is to relieve the mlx4 PMD from its > dependency on Mellanox OFED to instead rely on the standard rdma-core > package provided by Linux distributions. > > While compatibility with Mellanox OFED is pres

Re: [dpdk-dev] [PATCH v2 00/51] net/mlx4: trim and refactor entire PMD

2017-09-01 Thread Adrien Mazarguil
On Fri, Sep 01, 2017 at 12:24:40PM +0100, Ferruh Yigit wrote: > Hi Adrien, > > On 9/1/2017 9:06 AM, Adrien Mazarguil wrote: > > The main purpose of this large series is to relieve the mlx4 PMD from its > > dependency on Mellanox OFED to instead rely on the standard rdma-core > > package provided b

Re: [dpdk-dev] [PATCH 8/9] net/virtio: keep Rx handler whatever the Tx queue config

2017-09-01 Thread Yuanhan Liu
On Fri, Sep 01, 2017 at 11:58:07AM +0200, Olivier MATZ wrote: > On Fri, Sep 01, 2017 at 05:25:38PM +0800, Yuanhan Liu wrote: > > On Thu, Aug 31, 2017 at 03:40:14PM +0200, Olivier Matz wrote: > > > Split use_simple_rxtx into use_simple_rx and use_simple_tx, > > > and ensure that only use_simple_tx i

Re: [dpdk-dev] [PATCH 7/9] net/virtio: rationalize setting of Rx/Tx handlers

2017-09-01 Thread Yuanhan Liu
On Fri, Sep 01, 2017 at 11:52:17AM +0200, Olivier MATZ wrote: > > > @@ -1534,7 +1554,6 @@ eth_virtio_dev_init(struct rte_eth_dev *eth_dev) > > > RTE_BUILD_BUG_ON(RTE_PKTMBUF_HEADROOM < sizeof(struct > > > virtio_net_hdr_mrg_rxbuf)); > > > > > > eth_dev->dev_ops = &virtio_eth_dev_ops; > > > -

  1   2   >