[dpdk-dev] [PATCH 3/3] net/mlx5: add rte_flow rule creation

2016-11-25 Thread Nelio Laranjeiro
Convert Ethernet, IPv4, IPv6, TCP, UDP layers into ibv_flow and create those rules when after validation (i.e. NIC supports the rule). VLAN is still not supported in this commit. Signed-off-by: Nelio Laranjeiro --- drivers/net/mlx5/mlx5_flow.c | 645

[dpdk-dev] [PATCH 2/3] net/mlx5: add software support for rte_flow

2016-11-25 Thread Nelio Laranjeiro
Introduce initial software validation for rte_flow rules. Signed-off-by: Nelio Laranjeiro --- drivers/net/mlx5/mlx5.h | 1 + drivers/net/mlx5/mlx5_flow.c| 196 ++-- drivers/net/mlx5/mlx5_trigger.c | 1 + 3 files changed, 169 insertions(+), 29

[dpdk-dev] [PATCH 1/3] net/mlx5: add preliminary support for rte_flow

2016-11-25 Thread Nelio Laranjeiro
Signed-off-by: Nelio Laranjeiro --- drivers/net/mlx5/Makefile| 1 + drivers/net/mlx5/mlx5.h | 16 ++ drivers/net/mlx5/mlx5_fdir.c | 15 ++ drivers/net/mlx5/mlx5_flow.c | 122 +++ 4 files changed, 154 insertions(+) create mode 100644

[dpdk-dev] [PATCH 0/3] net/mlx5: support flow_rte

2016-11-25 Thread Nelio Laranjeiro
This series requires rte_flow [1]. It brings rte_flow support to the same level as flow director (FDIR) in mlx5. [1] http://dpdk.org/ml/archives/dev/2016-November/050262.html Nelio Laranjeiro (3): net/mlx5: add preliminary support for rte_flow net/mlx5: add software support for rte_flow

[dpdk-dev] [PATCH 7/7] net/mlx5: remove inefficient prefetching

2016-11-24 Thread Nelio Laranjeiro
Prefetching completion queue entries is inefficient because too few CPU cycles are spent before their use, which results into cache misses anyway. Signed-off-by: Nelio Laranjeiro Acked-by: Adrien Mazarguil --- drivers/net/mlx5/mlx5_rxtx.c | 21 - 1 file changed, 21

[dpdk-dev] [PATCH 6/7] net/mlx5: optimize copy of Ethernet header

2016-11-24 Thread Nelio Laranjeiro
Use fewer instructions to copy the first two bytes of Ethernet headers to work queue elements. Signed-off-by: Nelio Laranjeiro Acked-by: Adrien Mazarguil --- drivers/net/mlx5/mlx5_rxtx.c | 9 - 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/drivers/net/mlx5/mlx5_rxtx.c b

[dpdk-dev] [PATCH 5/7] net/mlx5: move static prototype

2016-11-24 Thread Nelio Laranjeiro
Gather function prototypes at the beginning of the file. Signed-off-by: Nelio Laranjeiro Acked-by: Adrien Mazarguil --- drivers/net/mlx5/mlx5_rxtx.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/net/mlx5/mlx5_rxtx.c b/drivers/net/mlx5/mlx5_rxtx.c index

[dpdk-dev] [PATCH 4/7] net/mlx5: fix missing inline attributes

2016-11-24 Thread Nelio Laranjeiro
These functions must be forced inline for better performance. Fixes: 99c12dcca65d ("net/mlx5: handle Rx CQE compression") Fixes: 1d88ba171942 ("net/mlx5: refactor Tx data path") Fixes: 67fa62bc672d ("mlx5: support checksum offload") CC: stable at dpdk.org Signed-o

[dpdk-dev] [PATCH 3/7] net/mlx5: use vector types to speed up processing

2016-11-24 Thread Nelio Laranjeiro
Let compiler automatically use the vector capabilities of the target machine to optimize instructions. Signed-off-by: Nelio Laranjeiro Acked-by: Adrien Mazarguil --- drivers/net/mlx5/mlx5_prm.h | 7 + drivers/net/mlx5/mlx5_rxtx.c | 74 +++- 2 files

[dpdk-dev] [PATCH 2/7] net/mlx5: use work queue buffer as a raw buffer

2016-11-24 Thread Nelio Laranjeiro
Define a single work queue element type that encompasses them all. It includes control, Ethernet segment and raw data all grouped in a single place. Signed-off-by: Nelio Laranjeiro Acked-by: Adrien Mazarguil --- drivers/net/mlx5/mlx5_prm.h | 13 -- drivers/net/mlx5/mlx5_rxtx.c | 103

[dpdk-dev] [PATCH 1/7] net/mlx5: prepare Tx vectorization

2016-11-24 Thread Nelio Laranjeiro
Prepare the code to write the Work Queue Element with vectorized instructions. Signed-off-by: Nelio Laranjeiro Signed-off-by: Elad Persiko Acked-by: Adrien Mazarguil --- drivers/net/mlx5/mlx5_rxtx.c | 44 1 file changed, 28 insertions(+), 16

[dpdk-dev] [PATCH 0/7] net/mlx5: improve single core performance

2016-11-24 Thread Nelio Laranjeiro
thread I/O forwarding packets per second performance is improved by 6% on Intel platforms. [1] http://dpdk.org/ml/archives/dev/2016-November/050261.html [2] http://dpdk.org/dev/patchwork/patch/17024/ Nelio Laranjeiro (7): net/mlx5: prepare Tx vectorization net/mlx5: use work queue buffer as a raw bu

[dpdk-dev] [PATCH 3/3] net/mlx5: do not invalidate title CQE

