dpdk.git
6 years agoexamples/ip_pipeline: add thread runtime
Jasvinder Singh [Thu, 29 Mar 2018 18:31:50 +0000 (19:31 +0100)]
examples/ip_pipeline: add thread runtime

Add runtime thread functions for the pipeline.

Signed-off-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
Signed-off-by: Jasvinder Singh <jasvinder.singh@intel.com>
6 years agoexamples/ip_pipeline: add threads
Jasvinder Singh [Thu, 29 Mar 2018 18:31:49 +0000 (19:31 +0100)]
examples/ip_pipeline: add threads

Add threads data structure and initialisation functions to run
the pipeline.

Signed-off-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
Signed-off-by: Jasvinder Singh <jasvinder.singh@intel.com>
6 years agoexamples/ip_pipeline: add pipeline object
Jasvinder Singh [Thu, 29 Mar 2018 18:31:48 +0000 (19:31 +0100)]
examples/ip_pipeline: add pipeline object

Add pipeline object implementation to the application.

Signed-off-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
Signed-off-by: Jasvinder Singh <jasvinder.singh@intel.com>
6 years agoexamples/ip_pipeline: add action profile objects
Jasvinder Singh [Thu, 29 Mar 2018 18:31:47 +0000 (19:31 +0100)]
examples/ip_pipeline: add action profile objects

Add action profile object implementation to the application.

Signed-off-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
Signed-off-by: Jasvinder Singh <jasvinder.singh@intel.com>
Signed-off-by: Fan Zhang <roy.fan.zhang@intel.com>
6 years agoexamples/ip_pipeline: add KNI object
Jasvinder Singh [Thu, 29 Mar 2018 18:31:46 +0000 (19:31 +0100)]
examples/ip_pipeline: add KNI object

Add kni object implementation to the application.

Signed-off-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
Signed-off-by: Jasvinder Singh <jasvinder.singh@intel.com>
Signed-off-by: Kevin Laatz <kevin.laatz@intel.com>
6 years agoexamples/ip_pipeline: add tap object
Jasvinder Singh [Thu, 29 Mar 2018 18:31:45 +0000 (19:31 +0100)]
examples/ip_pipeline: add tap object

Add tap object implementation to the application

Signed-off-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
Signed-off-by: Jasvinder Singh <jasvinder.singh@intel.com>
Signed-off-by: Kevin Laatz <kevin.laatz@intel.com>
6 years agoexamples/ip_pipeline: add traffic manager object
Jasvinder Singh [Thu, 29 Mar 2018 18:31:44 +0000 (19:31 +0100)]
examples/ip_pipeline: add traffic manager object

Add traffic manager object implementation to the application.

Signed-off-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
Signed-off-by: Jasvinder Singh <jasvinder.singh@intel.com>
6 years agoexamples/ip_pipeline: add sw queue object
Jasvinder Singh [Thu, 29 Mar 2018 18:31:43 +0000 (19:31 +0100)]
examples/ip_pipeline: add sw queue object

Add swq object implementation to the application.

Signed-off-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
Signed-off-by: Jasvinder Singh <jasvinder.singh@intel.com>
Signed-off-by: Kevin Laatz <kevin.laatz@intel.com>
6 years agoexamples/ip_pipeline: add link object
Jasvinder Singh [Thu, 29 Mar 2018 18:31:42 +0000 (19:31 +0100)]
examples/ip_pipeline: add link object

Add link object implementation to the application.

Signed-off-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
Signed-off-by: Jasvinder Singh <jasvinder.singh@intel.com>
Signed-off-by: Fan Zhang <roy.fan.zhang@intel.com>
6 years agoexamples/ip_pipeline: add mempool object
Jasvinder Singh [Thu, 29 Mar 2018 18:31:41 +0000 (19:31 +0100)]
examples/ip_pipeline: add mempool object

Add mempool object implementation to the application.

Signed-off-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
Signed-off-by: Jasvinder Singh <jasvinder.singh@intel.com>
Signed-off-by: Fan Zhang <roy.fan.zhang@intel.com>
6 years agoexamples/ip_pipeline: add CLI interface
Jasvinder Singh [Thu, 29 Mar 2018 18:31:40 +0000 (19:31 +0100)]
examples/ip_pipeline: add CLI interface

CLI interface allowing connectivity with external agent (e.g. telnet,
netcat, Python script, etc) is added to the application.

Signed-off-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
Signed-off-by: Jasvinder Singh <jasvinder.singh@intel.com>
6 years agoexamples/ip_pipeline: remove infra code
Jasvinder Singh [Thu, 29 Mar 2018 18:31:39 +0000 (19:31 +0100)]
examples/ip_pipeline: remove infra code

All the actions associated with application pipelines
tables and ports are now implemented using the new action
APIs. Therefore, thousands of lines of code are eliminated
from the application. The reduced code size is easier to
maintain and extend.

Signed-off-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
Signed-off-by: Jasvinder Singh <jasvinder.singh@intel.com>
6 years agoexamples/ip_pipeline: remove config
Jasvinder Singh [Thu, 29 Mar 2018 18:31:38 +0000 (19:31 +0100)]
examples/ip_pipeline: remove config

Remove application configuration and script files.

Signed-off-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
Signed-off-by: Jasvinder Singh <jasvinder.singh@intel.com>
6 years agoexamples/ip_pipeline: remove master pipeline
Jasvinder Singh [Thu, 29 Mar 2018 18:31:37 +0000 (19:31 +0100)]
examples/ip_pipeline: remove master pipeline

remove master pipeline.

Signed-off-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
Signed-off-by: Jasvinder Singh <jasvinder.singh@intel.com>
6 years agoexamples/ip_pipeline: remove firewall pipeline
Jasvinder Singh [Thu, 29 Mar 2018 18:31:36 +0000 (19:31 +0100)]
examples/ip_pipeline: remove firewall pipeline

Remove firewall pipeline.

