dpdk.git
7 years agovfio: fix structures for sPAPR IOMMU
Alexey Kardashevskiy [Wed, 26 Apr 2017 08:06:41 +0000 (18:06 +1000)]
vfio: fix structures for sPAPR IOMMU

If Linux UAPI headers in the system do not have VFIO_SPAPR_TCE_v2_IOMMU
defined, DPDK define necessary structures itself. However the existing
definitions are different from ones pushed to the mainline kernel.

This copies structures passed via VFIO_IOMMU_SPAPR_TCE_CREATE and
VFIO_IOMMU_SPAPR_TCE_REMOVE ioctls.

No change in behaviour is expected if installed linux UAPI headers
have knowledge of VFIO_SPAPR_TCE_v2_IOMMU.

Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
Acked-by: Anatoly Burakov <anatoly.burakov@intel.com>
7 years agovfio: fix device unplug when several devices per group
Alejandro Lucero [Wed, 26 Apr 2017 10:49:47 +0000 (11:49 +0100)]
vfio: fix device unplug when several devices per group

VFIO allows a secure way of assigning devices to user space and those
devices which can not be isolated from other ones are set in same VFIO
group. Releasing or unplugging a device should be aware of remaining
devices is the same group for avoiding to close such a group.

Fixes: 94c0776b1bad ("vfio: support hotplug")

Signed-off-by: Alejandro Lucero <alejandro.lucero@netronome.com>
Acked-by: Anatoly Burakov <anatoly.burakov@intel.com>
7 years agovfio: set IOMMU type for the container once
Andrew Rybchenko [Tue, 4 Apr 2017 16:06:16 +0000 (17:06 +0100)]
vfio: set IOMMU type for the container once

If more than one used PCI device belongs to one IOMMU group,
it is still one IOMMU group and the container IOMMU type
should be set only once.

Fixes: 94c0776b1bad ("vfio: support hotplug")

Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Reviewed-by: Alejandro Lucero <alejandro.lucero@netronome.com>
Acked-by: Anatoly Burakov <anatoly.burakov@intel.com>
7 years agopci: initialize generic driver pointer
Alexey Kardashevskiy [Wed, 26 Apr 2017 08:07:24 +0000 (18:07 +1000)]
pci: initialize generic driver pointer

The existing code initializes a PCI driver pointer but not the common one.
As the result, ring_dma_zone_reserve() in drivers/net/bnx2x/bnx2x_rxtx.c
crashed as dev->device->driver==NULL.

This adds missing initialization.

Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
7 years agousertools: fix CPU layout for more than 2 threads
Gowrishankar Muthukrishnan [Fri, 28 Apr 2017 10:34:35 +0000 (16:04 +0530)]
usertools: fix CPU layout for more than 2 threads

Current usertools/cpu_layout.py is broken to handle multithreads
of count more than 2 as in IBM powerpc P8 servers.
Below patch addressed this issue.

Also, added minor exception catch on failing to open unavailable
sys file in case of multithread=off configuration in server.

Patch has been verified not to break existing topology configurations
and also not changing anything in current output.

Signed-off-by: Gowrishankar Muthukrishnan <gowrishankar.m@linux.vnet.ibm.com>
Reviewed-by: Andriy Berestovskyy <andriy.berestovskyy@caviumnetworks.com>
7 years agousertools: add --status-dev option to devbind
Ferruh Yigit [Thu, 27 Apr 2017 17:55:37 +0000 (18:55 +0100)]
usertools: add --status-dev option to devbind

Script displays status for all device types and output is much
longer than it used to be. This makes harder to read script output.

This patch adds new --status-dev argument to the script to select
a device group to display status.

Supported device groups:
net
crypto
event
mempool

Sample usage:
./usertools/dpdk-devbind.py --status-dev mempool

Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
7 years agousertools: fix device binding with kernel tools
Guduri Prathyusha [Wed, 26 Apr 2017 13:52:19 +0000 (19:22 +0530)]
usertools: fix device binding with kernel tools

The following sequence of operation gives error in binding devices
1) Bind a device using dpdk-devbind.py
2) Unbind the device using kernel tools(/sys/bus/pci/device/driver/unbind)
3) Bind the device using kernel tools(/sys/bus/pci/driver/new_id and
/sys/bus/pci/driver/bind)

The bind failure was due to cached driver name in 'driver_override'.
Fix it by writing 'null' to driver_override just after binding a
device so that any method of binding/unbinding can be used.

Fixes: 2fc350293570 ("usertools: use optimized driver override scheme to bind")

Reported-by: Lijuan A Tu <lijuanx.a.tu@intel.com>
Signed-off-by: Guduri Prathyusha <gprathyusha@caviumnetworks.com>
7 years agodevtools: add tags and cscope index generation
Jerin Jacob [Sat, 29 Apr 2017 10:51:18 +0000 (16:21 +0530)]
devtools: add tags and cscope index generation

This script generates cscope, gtags, and tags index files based on
EAL environment(architecture and OS(linux/bsd)).

Selection of the architecture and OS environment is based on dpdk
configuration target(T=).If EAL environment(T=) is not specified,
the script generates tag files based on available source code.

Usage: make tags|cscope|gtags|etags [T=config]

example usage:
make cscope
make tags T=x86_64-native-linuxapp-gcc
make gtags T=arm64-armv8a-linuxapp-gcc

Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Reviewed-by: Yuanhan Liu <yuanhan.liu@linux.intel.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
Reviewed-by: Thomas Monjalon <thomas@monjalon.net>
7 years agodevtools: list stable commits without fixline
Yuanhan Liu [Fri, 28 Apr 2017 07:21:54 +0000 (15:21 +0800)]
devtools: list stable commits without fixline

Some commits for stable releases (with Cc stable tag) may not have the
fixline.
Thus, this patch makes git-log-fixes.sh script also list those stable
commits do not have fixline.

Signed-off-by: Yuanhan Liu <yuanhan.liu@linux.intel.com>
7 years agodevtools: add git log checks for acronyms
Ferruh Yigit [Mon, 17 Apr 2017 13:13:36 +0000 (14:13 +0100)]
devtools: add git log checks for acronyms

CRC, LSC and VSI must be uppercased.

Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
7 years agousertools: add mempool PCI functional device
Guduri Prathyusha [Wed, 22 Mar 2017 14:11:32 +0000 (19:41 +0530)]
usertools: add mempool PCI functional device

Signed-off-by: Guduri Prathyusha <gprathyusha@caviumnetworks.com>
Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
7 years agousertools: add eventdev PCI functional device
Guduri Prathyusha [Wed, 22 Mar 2017 14:11:31 +0000 (19:41 +0530)]
usertools: add eventdev PCI functional device