2016-11-17 Thread Nelio Laranjeiro
We can leave the title completion queue entry untouched since its contents are not modified. Reported-by: Liming Sun Signed-off-by: Nelio Laranjeiro --- drivers/net/mlx5/mlx5_rxtx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/mlx5/mlx5_rxtx.c b/drivers/net

[dpdk-dev] [PATCH 2/3] net/mlx5: fix wrong htons

2016-11-17 Thread Nelio Laranjeiro
Completion queue entry data uses network endian, to access them we should use ntoh*(). Fixes: c305090bbaf8 ("net/mlx5: replace countdown with threshold for Tx completions") CC: stable at dpdk.org Reported-by: Liming Sun Signed-off-by: Nelio Laranjeiro --- drivers/net/mlx5/mlx5_

[dpdk-dev] [PATCH 1/3] net/mlx5: fix leak when starvation occurs

2016-11-17 Thread Nelio Laranjeiro
Liming Sun Signed-off-by: Nelio Laranjeiro --- drivers/net/mlx5/mlx5_rxtx.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/net/mlx5/mlx5_rxtx.c b/drivers/net/mlx5/mlx5_rxtx.c index beff580..9bd4d80 100644 --- a/drivers/net/mlx5/mlx5_rxtx.c +++ b/drivers/net/mlx5/m