Signed-off-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
Signed-off-by: Jasvinder Singh <jasvinder.singh@intel.com>
6 years agoexamples/ip_pipeline: remove flow actions pipeline
Jasvinder Singh [Thu, 29 Mar 2018 18:31:35 +0000 (19:31 +0100)]
examples/ip_pipeline: remove flow actions pipeline

Remove flow actions pipeline.

Signed-off-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
Signed-off-by: Jasvinder Singh <jasvinder.singh@intel.com>
6 years agoexamples/ip_pipeline: remove flow classification pipeline
Jasvinder Singh [Thu, 29 Mar 2018 18:31:34 +0000 (19:31 +0100)]
examples/ip_pipeline: remove flow classification pipeline

Remove flow classification pipeline.

Signed-off-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
Signed-off-by: Jasvinder Singh <jasvinder.singh@intel.com>
6 years agoexamples/ip_pipeline: remove routing pipeline
Jasvinder Singh [Thu, 29 Mar 2018 18:31:33 +0000 (19:31 +0100)]
examples/ip_pipeline: remove routing pipeline

Remove routing pipeline.

Signed-off-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
Signed-off-by: Jasvinder Singh <jasvinder.singh@intel.com>
6 years agoexamples/ip_pipeline: remove passthrough pipeline
Jasvinder Singh [Thu, 29 Mar 2018 18:31:32 +0000 (19:31 +0100)]
examples/ip_pipeline: remove passthrough pipeline

remove passthrough pipeline.

Signed-off-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
Signed-off-by: Jasvinder Singh <jasvinder.singh@intel.com>
6 years agotable: remove incorrect check for ACL
Jasvinder Singh [Thu, 29 Mar 2018 18:31:31 +0000 (19:31 +0100)]
table: remove incorrect check for ACL

Remove wrong check for table entry pointer.

Signed-off-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
Signed-off-by: Jasvinder Singh <jasvinder.singh@intel.com>
6 years agopipeline: add port in action APIs
Jasvinder Singh [Thu, 29 Mar 2018 18:31:30 +0000 (19:31 +0100)]
pipeline: add port in action APIs

This API provides a common set of actions for pipeline input ports to speed
up application development.

Each pipeline input port can be assigned an action handler to be executed
on every input packet during the pipeline execution.

The pipeline library allows the user to define his own input port actions
by providing customized input port action handler. While the user can
still follow this process, this API is intended to provide a quicker
development alternative for a set of predefined actions.

The typical steps to use this API are:
* Define an input port action profile.
* Instantiate the input port action profile to create input port action
  objects.
* Use the input port action to generate the input port action handler
  invoked by the pipeline.
* Use the input port action object to generate the internal data structures
  used by the input port action handler based on given action parameters.

Signed-off-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
6 years agopipeline: add load balance action
Jasvinder Singh [Thu, 29 Mar 2018 18:31:29 +0000 (19:31 +0100)]
pipeline: add load balance action

Add implementation of the load balance action.

Signed-off-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
6 years agopipeline: add timestamp action
Jasvinder Singh [Thu, 29 Mar 2018 18:31:28 +0000 (19:31 +0100)]
pipeline: add timestamp action

Add implementation of timestamp action.

Signed-off-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
6 years agopipeline: add statistics read action
Jasvinder Singh [Thu, 29 Mar 2018 18:31:27 +0000 (19:31 +0100)]
pipeline: add statistics read action

Add implementation of stats read action

Signed-off-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
6 years agopipeline: add TTL update action
Jasvinder Singh [Thu, 29 Mar 2018 18:31:26 +0000 (19:31 +0100)]
pipeline: add TTL update action

Add implementation of ttl update action.

Signed-off-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
6 years agopipeline: add NAT action
Jasvinder Singh [Thu, 29 Mar 2018 18:31:25 +0000 (19:31 +0100)]
pipeline: add NAT action

Add implementation of Network Address Translation(NAT) action.

Signed-off-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
6 years agopipeline: add packet encapsulation action
Jasvinder Singh [Thu, 29 Mar 2018 18:31:24 +0000 (19:31 +0100)]
pipeline: add packet encapsulation action

Add implementation of different type of packet encap
such as vlan, qinq, mpls, pppoe, etc.

Signed-off-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
6 years agopipeline: add traffic manager action
Jasvinder Singh [Thu, 29 Mar 2018 18:31:23 +0000 (19:31 +0100)]
pipeline: add traffic manager action

Add implementation of traffic manager action.

Signed-off-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
6 years agopipeline: add traffic metering action
Jasvinder Singh [Thu, 29 Mar 2018 18:31:22 +0000 (19:31 +0100)]
pipeline: add traffic metering action

Add traffic metering action implementation.

Signed-off-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
6 years agopipeline: get table action params
Jasvinder Singh [Thu, 29 Mar 2018 18:31:21 +0000 (19:31 +0100)]
pipeline: get table action params

Add API to specify action related parameters such as action
handler, table entry data size, etc. for the pipeline table.

Signed-off-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
6 years agopipeline: add table action APIs
Jasvinder Singh [Thu, 29 Mar 2018 18:31:20 +0000 (19:31 +0100)]
pipeline: add table action APIs

This API provides a common set of actions for pipeline tables to speed up
application development.

Each match-action rule added to a pipeline table has associated data
that stores the action context. This data is input to the table
action handler called for every input packet that hits the rule as
part of the table lookup during the pipeline execution.

The pipeline library allows the user to define his own table
actions by providing customized table action handlers (table
lookup) and complete freedom of setting the rules and their data
(table rule add/delete). While the user can still follow this
process, this API is intended to provide a quicker development
alternative for a set of predefined actions.

The typical steps to use this API are:
* Define a table action profile.
* Instantiate the table action profile to create table action objects.
* Use the table action object to generate the pipeline table action
  handlers (invoked by the pipeline table lookup operation).