Signed-off-by: Guduri Prathyusha <gprathyusha@caviumnetworks.com>
Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
7 years agousertools: define DPDK PCI functional device
Guduri Prathyusha [Wed, 22 Mar 2017 14:11:30 +0000 (19:41 +0530)]
usertools: define DPDK PCI functional device

This patch creates the framework to define the DPDK PCI functional
device by specifying the pci attributes like Vendor ID, Device ID,
Sub Vendor ID, Sub Device ID and Class.This enables a flexible way to
add DPDK function devices based on PCI attributes.

Crypto devices can belong to Encryption class(0x10) or Processor
class(0x0b) based on the vendor preference.

Using this framework, The above disparity can be encoded in the following
format

encryption_class = [{'Class': '10', 'Vendor': None,
                     'Device': None, 'SVendor': None, 'SDevice': None}]

intel_processor_class = [{'Class': '0b', 'Vendor': '8086', 'Device': None,
                    'SVendor': None, 'SDevice': None}]

crypto_devices = [encryption_class, intel_processor_class]

Signed-off-by: Guduri Prathyusha <gprathyusha@caviumnetworks.com>
Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
7 years agousertools: use optimized driver override scheme to bind
Guduri Prathyusha [Wed, 22 Mar 2017 14:11:29 +0000 (19:41 +0530)]
usertools: use optimized driver override scheme to bind

The current device bind model uses /sys/bus/pci/driver/new_id scheme to
bind devices to the driver. This scheme has following operations to bind
a device to the driver.
1) Write device ID and vendor ID to /sys/bus/pci/driver/new_id
2) Write PCI BDF number to /sys/bus/pci/driver/bind
3) On step (1), _All_ the devices that match the device ID and vendor ID
get bound to the driver
4) Except for requested devices, Unbind the remaining devices

In kernels >= 3.15, An alternative scheme driver_override can be used to
bind a device to driver.This scheme has following operations to bind a
device to driver.
1) Write driver to /sys/bus/pci/device/driver_override
2) Write PCI BDF number to /sys/bus/pci/driver/bind

This script detects the presence of /sys/bus/pci/device/driver_override,
if available use optimized bind scheme to bind it

Signed-off-by: Guduri Prathyusha <gprathyusha@caviumnetworks.com>
Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
7 years agousertools: optimize lspci invocation
Guduri Prathyusha [Wed, 22 Mar 2017 14:11:28 +0000 (19:41 +0530)]
usertools: optimize lspci invocation

lspci invoked twice over all the pci devices in the system.
The first pass is to extract Numeric IDs and second pass to get extended
device details.

As an optimization, Used lspci with -nn option in get_device_details()
to obtain Numeric ID and extended device details in one shot.

In addition to this, After binding the PCI device, lspci needs to be
invoked again to confirm the proper bind operation. Used a boolean
argument to express this case in get_pci_device_details()

Signed-off-by: Guduri Prathyusha <gprathyusha@caviumnetworks.com>
Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
7 years agousertools: refactor binding status
Guduri Prathyusha [Wed, 22 Mar 2017 14:11:27 +0000 (19:41 +0530)]
usertools: refactor binding status

Identified and parameterized the common code in show_status() function as
show_device_status().This will enable to avoid code duplication when
additional devices added to the script.

Signed-off-by: Guduri Prathyusha <gprathyusha@caviumnetworks.com>
Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
7 years agousertools: refactor NIC and crypto binding details
Guduri Prathyusha [Wed, 22 Mar 2017 14:11:26 +0000 (19:41 +0530)]
usertools: refactor NIC and crypto binding details

get_nic_details() and get_crypto_details() shares a lot of common code.
Created a new unified get_device_details() function get the device details.

Signed-off-by: Guduri Prathyusha <gprathyusha@caviumnetworks.com>
Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
7 years agousertools: use sysfs for CPU layout
Andriy Berestovskyy [Fri, 31 Mar 2017 12:21:00 +0000 (14:21 +0200)]
usertools: use sysfs for CPU layout

Some platforms do not have core/socket info in /proc/cpuinfo.
Use /sys/devices/system/cpu instead.

Signed-off-by: Andriy Berestovskyy <andriy.berestovskyy@caviumnetworks.com>
7 years agocrypto/dpaa2_sec: update license and copyright
Akhil Goyal [Fri, 21 Apr 2017 10:56:13 +0000 (16:26 +0530)]
crypto/dpaa2_sec: update license and copyright

license and copyright for hw and mc files are made consistent
as per the other dpaa2 dual licensed files.

Signed-off-by: Akhil Goyal <akhil.goyal@nxp.com>
7 years agoethdev: fix typos in API comments
Olivier Matz [Mon, 24 Apr 2017 12:44:28 +0000 (14:44 +0200)]
ethdev: fix typos in API comments

Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
7 years agoexamples/performance-thread: fix compilation on Suse 11 SP2
Bruce Richardson [Mon, 24 Apr 2017 13:04:22 +0000 (14:04 +0100)]
examples/performance-thread: fix compilation on Suse 11 SP2

Fixes following compilation error, using uint64_t type,
instead of int128_t unnecessarily:

In file included from ./common/lthread.c:82:0:
./common/lthread_timer.h: In function ‘_ns_to_clks’:
./common/lthread_timer.h:49:20: error: expected ‘=’, ‘,’, ‘;’,
 ‘asm’ or ‘__attribute__’ before ‘clkns’
compilation terminated due to -Wfatal-errors.

Fixes: 116819b9ed0d ("examples/performance-thread: add lthread subsystem")
Cc: stable@dpdk.org
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
7 years agoexamples/performance-thread: use a single build dir
Bruce Richardson [Fri, 21 Apr 2017 13:50:24 +0000 (14:50 +0100)]
examples/performance-thread: use a single build dir

When building any of the perf-thread examples, the output .o files were
placed in two separate directories for each app: the regular build dir and
a "common" build directory. This was due to the way the files to be built
were specified, using a relative path. Switching to use VPATH to find the
files causes Make to put all .o's into the one build directory.

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
7 years agoexamples/performance-thread: fix build on FreeBSD
Bruce Richardson [Fri, 21 Apr 2017 13:50:23 +0000 (14:50 +0100)]
examples/performance-thread: fix build on FreeBSD

This set of sample apps did not compile on FreeBSD due to use of a number
of Linux/glibc-specific APIs, or APIs which existed in different headers
on FreeBSD. Specifically, the following APIs has problems:
  * sched_getcpu() is a glibc extension, so use rte_lcore_id() on BSD
  * pthread_yield() returns int on Linux, but void on FreeBSD, so
    we have to create two slightly different copies of the function.
  * the type for managing cpu sets is cpuset_t on FreeBSD rather than
    cpu_set_t as on Linux, so use rte_cpuset_t from rte_lcore.h.
  * APIs for managing cpu affinity are in pthread_np.h on FreeBSD, rather
    than in pthread.h, also fixed by including rte_lcore.h