[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

[dpdk-dev] [PATCH] net: introduce big and little endian types

2016-11-09 Thread Nelio Laranjeiro
. Signed-off-by: Nelio Laranjeiro --- .../common/include/generic/rte_byteorder.h | 31 +++--- lib/librte_net/rte_arp.h | 15 + lib/librte_net/rte_ether.h | 10 +++--- lib/librte_net/rte_gre.h | 30

[dpdk-dev] [PATCH v2] doc: add mlx5 release notes

2016-11-03 Thread Nelio Laranjeiro
Add list of tested and validated NICs too. Signed-off-by: Nelio Laranjeiro --- doc/guides/rel_notes/release_16_11.rst | 122 + 1 file changed, 122 insertions(+) diff --git a/doc/guides/rel_notes/release_16_11.rst b/doc/guides/rel_notes/release_16_11.rst index

[dpdk-dev] [PATCH 2/2] doc: add mlx5 release notes

2016-11-02 Thread Nelio Laranjeiro
Add list of tested and validated NICs too. Signed-off-by: Nelio Laranjeiro --- doc/guides/rel_notes/release_16_11.rst | 136 ++--- 1 file changed, 110 insertions(+), 26 deletions(-) diff --git a/doc/guides/rel_notes/release_16_11.rst b/doc/guides/rel_notes

[dpdk-dev] [PATCH 1/2] doc: update mlx5 dependencies

2016-11-02 Thread Nelio Laranjeiro
Signed-off-by: Nelio Laranjeiro --- doc/guides/nics/mlx5.rst | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/doc/guides/nics/mlx5.rst b/doc/guides/nics/mlx5.rst index 0d1fabb..98d1341 100644 --- a/doc/guides/nics/mlx5.rst +++ b/doc/guides/nics/mlx5.rst @@ -241,12

[dpdk-dev] [PATCH 0/2] update mlx5 release note and guide

2016-11-02 Thread Nelio Laranjeiro
Nelio Laranjeiro (2): doc: update mlx5 dependencies doc: add mlx5 release notes doc/guides/nics/mlx5.rst | 8 +- doc/guides/rel_notes/release_16_11.rst | 136 ++--- 2 files changed, 114 insertions(+), 30 deletions(-) -- 2.1.4

[dpdk-dev] [PATCH 3/3] net/mlx: fix support for new Rx checksum flags

2016-11-02 Thread Nelio Laranjeiro
Fixes: 5842289a546c ("mbuf: add new Rx checksum flags") Signed-off-by: Nelio Laranjeiro --- drivers/net/mlx4/mlx4.c | 21 - drivers/net/mlx5/mlx5_rxtx.c | 25 ++--- 2 files changed, 18 insertions(+), 28 deletions(-) diff --git a/driver

[dpdk-dev] [PATCH 2/3] net/mlx5: define explicit fields for Rx offloads

2016-11-02 Thread Nelio Laranjeiro
This commit redefines the completion queue element structure as the original lacks the required fields. Signed-off-by: Nelio Laranjeiro --- drivers/net/mlx5/mlx5_prm.h | 16 - drivers/net/mlx5/mlx5_rxtx.c | 56 +--- 2 files changed, 42

[dpdk-dev] [PATCH 1/3] net/mlx5: fix Rx checksum macros

2016-11-02 Thread Nelio Laranjeiro
path without Verbs") Signed-off-by: Nelio Laranjeiro --- drivers/net/mlx5/mlx5_prm.h | 21 + drivers/net/mlx5/mlx5_rxtx.c | 16 2 files changed, 29 insertions(+), 8 deletions(-) diff --git a/drivers/net/mlx5/mlx5_prm.h b/drivers/net/mlx5/mlx5_prm.h ind

[dpdk-dev] [PATCH 0/3] fix Rx checksum offloads

2016-11-02 Thread Nelio Laranjeiro
Fill correctly the Mbuf Rx offloads. Nelio Laranjeiro (3): net/mlx5: fix Rx checksum macros net/mlx5: define explicit fields for Rx offloads net/mlx: fix support for new Rx checksum flags drivers/net/mlx4/mlx4.c | 21 -- drivers/net/mlx5/mlx5_prm.h | 37

[dpdk-dev] [PATCH] doc: fix mlx5 features overview

2016-10-27 Thread Nelio Laranjeiro
Fixes: 75ef62a94301 ("net/mlx5: fix link speed capability information") Fixes: 188408719888 ("net/mlx5: fix support for newer link speeds") Signed-off-by: Nelio Laranjeiro --- doc/guides/nics/features/mlx5.ini | 1 + 1 file changed, 1 insertion(+) diff --git a/doc/guides/ni

[dpdk-dev] [PATCH 2/2] net/mlx5: fix support for newer link speeds

2016-10-26 Thread Nelio Laranjeiro
ities") Signed-off-by: Nelio Laranjeiro --- drivers/net/mlx5/Makefile | 15 + drivers/net/mlx5/mlx5_ethdev.c | 123 - 2 files changed, 135 insertions(+), 3 deletions(-) diff --git a/drivers/net/mlx5/Makefile b/drivers/net/mlx5/Makefile index 2c13c3

[dpdk-dev] [PATCH 1/2] net/mlx5: fix link speed capability information

2016-10-26 Thread Nelio Laranjeiro
Make hard-coded values dynamic to return correct link speed capabilities (not all ConnectX-4 NICs support everything). Fixes: e274f5732225 ("ethdev: add speed capabilities") Signed-off-by: Nelio Laranjeiro --- drivers/net/mlx5/mlx5.h| 1 + drivers/net/mlx5/mlx5_eth

[dpdk-dev] [PATCH 0/2] mlx5: fix link speed capabilities

2016-10-26 Thread Nelio Laranjeiro
Make hard-coded values dynamic to return correct link speed capabilities (not all ConnectX-4 NICs support everything). Nelio Laranjeiro (2): net/mlx5: fix link speed capability information net/mlx5: fix support for newer link speeds drivers/net/mlx5/Makefile | 15 + drivers/net

[dpdk-dev] [PATCH] net/mlx5: fix link status report

2016-10-17 Thread Nelio Laranjeiro
From: Olga Shern This commit fixes link status report on device start up when lcs callback is configured. Fixes: 62072098b54e ("mlx5: support setting link up or down") Signed-off-by: Olga Shern --- drivers/net/mlx5/mlx5.c| 1 + drivers/net/mlx5/mlx5.h| 1 +

[dpdk-dev] [PATCH] net/mlx5: fix hash key size retrieval

2016-10-14 Thread Nelio Laranjeiro
Return RSS key size in struct rte_eth_dev_info. Fixes: 0f6f219e7919 ("app/testpmd: fix RSS hash key size") Signed-off-by: Nelio Laranjeiro --- drivers/net/mlx5/mlx5_ethdev.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/net/mlx5/mlx5_ethdev.c b/drivers/net/mlx5/mlx

[dpdk-dev] [PATCH] net/mlx5: fix Rx function selection

2016-10-11 Thread Nelio Laranjeiro
mlx5_rx_queue_setup() was setting the Rx function by itself instead of using priv_select_rx_function() written for that purpose. Fixes: cdab90cb5c8d ("net/mlx5: add Tx/Rx burst function selection wrapper") Signed-off-by: Nelio Laranjeiro --- drivers/net/mlx5/mlx5_rxq.c | 2 +- 1 fi

[dpdk-dev] [PATCH v2 6/6] net/mlx5: remove gather loop on segments

2016-09-14 Thread Nelio Laranjeiro
Tx function was handling a double loop to send segmented packets, it can be done in a single one. Signed-off-by: Nelio Laranjeiro Signed-off-by: Vasily Philipov --- drivers/net/mlx5/mlx5_rxtx.c | 312 ++- 1 file changed, 158 insertions(+), 154 deletions

[dpdk-dev] [PATCH v2 5/6] net/mlx5: reduce Tx and Rx structure size

2016-09-14 Thread Nelio Laranjeiro
PMD uses only power of two number of Work Queue Elements, storing the number of elements in log2 helps to reduce the size of the container to store it. Signed-off-by: Nelio Laranjeiro --- drivers/net/mlx5/mlx5_rxtx.c | 23 --- drivers/net/mlx5/mlx5_rxtx.h | 2 +- drivers

[dpdk-dev] [PATCH v2 4/6] net/mlx5: reduce Tx structure size

2016-09-14 Thread Nelio Laranjeiro
Blue Flame is a buffer allocated with a power of two value, its size is returned by Verbs in log2. Signed-off-by: Nelio Laranjeiro --- drivers/net/mlx5/mlx5_rxtx.c | 2 +- drivers/net/mlx5/mlx5_rxtx.h | 2 +- drivers/net/mlx5/mlx5_txq.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions

[dpdk-dev] [PATCH v2 3/6] net/mlx5: reduce Tx and Rx structure size

2016-09-14 Thread Nelio Laranjeiro
PMD uses only power of two number of Completion Queue Elements, storing the number of elements in log2 helps to reduce the size of the container to store it. Signed-off-by: Nelio Laranjeiro --- drivers/net/mlx5/mlx5_rxq.c | 2 +- drivers/net/mlx5/mlx5_rxtx.c | 8 drivers/net/mlx5

[dpdk-dev] [PATCH v2 2/6] net/mlx5: reduce Tx and Rx structure size

2016-09-14 Thread Nelio Laranjeiro
PMD uses only power of two number of descriptors, storing the number of elements in log2 helps to reduce the size of the container to store it. Signed-off-by: Nelio Laranjeiro Signed-off-by: Adrien Mazarguil --- drivers/net/mlx5/mlx5_ethdev.c | 4 ++-- drivers/net/mlx5/mlx5_rxq.c| 10

[dpdk-dev] [PATCH v2 1/6] net/mlx5: rework hardware structures

2016-09-14 Thread Nelio Laranjeiro
Rework Work Queue Element (aka WQE) structures to fit PMD needs. A WQE is an aggregation of 16 bytes elements known as "data segments" (aka dseg). Signed-off-by: Nelio Laranjeiro --- drivers/net/mlx5/mlx5_prm.h | 70 ++ drivers/net/mlx5/mlx5_rx

[dpdk-dev] [PATCH v2 0/6] net/mlx5: performance improvement

2016-09-14 Thread Nelio Laranjeiro
- Rework structure elements to reduce their size. - Removes a second useless loop in Tx burst function. This series should be applied on top of "net/mlx5: various fixes". Changes in v2: - rework serie to apply it on top of "net/mlx5: various fixes". Nelio Laranjeiro (6)

[dpdk-dev] [PATCH V2 8/8] net/mlx5: fix inline logic

2016-09-14 Thread Nelio Laranjeiro
To improve performance the NIC expects for large packets to have a pointer to a cache aligned address, old inline code could break this assumption which hurts performance. Fixes: 2a66cf378954 ("net/mlx5: support inline send") Signed-off-by: Nelio Laranjeiro Signed-off-by: Vasil

[dpdk-dev] [PATCH V2 7/8] net/mlx5: re-factorize functions

2016-09-14 Thread Nelio Laranjeiro
Rework logic of wqe_write() and wqe_write_vlan() which are pretty similar to keep a single one. Signed-off-by: Nelio Laranjeiro --- drivers/net/mlx5/mlx5_rxtx.c | 98 ++-- 1 file changed, 22 insertions(+), 76 deletions(-) diff --git a/drivers/net/mlx5

[dpdk-dev] [PATCH V2 6/8] net/mlx5: force inline for completion function

2016-09-14 Thread Nelio Laranjeiro
This function was supposed to be inlined, but was not because several functions calls it. This function should always be inline avoid external function calls and to optimize code in data-path. Signed-off-by: Nelio Laranjeiro --- drivers/net/mlx5/mlx5_rxtx.c | 5 - 1 file changed, 4

[dpdk-dev] [PATCH V2 5/8] net/mlx5: fix support for flow director drop mode

2016-09-14 Thread Nelio Laranjeiro
From: Yaacov Hazan <yaac...@mellanox.com> Packet rejection was routed to a polled queue. This patch route them to a dummy queue which is not polled. Fixes: 76f5c99e6840 ("mlx5: support flow director") Signed-off-by: Yaacov Hazan Signed-off-by: Adrien Mazarguil Signed-off-by:

[dpdk-dev] [PATCH V2 4/8] net/mlx5: refactor allocation of flow director queues

2016-09-14 Thread Nelio Laranjeiro
From: Yaacov Hazan This is done to prepare support for drop queues, which are not related to existing RX queues and need to be managed separately. Signed-off-by: Yaacov Hazan Signed-off-by: Adrien Mazarguil --- drivers/net/mlx5/mlx5.h | 1 +

[dpdk-dev] [PATCH V2 3/8] net/mlx5: fix removing VLAN filter

2016-09-14 Thread Nelio Laranjeiro
From: Raslan Darawsheh memmove was moving bytes as the number of elements next to i, while it should move the number of elements multiplied by the size of each element. Fixes: e9086978 ("mlx5: support VLAN filtering") Signed-off-by: Raslan Darawsheh ---

[dpdk-dev] [PATCH V2 2/8] net/mlx5: fix Rx VLAN offload capability report

2016-09-14 Thread Nelio Laranjeiro
From: Adrien Mazarguil This capability is implemented but not reported. Fixes: f3db9489188a ("mlx5: support Rx VLAN stripping") Signed-off-by: Adrien Mazarguil --- drivers/net/mlx5/mlx5_ethdev.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git

[dpdk-dev] [PATCH V2 1/8] net/mlx5: fix inconsistent return value in Flow Director

2016-09-14 Thread Nelio Laranjeiro
From: Yaacov Hazan The return value in DPDK is negative errno on failure. Since internal functions in mlx driver return positive values need to negate this value when it returned to dpdk layer. Fixes: 76f5c99 ("mlx5: support flow director") Signed-off-by: Yaacov Hazan

[dpdk-dev] [PATCH V2 0/8] net/mlx5: various fixes

2016-09-14 Thread Nelio Laranjeiro
- Flow director - Rx Capabilities - Inline Changes in V2: - Fix a compilation error. Adrien Mazarguil (1): net/mlx5: fix Rx VLAN offload capability report Nelio Laranjeiro (3): net/mlx5: force inline for completion function net/mlx5: re-factorize functions net/mlx5: fix inline

[dpdk-dev] [PATCH] net/mlx5: return RSS hash result in mbuf

2016-09-14 Thread Nelio Laranjeiro
Signed-off-by: Nelio Laranjeiro --- drivers/net/mlx5/mlx5_rxq.c | 1 + drivers/net/mlx5/mlx5_rxtx.c | 6 +- drivers/net/mlx5/mlx5_rxtx.h | 2 ++ 3 files changed, 8 insertions(+), 1 deletion(-) diff --git a/drivers/net/mlx5/mlx5_rxq.c b/drivers/net/mlx5/mlx5_rxq.c index f6f4315..65c264b

[dpdk-dev] [PATCH] net/mlx5: return RSS hash result in mbuf

2016-09-14 Thread Nelio Laranjeiro
Fill RSS hash result in mbuf. To be applied on top of "[PATCH 0/6] net/mlx5: performance improvement" Nelio Laranjeiro (1): net/mlx5: return RSS hash result in mbuf drivers/net/mlx5/mlx5_rxq.c | 1 + drivers/net/mlx5/mlx5_rxtx.c | 6 +- drivers/net/mlx5/mlx5_rxtx.h | 2 +

[dpdk-dev] [PATCH 6/6] net/mlx5: remove gather loop on segments

2016-09-07 Thread Nelio Laranjeiro
Tx function was handling a double loop to send segmented packets, it can be done in a single one. Signed-off-by: Nelio Laranjeiro Signed-off-by: Vasily Philipov --- drivers/net/mlx5/mlx5_rxtx.c | 312 ++- 1 file changed, 158 insertions(+), 154 deletions

[dpdk-dev] [PATCH 5/6] net/mlx5: reduce Tx and Rx structure size

2016-09-07 Thread Nelio Laranjeiro
PMD uses only power of two number of Work Queue Elements, storing the number of elements in log2 helps to reduce the size of the container to store it. Signed-off-by: Nelio Laranjeiro --- drivers/net/mlx5/mlx5_rxtx.c | 23 --- drivers/net/mlx5/mlx5_rxtx.h | 2 +- drivers

[dpdk-dev] [PATCH 4/6] net/mlx5: reduce Tx structure size

2016-09-07 Thread Nelio Laranjeiro
Blue Flame is a buffer allocated with a power of two value, its size is returned by Verbs in log2. Signed-off-by: Nelio Laranjeiro --- drivers/net/mlx5/mlx5_rxtx.c | 2 +- drivers/net/mlx5/mlx5_rxtx.h | 2 +- drivers/net/mlx5/mlx5_txq.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions

[dpdk-dev] [PATCH 3/6] net/mlx5: reduce Tx and Rx structure size

2016-09-07 Thread Nelio Laranjeiro
PMD uses only power of two number of Completion Queue Elements, storing the number of elements in log2 helps to reduce the size of the container to store it. Signed-off-by: Nelio Laranjeiro --- drivers/net/mlx5/mlx5_rxq.c | 2 +- drivers/net/mlx5/mlx5_rxtx.c | 8 drivers/net/mlx5

[dpdk-dev] [PATCH 2/6] net/mlx5: reduce Tx and Rx structure size

2016-09-07 Thread Nelio Laranjeiro
PMD uses only power of two number of descriptors, storing the number of elements in log2 helps to reduce the size of the container to store it. Signed-off-by: Nelio Laranjeiro Signed-off-by: Adrien Mazarguil --- drivers/net/mlx5/mlx5_ethdev.c | 4 ++-- drivers/net/mlx5/mlx5_rxq.c| 10

[dpdk-dev] [PATCH 1/6] net/mlx5: rework hardware structures

2016-09-07 Thread Nelio Laranjeiro
Rework Work Queue Element (aka WQE) structures to fit PMD needs. A WQE is an aggregation of 16 bytes elements known as "data segments" (aka dseg). Signed-off-by: Nelio Laranjeiro --- drivers/net/mlx5/mlx5_prm.h | 70 ++ drivers/net/mlx5/mlx5_rx

[dpdk-dev] [PATCH 0/6] net/mlx5: performance improvement

2016-09-07 Thread Nelio Laranjeiro
- Rework structure elements to reduce their size. - Removes a second useless loop in Tx burst function. This series should be applied on top of "net/mlx5: various fixes". Nelio Laranjeiro (6): net/mlx5: rework hardware structures net/mlx5: reduce Tx and Rx structure size net/ml

[dpdk-dev] [PATCH 8/8] net/mlx5: fix inline logic

2016-09-07 Thread Nelio Laranjeiro
To improve performance the NIC expects for large packets to have a pointer to a cache aligned address, old inline code could break this assumption which hurts performance. Fixes: 2a66cf378954 ("net/mlx5: support inline send") Signed-off-by: Nelio Laranjeiro Signed-off-by: Vasil

[dpdk-dev] [PATCH 7/8] net/mlx5: re-factorize functions

2016-09-07 Thread Nelio Laranjeiro
Rework logic of wqe_write() and wqe_write_vlan() which are pretty similar to keep a single one. Signed-off-by: Nelio Laranjeiro --- drivers/net/mlx5/mlx5_rxtx.c | 98 ++-- 1 file changed, 22 insertions(+), 76 deletions(-) diff --git a/drivers/net/mlx5

[dpdk-dev] [PATCH 6/8] net/mlx5: force inline for completion function

2016-09-07 Thread Nelio Laranjeiro
This function was supposed to be inlined, but was not because several functions calls it. This function should always be inline avoid external function calls and to optimize code in data-path. Signed-off-by: Nelio Laranjeiro --- drivers/net/mlx5/mlx5_rxtx.c | 5 - 1 file changed, 4

[dpdk-dev] [PATCH 5/8] net/mlx5: fix support for flow director drop mode

2016-09-07 Thread Nelio Laranjeiro
From: Yaacov Hazan <yaac...@mellanox.com> Packet rejection was routed to a polled queue. This patch route them to a dummy queue which is not polled. Fixes: 76f5c99e6840 ("mlx5: support flow director") Signed-off-by: Yaacov Hazan Signed-off-by: Adrien Mazarguil Signed-off-by:

[dpdk-dev] [PATCH 4/8] net/mlx5: refactor allocation of flow director queues

2016-09-07 Thread Nelio Laranjeiro
From: Yaacov Hazan This is done to prepare support for drop queues, which are not related to existing RX queues and need to be managed separately. Signed-off-by: Yaacov Hazan Signed-off-by: Adrien Mazarguil --- drivers/net/mlx5/mlx5.h | 1 +

[dpdk-dev] [PATCH 3/8] net/mlx5: fix removing VLAN filter

2016-09-07 Thread Nelio Laranjeiro
From: Raslan Darawsheh memmove was moving bytes as the number of elements next to i, while it should move the number of elements multiplied by the size of each element. Fixes: e9086978 ("mlx5: support VLAN filtering") Signed-off-by: Raslan Darawsheh ---

[dpdk-dev] [PATCH 2/8] net/mlx5: fix Rx VLAN offload capability report

2016-09-07 Thread Nelio Laranjeiro
From: Adrien Mazarguil This capability is implemented but not reported. Fixes: f3db9489188a ("mlx5: support Rx VLAN stripping") Signed-off-by: Adrien Mazarguil --- drivers/net/mlx5/mlx5_ethdev.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git

[dpdk-dev] [PATCH 1/8] net/mlx5: fix inconsistent return value in Flow Director

2016-09-07 Thread Nelio Laranjeiro
From: Yaacov Hazan The return value in DPDK is negative errno on failure. Since internal functions in mlx driver return positive values need to negate this value when it returned to dpdk layer. Fixes: 76f5c99 ("mlx5: support flow director") Signed-off-by: Yaacov Hazan

[dpdk-dev] [PATCH 0/8] net/mlx5: various fixes

2016-09-07 Thread Nelio Laranjeiro
- Flow director - Rx Capabilities - Inline Adrien Mazarguil (1): net/mlx5: fix Rx VLAN offload capability report Nelio Laranjeiro (3): net/mlx5: force inline for completion function net/mlx5: re-factorize functions net/mlx5: fix inline logic Raslan Darawsheh (1): net/mlx5: fix

[dpdk-dev] [PATCH] net/mlx5: fix a segmentation fault in Rx

2016-07-08 Thread Nelio Laranjeiro
dd Rx scatter support") Reported-by: Yongseok Koh Signed-off-by: Nelio Laranjeiro --- drivers/net/mlx5/mlx5_rxtx.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/net/mlx5/mlx5_rxtx.c b/drivers/net/mlx5/mlx5_rxtx.c index 0c352f3..3564937 100644 --- a/driver

[dpdk-dev] [PATCH v7 25/25] mlx5: resurrect Rx scatter support

2016-06-24 Thread Nelio Laranjeiro
Signed-off-by: Vasily Philipov Signed-off-by: Nelio Laranjeiro --- drivers/net/mlx5/mlx5_ethdev.c | 90 ++ drivers/net/mlx5/mlx5_rxq.c| 77 ++- drivers/net/mlx5/mlx5_rxtx.c | 139 - drivers/net/mlx5/mlx5_rxtx.h

[dpdk-dev] [PATCH v7 24/25] mlx5: make Rx queue reinitialization safer

2016-06-24 Thread Nelio Laranjeiro
From: Adrien Mazarguil The primary purpose of rxq_rehash() function is to stop and restart reception on a queue after re-posting buffers. This may fail if the array that temporarily stores existing buffers for reuse cannot be allocated. Update rxq_rehash() to work on

[dpdk-dev] [PATCH v7 22/25] mlx5: work around spurious compilation errors

2016-06-24 Thread Nelio Laranjeiro
From: Adrien Mazarguil Since commit "mlx5: resurrect Tx gather support", older GCC versions (such as 4.8.5) may complain about the following: mlx5_rxtx.c: In function `mlx5_tx_burst': mlx5_rxtx.c:705:25: error: `wqe' may be used uninitialized in this function

[dpdk-dev] [PATCH v7 21/25] mlx5: resurrect Tx gather support

2016-06-24 Thread Nelio Laranjeiro
a non negligible amount of memory to handle oversized mbufs. The resulting code is both lighter and faster. Signed-off-by: Adrien Mazarguil Signed-off-by: Nelio Laranjeiro --- drivers/net/mlx5/mlx5_rxtx.c | 235 +-- drivers/net/mlx5/mlx5_txq.c | 8 +- 2

[dpdk-dev] [PATCH v7 20/25] mlx5: check remaining space while processing Tx burst

2016-06-24 Thread Nelio Laranjeiro
From: Adrien Mazarguil <adrien.mazarg...@6wind.com> The space necessary to store segmented packets cannot be known in advance and must be verified for each of them. Signed-off-by: Adrien Mazarguil Signed-off-by: Nelio Laranjeiro --- drivers/net/mlx5/mlx5_rxtx.c

[dpdk-dev] [PATCH v7 19/25] mlx5: add debugging information about Tx queues capabilities

2016-06-24 Thread Nelio Laranjeiro
From: Adrien Mazarguil Signed-off-by: Adrien Mazarguil --- drivers/net/mlx5/mlx5_txq.c | 5 + 1 file changed, 5 insertions(+) diff --git a/drivers/net/mlx5/mlx5_txq.c b/drivers/net/mlx5/mlx5_txq.c index 4f17fb0..bae9f3d 100644 --- a/drivers/net/mlx5/mlx5_txq.c

[dpdk-dev] [PATCH v7 18/25] mlx5: add support for multi-packet send

2016-06-24 Thread Nelio Laranjeiro
This feature enables the TX burst function to emit up to 5 packets using only two WQEs on devices that support it. Saves PCI bandwidth and improves performance. Signed-off-by: Nelio Laranjeiro Signed-off-by: Adrien Mazarguil Signed-off-by: Olga Shern --- doc/guides/nics/mlx5.rst | 10

[dpdk-dev] [PATCH v7 17/25] mlx5: add support for inline send

2016-06-24 Thread Nelio Laranjeiro
causes a performance bottleneck. Signed-off-by: Yaacov Hazan Signed-off-by: Adrien Mazarguil Signed-off-by: Nelio Laranjeiro --- doc/guides/nics/mlx5.rst | 17 +++ drivers/net/mlx5/mlx5.c| 15 +++ drivers/net/mlx5/mlx5.h| 2 + drivers/net/mlx5/mlx5_ethdev.c | 5 + drivers/ne

[dpdk-dev] [PATCH v7 16/25] mlx5: replace countdown with threshold for Tx completions

2016-06-24 Thread Nelio Laranjeiro
etions during a burst. Completions are now requested at most once per burst after threshold is reached. Signed-off-by: Adrien Mazarguil Signed-off-by: Nelio Laranjeiro Signed-off-by: Vasily Philipov --- drivers/net/mlx5/mlx5_defs.h | 7 +-- drivers/net/mlx5/mlx5_rxtx.

[dpdk-dev] [PATCH v7 15/25] mlx5: handle Rx CQE compression

2016-06-24 Thread Nelio Laranjeiro
empty CQE64 entries are handed back to HW without further processing. Signed-off-by: Nelio Laranjeiro Signed-off-by: Adrien Mazarguil Signed-off-by: Olga Shern Signed-off-by: Vasily Philipov --- doc/guides/nics/mlx5.rst | 6 + drivers/net/mlx5/mlx5.c | 24 +++- drivers/net/mlx5/mlx5

[dpdk-dev] [PATCH v7 14/25] mlx5: refactor Tx data path

2016-06-24 Thread Nelio Laranjeiro
Bypass Verbs to improve Tx performance. Signed-off-by: Nelio Laranjeiro Signed-off-by: Yaacov Hazan Signed-off-by: Adrien Mazarguil --- drivers/net/mlx5/Makefile | 5 - drivers/net/mlx5/mlx5_ethdev.c | 10 +- drivers/net/mlx5/mlx5_mr.c | 4 +- drivers/net/mlx5/mlx5_rxtx.c

[dpdk-dev] [PATCH v7 13/25] mlx5: refactor Rx data path

2016-06-24 Thread Nelio Laranjeiro
Bypass Verbs to improve RX performance. Signed-off-by: Nelio Laranjeiro Signed-off-by: Yaacov Hazan Signed-off-by: Adrien Mazarguil Signed-off-by: Vasily Philipov --- drivers/net/mlx5/mlx5_ethdev.c | 4 +- drivers/net/mlx5/mlx5_fdir.c | 2 +- drivers/net/mlx5/mlx5_rxq.c| 303

[dpdk-dev] [PATCH v7 12/25] mlx5: add Tx/Rx burst function selection wrapper

2016-06-24 Thread Nelio Laranjeiro
These wrappers are meant to prevent code duplication later. Signed-off-by: Nelio Laranjeiro Signed-off-by: Adrien Mazarguil --- drivers/net/mlx5/mlx5.h| 2 ++ drivers/net/mlx5/mlx5_ethdev.c | 34 -- drivers/net/mlx5/mlx5_txq.c| 2 +- 3 files

[dpdk-dev] [PATCH v7 11/25] mlx5: add support for configuration through kvargs

2016-06-24 Thread Nelio Laranjeiro
The intent is to replace the remaining compile-time options and environment variables with a common mean of runtime configuration. This commit only adds the kvargs handling code, subsequent commits will update the rest. Signed-off-by: Nelio Laranjeiro Signed-off-by: Adrien Mazarguil

[dpdk-dev] [PATCH v7 10/25] mlx5: add definitions for data path without Verbs

2016-06-24 Thread Nelio Laranjeiro
These structures and macros extend those exposed by libmlx5 (in mlx5_hw.h) to let the PMD manage work queue and completion queue elements directly. Signed-off-by: Nelio Laranjeiro Signed-off-by: Adrien Mazarguil --- drivers/net/mlx5/mlx5_prm.h | 163

[dpdk-dev] [PATCH v7 09/25] mlx5: update prerequisites for upcoming enhancements

2016-06-24 Thread Nelio Laranjeiro
The latest version of Mellanox OFED exposes hardware definitions necessary to implement data path operation bypassing Verbs. Update the minimum version requirement to MLNX_OFED >= 3.3 and clean up compatibility checks for previous releases. Signed-off-by: Nelio Laranjeiro Signed-off-by: Adr

[dpdk-dev] [PATCH v7 08/25] mlx5: split Rx queue structure

2016-06-24 Thread Nelio Laranjeiro
To keep the data path as efficient as possible, move fields only useful to the control path into new structure rxq_ctrl. Signed-off-by: Nelio Laranjeiro Signed-off-by: Adrien Mazarguil --- drivers/net/mlx5/mlx5.c | 6 +- drivers/net/mlx5/mlx5_fdir.c | 8 +- drivers/net/mlx5/mlx5_rxq.c

[dpdk-dev] [PATCH v7 07/25] mlx5: split Tx queue structure

2016-06-24 Thread Nelio Laranjeiro
To keep the data path as efficient as possible, move fields only useful to the control path into new structure txq_ctrl. Signed-off-by: Nelio Laranjeiro Signed-off-by: Adrien Mazarguil --- drivers/net/mlx5/mlx5.c| 21 +++-- drivers/net/mlx5/mlx5_ethdev.c | 28 +++--- drivers/net/mlx5

[dpdk-dev] [PATCH v7 06/25] mlx5: remove inline Tx support

2016-06-24 Thread Nelio Laranjeiro
Inline TX will be fully managed by the PMD after Verbs is bypassed in the data path. Remove the current code until then. Signed-off-by: Nelio Laranjeiro Signed-off-by: Adrien Mazarguil --- config/common_base | 1 - doc/guides/nics/mlx5.rst | 10 -- drivers/net/mlx5/Makefile

[dpdk-dev] [PATCH v7 05/25] mlx5: remove configuration variable

2016-06-24 Thread Nelio Laranjeiro
There is no scatter/gather support anymore, CONFIG_RTE_LIBRTE_MLX5_SGE_WR_N has no purpose and can be removed. Signed-off-by: Nelio Laranjeiro Signed-off-by: Adrien Mazarguil --- config/common_base | 1 - doc/guides/nics/mlx5.rst | 7 --- drivers/net/mlx5/Makefile| 4

[dpdk-dev] [PATCH v7 04/25] mlx5: remove Rx scatter support

2016-06-24 Thread Nelio Laranjeiro
This is done in preparation of bypassing Verbs entirely for the data path as a performance improvement. RX scatter cannot be maintained during the transition and will be reimplemented later. Signed-off-by: Nelio Laranjeiro Signed-off-by: Adrien Mazarguil --- drivers/net/mlx5/mlx5_ethdev.c

[dpdk-dev] [PATCH v7 03/25] mlx5: remove Tx gather support

2016-06-24 Thread Nelio Laranjeiro
This is done in preparation of bypassing Verbs entirely for the data path as a performance improvement. TX gather cannot be maintained during the transition and will be reimplemented later. Signed-off-by: Nelio Laranjeiro Signed-off-by: Adrien Mazarguil --- drivers/net/mlx5/mlx5_ethdev.c | 2

[dpdk-dev] [PATCH v7 02/25] mlx5: split memory registration function

2016-06-24 Thread Nelio Laranjeiro
function. Signed-off-by: Nelio Laranjeiro Signed-off-by: Adrien Mazarguil --- drivers/net/mlx5/Makefile| 1 + drivers/net/mlx5/mlx5_mr.c | 280 +++ drivers/net/mlx5/mlx5_rxtx.c | 209 ++-- drivers/net/mlx5/mlx5_rxtx.h

[dpdk-dev] [PATCH v7 01/25] drivers: fix PCI class id support

2016-06-24 Thread Nelio Laranjeiro
Fixes: 701c8d80c820 ("pci: support class id probing") Signed-off-by: Nelio Laranjeiro --- drivers/crypto/qat/rte_qat_cryptodev.c | 5 + drivers/net/mlx4/mlx4.c| 18 ++ drivers/net/mlx5/mlx5.c| 24 drive

[dpdk-dev] [PATCH v7 00/25] Refactor mlx5 to improve performance

2016-06-24 Thread Nelio Laranjeiro
ation code mlx5: make Rx queue reinitialization safer Nelio Laranjeiro (17): drivers: fix PCI class id support mlx5: split memory registration function mlx5: remove Tx gather support mlx5: remove Rx scatter support mlx5: remove configuration variable mlx5: remove inline Tx support mlx5

[dpdk-dev] [PATCH v6 25/25] mlx5: resurrect Rx scatter support

2016-06-24 Thread Nelio Laranjeiro
Signed-off-by: Vasily Philipov Signed-off-by: Nelio Laranjeiro --- drivers/net/mlx5/mlx5_ethdev.c | 90 ++ drivers/net/mlx5/mlx5_rxq.c| 77 ++- drivers/net/mlx5/mlx5_rxtx.c | 139 - drivers/net/mlx5/mlx5_rxtx.h

[dpdk-dev] [PATCH v6 24/25] mlx5: make Rx queue reinitialization safer

2016-06-24 Thread Nelio Laranjeiro
From: Adrien Mazarguil The primary purpose of rxq_rehash() function is to stop and restart reception on a queue after re-posting buffers. This may fail if the array that temporarily stores existing buffers for reuse cannot be allocated. Update rxq_rehash() to work on

[dpdk-dev] [PATCH v6 23/25] mlx5: remove redundant Rx queue initialization code

2016-06-24 Thread Nelio Laranjeiro
From: Adrien Mazarguil <adrien.mazarg...@6wind.com> Toggling RX checksum offloads is already done at initialization time. This code does not belong in rxq_rehash(). Signed-off-by: Adrien Mazarguil Signed-off-by: Nelio Laranjeiro --- drivers/net/mlx5/mlx5_rxq.c | 11 --- 1 file c

[dpdk-dev] [PATCH v6 22/25] mlx5: work around spurious compilation errors

2016-06-24 Thread Nelio Laranjeiro
From: Adrien Mazarguil Since commit "mlx5: resurrect Tx gather support", older GCC versions (such as 4.8.5) may complain about the following: mlx5_rxtx.c: In function `mlx5_tx_burst': mlx5_rxtx.c:705:25: error: `wqe' may be used uninitialized in this function

[dpdk-dev] [PATCH v6 21/25] mlx5: resurrect Tx gather support

2016-06-24 Thread Nelio Laranjeiro
a non negligible amount of memory to handle oversized mbufs. The resulting code is both lighter and faster. Signed-off-by: Adrien Mazarguil Signed-off-by: Nelio Laranjeiro --- drivers/net/mlx5/mlx5_rxtx.c | 235 +-- drivers/net/mlx5/mlx5_txq.c | 8 +- 2

[dpdk-dev] [PATCH v6 20/25] mlx5: check remaining space while processing Tx burst

2016-06-24 Thread Nelio Laranjeiro
From: Adrien Mazarguil <adrien.mazarg...@6wind.com> The space necessary to store segmented packets cannot be known in advance and must be verified for each of them. Signed-off-by: Adrien Mazarguil Signed-off-by: Nelio Laranjeiro --- drivers/net/mlx5/mlx5_rxtx.c

[dpdk-dev] [PATCH v6 19/25] mlx5: add debugging information about Tx queues capabilities

2016-06-24 Thread Nelio Laranjeiro
From: Adrien Mazarguil Signed-off-by: Adrien Mazarguil --- drivers/net/mlx5/mlx5_txq.c | 5 + 1 file changed, 5 insertions(+) diff --git a/drivers/net/mlx5/mlx5_txq.c b/drivers/net/mlx5/mlx5_txq.c index 4f17fb0..bae9f3d 100644 --- a/drivers/net/mlx5/mlx5_txq.c

[dpdk-dev] [PATCH v6 18/25] mlx5: add support for multi-packet send

2016-06-24 Thread Nelio Laranjeiro
This feature enables the TX burst function to emit up to 5 packets using only two WQEs on devices that support it. Saves PCI bandwidth and improves performance. Signed-off-by: Nelio Laranjeiro Signed-off-by: Adrien Mazarguil Signed-off-by: Olga Shern --- doc/guides/nics/mlx5.rst | 10

  1   2   3   >