* Use the table action object to generate the rule data (for the
  pipeline table rule add operation) based on given action parameters.
* Use the table action object to read action data (e.g. stats counters)
  for any given rule.

Signed-off-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
6 years agobus/fslmc: fix find device start condition
Gaetan Rivet [Thu, 22 Mar 2018 10:28:44 +0000 (11:28 +0100)]
bus/fslmc: fix find device start condition

If start is set and a device before it matches the data,
this device is returned.

Fixes: c7fe1eea8a74 ("bus: simplify finding starting point")
Cc: stable@dpdk.org
Signed-off-by: Gaetan Rivet <gaetan.rivet@6wind.com>
Acked-by: Shreyansh Jain <shreyansh.jain@nxp.com>
6 years agoeal: provide API for querying valid socket ids
Anatoly Burakov [Sat, 31 Mar 2018 17:08:13 +0000 (18:08 +0100)]
eal: provide API for querying valid socket ids

During lcore scan, find all socket ID's and store them, and
provide public API to query valid socket id's. This will break
the ABI, so bump ABI version.

Also, remove deprecation notice corresponding to this change.

Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
Acked-by: Gowrishankar Muthukrishnan <gowrishankar.m@linux.vnet.ibm.com>
6 years agoeal: add IPC asynchronous request
Anatoly Burakov [Sat, 31 Mar 2018 17:06:16 +0000 (18:06 +0100)]
eal: add IPC asynchronous request

This API is similar to the blocking API that is already present,
but reply will be received in a separate callback by the caller
(callback specified at the time of request, rather than registering
for it in advance).

Under the hood, we create a separate thread to deal with replies to
asynchronous requests, that will just wait to be notified by the
main thread, or woken up on a timer.

Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
Acked-by: Jianfeng Tan <jianfeng.tan@intel.com>
6 years agoeal: rename IPC request as synchronous one
Anatoly Burakov [Sat, 31 Mar 2018 17:06:15 +0000 (18:06 +0100)]
eal: rename IPC request as synchronous one

Rename rte_mp_request to rte_mp_request_sync to indicate
that this request will be done synchronously (as opposed to
asynchronous request, which comes in next patch).

Also, fix alphabetical ordering for .map file.

Suggested-by: Thomas Monjalon <thomas@monjalon.net>
Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
Acked-by: Jianfeng Tan <jianfeng.tan@intel.com>
6 years agoeal: rename IPC sync request to pending request
Anatoly Burakov [Sat, 31 Mar 2018 17:06:14 +0000 (18:06 +0100)]
eal: rename IPC sync request to pending request

Originally, there was only one type of request which was used
for multiprocess synchronization (hence the name - sync request).

However, now that we are going to have two types of requests,
synchronous and asynchronous, having it named "sync request" is
very confusing, so we will rename it to "pending request". This
is internal-only, so no externally visible API changes.

Suggested-by: Jianfeng Tan <jianfeng.tan@intel.com>
Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
Acked-by: Jianfeng Tan <jianfeng.tan@intel.com>
6 years agocommon/octeontx: move mbox to common folder
Pavan Nikhilesh [Wed, 4 Apr 2018 14:30:25 +0000 (20:00 +0530)]
common/octeontx: move mbox to common folder

Move commonly used functions across mempool, event and net devices to a
common folder in drivers.

Signed-off-by: Pavan Nikhilesh <pbhagavatula@caviumnetworks.com>
Acked-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Acked-by: Santosh Shukla <santosh.shukla@caviumnetworks.com>
6 years agodrivers: add common folder
Pavan Nikhilesh [Wed, 4 Apr 2018 14:30:24 +0000 (20:00 +0530)]
drivers: add common folder

Add driver/common folder and skeleton makefile for adding commonly used
functions across mempool, event and net devices.

Signed-off-by: Pavan Nikhilesh <pbhagavatula@caviumnetworks.com>
Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com>
Acked-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Acked-by: Santosh Shukla <santosh.shukla@caviumnetworks.com>
6 years agombuf: fix truncated strncpy
Stephen Hemminger [Thu, 29 Mar 2018 17:05:30 +0000 (10:05 -0700)]
mbuf: fix truncated strncpy

Gcc-8 discovers issue with platform_mempool_ops.
rte_mbuf_pool_ops.c:26:3: error: ‘strncpy’ output truncated before
  terminating nul copying as many bytes from a string as its length
  [-Werror=stringop-truncation]
  strncpy(mz->addr, ops_name,  strlen(ops_name));

Since the ops_name is already checked for size, using strncpy
here is unnecessary; just use strcpy.

Fixes: a3acc3144a76 ("mbuf: add pool ops selection functions")

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
6 years agometrics: fix potential missing string termination
Remy Horton [Tue, 20 Feb 2018 16:05:59 +0000 (16:05 +0000)]
metrics: fix potential missing string termination

Fixes a potential memory overrun detected by Coverity.
This overrun cannot currently happen in practice because
rte_metrics_reg_names() explicitly forces the last name
character to be a NULL terminator.

This patches uses strlcpy instead of strncpy to copy name strings.

Coverity issue: 143434
Fixes: 349950ddb9c5 ("metrics: add information metrics library")
Fixes: 710cab6f675a ("metrics: fix out of bound access")

Signed-off-by: Remy Horton <remy.horton@intel.com>
Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
6 years agoconvert snprintf to strlcpy
Bruce Richardson [Mon, 12 Mar 2018 11:33:00 +0000 (11:33 +0000)]
convert snprintf to strlcpy

Since we have support for the strlcpy function in DPDK, replace all
instances where a string is copied using snprintf.

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Reviewed-by: Stephen Hemminger <stephen@networkplumber.org>
6 years agoeal: support strlcpy function
Bruce Richardson [Mon, 12 Mar 2018 11:32:59 +0000 (11:32 +0000)]
eal: support strlcpy function