Fixes: 433ba6228f9a ("examples/performance-thread: add pthread_shim app")
Fixes: d48415e1fee3 ("examples/performance-thread: add l3fwd-thread app")
Cc: stable@dpdk.org
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
7 years agoexamples: fix build clean on FreeBSD
Bruce Richardson [Fri, 21 Apr 2017 13:50:22 +0000 (14:50 +0100)]
examples: fix build clean on FreeBSD

The "examples_clean" top-level build target calls "make clean" for each
individual example. However, for a number of those which were linux-only
examples, the "if" condition only had a dummy "all" target i.e. no "clean"
target, causing an error with examples_clean.

Fixes: 3417cd687e5e ("examples: ignore linux apps on bsd")
Cc: stable@dpdk.org
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
7 years agonet/ark: fix build on FreeBSD
Bruce Richardson [Fri, 21 Apr 2017 13:50:21 +0000 (14:50 +0100)]
net/ark: fix build on FreeBSD

On FreeBSD it's not necessary to use -ldl to link apps which use
dlopen. This error only showed up with a shared library gcc build,
not standard build using static libs.

Fixes: 1131cbf0fb2b ("net/ark: stub PMD for Atomic Rules Arkville")

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: John Miller <john.miller@atomicrules.com>
7 years agoapp/procinfo: fix description of --xstats-name option
Michal Jastrzebski [Fri, 21 Apr 2017 11:21:54 +0000 (13:21 +0200)]
app/procinfo: fix description of --xstats-name option

fix proc-info xstats-name description string

Fixes: 1223608adb9b ("app/proc-info: support xstats by ID")

Signed-off-by: Michal Jastrzebski <michalx.k.jastrzebski@intel.com>
Acked-by: Harry van Haaren <harry.van.haaren@intel.com>
7 years agodoc: fix flow validate comments
John Daley [Thu, 20 Apr 2017 18:49:33 +0000 (11:49 -0700)]
doc: fix flow validate comments

Change comments for rte_flow_validate() function to indicate that flow
rule collision and resource validation is optional for PMDs and
therefore the return codes may have different meanings.

Fixes: b1a4b4cbc0a8 ("ethdev: introduce generic flow API")

Signed-off-by: John Daley <johndale@cisco.com>
Acked-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
7 years agoversion: 17.05-rc2
Thomas Monjalon [Fri, 21 Apr 2017 01:27:07 +0000 (03:27 +0200)]
version: 17.05-rc2

Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
7 years agodoc: fix typo in PVP howto
Maxime Coquelin [Fri, 7 Apr 2017 15:06:14 +0000 (17:06 +0200)]
doc: fix typo in PVP howto

This patch adds missing backslash in host's testpmd command
line.

Without it the command works, but a single core is used
instead of four, which might create confusion.

Fixes: 58a2551a160f ("doc: introduce PVP reference benchmark")

Signed-off-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Acked-by: John McNamara <john.mcnamara@intel.com>
7 years agoexamples/performance-thread: support C++
Hiroki Shirokura [Wed, 22 Mar 2017 02:26:23 +0000 (11:26 +0900)]
examples/performance-thread: support C++

Lthread is awesome but it doesn't support C++.
So I write patch to support lthread to support C++.
Added "extern C {}" to lthread-headers

Signed-off-by: Hiroki Shirokura <slank.dev@gmail.com>
Acked-by: Keith Wiles <keith.wiles@intel.com>
7 years agoexamples/ethtool: disable promiscuous mode by default
Qi Zhang [Wed, 12 Apr 2017 19:58:19 +0000 (15:58 -0400)]
examples/ethtool: disable promiscuous mode by default

Disable promiscuous mode by default since VLAN filter
does not work when promiscuous mode is enabled.

Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
Acked-by: Remy Horton <remy.horton@intel.com>
7 years agoexamples: limit max frame size
Andriy Berestovskyy [Mon, 10 Apr 2017 14:30:54 +0000 (16:30 +0200)]
examples: limit max frame size

Some PMDs do not support 9,5K jumbo frames, so the example fails.
Limit the frame size to the maximum supported by the underlying NIC.

Signed-off-by: Andriy Berestovskyy <andriy.berestovskyy@caviumnetworks.com>
7 years agoport: fix minor typo
Andriy Berestovskyy [Fri, 31 Mar 2017 13:36:36 +0000 (15:36 +0200)]
port: fix minor typo

Signed-off-by: Andriy Berestovskyy <andriy.berestovskyy@caviumnetworks.com>
Acked-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
7 years agoport: fix file descriptor reader
Andriy Berestovskyy [Fri, 31 Mar 2017 13:36:35 +0000 (15:36 +0200)]
port: fix file descriptor reader

The code should return the actual number of packets read.

Fixes: 5a99f208 ("port: support file descriptor")

Signed-off-by: Andriy Berestovskyy <andriy.berestovskyy@caviumnetworks.com>
Acked-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
7 years agoport: use mbuf alloc bulk instead of mempool
Andriy Berestovskyy [Fri, 31 Mar 2017 13:36:34 +0000 (15:36 +0200)]
port: use mbuf alloc bulk instead of mempool

Makes code a bit cleaner and type-aware.

Signed-off-by: Andriy Berestovskyy <andriy.berestovskyy@caviumnetworks.com>
Acked-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
7 years agoexamples/ip_pipeline: avoid panic if link up/down not supported
Andriy Berestovskyy [Fri, 31 Mar 2017 13:36:33 +0000 (15:36 +0200)]
examples/ip_pipeline: avoid panic if link up/down not supported

Some PMDs (mostly VFs) do not provide link up/down functionality.

Signed-off-by: Andriy Berestovskyy <andriy.berestovskyy@caviumnetworks.com>
Acked-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
7 years agoexamples/ip_pipeline: support more than 32 CPUs
Andriy Berestovskyy [Fri, 31 Mar 2017 13:36:32 +0000 (15:36 +0200)]
examples/ip_pipeline: support more than 32 CPUs

At the moment ip_pipeline example uses 32 during the initialization,
which leads to an error on systems with more than 32 CPUs.

Signed-off-by: Andriy Berestovskyy <andriy.berestovskyy@caviumnetworks.com>
Acked-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
7 years agoexamples/ip_pipeline: fix port range filtering
Shyam Kumar Shrivastav [Wed, 22 Mar 2017 01:35:35 +0000 (21:35 -0400)]
examples/ip_pipeline: fix port range filtering