The strncpy function is error prone for doing "safe" string copies, so
we generally try to use "snprintf" instead in the code. The function
"strlcpy" is a better alternative, since it better conveys the
intention of the programmer, and doesn't suffer from the non-null
terminating behaviour of it's n'ed brethern.

The downside of this function is that it is not available by default
on linux, though standard in the BSD's. It is available on most
distros by installing "libbsd" package.

This patch therefore provides the following in rte_string_fns.h to ensure
that strlcpy is available there:
* for BSD, include string.h as normal
* if RTE_USE_LIBBSD is set, include <bsd/string.h>
* if not set, fallback to snprintf for strlcpy

Using make build system, the RTE_USE_LIBBSD is a hard-coded value to "n",
but when using meson, it's automatically set based on what is available
on the platform.

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Reviewed-by: Stephen Hemminger <stephen@networkplumber.org>
6 years agoeal: add functions for previous power of 2 alignment
Pavan Nikhilesh [Wed, 4 Apr 2018 13:20:16 +0000 (18:50 +0530)]
eal: add functions for previous power of 2 alignment

Add 32b and 64b API's to align the given integer to the previous power
of 2. Update common auto test to include test for previous power of 2 for
both 32 and 64bit integers.

Signed-off-by: Pavan Nikhilesh <pbhagavatula@caviumnetworks.com>
6 years agoeal: add macros to align value to multiple
Pavan Nikhilesh [Tue, 20 Mar 2018 13:24:34 +0000 (18:54 +0530)]
eal: add macros to align value to multiple

Add macros to align given value to the multiple of the supplied
integer.

Signed-off-by: Pavan Nikhilesh <pbhagavatula@caviumnetworks.com>
6 years agomem: use z specifier to format size_t
Stephen Hemminger [Thu, 15 Feb 2018 22:25:50 +0000 (14:25 -0800)]
mem: use z specifier to format size_t

The recommended way to format size_t in printf is to use the
z modifier which handles the case where size_t maybe 32 or 64 bits.

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
6 years agopci: use z specifier to format size_t
Stephen Hemminger [Thu, 15 Feb 2018 22:25:49 +0000 (14:25 -0800)]
pci: use z specifier to format size_t

This addresses potential issues where size_t and off_t can vary
on some platforms.  For size_t the best way to format the value
is to use the z modifier to printf. For off_t need to cast to
long long to handle 64 bit offset on 32 bit platforms.

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
6 years agoconfig: remove old log level option
Stephen Hemminger [Fri, 16 Feb 2018 20:02:39 +0000 (12:02 -0800)]
config: remove old log level option

The old RTE_LOG_LEVEL has been replaced by RTE_DP_LOG_LEVEL and
is not used anywhere in the current source tree.

It is a merge leftover.

Fixes: 43e9f17ce7b8 ("log: remove log level config option")
Cc: stable@dpdk.org
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
6 years agodoc: update Marvell driver link
Jerin Jacob [Mon, 2 Apr 2018 07:51:47 +0000 (13:21 +0530)]
doc: update Marvell driver link

Change the incorrect driver documentation link to fix
following documentation build warning.

$ make doc-guides-html
sphinx processing guides-html...
doc/guides/rel_notes/release_17_11.rst:58:
WARNING: unknown document: ../nics/mrvl

Fixes: fe93968722af ("net/mrvl: rename PMD as mvpp2")

Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Acked-by: Marko Kovacevic <marko.kovacevic@intel.com>
6 years agodevtools: do not create kernel dir
Pablo de Lara [Thu, 29 Mar 2018 10:36:45 +0000 (11:36 +0100)]
devtools: do not create kernel dir

get-maintainer script requires the creation of
some folders, including "kernel". Since now this folder
exists in DPDK folder, it is not required to create it.

Fixes: acaa9ee991b5 ("move kernel modules directories")

Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>
6 years agoconfig: remove useless lines for DPAA2
Thomas Monjalon [Mon, 2 Apr 2018 21:49:55 +0000 (23:49 +0200)]
config: remove useless lines for DPAA2

Some comments are not relevant in a config which only overrides
the default config.

The option CONFIG_RTE_LIBRTE_DPAA2_DEBUG_DRIVER is already disabled
by default so it can be removed from this file.

Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Acked-by: Shreyansh Jain <shreyansh.jain@nxp.com>
6 years agocrypto/dpaa2_sec: support dynamic logging
Shreyansh Jain [Mon, 2 Apr 2018 14:06:01 +0000 (19:36 +0530)]
crypto/dpaa2_sec: support dynamic logging

Signed-off-by: Shreyansh Jain <shreyansh.jain@nxp.com>
Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com>
6 years agocrypto/dpaa2_sec: fix debug logs
Shreyansh Jain [Mon, 2 Apr 2018 14:06:00 +0000 (19:36 +0530)]
crypto/dpaa2_sec: fix debug logs

Digest and IV length variable declarations have changed.
These were escaping builds as the debugging macro was disabled.
During dynamic logging change, they were discoverd.

Fixes: 0fbd75a99fc9 ("cryptodev: move IV parameters to session")
Fixes: 7f0034275a24 ("cryptodev: remove digest length from crypto op")
Cc: stable@dpdk.org
Signed-off-by: Shreyansh Jain <shreyansh.jain@nxp.com>
Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com>
6 years agobus/fslmc: remove unused debug macros
Shreyansh Jain [Mon, 2 Apr 2018 14:05:59 +0000 (19:35 +0530)]
bus/fslmc: remove unused debug macros

Signed-off-by: Shreyansh Jain <shreyansh.jain@nxp.com>
Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com>
6 years agoevent/dpaa2: support dynamic logging
Shreyansh Jain [Mon, 2 Apr 2018 14:05:58 +0000 (19:35 +0530)]
event/dpaa2: support dynamic logging

Some changes had already been pushed via SHA:72654f090a11 patch. This
patch updates them.

Signed-off-by: Shreyansh Jain <shreyansh.jain@nxp.com>
Acked-by: Nipun Gupta <nipun.gupta@nxp.com>
6 years agonet/dpaa2: support dynamic logging
Shreyansh Jain [Mon, 2 Apr 2018 14:05:57 +0000 (19:35 +0530)]
net/dpaa2: support dynamic logging

Signed-off-by: Shreyansh Jain <shreyansh.jain@nxp.com>
Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com>
6 years agomempool/dpaa2: support dynamic logging
Shreyansh Jain [Mon, 2 Apr 2018 14:05:56 +0000 (19:35 +0530)]
mempool/dpaa2: support dynamic logging

Signed-off-by: Shreyansh Jain <shreyansh.jain@nxp.com>
Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com>
6 years agobus/fslmc: support dynamic logging
Shreyansh Jain [Mon, 2 Apr 2018 14:05:55 +0000 (19:35 +0530)]
bus/fslmc: support dynamic logging

Signed-off-by: Shreyansh Jain <shreyansh.jain@nxp.com>
Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com>
6 years agonet/i40e: remove unnecessary FDIR mask configuration
Beilei Xing [Thu, 29 Mar 2018 06:33:58 +0000 (14:33 +0800)]
net/i40e: remove unnecessary FDIR mask configuration

Remove unnecessary FDIR mask configuration, otherwise
flow directory mask will be changed when configuring
hash input set.

Signed-off-by: Beilei Xing <beilei.xing@intel.com>
Reviewed-by: Kirill Rybalchenko <kirill.rybalchenko@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
6 years agovhost: avoid populate guest memory
Jianfeng Tan [Wed, 28 Mar 2018 06:56:07 +0000 (06:56 +0000)]
vhost: avoid populate guest memory

It's not necessary to populate guest memory from vhost side unless
zerocopy is enabled or users want better performance.

Update the doc for guest memory requirement clarification.

Signed-off-by: Jianfeng Tan <jianfeng.tan@intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
6 years agovhost: add pipe event for optimizing negotiation
Tonghao Zhang [Wed, 28 Mar 2018 05:49:25 +0000 (22:49 -0700)]
vhost: add pipe event for optimizing negotiation

When vhost-user connects qemu successfully, dpdk will call
the vhost_user_add_connection to add unix socket fd to poll.
And fdset_add only set the socket fd to a fdentry while poll
may sleep now. In a general case, this is no problem. But if
we use hot update for vhost-user, most downtime of VMs network
is 750+ms. This patch adds pipe event, so after connections are
ok, dpdk rebuild the poll immediately. With this patch, the
most downtime is 20~30ms.

Signed-off-by: Tonghao Zhang <xiangxia.m.yue@gmail.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
6 years agovhost: move stdbool include
Tonghao Zhang [Wed, 28 Mar 2018 05:49:24 +0000 (22:49 -0700)]
vhost: move stdbool include

The vhost.h file uses bool type, but not include stdbool
header file. If other c files include vhost.h directly,
there will be a compile error.

This patch will be used in the next patch.

Signed-off-by: Tonghao Zhang <xiangxia.m.yue@gmail.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
6 years agovhost: add fdset-event thread name
Tonghao Zhang [Fri, 23 Mar 2018 02:18:51 +0000 (19:18 -0700)]
vhost: add fdset-event thread name

This patch adds the name for vhost fdset thread.
It can help us to know whether the thread is running.

Signed-off-by: Tonghao Zhang <xiangxia.m.yue@gmail.com>
Reviewed-by: Jianfeng Tan <jianfeng.tan@intel.com>
6 years agovhost: raise error on fdset-thread creation
Tonghao Zhang [Fri, 23 Mar 2018 02:18:50 +0000 (19:18 -0700)]
vhost: raise error on fdset-thread creation

When first call the 'rte_vhost_driver_start', the
fdset_event_dispatch thread should be created successfully.
Because the vhost uses it to poll socket events for vhost
server or clients. Without it, for example, vhost will not
get the connection event.

This patch returns err code directly when created not successful.

Signed-off-by: Tonghao Zhang <xiangxia.m.yue@gmail.com>
Reviewed-by: Jianfeng Tan <jianfeng.tan@intel.com>
6 years agonet/vhost: fix crash when creating vdev dynamically
Junjie Chen [Fri, 30 Mar 2018 06:58:31 +0000 (14:58 +0800)]
net/vhost: fix crash when creating vdev dynamically

When creating vdev dynamically, vhost pmd driver starts directly without
checking TX/RX queues are ready or not, and thus causes segmentation fault
when vhost library accesses queues. This patch adds a flag to check whether
queues are setup or not, and adds queues setup into dev_start function to
allow user to start them after setting up.

Fixes: aed0b12930b3 ("net/vhost: fix socket file deleted on stop")
Cc: stable@dpdk.org
Signed-off-by: Junjie Chen <junjie.j.chen@intel.com>
Tested-by: Zhiyong Yang <zhiyong.yang@intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
6 years agovhost: avoid concurrency when logging dirty pages
Maxime Coquelin [Wed, 21 Mar 2018 15:44:13 +0000 (16:44 +0100)]
vhost: avoid concurrency when logging dirty pages

This patch aims at fixing a migration performance regression
faced since atomic operation is used to log pages as dirty when
doing live migration.

Instead of setting a single bit by doing an atomic read-modify-write
operation to log a page as dirty, this patch write 0xFF to the
corresponding byte, and so logs 8 page as dirty.

The advantage is that it avoids concurrent atomic operations by
multiple PMD threads, the drawback is that some clean pages are
marked as dirty and so are transferred twice.

Fixes: 897f13a1f726 ("vhost: make page logging atomic")
Cc: stable@dpdk.org
Signed-off-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Reviewed-by: Jianfeng Tan <jianfeng.tan@intel.com>
6 years agoethdev: fix port accessing after release
Matan Azrad [Wed, 28 Mar 2018 12:10:30 +0000 (12:10 +0000)]
ethdev: fix port accessing after release