Firewall ACL definition need to use same input index for source and
destination ports as these are 16 bits and would fit in one ACL
field of 32 bits. This is required as per librte_acl API. Without this
UDP/TCP source and destination ports filtering (and for that
matter ICMP type/code filtering) does not work.

Signed-off-by: Shyam Kumar Shrivastav <shrivastav.shyam@gmail.com>
Reviewed-by: Jasvinder Singh <jasvinder.singh@intel.com>
Acked-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
7 years agotable: fix stats update
Aleksey Katargin [Sat, 11 Mar 2017 07:41:26 +0000 (12:41 +0500)]
table: fix stats update

Fixed stats double update.

Signed-off-by: Aleksey Katargin <gureedo@gmail.com>
Acked-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
7 years agokni: fix possible memory leak
Ferruh Yigit [Tue, 18 Apr 2017 14:21:44 +0000 (15:21 +0100)]
kni: fix possible memory leak

alloc_q and rx_q fifos holds physical address of the mbufs, and not able
to free those mbufs explicitly.

But kernel thread reads from rx_q and puts used mbufs into free_q (with
their virtual addresses.) And kernel thread stopped when application
close the /dev/kni file on exit. So rx_q has time to be consumed by
kernel thread but leak is technically possible.

Another fifo, alloc_q has physical addresses too, but all those coming
from same mempool provided by application, when application quit, all
mempool already returned back, so this leak can be ignored.

Added check and wait logic for rx_q to be sure kernel consumed the fifo,
an error message printed after some ammount of wait, and an explicit
mempool free added for alloc_q.

Fixes: 8451269e6d7b ("kni: remove continuous memory restriction")
Cc: stable@dpdk.org
Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
7 years agoapp/testpmd: enable NUMA support by default
Bruce Richardson [Fri, 24 Mar 2017 17:00:38 +0000 (17:00 +0000)]
app/testpmd: enable NUMA support by default

There is little reason for NUMA support in testpmd to be off by default, so
enable it, and add in a new commandline parameter to disable it, if that is
wanted by users.

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
7 years agoapp/testpmd: consolidate duplicate ifdefs into one
Rami Rosen [Mon, 17 Apr 2017 22:56:30 +0000 (18:56 -0400)]
app/testpmd: consolidate duplicate ifdefs into one

Cnsolidate the duplicate #ifdef RTE_TEST_PMD_RECORD_CORE_CYCLES
into one #ifdef.

Signed-off-by: Rami Rosen <rami.rosen@intel.com>
7 years agoapp/testpmd: fix duplicated metrics header include
Pascal Mazon [Tue, 11 Apr 2017 08:22:54 +0000 (10:22 +0200)]
app/testpmd: fix duplicated metrics header include

Fixes: 62d3216d6194 ("app/testpmd: add latency statistics calculation")

Signed-off-by: Pascal Mazon <pascal.mazon@6wind.com>
Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>
7 years agobitrate: fix integer roundoff
Remy Horton [Wed, 19 Apr 2017 13:26:48 +0000 (14:26 +0100)]
bitrate: fix integer roundoff

In the absence of traffic, it is possible for the bitrate moving average
to get stuck at a non-zero value, due to the calculated delta being less
than what an integer can represent.

Fixes: 2ad7ba9a6567 ("bitrate: add bitrate statistics library")

Signed-off-by: Remy Horton <remy.horton@intel.com>
7 years agodistributor: fix crash in flush
David Hunt [Fri, 14 Apr 2017 08:59:53 +0000 (09:59 +0100)]
distributor: fix crash in flush

Occasionally, the distributor single-packet-at-a-time mode will
segfault because it inadvertently calls some burst mode code when
flushing packets.

This patch ensures that only the v20 (single mode) codepath is used, and
returns without falling through to the burst mode code.

Fixes: 775003ad2f96 ("distributor: add new burst-capable library")

Signed-off-by: David Hunt <david.hunt@intel.com>
Tested-by: Yong Liu <yong.liu@intel.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
7 years agoapp/testpmd: request device removal interrupt
Gaetan Rivet [Tue, 18 Apr 2017 12:17:42 +0000 (14:17 +0200)]
app/testpmd: request device removal interrupt

Enable device removal event for PMD supporting it.
Add the --no-rmv-interrupt parameter to explicitly disable it.

Signed-off-by: Gaetan Rivet <gaetan.rivet@6wind.com>
Signed-off-by: Elad Persiko <eladpe@mellanox.com>
7 years agoapp/testpmd: request link status interrupt
Gaetan Rivet [Tue, 18 Apr 2017 12:17:41 +0000 (14:17 +0200)]
app/testpmd: request link status interrupt

For drivers supporting the LSC event, enable it.
This allows to test LSC event support.

Add the --no-lsc-interrupt parameter to explicitly disable the link status
change interrupt.

Signed-off-by: Gaetan Rivet <gaetan.rivet@6wind.com>
7 years agoapp/testpmd: add generic event handler
Gaetan Rivet [Tue, 18 Apr 2017 12:17:40 +0000 (14:17 +0200)]
app/testpmd: add generic event handler

This is a rather simple handler that prints a message with the name of
the current event. It can be used to check PMD callback registration and
triggers.

Signed-off-by: Gaetan Rivet <gaetan.rivet@6wind.com>
7 years agonet/mlx4: support device removal event
Gaetan Rivet [Tue, 18 Apr 2017 12:17:39 +0000 (14:17 +0200)]
net/mlx4: support device removal event

Extend the LSC event handling to support the device removal as well. The
Verbs library will send several related events, that can conflict
with the LSC event itself.

The event handling has thus been made capable of receiving and signaling
several event types at once.

Signed-off-by: Gaetan Rivet <gaetan.rivet@6wind.com>
Signed-off-by: Elad Persiko <eladpe@mellanox.com>
7 years agoethdev: introduce device removal event
Gaetan Rivet [Tue, 18 Apr 2017 12:17:38 +0000 (14:17 +0200)]
ethdev: introduce device removal event

This new API allows reacting to a device removal.
A device removal is the sudden disappearance of a device from its
bus.

PMDs implementing support for this notification guarantee that the removal
of the underlying device does not incur a risk to the application.

In particular, Rx/Tx bursts and all other functions can still be called
(albeit likely returning errors) without triggering a crash, irrespective
of an application handling this event.

Signed-off-by: Gaetan Rivet <gaetan.rivet@6wind.com>
Signed-off-by: Elad Persiko <eladpe@mellanox.com>
7 years agonet/ixgbe: support xstats by ID
Jacek Piasecki [Thu, 13 Apr 2017 14:59:28 +0000 (16:59 +0200)]
net/ixgbe: support xstats by ID