rte_eth_dev_pci_release() function wrongly releases an ethdev port and
then releases internal fields of this port.
This behavior is problematic, because after the release, the port may
be reallocated again by another thread or just be invalid for any
usage.

Move the release operation to the end of the function.

Fixes: dcd5c8112bc3 ("ethdev: add PCI driver helpers")
Cc: stable@dpdk.org
Suggested-by: Ferruh Yigit <ferruh.yigit@intel.com>
Signed-off-by: Matan Azrad <matan@mellanox.com>
Acked-by: Thomas Monjalon <thomas@monjalon.net>
6 years agonet/qede: fix to prevent overwriting packet type
Harish Patil [Wed, 28 Mar 2018 00:15:55 +0000 (17:15 -0700)]
net/qede: fix to prevent overwriting packet type

Fixes: 3f72dd780e10 ("net/qede: check tunnel L3 header")
Cc: stable@dpdk.org
Signed-off-by: Harish Patil <harish.patil@cavium.com>
6 years agonet/qede: fix device stop to remove primary MAC
Rasesh Mody [Wed, 28 Mar 2018 00:15:54 +0000 (17:15 -0700)]
net/qede: fix device stop to remove primary MAC

This fix is to remove primary MAC filter during dev stop. Without the
fix device start attempt to add the primary MAC fails. Perform MAC set
remove under IS_PF() check.

Fixes: dd28bc8c6ef4 ("net/qede: fix VF port creation sequence")
Cc: stable@dpdk.org
Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
6 years agonet/qede: add devargs to disable NPAR Tx switching
Rasesh Mody [Wed, 28 Mar 2018 00:15:53 +0000 (17:15 -0700)]
net/qede: add devargs to disable NPAR Tx switching

Added a run-time argument npar_tx_switching to enable/disable
Tx switching for multi-fucntion devices (NPAR).
Rename vf_txswitch option to vf_tx_switching.

Sample usage to disable Tx switching for NPAR or VF is something like...

 -w 05:00.0,npar_tx_switching=0 -w 05:00.1,npar_tx_switching=0
 -w 05:00.0,vf_tx_switching=0 -w 05:00.1,vf_tx_switching=0

Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
6 years agonet/qede: enable IPGRE offload support
Harish Patil [Wed, 28 Mar 2018 00:15:52 +0000 (17:15 -0700)]
net/qede: enable IPGRE offload support

Signed-off-by: Harish Patil <harish.patil@cavium.com>
6 years agonet/qede: convert to new Rx/Tx offloads API
Harish Patil [Wed, 28 Mar 2018 00:15:51 +0000 (17:15 -0700)]
net/qede: convert to new Rx/Tx offloads API

Ethdev RX/TX offloads API has changed since:
commit ce17eddefc20 ("ethdev: introduce Rx queue offloads API")
commit cba7f53b717d ("ethdev: introduce Tx queue offloads API")

This patch makes use of new offload flags as suggested and fix
the default RX/TX configuration. Also indent the code properly
around those changes.

Signed-off-by: Harish Patil <harish.patil@cavium.com>
Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
6 years agonet/mrvl: rename PMD as mvpp2
Natalie Samsonov [Mon, 26 Mar 2018 14:38:50 +0000 (16:38 +0200)]
net/mrvl: rename PMD as mvpp2

The name "mrvl" for Marvell PMD driver for PPv2 Marvell PPv2
(Packet Processor v2) 1/10 Gbps adapter is too generic and causes
problem for adding new PMD drivers for other Marvell devices.
Changed to "mvpp2" for specific Marvell PPv2 PMD.

This patch doesn't introduce any change except renaming.

Signed-off-by: Natalie Samsonov <nsamsono@marvell.com>
Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>
6 years agonet/sfc: support Medford2 family adapters
Andrew Rybchenko [Wed, 21 Mar 2018 13:51:32 +0000 (13:51 +0000)]
net/sfc: support Medford2 family adapters

Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Reviewed-by: Andy Moreton <amoreton@solarflare.com>
6 years agonet/sfc: support runtime VI window size
Andrew Rybchenko [Wed, 21 Mar 2018 13:51:31 +0000 (13:51 +0000)]
net/sfc: support runtime VI window size

Medford2 uses a configurable VI window size, and requires
updates to register accesses to use a runtime VI window size
rather than the *_STEP register constants used for earlier
controllers.

Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Reviewed-by: Andy Moreton <amoreton@solarflare.com>
6 years agonet/sfc: support link speeds up to 100G
Andrew Rybchenko [Wed, 21 Mar 2018 13:51:30 +0000 (13:51 +0000)]
net/sfc: support link speeds up to 100G

Add 25G, 50G and 100G.

Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Reviewed-by: Andy Moreton <amoreton@solarflare.com>
6 years agonet/avf: fix link autoneg value
Ferruh Yigit [Fri, 9 Mar 2018 17:56:31 +0000 (17:56 +0000)]
net/avf: fix link autoneg value

Intention of the logic is:
If ETH_LINK_SPEED_FIXED is set in dev_conf, set link_autoneg to
ETH_LINK_FIXED, else set it to ETH_LINK_AUTONEG

ETH_LINK_SPEED_FIXED value is 1, and ETH_LINK_FIXED is 0;

Current logic is broken, fix it according above values.

Fixes: 48de41ca11f0 ("net/avf: enable link status update")
Cc: stable@dpdk.org
Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
6 years agonet/i40e: fix support DDP packages group 0xff
Kirill Rybalchenko [Thu, 22 Feb 2018 18:01:39 +0000 (18:01 +0000)]
net/i40e: fix support DDP packages group 0xff

Group ID 0xFF indicates that packages does not change parser
graph so compatible with any other packages.

Fixes: b1ec717bfff5 ("net/i40e: fix multiple DDP packages conflict")
Cc: stable@dpdk.org
Signed-off-by: Kirill Rybalchenko <kirill.rybalchenko@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
6 years agonet/i40e: add log when setting input set
Beilei Xing [Sun, 11 Feb 2018 06:55:50 +0000 (14:55 +0800)]
net/i40e: add log when setting input set

This patch adds log when setting input set since global
configuration is changed.

Signed-off-by: Beilei Xing <beilei.xing@intel.com>
Reviewed-by: Kirill Rybalchenko <kirill.rybalchenko@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
6 years agonet/ixgbe: fix intr callback unregister by adding retry
Yunjian Wang [Wed, 21 Mar 2018 12:28:10 +0000 (20:28 +0800)]
net/ixgbe: fix intr callback unregister by adding retry

The nic's interrupt source has some active callbacks, when
the port hotplug. Add a retry to give more port's a chance
to uninit before returning an error.

Fixes: 2866c5f1b87e ("ixgbe: support port hotplug")
Cc: stable@dpdk.org
Signed-off-by: Yunjian Wang <wangyunjian@huawei.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
6 years agovhost: do not generate signal when sendmsg fails
Tiwei Bie [Tue, 6 Mar 2018 10:43:25 +0000 (18:43 +0800)]
vhost: do not generate signal when sendmsg fails

More precisely, do not generate a SIGPIPE signal if the peer
has closed the connection. Otherwise, it will terminate the
process by default. As a library, we should avoid terminating
the application process when error happens and just need to
return with an error.

Signed-off-by: Tiwei Bie <tiwei.bie@intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
6 years agovhost: support sending fds via slave channel
Tiwei Bie [Tue, 6 Mar 2018 10:43:26 +0000 (18:43 +0800)]
vhost: support sending fds via slave channel

This function will be used to send fds to QEMU via slave channel.

Signed-off-by: Tiwei Bie <tiwei.bie@intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
6 years agonet/virtio: add check for cvq
Zhiyong Yang [Wed, 21 Mar 2018 03:03:41 +0000 (11:03 +0800)]
net/virtio: add check for cvq

Add checking for cvq to judge if virtio_ack_link_announce should be called.
The existing code doesn't cause issue, and add the checking just to look
more reasonable.

Signed-off-by: Zhiyong Yang <zhiyong.yang@intel.com>
Reviewed-by: Jianfeng Tan <jianfeng.tan@intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
6 years agonet/virtio: fix queues pointer check
Zhiyong Yang [Wed, 21 Mar 2018 03:03:40 +0000 (11:03 +0800)]
net/virtio: fix queues pointer check

It is necessary to add pointer checking because in some case the
code will cause crash. For example, the code goes here before
memory allocation of rxvq is finished.

Fixes: 7365504f77e3 ("net/virtio: support guest announce")
Cc: stable@dpdk.org
Signed-off-by: Zhiyong Yang <zhiyong.yang@intel.com>
Reviewed-by: Jianfeng Tan <jianfeng.tan@intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
6 years agonet/virtio-user: specify MAC of the tap
Ning Li [Fri, 29 Dec 2017 03:38:42 +0000 (11:38 +0800)]
net/virtio-user: specify MAC of the tap

When using virtio-user with vhost-kernel to exchange
packet with kernel networking stack, application can
set the MAC of the tap interface via parameter.

Signed-off-by: Ning Li <muziding001@163.com>
Reviewed-by: Seán Harte <seanbh@gmail.com>
Tested-by: Seán Harte <seanbh@gmail.com>
Reviewed-by: Jianfeng Tan <jianfeng.tan@intel.com>
6 years agonet/cxgbe: convert to SPDX license tags
Rahul Lakkireddy [Sat, 10 Mar 2018 22:48:30 +0000 (04:18 +0530)]
net/cxgbe: convert to SPDX license tags

Signed-off-by: Rahul Lakkireddy <rahul.lakkireddy@chelsio.com>
Signed-off-by: Kumar Sanghvi <kumaras@chelsio.com>
6 years agonet/cxgbe: support setting MAC address
Kumar Sanghvi [Sat, 10 Mar 2018 22:48:27 +0000 (04:18 +0530)]
net/cxgbe: support setting MAC address

Signed-off-by: Kumar Sanghvi <kumaras@chelsio.com>
Signed-off-by: Rahul Lakkireddy <rahul.lakkireddy@chelsio.com>
6 years agonet/cxgbe: add VF port statistics
Kumar Sanghvi [Sat, 10 Mar 2018 22:48:26 +0000 (04:18 +0530)]
net/cxgbe: add VF port statistics

Signed-off-by: Kumar Sanghvi <kumaras@chelsio.com>
Signed-off-by: Rahul Lakkireddy <rahul.lakkireddy@chelsio.com>
6 years agonet/cxgbe: update Tx and Rx path for VF
Kumar Sanghvi [Sat, 10 Mar 2018 22:48:25 +0000 (04:18 +0530)]
net/cxgbe: update Tx and Rx path for VF

On TX path, add fw_eth_tx_pkt_vm_wr to transmit packets over VF.
Use is_pf4() to correctly calculate the work request size and
offsets within the work request.  On RX path, use pktshift to adjust
data offset within the mbuf.

Signed-off-by: Kumar Sanghvi <kumaras@chelsio.com>
Signed-off-by: Rahul Lakkireddy <rahul.lakkireddy@chelsio.com>
6 years agonet/cxgbe: enable RSS for VF
Kumar Sanghvi [Sat, 10 Mar 2018 22:48:24 +0000 (04:18 +0530)]
net/cxgbe: enable RSS for VF

Query firmware and configure RSS for VF.

Signed-off-by: Kumar Sanghvi <kumaras@chelsio.com>
Signed-off-by: Rahul Lakkireddy <rahul.lakkireddy@chelsio.com>
6 years agonet/cxgbe: initialize SGE and queues for VF
Kumar Sanghvi [Sat, 10 Mar 2018 22:48:23 +0000 (04:18 +0530)]
net/cxgbe: initialize SGE and queues for VF