To achieve functionality of retrieving only specific statistics
given by application there are two new functions added:
ixgbe_dev_xstats_get_by_ids() which retrieve
values of statistics specified by ids array
and ixgbe_dev_xstats_get_names_by_ids() which retrieve
names of statistics specified by ids array.

Signed-off-by: Jacek Piasecki <jacekx.piasecki@intel.com>
Signed-off-by: Kuba Kozak <kubax.kozak@intel.com>
Acked-by: Harry van Haaren <harry.van.haaren@intel.com>
7 years agonet/e1000: support xstats by ID
Jacek Piasecki [Thu, 13 Apr 2017 14:59:27 +0000 (16:59 +0200)]
net/e1000: support xstats by ID

To achieve functionality of retrieving only specific statistics
given by application there are two new functions added:
eth_igb_xstats_get_by_ids() which retrieve
values of statistics specified by ids array
and eth_igb_xstats_get_names_by_ids() which retrieve
names of statistics specified by ids array.

Signed-off-by: Jacek Piasecki <jacekx.piasecki@intel.com>
Signed-off-by: Kuba Kozak <kubax.kozak@intel.com>
Acked-by: Harry van Haaren <harry.van.haaren@intel.com>
7 years agoapp/proc-info: support xstats by ID
Kuba Kozak [Thu, 13 Apr 2017 14:59:26 +0000 (16:59 +0200)]
app/proc-info: support xstats by ID

There is a new argument --xstats-ids and --xstats-name
in proc_info command line to retrieve statistics given by ids
and by name.
E.g. --xstats-ids="1,3,5,7,8"
E.g. --xstats-name rx_errors

ethdev: mark functions as deprecated

Functions rte_eth_xstats_get_all and rte_eth_xstats_get_names_all
are marked as deprecated

Signed-off-by: Kuba Kozak <kubax.kozak@intel.com>
Acked-by: Harry van Haaren <harry.van.haaren@intel.com>
7 years agoethdev: get xstats ID by name
Kuba Kozak [Thu, 13 Apr 2017 14:59:25 +0000 (16:59 +0200)]
ethdev: get xstats ID by name

Introduced new function: rte_eth_xstats_get_id_by_name
to retrieve xstats ids by its names.

doc: added release note

Signed-off-by: Kuba Kozak <kubax.kozak@intel.com>
Acked-by: Harry van Haaren <harry.van.haaren@intel.com>
7 years agoethdev: retrieve xstats by ID
Jacek Piasecki [Thu, 13 Apr 2017 14:59:24 +0000 (16:59 +0200)]
ethdev: retrieve xstats by ID

Extended xstats API in ethdev library to allow grouping of stats
logically so they can be retrieved per logical grouping  managed
by the application.
Changed existing functions rte_eth_xstats_get_names and
rte_eth_xstats_get to use a new list of arguments: array of ids
and array of values. ABI versioning mechanism was used to
support backward compatibility.
Introduced two new functions rte_eth_xstats_get_all and
rte_eth_xstats_get_names_all which keeps functionality of the
previous ones (respectively rte_eth_xstats_get and
rte_eth_xstats_get_names) but use new API inside.

test-pmd: add support for new xstats API retrieving by id in
testpmd application: xstats_get() and
xstats_get_names() call with modified parameters.

doc: add description for modified xstats API
Documentation change for modified extended statistics API functions.
The old API only allows retrieval of *all* of the NIC statistics
at once. Given this requires a MMIO read PCI transaction per statistic
it is an inefficient way of retrieving just a few key statistics.
Often a monitoring agent only has an interest in a few key statistics,
and the old API forces wasting CPU time and PCIe bandwidth in retrieving
*all* statistics; even those that the application didn't explicitly
show an interest in.
The new, more flexible API allow retrieval of statistics per ID.
If a PMD wishes, it can be implemented to read just the required
NIC registers. As a result, the monitoring application no longer wastes
PCIe bandwidth and CPU time.

Signed-off-by: Jacek Piasecki <jacekx.piasecki@intel.com>
Signed-off-by: Kuba Kozak <kubax.kozak@intel.com>
Signed-off-by: Tomasz Kulasek <tomaszx.kulasek@intel.com>
Acked-by: Harry van Haaren <harry.van.haaren@intel.com>
7 years agotest/crypto: add DPAA2 crypto functional test
Akhil Goyal [Thu, 20 Apr 2017 05:44:27 +0000 (11:14 +0530)]
test/crypto: add DPAA2 crypto functional test

Signed-off-by: Akhil Goyal <akhil.goyal@nxp.com>
Reviewed-by: Hemant Agrawal <hemant.agrawal@nxp.com>
7 years agotest/crypto: add DPAA2 crypto performance test
Akhil Goyal [Thu, 20 Apr 2017 05:44:26 +0000 (11:14 +0530)]
test/crypto: add DPAA2 crypto performance test

Signed-off-by: Akhil Goyal <akhil.goyal@nxp.com>
Reviewed-by: Hemant Agrawal <hemant.agrawal@nxp.com>
7 years agodoc: add NXP DPAA2 SEC
Akhil Goyal [Thu, 20 Apr 2017 05:44:24 +0000 (11:14 +0530)]
doc: add NXP DPAA2 SEC

Signed-off-by: Akhil Goyal <akhil.goyal@nxp.com>
Reviewed-by: Hemant Agrawal <hemant.agrawal@nxp.com>
Acked-by: John McNamara <john.mcnamara@intel.com>
7 years agocrypto/dpaa2_sec: support statistics
Akhil Goyal [Thu, 20 Apr 2017 05:44:23 +0000 (11:14 +0530)]
crypto/dpaa2_sec: support statistics

Signed-off-by: Akhil Goyal <akhil.goyal@nxp.com>
7 years agocrypto/dpaa2_sec: support crypto operation
Akhil Goyal [Thu, 20 Apr 2017 05:44:22 +0000 (11:14 +0530)]
crypto/dpaa2_sec: support crypto operation

Signed-off-by: Akhil Goyal <akhil.goyal@nxp.com>
Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
7 years agobus/fslmc: add packet frame list entry definitions
Akhil Goyal [Thu, 20 Apr 2017 05:44:21 +0000 (11:14 +0530)]
bus/fslmc: add packet frame list entry definitions

Signed-off-by: Akhil Goyal <akhil.goyal@nxp.com>
7 years agocrypto/dpaa2_sec: add sample descriptors
Akhil Goyal [Thu, 20 Apr 2017 05:44:20 +0000 (11:14 +0530)]
crypto/dpaa2_sec: add sample descriptors

algo.h provides APIs for constructing non-protocol offload SEC
descriptors like hmac, blkciphers etc.
ipsec.h provides APIs for IPSEC offload descriptors.
common.h is a common helper file which for all descriptors

In future, additional algorithms' descriptors(PDCP etc.) will be
added in the desc/

Signed-off-by: Horia Geanta Neag <horia.geanta@nxp.com>
Acked-by: Akhil Goyal <akhil.goyal@nxp.com>
7 years agocrypto/dpaa2_sec: add run-time assembler for descriptor
Akhil Goyal [Thu, 20 Apr 2017 05:44:19 +0000 (11:14 +0530)]
crypto/dpaa2_sec: add run-time assembler for descriptor

A set of header files(hw) which helps in making the descriptors
that are understood by NXP's SEC hardware.
This patch provides header files for command words which can be
used for descriptor formation.

Signed-off-by: Horia Geanta Neag <horia.geanta@nxp.com>
Acked-by: Akhil Goyal <akhil.goyal@nxp.com>
7 years agocrypto/dpaa2_sec: add basic operations
Akhil Goyal [Thu, 20 Apr 2017 05:44:18 +0000 (11:14 +0530)]
crypto/dpaa2_sec: add basic operations

Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
Signed-off-by: Akhil Goyal <akhil.goyal@nxp.com>
7 years agocrypto/dpaa2_sec: support mc dpseci object
Akhil Goyal [Thu, 20 Apr 2017 05:44:17 +0000 (11:14 +0530)]
crypto/dpaa2_sec: support mc dpseci object

add support for dpseci object in MC driver.
DPSECI represent a crypto object in DPAA2.

Signed-off-by: Cristian Sovaiala <cristian.sovaiala@nxp.com>
Signed-off-by: Akhil Goyal <akhil.goyal@nxp.com>
7 years agocrypto/dpaa2_sec: introduce poll mode driver
Akhil Goyal [Thu, 20 Apr 2017 05:44:16 +0000 (11:14 +0530)]
crypto/dpaa2_sec: introduce poll mode driver

Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
Signed-off-by: Akhil Goyal <akhil.goyal@nxp.com>
7 years agocryptodev: add type for DPAA2
Akhil Goyal [Thu, 20 Apr 2017 05:44:15 +0000 (11:14 +0530)]
cryptodev: add type for DPAA2

Signed-off-by: Akhil Goyal <akhil.goyal@nxp.com>
7 years agocrypto/scheduler: fix uninitialized capabilities
Pablo de Lara [Wed, 19 Apr 2017 15:02:15 +0000 (16:02 +0100)]
crypto/scheduler: fix uninitialized capabilities

Capability information is updated as slaves are attached,
but if this information is requested via rte_cryptodev_info_get()
when no slaves have been attached, the structure would not be
initialized, leading to a potential segmentation fault.

Therefore, the structure should be initialized with no
capabilities at device creation.

Fixes: 31439ee72b2c ("crypto/scheduler: add API implementations")
Cc: stable@dpdk.org
Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Acked-by: Fan Zhang <roy.fan.zhang@intel.com>
7 years agocrypto/scheduler: fix ring dequeue return handling
Fan Zhang [Wed, 19 Apr 2017 14:47:02 +0000 (15:47 +0100)]
crypto/scheduler: fix ring dequeue return handling