Query firmware and initialize SGE parameters and enable queue
allocation for VF.  Calculate pcie channel and queue congestion
management for VF.

Signed-off-by: Kumar Sanghvi <kumaras@chelsio.com>
Signed-off-by: Rahul Lakkireddy <rahul.lakkireddy@chelsio.com>
6 years agonet/cxgbe: add probe to initialize VF devices
Kumar Sanghvi [Sat, 10 Mar 2018 22:48:22 +0000 (04:18 +0530)]
net/cxgbe: add probe to initialize VF devices

Add probe to initialize VF devices.  Separate init/de-init paths
for PF and VF.  Do firmware state initialization wrt VF and retrieve
various operational parameters by querying firmware.  Finally configure
and initialize ports.

Signed-off-by: Kumar Sanghvi <kumaras@chelsio.com>
Signed-off-by: Rahul Lakkireddy <rahul.lakkireddy@chelsio.com>
6 years agonet/cxgbe: add base for enabling VF ports
Kumar Sanghvi [Sat, 10 Mar 2018 22:48:21 +0000 (04:18 +0530)]
net/cxgbe: add base for enabling VF ports

Add base to enable VF ports in subsequent patches.

Signed-off-by: Kumar Sanghvi <kumaras@chelsio.com>
Signed-off-by: Rahul Lakkireddy <rahul.lakkireddy@chelsio.com>
6 years agonet/cxgbe: add VF firmware mailbox
Kumar Sanghvi [Sat, 10 Mar 2018 22:48:20 +0000 (04:18 +0530)]
net/cxgbe: add VF firmware mailbox

Add firmware mailbox communication support for VF.  Add is_pf4()
to check if driver is attached to PF4.  Use is_pf4() to determine
whether to use PF or VF mailbox communication.

Signed-off-by: Kumar Sanghvi <kumaras@chelsio.com>
Signed-off-by: Rahul Lakkireddy <rahul.lakkireddy@chelsio.com>
6 years agonet/cxgbe: add skeleton VF driver
Kumar Sanghvi [Sat, 10 Mar 2018 22:48:19 +0000 (04:18 +0530)]
net/cxgbe: add skeleton VF driver

Add minimal VF driver.  Declare functions common to both PF and VF
functionality in separate header file and import the header file.

Signed-off-by: Kumar Sanghvi <kumaras@chelsio.com>
Signed-off-by: Rahul Lakkireddy <rahul.lakkireddy@chelsio.com>
6 years agonet/avp: convert to SPDX license tags
Allain Legacy [Wed, 28 Mar 2018 16:55:06 +0000 (11:55 -0500)]
net/avp: convert to SPDX license tags

As per the following commit the AVP files maintained by Wind River are
converted to use the SPDX license tag format.

    commit a4862c9e1a98 ("license: introduce SPDX identifiers")

Signed-off-by: Allain Legacy <allain.legacy@windriver.com>
Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>
6 years agonet/liquidio: move to new offload API
Shijith Thotton [Wed, 28 Mar 2018 06:51:06 +0000 (12:21 +0530)]
net/liquidio: move to new offload API

Make use of new offloads member instead of bit fields in port Rx conf.

Signed-off-by: Shijith Thotton <shijith.thotton@caviumnetworks.com>
6 years agonet/mlx5: fix RSS key length query
Shahaf Shuler [Mon, 26 Mar 2018 10:12:19 +0000 (13:12 +0300)]
net/mlx5: fix RSS key length query

The RSS key length returned by rte_eth_dev_info_get command was taken
from the
PMD private structure. This structure initialization was done only after
the port configuration.

Considering Mellanox device supports only 40B long RSS key, reporting
the fixed number instead.

Fixes: 29c1d8bb3e79 ("net/mlx5: handle a single RSS hash key for all protocols")
Cc: stable@dpdk.org
Signed-off-by: Shahaf Shuler <shahafs@mellanox.com>
Acked-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
6 years agonet/mlx5: enforce RSS key length limitation
Shahaf Shuler [Mon, 26 Mar 2018 10:12:18 +0000 (13:12 +0300)]
net/mlx5: enforce RSS key length limitation

RSS hash key must be 40 Bytes long.

Cc: stable@dpdk.org
Signed-off-by: Shahaf Shuler <shahafs@mellanox.com>
Acked-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
6 years agonet/mlx5: setup RSS regardless of queue count
Dahir Osman [Wed, 21 Mar 2018 12:47:51 +0000 (13:47 +0100)]
net/mlx5: setup RSS regardless of queue count

In some environments it is desirable to have the NIC perform RSS
normally on the packet regardless of the number of queues configured.
The RSS hash result that is stored in the mbuf can then be used by
the application to make decisions about how to distribute workloads
to threads, secondary processes, or even virtual machines if the
application is a virtual switch.  This change to the mlx5 driver
aligns with how other drivers in the Intel family work.

Signed-off-by: Allain Legacy <allain.legacy@windriver.com>
Signed-off-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
Acked-by: Yongseok Koh <yskoh@mellanox.com>
Tested-by: Allain Legacy <allain.legacy@windriver.com>
6 years agonet/mlx5: fix icc build
Nélio Laranjeiro [Mon, 19 Mar 2018 10:42:16 +0000 (11:42 +0100)]
net/mlx5: fix icc build

Remove the second declaration of device_attr [1] inside the loop as well as
the query_device_ex() which has already been done outside of the loop.

[1] https://dpdk.org/ml/archives/dev/2018-March/091744.html

Fixes: 9a761de8ea14 ("net/mlx5: flow counter support")
Cc: stable@dpdk.org
Reported-by: Ferruh Yigit <ferruh.yigit@intel.com>
Signed-off-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
Acked-by: Yongseok Koh <yskoh@mellanox.com>
Tested-by: Ferruh Yigit <ferruh.yigit@intel.com>