Commit <ecaed092b677> ("ring: return remaining entry count when
dequeuing") changed the return of rte_ring_sc_dequeue_bulk.
This patch updates the scheduler to comply with this change.

Fixes: 8a48e039432b ("crypto/scheduler: optimize crypto op ordering")

Signed-off-by: Fan Zhang <roy.fan.zhang@intel.com>
7 years agoexamples/l2fwd-crypto: fix padding calculation
Pablo de Lara [Wed, 19 Apr 2017 14:37:54 +0000 (15:37 +0100)]
examples/l2fwd-crypto: fix padding calculation

For padding calculation, it is necessary to know if algorithm
is a block cipher or stream cipher algorithm, and know the
block size for the algorithm.

In the application, this block size should be only the
cipher block size, but if authentication was used too,
it was being overwritten by the authentication block size,
which is not needed.

Fixes: 27cf2d1b18e1 ("examples/l2fwd-crypto: discover capabilities")
Cc: stable@dpdk.org
Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Acked-by: Fan Zhang <roy.fan.zhang@intel.com>
7 years agodrivers/crypto: do not create unique name internally
Pablo de Lara [Tue, 18 Apr 2017 14:34:20 +0000 (15:34 +0100)]
drivers/crypto: do not create unique name internally

Crypto devices of the same type could be initialized
with the same name, since internally this name was suffixed
with an index.

Since commit <dda987315ca2> ("vdev: make virtual bus use its
device struct"), this is not allowed anymore.

Therefore, there is no need to create an unique name
at device initialization.

Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Acked-by: Fan Zhang <roy.fan.zhang@intel.com>
7 years agodrivers/crypto: check if name is null
Pablo de Lara [Tue, 18 Apr 2017 14:34:19 +0000 (15:34 +0100)]
drivers/crypto: check if name is null

Check if virtual device name is NULL,
to avoid possible segmentation faults.

Fixes: 5d2aa461cbca ("vdev: use generic vdev struct for probe and remove")

Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Acked-by: Fan Zhang <roy.fan.zhang@intel.com>
7 years agoexamples/l2fwd-crypto: add cryptodev mask option
Fan Zhang [Tue, 18 Apr 2017 11:34:31 +0000 (12:34 +0100)]
examples/l2fwd-crypto: add cryptodev mask option

Previously, l2fwd-crypto application did not give user the
flexibility to decide which crypto device(s) will be used.

In this patch, a new cryptodev_mask option is added to the
application. Same as portmask, the cryptodev_mask avails the
user to mask out the unwanted crypto devices in the system.

Signed-off-by: Fan Zhang <roy.fan.zhang@intel.com>
7 years agoexamples/l2fwd-crypto: fix AEAD tests when AAD is zero
Pablo de Lara [Mon, 17 Apr 2017 12:23:37 +0000 (13:23 +0100)]
examples/l2fwd-crypto: fix AEAD tests when AAD is zero

For AEAD algorithms, additional authenticated data (AAD)
can be passed, but it is optional, so its size can be zero.
However, it is required to set this length to zero in the crypto
operation to avoid undefined behaviour.

Fixes: 617a7949c98a ("examples/l2fwd-crypto: parse AAD parameter")
Cc: stable@dpdk.org
Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
7 years agoapp/crypto-perf: fix AEAD tests when AAD is zero
Pablo de Lara [Wed, 12 Apr 2017 09:26:26 +0000 (10:26 +0100)]
app/crypto-perf: fix AEAD tests when AAD is zero

For AEAD algorithms, additional authenticated data (AAD)
can be passed, but it is optional, so its size can be zero.
Therefore, test can be run if no memory is allocated.

Fixes: f8be1786b1b8 ("app/crypto-perf: introduce performance test application")
Cc: stable@dpdk.org
Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
7 years agoapp/crypto-perf: fix length for wireless algos
Pablo de Lara [Mon, 10 Apr 2017 09:58:07 +0000 (10:58 +0100)]
app/crypto-perf: fix length for wireless algos

When SNOW3G/KASUMI/ZUC algorithms are used, ciphering
and authentication lengths have to be passed as bits
and not as bytes.

Fixes: f8be1786b1b8 ("app/crypto-perf: introduce performance test application")
Cc: stable@dpdk.org
Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
7 years agocrypto/qat: fix IV zero physical address
Arek Kusztal [Fri, 14 Apr 2017 08:08:42 +0000 (09:08 +0100)]
crypto/qat: fix IV zero physical address

This commit fixes zero physical address when IV not set

Fixes: 1703e94ac5ce ("qat: add driver for QuickAssist devices")
Cc: stable@dpdk.org
Signed-off-by: Arek Kusztal <arkadiuszx.kusztal@intel.com>
Acked-by: Deepak Kumar Jain <deepak.k.jain@intel.com>
7 years agocrypto/qat: fix AES-GCM authentication length
Arek Kusztal [Thu, 13 Apr 2017 09:29:03 +0000 (10:29 +0100)]
crypto/qat: fix AES-GCM authentication length

This commit fixes AES-GCM length of authentication input data,
cipher length is used instead

Fixes: 1703e94ac5ce ("qat: add driver for QuickAssist devices")
Cc: stable@dpdk.org
Signed-off-by: Arek Kusztal <arkadiuszx.kusztal@intel.com>
Acked-by: Deepak Kumar Jain <deepak.k.jain@intel.com>
7 years agocrypto/scheduler: improve parameters parsing
Fan Zhang [Tue, 18 Apr 2017 11:28:14 +0000 (12:28 +0100)]
crypto/scheduler: improve parameters parsing

This patch improves the cryptodev scheduler PMD's commandline
parsing capability. Originally, the scheduler's slave option
requires the slave vdev(s) being declared prior to it. This
patch removes this limitation by storing the slave names
temporarily and attaching them later.

Signed-off-by: Fan Zhang <roy.fan.zhang@intel.com>
Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
7 years agotest/crypto: create unique driver name
Pablo de Lara [Tue, 18 Apr 2017 11:39:39 +0000 (12:39 +0100)]
test/crypto: create unique driver name

Since commit <dda987315ca2> ("vdev: make virtual bus use
its device struct"), rte_eal_vdev_init cannot be called
with same name twice.

If several devices with the same driver are needed
(as in the crypto scheduler test), then driver name argument
has to be unique, concatenating the driver name and an index.

Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Acked-by: Fan Zhang <roy.fan.zhang@intel.com>
7 years agotest/crypto: create only one virtual device if needed
Pablo de Lara [Tue, 18 Apr 2017 11:39:38 +0000 (12:39 +0100)]
test/crypto: create only one virtual device if needed

Instead of creating two virtual devices per PMD, if they have not
been initialized from EAL already, create only one, as only the
first device is used for the crypto tests.

Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
7 years agoapp/crypto-perf: fix crypto operation resubmission
Fan Zhang [Tue, 18 Apr 2017 14:48:31 +0000 (15:48 +0100)]
app/crypto-perf: fix crypto operation resubmission

This patch fixes the crypto operation resubmission problem in crypto
perferformance test. Originally, when needed crypto ops amount is
smaller than the enqueued crypto ops in the last round, one or more
processed crypto operations will be re-enqueued.

Fixes: f8be1786b1b8 ("app/crypto-perf: introduce performance test application")
Cc: stable@dpdk.org
Signed-off-by: Fan Zhang <roy.fan.zhang@intel.com>
Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
7 years agocrypto/scheduler: fix doxygen comments
Fan Zhang [Tue, 18 Apr 2017 11:33:15 +0000 (12:33 +0100)]
crypto/scheduler: fix doxygen comments

This patch adds the missing doxygen comments and updated
inline comments to cryptodev scheduler

Fixes: d58a3f312545 ("crypto/scheduler: add documentation")
Cc: stable@dpdk.org
Signed-off-by: Fan Zhang <roy.fan.zhang@intel.com>
Acked-by: John McNamara <john.mcnamara@intel.com>
7 years agoapp/crypto-perf: fix possible overflow
Pablo de Lara [Tue, 11 Apr 2017 14:42:59 +0000 (15:42 +0100)]
app/crypto-perf: fix possible overflow

In the latency test, when number of enqueued operations
is less than the burst size, the timestamp value of the
non-enqueued operations was being stored, even though
those operations were being freed.

This could cause an array overflow, since it could store
more values than the total number of operations.

Fixes: 5d75fb09d3be ("app/crypto-perf: fix invalid latency for QAT")
Cc: stable@dpdk.org
Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
7 years agocrypto/qat: fix incomplete capabilities
Pablo de Lara [Thu, 13 Apr 2017 16:34:56 +0000 (17:34 +0100)]
crypto/qat: fix incomplete capabilities

After the refactoring of the capabilities, AES DOCSIS BPI
algorithm was left out.

Fixes: 6a3c87bc6a6c ("crypto/qat: refactor capabilities infrastructure")

Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
7 years agocrypto/scheduler: fix queue pair configuration
Fan Zhang [Mon, 10 Apr 2017 15:00:54 +0000 (16:00 +0100)]
crypto/scheduler: fix queue pair configuration

This patch fixes the queue pair configuration for the scheduler PMD.
The queue pairs of a scheduler may have different nb_descriptors sizes,
which was not the case. Also, the maximum available objects in a
queue pair is 1 object smaller than nb_descriptors. This patch fixes
these issues.

Fixes: a783aa634410 ("crypto/scheduler: add packet size based mode")

Signed-off-by: Fan Zhang <roy.fan.zhang@intel.com>
Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
7 years agocrypto/scheduler: support mode specific option
Fan Zhang [Wed, 5 Apr 2017 16:07:09 +0000 (17:07 +0100)]
crypto/scheduler: support mode specific option

Some scheduling modes may need extra options to be configured,
this patch adds the function prototype for setting/getting
options.

Signed-off-by: Fan Zhang <roy.fan.zhang@intel.com>
Acked-by: Declan Doherty <declan.doherty@intel.com>
7 years agocrypto/scheduler: fix capability update
Fan Zhang [Mon, 10 Apr 2017 14:59:34 +0000 (15:59 +0100)]
crypto/scheduler: fix capability update

Fixes: 31439ee72b2c ("crypto/scheduler: add API implementations")
Cc: stable@dpdk.org
Signed-off-by: Fan Zhang <roy.fan.zhang@intel.com>
7 years agocrypto/qat: fix capabilities for D15xx device
Arek Kusztal [Mon, 10 Apr 2017 13:20:08 +0000 (14:20 +0100)]
crypto/qat: fix capabilities for D15xx device

This commit fixes capabilities for Intel(R) QuickAssist
Technology D15xx device

Fixes: 259310f3a984 ("crypto/qat: support device D15xx")

Signed-off-by: Arek Kusztal <arkadiuszx.kusztal@intel.com>
Acked-by: Deepak Kumar Jain <deepak.k.jain@intel.com>
7 years agoigb_uio: switch to new irq function for MSI-X
Nicolas Dichtel [Thu, 20 Apr 2017 13:11:23 +0000 (15:11 +0200)]
igb_uio: switch to new irq function for MSI-X

pci_enable_msix() will be removed in kernel 4.12.
The new API pci_alloc_irq_vectors() is available
since linux 4.8, thus let's use it.

Link: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=aff171641d18
Link: https://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next.git/commit/?id=4244de1c64de
Signed-off-by: Nicolas Dichtel <nicolas.dichtel@6wind.com>
Reviewed-by: David Marchand <david.marchand@6wind.com>
Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>
7 years agonet/i40e: fix build on ppc64le
Gowrishankar Muthukrishnan [Thu, 20 Apr 2017 07:39:18 +0000 (13:09 +0530)]
net/i40e: fix build on ppc64le

A typo introduced in i40e_rxtx_vec_altivec.c

Fixes: 67f038076657 ("net/i40e: enable per-device packet type mapping")

Signed-off-by: Gowrishankar Muthukrishnan <gowrishankar.m@linux.vnet.ibm.com>
7 years agoeal/ppc: fix mmap for memory initialization
Chao Zhu [Thu, 6 Apr 2017 10:06:09 +0000 (15:36 +0530)]
eal/ppc: fix mmap for memory initialization

On IBM POWER platform, when mapping /dev/zero file to hugepage memory
space, mmap will not respect the requested address hint. This will cause
the memory initialization for the second process fails. This patch adds
the required mmap flags to make it work. Beside this, users need to set
the nr_overcommit_hugepages to expand the VA range. When
doing the initialization, users need to set both nr_hugepages and
nr_overcommit_hugepages to the same value, like 64, 128, etc.

Signed-off-by: Chao Zhu <chaozhu@linux.vnet.ibm.com>
Acked-by: Sergio Gonzalez Monroy <sergio.gonzalez.monroy@intel.com>
Acked-by: John McNamara <john.mcnamara@intel.com>
7 years agolog: fix dump of registered logs when disabled
Olivier Matz [Tue, 18 Apr 2017 14:22:25 +0000 (16:22 +0200)]
log: fix dump of registered logs when disabled

When we pass --log-level=0, it disables the logs. This level is
not displayed properly by the function that dumps the registered log
types (it shows "unknown"). Show "disabled" instead.

Before:

  ./build/app/test --log-level=0
  RTE>>dump_log_types
  global log level is unknown
  ...

After:

  ./build/app/test --log-level=0
  RTE>>dump_log_types
  global log level is disabled
  ...

Fixes: 432050bfd05b ("eal: dump registered log types")

Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>
7 years agolog: fix log level regexp matching
Olivier Matz [Tue, 18 Apr 2017 14:22:24 +0000 (16:22 +0200)]
log: fix log level regexp matching

Fix misuse of regular expression functions, which was producing a
segfault.

After the patch, it works properly:

  $ ./build/app/test --no-huge --log-level=pmd,3
  RTE>>dump_log_types
  [...]
  id 30: user7, level is debug
  id 31: user8, level is debug
  id 32: pmd.i40e.init, level is critical
  id 33: pmd.i40e.driver, level is critical

Coverity issue: 143472
Fixes: a5279180f510 ("eal: change several log levels matching a regexp")

Reported-by: Jianfeng Tan <jianfeng.tan@intel.com>
Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>
7 years agoeal: remove undue printf
Olivier Matz [Tue, 18 Apr 2017 14:22:23 +0000 (16:22 +0200)]
eal: remove undue printf

Remove the printf displaying the log level at initialization. It
was introduced for debug purpose, but was not intended to be pushed.

Fixes: 845afe51e428 ("eal: change specific log levels at startup")

Reported-by: Ferruh Yigit <ferruh.yigit@intel.com>
Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>
7 years agoeal: remove log level from internal config
Olivier Matz [Tue, 18 Apr 2017 14:22:22 +0000 (16:22 +0200)]
eal: remove log level from internal config

This field is only used in the initialization phase. Remove it since the
global log level can also be retrieved using a public API:
rte_log_get_global_level().

Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>
7 years agoeal: move internal config initialization
Olivier Matz [Tue, 18 Apr 2017 14:22:21 +0000 (16:22 +0200)]
eal: move internal config initialization

It's better to initialize the internal config in rte_eal_init()
instead of eal_log_level_parse(), since this structure is not only
about logs.

Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>
7 years agolog: fix default level
Olivier Matz [Tue, 18 Apr 2017 14:22:20 +0000 (16:22 +0200)]
log: fix default level

The initialization of the default log level (from configuration) was
removed by mistake in a previous commit. The global log level was
wrongly set to debug when no --log-level argument was passed. Restore
this initialization.

Before:
  $ ./build/app/test
  RTE>>dump_log_types
  global log level is debug
  ...

After:
  $ ./build/app/test
  RTE>>dump_log_types
  global log level is info
  ...

Fixes: 845afe51e428 ("eal: change specific log levels at startup")

Reported-by: Ferruh Yigit <ferruh.yigit@intel.com>
Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>
7 years agolog: redefine logtype values
Pablo de Lara [Wed, 19 Apr 2017 14:06:34 +0000 (15:06 +0100)]
log: redefine logtype values

After the changes in commit c1b5fa94a46f
("eal: support dynamic log types"), logtype is not treated as a
bitmask, but a decimal value. Therefore, values have to be
converted.

Fixes: c1b5fa94a46f ("eal: support dynamic log types")

Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Acked-by: Olivier Matz <olivier.matz@6wind.com>
7 years agomaintainers: update email address
Thomas Monjalon [Tue, 18 Apr 2017 21:36:51 +0000 (23:36 +0200)]
maintainers: update email address

Signed-off-by: Thomas Monjalon <thomas@monjalon.net>