dpdk.git
8 years agoi40evf: report error for unsupported CRC stripping config
Björn Töpel [Fri, 22 Apr 2016 05:39:22 +0000 (07:39 +0200)]
i40evf: report error for unsupported CRC stripping config

On hosts running a non-DPDK PF driver, the VF has no means of changing
the HW CRC strip setting for a RX queue. It's implicitly enabled.

This patch checks if the host is running a non-DPDK PF kernel driver,
and returns an error, if HW CRC stripping was not requested in the port
configuration.

Signed-off-by: Björn Töpel <bjorn.topel@intel.com>
Acked-by: Helin Zhang <helin.zhang@intel.com>
8 years agoi40e: remove unneeded NULL check
Daniel Mrzyglod [Mon, 18 Apr 2016 17:13:23 +0000 (19:13 +0200)]
i40e: remove unneeded NULL check

In i40evf_config_vlan_pvid the check for NULL for the dev value is
unnecessary, since this value is passed in from the ethdev API which
will ensure that a valid rte_eth_dev structure is provided.
Furthermore, all code paths leading to this function already use the
dev value.

Issue identified by Coverity.
  Coverity ID 13302:
  There may be a null pointer dereference, or else the comparison against
  null is unnecessary.

  In i40evf_config_vlan_pvid: All paths that lead to this null pointer
  comparison already dereference the pointer earlier

Fixes: 2b12431b5369 ("i40e: add vlan stripping and insertion to VF")

Signed-off-by: Daniel Mrzyglod <danielx.t.mrzyglod@intel.com>
Acked-by: Helin Zhang <helin.zhang@intel.com>
Acked-by: Jingjing Wu <jingjing.wu@intel.com>
8 years agoi40e: simplify SSE packet length extraction code
Bruce Richardson [Thu, 14 Apr 2016 16:02:37 +0000 (17:02 +0100)]
i40e: simplify SSE packet length extraction code

In Table 8-16 of the "Intel® Ethernet Controller XL710 Datasheet" it is
stated that when the whole packet is written to a single buffer, the
header length field in the descriptor will be 0. This means that when
extracting the packet/data_len field from the descriptor in the driver
we do not need to mask out the extra header-length bits.

Inside the vector driver, this reduces the need to pull all four pktlen
fields into a single register to work on. Instead of a shift and mask,
we now need to only do a shift. Therefore, we can work on each descriptor
independently, processing each using one shift intrinsic and a blend.

This change makes the code shorter and easier to read, so we can pull it
into the main descriptor processing loop instead of needing its own
function. This in turn makes the descriptor processing in the loop as a
whole slightly easier to read as it's more linear.

In terms of performance, in testing this change shows little effect, with
single-core perf tests showing a very slight improvement.

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Zhe Tao <zhe.tao@intel.com>
8 years agoi40e: improve performance of vector PMD
Bruce Richardson [Thu, 14 Apr 2016 16:02:36 +0000 (17:02 +0100)]
i40e: improve performance of vector PMD

An analysis of the i40e code using Intel® VTune™ Amplifier 2016 showed
that the code was unexpectedly causing stalls due to "Loads blocked by
Store Forwards". This can occur when a load from memory has to wait
due to the prior store being to the same address, but being of a smaller
size i.e. the stored value cannot be directly returned to the loader.
[See ref: https://software.intel.com/en-us/node/544454]

These stalls are due to the way in which the data_len values are handled
in the driver. The lengths are extracted using vector operations, but those
16-bit lengths are then assigned using scalar operations i.e. 16-bit
stores.

These regular 16-bit stores actually have two effects in the code:
* they cause the "Loads blocked by Store Forwards" issues reported
* they also cause the previous loads in the RX function to actually be a
load followed by a store to an address on the stack, because the 16-bit
assignment can't be done to an xmm register.

By converting the 16-bit store operations into a sequence of SSE blend
operations, we can ensure that the descriptor loads only occur once, and
avoid both the additional stores and loads from the stack, as well as the
stalls due to the blocked loads.

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Zhe Tao <zhe.tao@intel.com>
8 years agoi40e: require SSE4.1 support for vector driver
Bruce Richardson [Thu, 14 Apr 2016 16:02:35 +0000 (17:02 +0100)]
i40e: require SSE4.1 support for vector driver

Later commits to improve the driver will make use of the SSE4.1
_mm_blend_epi16 intrinsic, so:
* set the compilation level to always have SSE4.1 support,
* and add in a runtime check for SSE4.1 as part of the condition checks
  for vector driver selection.

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Zhe Tao <zhe.tao@intel.com>
8 years agoi40e: remove redundant fdir forward declarations
Rami Rosen [Sat, 26 Mar 2016 01:32:08 +0000 (04:32 +0300)]
i40e: remove redundant fdir forward declarations

This patch removes several redundant forward declarations
in i40e_fdir.c.

Fixes: a778a1fa2e4e ("i40e: set up and initialize flow director")

Signed-off-by: Rami Rosen <rami.rosen@intel.com>
Acked-by: Helin Zhang <helin.zhang@intel.com>
8 years agoqede: add DCBX support
Rasesh Mody [Wed, 27 Apr 2016 14:18:42 +0000 (07:18 -0700)]
qede: add DCBX support

This patch adds LLDP and DCBX capabilities to the qede PMD.

Signed-off-by: Harish Patil <harish.patil@qlogic.com>
Signed-off-by: Rasesh Mody <rasesh.mody@qlogic.com>
Signed-off-by: Sony Chacko <sony.chacko@qlogic.com>
8 years agoqede: add interrupt handling support
Rasesh Mody [Wed, 27 Apr 2016 14:18:41 +0000 (07:18 -0700)]
qede: add interrupt handling support

The physical link is handled by the management Firmware.
This patch lays the infrastructure for interrupt/attention handling in
the driver, as link change notifications arrive via async interrupts,
as well as the handling of such notifications. It adds async event
notification handler interfaces to the PMD.

Signed-off-by: Harish Patil <harish.patil@qlogic.com>
Signed-off-by: Rasesh Mody <rasesh.mody@qlogic.com>
Signed-off-by: Sony Chacko <sony.chacko@qlogic.com>
8 years agoqede: add SRIOV support
Rasesh Mody [Wed, 27 Apr 2016 14:18:40 +0000 (07:18 -0700)]
qede: add SRIOV support

This patch adds following SRIOV features to qede PMD:
 - VF configuration
 - VF intialization/de-initialization
 - VF PF communications channel
 - statistics capture and query

Signed-off-by: Harish Patil <harish.patil@qlogic.com>
Signed-off-by: Rasesh Mody <rasesh.mody@qlogic.com>
Signed-off-by: Sony Chacko <sony.chacko@qlogic.com>
8 years agoqede: add L2 support
Rasesh Mody [Wed, 27 Apr 2016 14:18:39 +0000 (07:18 -0700)]
qede: add L2 support

This patch adds the features to supports configuration of various Layer 2
elements, such as channels and filtering options.

Signed-off-by: Harish Patil <harish.patil@qlogic.com>
Signed-off-by: Rasesh Mody <rasesh.mody@qlogic.com>
Signed-off-by: Sony Chacko <sony.chacko@qlogic.com>
8 years agoqede: enable PMD build
Rasesh Mody [Wed, 27 Apr 2016 14:18:38 +0000 (07:18 -0700)]
qede: enable PMD build

This patch enables the QEDE PMD build.

Signed-off-by: Harish Patil <harish.patil@qlogic.com>
Signed-off-by: Rasesh Mody <rasesh.mody@qlogic.com>
Signed-off-by: Sony Chacko <sony.chacko@qlogic.com>
8 years agoqede: add core driver
Rasesh Mody [Wed, 27 Apr 2016 14:18:37 +0000 (07:18 -0700)]
qede: add core driver

The Qlogic Everest Driver for Ethernet(QEDE) Poll Mode Driver(PMD) is
the DPDK specific module for QLogic FastLinQ QL4xxxx 25G/40G CNA family
of adapters as well as their virtual functions (VF) in SR-IOV context.

This patch adds QEDE PMD, which interacts with base driver and
initialises the HW.

This patch content also includes:
 - eth_dev_ops callbacks
 - Rx/Tx support for the driver
 - link default configuration
 - change link property
 - link up/down/update notifications
 - vlan offload and filtering capability
 - device/function/port statistics
 - qede nic guide and updated overview.rst

Note that the follow on commits contain the code for the features mentioned
in documents but not implemented in this patch.

Signed-off-by: Harish Patil <harish.patil@qlogic.com>
Signed-off-by: Rasesh Mody <rasesh.mody@qlogic.com>
Signed-off-by: Sony Chacko <sony.chacko@qlogic.com>
8 years agoqede: add base driver
Rasesh Mody [Wed, 27 Apr 2016 14:18:36 +0000 (07:18 -0700)]
qede: add base driver

The base driver is the backend module for the QLogic FastLinQ QL4xxxx
25G/40G CNA family of adapters as well as their virtual functions (VF)
in SR-IOV context.

The purpose of the base module is to:
 - provide all the common code that will be shared between the various
   drivers that would be used with said line of products. Flows such as
   chip initialization and de-initialization fall under this category.
 - abstract the protocol-specific HW & FW components, allowing the
   protocol drivers to have clean APIs, which are detached in its
   slowpath configuration from the actual Hardware Software Interface(HSI).

This patch adds a base module without any protocol-specific bits.
I.e., this adds a basic implementation that almost entirely falls under
the first category.

Signed-off-by: Harish Patil <harish.patil@qlogic.com>
Signed-off-by: Rasesh Mody <rasesh.mody@qlogic.com>
Signed-off-by: Sony Chacko <sony.chacko@qlogic.com>
8 years agoixgbe: fix bit shift overflow in VMDQ pool setup
Tomasz Kulasek [Fri, 22 Apr 2016 15:35:57 +0000 (17:35 +0200)]
ixgbe: fix bit shift overflow in VMDQ pool setup

Fix issue reported by Coverity.

Coverity ID 13193: Bad bit shift operation (BAD_SHIFT)
large_shift: In expression 1 << pool, left shifting by more than 31 bits
has undefined behavior. The shift amount, pool, is at least 32.

This patch is a rework of register addr selection logic and mask
computation to made it more readable and avoid bit overflow when 32 bit
value is shifted over its size for pool > 31.

Fixes: fe3a45fd4104 ("ixgbe: add VMDq support")

Signed-off-by: Tomasz Kulasek <tomaszx.kulasek@intel.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
8 years agoi40e: fix packet count stats
Jingjing Wu [Tue, 19 Apr 2016 06:11:13 +0000 (14:11 +0800)]
i40e: fix packet count stats

The statistics queried by calling rte_eth_stats_get are zero when
the API is first called on the port. The root cause is because the
offset_loaded flag is not set correctly after device start.
This patch fixes this issue by resetting statistics at initialization
time. The resetting process will set offset_loaded flag.

Fixes: 4861cde46116 ("i40e: new poll mode driver")

Signed-off-by: Jingjing Wu <jingjing.wu@intel.com>
Acked-by: Helin Zhang <helin.zhang@intel.com>
8 years agofm10k: fix packet type for multi-segment packets
Michael Frasca [Mon, 18 Apr 2016 12:51:52 +0000 (08:51 -0400)]
fm10k: fix packet type for multi-segment packets

When building a chain of mbufs for a multi-segment packet, the
packet_type field resides at the end of the chain. It should be
copied forward to the head of the list.

Also, uses RTE_LIBRTE_FM10K_RX_OLFLAGS_ENABLE to guard packet-type
computation. The mbuf fields are not copied when this define is not set.

Fixes: fe65e1e1ce61 ("fm10k: add vector scatter Rx")

Signed-off-by: Michael Frasca <michael.frasca@oracle.com>
Acked-by: Jing Chen <jing.d.chen@intel.com>
8 years agoixgbe: fix bit masking in queue stop
Piotr Azarewicz [Thu, 14 Apr 2016 09:59:30 +0000 (11:59 +0200)]
ixgbe: fix bit masking in queue stop

The masking for the RX/TX enable bit was incorrect in the rx and tx
queue stop functions. Instead of using "& MASK" it used "| MASK" which
would always return true. This error was found by converity scan.

CID 13215 : Wrong operator used (CONSTANT_EXPRESSION_RESULT)
operator_confusion: txdctl | 33554432 is always 1/true regardless of the
values of its operand. This occurs as the logical second operand of
'&&'.

CID 13216 : Wrong operator used (CONSTANT_EXPRESSION_RESULT)
operator_confusion: rxdctl | 33554432 is always 1/true regardless of the
values of its operand. This occurs as the logical second operand of
'&&'.

Coverity issue: 13215
Coverity issue: 13216
Fixes: 029fd06d40fa ("ixgbe: queue start and stop")

Signed-off-by: Piotr Azarewicz <piotrx.t.azarewicz@intel.com>
Acked-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
8 years agoi40e: fix register dump offset
Remy Horton [Wed, 13 Apr 2016 09:44:45 +0000 (10:44 +0100)]
i40e: fix register dump offset

The position of register values within i40e register dumps is
supposed to reflect the register addresses. These were not being
correctly calculated.

Fixes: d9efd0136ac1 ("i40e: add EEPROM and registers dumping")

Signed-off-by: Remy Horton <remy.horton@intel.com>
Acked-by: Jingjing Wu <jingjing.wu@intel.com>
8 years agoixgbe: clean up code style
Stephen Hemminger [Thu, 7 Apr 2016 23:45:28 +0000 (16:45 -0700)]
ixgbe: clean up code style

Run ixgbe driver through checkpatch and fix the issues highlighted
Fix line spacing, some bad indentation, and in a couple
of cases use short circuit (already there) return to lessen indentation.

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
Applied with four additional fixes for issues highlighted by checkpatch
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
8 years agoeal: add missing include to debug header
Bruce Richardson [Wed, 4 May 2016 16:37:56 +0000 (17:37 +0100)]
eal: add missing include to debug header

The header file rte_debug.h makes use of the "unlikely" macro which
means it should include the rte_branch_prediction.h header file.

Fixes: 50705e8e3cdd ("eal: add assert macro for debug")

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>
8 years agomk: do not enforce any specific ARM ABI
Jan Viktorin [Fri, 15 Apr 2016 22:33:06 +0000 (00:33 +0200)]
mk: do not enforce any specific ARM ABI

The dpdk build system passes -mfloat-abi=softfp, which makes the build fail
when the selected ABI is EABIhf. The dpdk build system should not make
assumptions on the selected ARM ABI.

Reported-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Jan Viktorin <viktorin@rehivetech.com>
8 years agoeal: add assert macro for debug
Thomas Monjalon [Fri, 22 Apr 2016 12:21:26 +0000 (14:21 +0200)]
eal: add assert macro for debug

The macro RTE_VERIFY always checks a condition.
It is optimized with "unlikely" hint.
While this macro is well suited for test applications, it is preferred
in libraries and examples to enable such check in debug mode.
That's why the macro RTE_ASSERT is introduced to call RTE_VERIFY only
if built with debug logs enabled.

A lot of assert macros were duplicated and enabled with a specific flag.
Removing these #ifdef allows to test these code branches more easily
and avoid dead code pitfalls.

The ENA_ASSERT is kept (in debug mode only) because it has more
parameters to log.

Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
8 years agoexamples: remove useless debug flags
Thomas Monjalon [Fri, 22 Apr 2016 10:52:20 +0000 (12:52 +0200)]
examples: remove useless debug flags

The debug logs must be enabled at compile-time and run-time.
There are also some internal flags in some examples to enable the debug
logs of the applications. They are now enabled in debug configs and
can be disabled thanks to the more generic logtype mechanism:
rte_set_log_type(RTE_LOGTYPE_USER1, 0);

Removing these #ifdef allows to test these code branches more easily
and avoid dead code pitfalls.

Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
Acked-by: Yuanhan Liu <yuanhan.liu@linux.intel.com>
8 years agolog: increase default level to info
Thomas Monjalon [Fri, 22 Apr 2016 10:25:59 +0000 (12:25 +0200)]
log: increase default level to info

The default was to compile every logs (including debug) and set
the default level to debug.
As some debug logs may hurt performance, a notice is added and the
default level is now info.

In order to enable debug logs, they must be compiled with
RTE_LOG_LEVEL=RTE_LOG_DEBUG and enabled at runtime with --log-level=8.

Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
8 years agoeal: increase log level of some messages
Thomas Monjalon [Fri, 22 Apr 2016 13:03:02 +0000 (15:03 +0200)]
eal: increase log level of some messages

Some relevant EAL logs are raised from debug to info level in order to
show the available number of cores and the detected devices.
The driver ids and name are logged only if the device is not blacklisted.

Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
8 years agocmdline: add any multi string mode to token string
Piotr Azarewicz [Fri, 29 Apr 2016 14:29:34 +0000 (16:29 +0200)]
cmdline: add any multi string mode to token string

While parsing token string there may be several modes:
- fixed single string
- multi-choice single string
- any single string

This patch add one more mode - any multi string.

Signed-off-by: Piotr Azarewicz <piotrx.t.azarewicz@intel.com>
Acked-by: Olivier Matz <olivier.matz@6wind.com>
8 years agocfgfile: fix uninitialized variable on load error
Michal Kobylinski [Wed, 13 Apr 2016 12:15:02 +0000 (14:15 +0200)]
cfgfile: fix uninitialized variable on load error

CID 13323:
Uninitialized scalar variable. Using uninitialized value
cfg->num_sections when calling rte_cfgfile_close.

Fixes: eaafbad419bf ("cfgfile: library to interpret config files")

Signed-off-by: Michal Kobylinski <michalx.kobylinski@intel.com>
Acked-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
8 years agocfgfile: fix return value comment
Dmitriy Yakovlev [Fri, 15 Apr 2016 22:58:43 +0000 (01:58 +0300)]
cfgfile: fix return value comment

Function rte_cfgfile_load can return NULL value, when something goes wrong.

Signed-off-by: Dmitriy Yakovlev <bombermag@gmail.com>
Acked-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
8 years agolpm6: fix possible garbage in lookup
Daniel Mrzyglod [Wed, 27 Apr 2016 15:07:53 +0000 (17:07 +0200)]
lpm6: fix possible garbage in lookup

Fix issue reported by clang scan-build

Value of pointer tbl_next was uninitialized. When function lookup_step()
take else branch it may provide garbage into tbl = tbl_next;

Fixes: 5c510e13a9cb ("lpm: add IPv6 support")

Signed-off-by: Daniel Mrzyglod <danielx.t.mrzyglod@intel.com>
8 years agolpm6: fix missing header dependency
Igor Ryzhov [Thu, 28 Apr 2016 12:08:33 +0000 (15:08 +0300)]
lpm6: fix missing header dependency

Include stdint.h for the definition of uint*_t types.

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
8 years agolpm: fix freeing in compatibility mode
Christian Ehrhardt [Tue, 12 Apr 2016 13:49:27 +0000 (15:49 +0200)]
lpm: fix freeing in compatibility mode

Back then when we fixed the missing free lpm I was to quickly to say yes
if it applies not only to the lpm6 but also to all of the lpm code.

It turned out to not apply to all of them. In rte_lpm_create_v20 there
is an unexpected fused allocation:
mem_size = sizeof(*lpm) + (sizeof(lpm->rules_tbl[0]) * max_rules);
[...]
lpm = (struct rte_lpm_v20 *)rte_zmalloc_socket(mem_name,mem_size,
               RTE_CACHE_LINE_SIZE, socket_id);

That causes lpm->rules_tbl not to have an own struct malloc_elem that
can be derived via RTE_PTR_SUB(data, MALLOC_ELEM_HEADER_LEN) in
malloc_elem_from_data.
Due to that the rte_lpm_free_v20 accidentially misderives the elem and
assumes it is ELEM_FREE triggering in malloc_elem_free
if (!malloc_elem_cookies_ok(elem) || elem->state !=
        return -1;

While it seems counter-intuitive the way to properly remove rules_tbl in
the old fused allocation style of rte_lpm_free_v20 is to not remove it.

The newer rte_lpm_free_v1604 is safe because in rte_lpm_create_v1604
rules_tbl is a separate allocation.

Fixes: d4c18f0a1d5d ("lpm: fix missing free")

Signed-off-by: Christian Ehrhardt <christian.ehrhardt@canonical.com>
Acked-by: Olivier Matz <olivier.matz@6wind.com>
8 years agoip_frag: fix double free of chained mbufs
Chaeyong Chong [Thu, 21 Apr 2016 17:28:01 +0000 (02:28 +0900)]
ip_frag: fix double free of chained mbufs

If any fragment hole is found in ipv4_frag_reassemble() and
ipv6_frag_reassemble(), whole ip_frag_pkt mbufs are moved to death-row.
Any mbufs already chained to another mbuf are freed multiple times as
there are still in ip_frag_pkt array.

Signed-off-by: Chaeyong Chong <cychong@gmail.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
8 years agomem: fix freeing of memzone used by ivshmem
Mauricio Vasquez B [Fri, 15 Apr 2016 08:29:49 +0000 (10:29 +0200)]
mem: fix freeing of memzone used by ivshmem

Although previous implementation returned an error when trying to release
a memzone assigned to an ivshmem device, it stills freed it.

Fixes: cd10c42eb5bc ("mem: fix ivshmem freeing")

Signed-off-by: Mauricio Vasquez B <mauricio.vasquezbernal@studenti.polito.it>
Acked-by: Sergio Gonzalez Monroy <sergio.gonzalez.monroy@intel.com>
8 years agokni: support chained mbufs
Ferruh Yigit [Tue, 26 Apr 2016 12:37:58 +0000 (13:37 +0100)]
kni: support chained mbufs

rx_q fifo may have chained mbufs, merge them into single skb before
handing to the network stack.

Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
Acked-by: Helin Zhang <helin.zhang@intel.com>
8 years agokni: keep ethernet MAC address when interface goes up
Igor Ryzhov [Thu, 21 Apr 2016 16:27:30 +0000 (19:27 +0300)]
kni: keep ethernet MAC address when interface goes up

Currently every time a KNI interface goes up, its ethernet address
is reassigned.
After this patch ethernet address is assigned only once,
at initialization time.

Suggested-by: Sergey Balabanov <balabanovsv@ecotelecom.ru>
Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
Acked-by: Helin Zhang <helin.zhang@intel.com>
8 years agoapp/testpmd: fix string overrun in engines listing
Tomasz Kulasek [Mon, 11 Apr 2016 16:03:48 +0000 (18:03 +0200)]
app/testpmd: fix string overrun in engines listing

CID 13307 (#1 of 1): Copy into fixed size buffer (STRING_OVERFLOW)
fixed_size_dest: You might overrun the 128 byte fixed-size string fwd_modes
by copying fwd_eng->fwd_mode_name without checking the length.

Fixes: 769ce6b17835 ("app/testpmd: list forwarding engines")

Signed-off-by: Tomasz Kulasek <tomaszx.kulasek@intel.com>
8 years agoexamples/performance-thread: fix crash with gcc 5
Tomasz Kulasek [Tue, 26 Apr 2016 15:47:56 +0000 (17:47 +0200)]
examples/performance-thread: fix crash with gcc 5

It seems that with gcc >5.x and -O2/-O3 optimization breaks packet
grouping algorithm in l3fwd-thread application causing segfault.

When last packet pointer "lp" and "pnum->u64" buffer points the same
memory buffer, high optimization can cause unpredictable results.
It seems that assignment of precalculated group sizes may interfere
with initialization of new group size when lp points value inside
current group and didn't should be changed.

With gcc >5.x and optimization we cannot be sure which assignment will be
done first, so the group size can be counted incorrectly causing segfault.

This patch eliminates intersection of assignment of initial group size
(lp[0] = 1) and precalculated group sizes when gptbl[v].idx < 4.

The same patch was applied for original l3fwd (af1694d94).

Fixes: d48415e1fee3 ("examples/performance-thread: add l3fwd-thread app")

Signed-off-by: Tomasz Kulasek <tomaszx.kulasek@intel.com>
8 years agoexamples/exception_path: fix shift operation in lcore setup
Daniel Mrzyglod [Fri, 15 Apr 2016 15:29:40 +0000 (17:29 +0200)]
examples/exception_path: fix shift operation in lcore setup

CID: #30688
The operaton may have an undefined behavior or yield to an unexpected result.

In setup_port_lcore_affinities: A bit shift operation has a shift amount
which is too large or has a negative value.

Fixes: af75078fece3 ("first public release")

Signed-off-by: Daniel Mrzyglod <danielx.t.mrzyglod@intel.com>
8 years agoacl: fix division by float zero in test app
Daniel Mrzyglod [Fri, 22 Apr 2016 16:00:50 +0000 (18:00 +0200)]
acl: fix division by float zero in test app

Fix issue reported by Coverity.
Coverity ID 13240

This could cause an immediate crash or incorrect computation.

In search_ip5tuples: An expression which may be zero is used
as a divisor in floating-point arithmetic.

divide_by_zero: In expression (long double)tm / pkt,
division by expression pkt which may be zero has undefined behavior.

Fixes: 26c057ab6c45 ("acl: new test-acl application")

Signed-off-by: Daniel Mrzyglod <danielx.t.mrzyglod@intel.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
8 years agovfio: fix socket option check
Daniel Mrzyglod [Fri, 22 Apr 2016 13:17:09 +0000 (15:17 +0200)]
vfio: fix socket option check

Fix issue reported by Coverity.
Coverity ID 13194

The function returns a value that indicates an error condition. If this
is not checked, the error condition may not be handled correctly.

Fixes: 2f4adfad0a69 ("vfio: add multiprocess support")

Signed-off-by: Daniel Mrzyglod <danielx.t.mrzyglod@intel.com>
Acked-by: Anatoly Burakov <anatoly.burakov@intel.com>
8 years agoeal: remove useless internal function from memcpy headers
Thomas Monjalon [Tue, 19 Apr 2016 20:38:31 +0000 (22:38 +0200)]
eal: remove useless internal function from memcpy headers

The function rte_memcpy_func() is used in ARM and PPC implementations
of rte_memcpy().
There are some useless copies in Tile and some ARM branches.
It was also declared without doxygen comment in the generic header.

Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
Acked-by: David Marchand <david.marchand@6wind.com>
8 years agodoc: improve nics features matrix
John McNamara [Mon, 11 Apr 2016 22:27:25 +0000 (23:27 +0100)]
doc: improve nics features matrix

Changed symbol on NIC overview table from X to Y to help
clarify the indicated features are supported. The X caused
confusion for some readers.

Also, added * character to indicate partially supported
features. This can be used in the future to direct the reader
to more specific details in the individual NIC guides.

Signed-off-by: John McNamara <john.mcnamara@intel.com>
8 years agoversion: 16.07-rc0
Thomas Monjalon [Tue, 19 Apr 2016 14:20:04 +0000 (16:20 +0200)]
version: 16.07-rc0

After having removed the deprecated stuff, we can start pushing
new fixes and features in the version 16.07.

Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
8 years agolib: remove poisoned flags
Thomas Monjalon [Tue, 19 Apr 2016 19:49:03 +0000 (21:49 +0200)]
lib: remove poisoned flags

Some flags were poisoned after having been removed from EAL and mbuf
in releases 1.8 (b10eef348d62814bc2e9) and 2.0 (4769bc5a27cc).
After several releases, they have probably disappeared from all
applications going to upgrade to DPDK 16.07.

Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
Acked-by: David Marchand <david.marchand@6wind.com>
8 years agohash: remove aliases for bulk lookup
Thomas Monjalon [Tue, 19 Apr 2016 16:04:00 +0000 (18:04 +0200)]
hash: remove aliases for bulk lookup

The function rte_hash_lookup_multi() was renamed rte_hash_lookup_bulk()
in DPDK 1.4 and was kept as an undocumented alias.

Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
8 years agoethdev: remove deprecated statistics
Thomas Monjalon [Fri, 15 Apr 2016 09:01:51 +0000 (11:01 +0200)]
ethdev: remove deprecated statistics

Some statistics were deprecated since release 2.1 (49f386542af4).
The last deprecated counter to be used was imcasts.

The VF loopback statistics are also removed as they are used only
in igb and duplicated in extended statistics.

The new counters should be added to extended statistics.

Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
Acked-by: Remy Horton <remy.horton@intel.com>
8 years agopci: remove deprecated specific config
Thomas Monjalon [Thu, 14 Apr 2016 18:49:49 +0000 (20:49 +0200)]
pci: remove deprecated specific config

The driver i40e was using a specific PCI config before the release 16.04.
Since 16.04, it is always enabled in i40e (commit 56465cfaf).
The API has been deprecated in the commit 68f77593823cab.
The igb_uio implementation has been deprecated in commit b7cf8e155.
The config helper - through igb_uio sysfs entries - is now removed.

Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
Acked-by: Helin Zhang <helin.zhang@intel.com>
Acked-by: David Marchand <david.marchand@6wind.com>
8 years agoport: bump ABI for pcap file support
Thomas Monjalon [Thu, 14 Apr 2016 17:15:13 +0000 (19:15 +0200)]
port: bump ABI for pcap file support

Support of PCAP file has been added to rte_port in release 16.04
as NEXT_ABI. It is in the standard ABI of the release 16.07.

Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
Acked-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
8 years agodoc: add template release notes for 16.07
John McNamara [Tue, 12 Apr 2016 12:55:10 +0000 (13:55 +0100)]
doc: add template release notes for 16.07

Added template release notes for DPDK 16.07 with inline
explanations of the various sections.

Signed-off-by: John McNamara <john.mcnamara@intel.com>
8 years agoversion: 16.04
Thomas Monjalon [Mon, 11 Apr 2016 15:46:53 +0000 (17:46 +0200)]
version: 16.04

Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
8 years agodoc: remove residual template from release notes
Thomas Monjalon [Mon, 11 Apr 2016 16:49:41 +0000 (18:49 +0200)]
doc: remove residual template from release notes

Fixes: b0641b68286d ("doc: fix release notes for 16.04")

Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
8 years agodoc: fix references in guides
Thomas Monjalon [Mon, 11 Apr 2016 21:21:35 +0000 (23:21 +0200)]
doc: fix references in guides

Replace some hard-coded section numbers by dynamic links.

Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
8 years agoscripts: check commit formatting
Thomas Monjalon [Tue, 29 Mar 2016 21:14:47 +0000 (23:14 +0200)]
scripts: check commit formatting

The git messages have three parts:
1/ the headline
2/ the explanations
3/ the footer tags

The headline helps to quickly browse an history or catch instantly the
purpose of a commit. Making it short with some consistent wording
allows to easily parse it or match some patterns.

The explanations must give some keys like the reason of the change.
Nothing can be automatically checked for this part, except line length.

The footer contains some tags to find the origin of a bug or who
was working on it.

This script is doing some basic checks mostly on parts 1 and 3.

Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
Reviewed-by: Yuanhan Liu <yuanhan.liu@linux.intel.com>
8 years agoscripts: test build with all stats enabled
Thomas Monjalon [Fri, 8 Apr 2016 08:49:59 +0000 (10:49 +0200)]
scripts: test build with all stats enabled

These stats will be compiled when adding +debug
to test-build.sh targets:
CONFIG_RTE_LIBRTE_IP_FRAG_TBL_STAT
CONFIG_RTE_SCHED_COLLECT_STATS
CONFIG_RTE_PORT_STATS_COLLECT
CONFIG_RTE_TABLE_STATS_COLLECT
CONFIG_RTE_PIPELINE_STATS_COLLECT
CONFIG_RTE_TEST_PMD_RECORD_BURST_STATS
CONFIG_RTE_TEST_PMD_RECORD_CORE_CYCLES

Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
8 years agokni: fix vhost build with kernels 4.2 and 4.4
Ferruh Yigit [Mon, 11 Apr 2016 18:30:08 +0000 (19:30 +0100)]
kni: fix vhost build with kernels 4.2 and 4.4

Fix vhost-kni compile errors because of Linux kernel API changes

- SOCK_ASYNC_WAITDATA renamed to SOCKWQ_ASYNC_WAITDATA
  Linux commit id: 9cd3e072
  Updated in Linux kernel 4.4

- sk_alloc() gets new parameter
  Linux commit id: 11aa9c28b
  Updated in Linux kernel 4.2
  New parameter is: "@kern: is this to be a kernel socket?"

Reported-by: Chintu Hetam <rometoroam@gmail.com>
Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
8 years agoport: fix ring writer buffer overflow
Jasvinder Singh [Mon, 11 Apr 2016 17:55:37 +0000 (18:55 +0100)]
port: fix ring writer buffer overflow

Fixes the buffer overflow that occurs due to following;

1. When the input packet burst does not meet the conditions: (a) being
contiguous (first n bits set in pkts_mask, all the other bits cleared)
and (b) containing a full burst, i.e. at least tx_burst_sz packets
(n >= tx_burst_size). This is the slow(er) code path taken when local
variable expr != 0.
2. There are some packets already in the buffer.
3. The number of packets in the incoming burst (i.e. popcount(pkts_mask))
plus the number of packets already in the buffer exceeds the buffer size
(RTE_PORT_IN_BURST_SIZE_MAX, i.e. 64).

Fixes: bf6931b242f7 ("port: ring")
Fixes: 5f4cd47309d6 ("port: add ring writer nodrop")

Signed-off-by: Jasvinder Singh <jasvinder.singh@intel.com>
Acked-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
8 years agoport: fix burst size mask type
Jasvinder Singh [Mon, 11 Apr 2016 17:54:46 +0000 (18:54 +0100)]
port: fix burst size mask type

Fixes the variable bsz_mask type from uint32_t to uint64_t

Fixes: 4d97e8b565cc ("port: ethdev")
Fixes: 304c8091e90a ("port: add ethdev writer nodrop")
Fixes: 8dceb6aa6ecf ("port: hierarchical scheduler")
Fixes: 3e5966837a09 ("port: new Tx burst implementation of ring writer")
Fixes: 5f4cd47309d6 ("port: add ring writer nodrop")

Signed-off-by: Jasvinder Singh <jasvinder.singh@intel.com>
Acked-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
8 years agodoc: add tested platforms and nics
John McNamara [Fri, 8 Apr 2016 15:21:38 +0000 (16:21 +0100)]
doc: add tested platforms and nics

Add a new section on tested platforms and nics to the release notes.

Signed-off-by: Qian Xu <qian.q.xu@intel.com>
Signed-off-by: John McNamara <john.mcnamara@intel.com>
Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
8 years agoapp/testpmd: fix running without Xen whereas enabled
Christian Ehrhardt [Thu, 17 Mar 2016 14:47:03 +0000 (15:47 +0100)]
app/testpmd: fix running without Xen whereas enabled

With LIBRTE_PMD_XENVIRT enabled testpmd is built in a way to ONLY work
in XEN environments.
It will surface as:
   PMD: gntalloc: ioctl error
   EAL: Error - exiting with code: 1
     Cause: Creation of mbuf pool for socket 0 failed

With LIBRTE_PMD_XENVIRT enabled this now tries the xen style grant
table allocation, but falls back gracefully for the normal allocation.

The only thing left in the log will be the
   PMD: gntalloc: ioctl error

Signed-off-by: Christian Ehrhardt <christian.ehrhardt@canonical.com>
8 years agovfio: fix resource leak
Daniel Mrzyglod [Mon, 11 Apr 2016 09:46:54 +0000 (11:46 +0200)]
vfio: fix resource leak

Coverity ID 13289: Resource leak:
The system resource will not be reclaimed and reused,
reducing the future availability of the resource.
In pci_vfio_get_group_fd: Leak of memory or pointers to system resources

Fixes: ff0b67d1c868 ("vfio: DMA mapping")

Signed-off-by: Daniel Mrzyglod <danielx.t.mrzyglod@intel.com>
Acked-by: Anatoly Burakov <anatoly.burakov@intel.com>
8 years agoexamples/vm_power_manager: fix libvirt dependency check
Marvin Liu [Mon, 11 Apr 2016 08:50:31 +0000 (16:50 +0800)]
examples/vm_power_manager: fix libvirt dependency check

vm_power_manager utilize libvirt API virDomainGetVcpuPinInfo to
retrieve domU vcpu information. This API is implemented from version 0.9.3.
Suse11 SP3 32bit default libvirt version is 0.8.8.

examples/vm_power_manager/channel_manager.c:
channel_manager.c:117:3: error: implicit declaration of function
'virDomainGetVcpuPinInfo'

Check and skip it from examples or raise an error when trying to compile
without libvirt or with a too old libvirt.

Fixes: e8ae9b662 ("examples/vm_power: channel manager and monitor in host")

Signed-off-by: Marvin Liu <yong.liu@intel.com>
Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
8 years agoapp/test: fix memory corruption in reentrancy autotest
Olivier Matz [Mon, 11 Apr 2016 09:33:23 +0000 (11:33 +0200)]
app/test: fix memory corruption in reentrancy autotest

The mempool element size is set to 0, but 4 bytes are written in
my_obj_init():

  uint32_t *objnum = obj;
  memset(obj, 0, mp->elt_size);
  *objnum = i;

Change the MEMPOOL_ELT_SIZE constant to sizeof(uint32_t). This fixes
memory corruptions since we were writing outside of the object
boundaries.

Fixes: 104a92bd026 ("app: add reentrancy tests")

Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
8 years agoexamples/vhost_xen: fix 32-bit build
Pablo de Lara [Sun, 10 Apr 2016 19:25:52 +0000 (20:25 +0100)]
examples/vhost_xen: fix 32-bit build

Compilation fails on 32 bits on Vhost_xen sample app, due to wrong casting:

examples/vhost_xen/vhost_monitor.c: In function ‘new_device’:
examples/vhost_xen/vhost_monitor.c:288:62: error: cast from pointer to integer
                               of different size [-Werror=pointer-to-int-cast]

Fixes: 47bd46112b71 ("xen: import xenvirt pmd and vhost_xen")

Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
8 years agoxenvirt: fix 32-bit build
Pablo de Lara [Sun, 10 Apr 2016 19:25:51 +0000 (20:25 +0100)]
xenvirt: fix 32-bit build

Compilation fails on 32 bits on Xen driver, due to wrong casting:

drivers/net/xenvirt/virtqueue.h: In function ‘virtqueue_enqueue_xmit’:
drivers/net/xenvirt/virtqueue.h:234:24: error: cast from pointer to integer
                            of different size [-Werror=pointer-to-int-cast]
  start_dp[idx].addr  = rte_pktmbuf_mtod(cookie, uint64_t);
                        ^

Fixes: d6b324c00fc9 ("mbuf: get DMA address")

Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
8 years agodoc: announce API changes for device objects
David Marchand [Thu, 7 Apr 2016 15:33:17 +0000 (17:33 +0200)]
doc: announce API changes for device objects

Following discussions with Jan, here is a deprecation notice to prepare for
hotplug and rte_device changes to come in 16.07.

Signed-off-by: David Marchand <david.marchand@6wind.com>
Acked-by: Jan Viktorin <viktorin@rehivetech.com>
Acked-by: Olivier Matz <olivier.matz@6wind.com>
Acked-by: Thomas Monjalon <thomas.monjalon@6wind.com>
8 years agodoc: announce API changes for vhost refactoring
Yuanhan Liu [Wed, 6 Apr 2016 06:53:55 +0000 (14:53 +0800)]
doc: announce API changes for vhost refactoring

We currently exposed way too many fields (or even structures) than
necessary. For example, vhost_virtqueue struct should NOT be exposed
to user at all: application just need to tell the right queue id to
locate a specific queue, and that's all. Instead, the structure should
be defined in an internal header file. With that, we could do any changes
to it we want, without worrying about that we may offense the painful
ABI rules.

Similar changes could be done to virtio_net struct as well, just exposing
very few fields that are necessary and moving all others to an internal
structure.

Huawei then suggested a more radical yet much cleaner one: just exposing
a virtio_net handle to application, just like the way kernel exposes an
fd to user for locating a specific file, and exposing some new functions
to access those old fields, such as flags, virt_qp_nb.

With this change, we're likely to be free from ABI violations forever
(well, except when we have to extend the virtio_net_device_ops struct).
For example, following nice cleanup would not be a blocking one then:

    http://dpdk.org/ml/archives/dev/2016-February/033528.html

Suggested-by: Huawei Xie <huawei.xie@intel.com>
Signed-off-by: Yuanhan Liu <yuanhan.liu@linux.intel.com>
Acked-by: Panu Matilainen <pmatilai@redhat.com>
Acked-by: Thomas Monjalon <thomas.monjalon@6wind.com>
8 years agodoc: announce ABI changes for user-owned mempool caches
Lazaros Koromilas [Tue, 5 Apr 2016 09:23:08 +0000 (12:23 +0300)]
doc: announce ABI changes for user-owned mempool caches

Deprecation notice for 16.04 for changes targeting release 16.07.
The changes affect struct rte_mempool, rte_mempool_cache and the
mempool API.

Signed-off-by: Lazaros Koromilas <l@nofutznetworks.com>
Acked-by: Olivier Matz <olivier.matz@6wind.com>
Acked-by: David Hunt <david.hunt@intel.com>
8 years agomaintainers: claim responsibility for pcap PMD
Ferruh Yigit [Fri, 8 Apr 2016 17:03:28 +0000 (18:03 +0100)]
maintainers: claim responsibility for pcap PMD

Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
Acked-by: John McNamara <john.mcnamara@intel.com>
8 years agodoc: fill nics features matrix for pcap
Ferruh Yigit [Fri, 8 Apr 2016 16:39:17 +0000 (17:39 +0100)]
doc: fill nics features matrix for pcap

Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
Acked-by: John McNamara <john.mcnamara@intel.com>
8 years agodoc: add cryptodev chapter in prog guide
Declan Doherty [Fri, 8 Apr 2016 16:17:27 +0000 (17:17 +0100)]
doc: add cryptodev chapter in prog guide

Add a programmer's guide section for cryptodev library.

Signed-off-by: Declan Doherty <declan.doherty@intel.com>
Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Acked-by: John McNamara <john.mcnamara@intel.com>
8 years agodoc: add cryptodevs guide overview
Declan Doherty [Fri, 8 Apr 2016 16:17:26 +0000 (17:17 +0100)]
doc: add cryptodevs guide overview

Details supported device features and algorithms for each crypto PMD.

Signed-off-by: Declan Doherty <declan.doherty@intel.com>
Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Acked-by: John McNamara <john.mcnamara@intel.com>
8 years agoixgbe: fix packet type for VXLAN and NVGRE on X550
Wenzhuo Lu [Fri, 8 Apr 2016 08:10:24 +0000 (16:10 +0800)]
ixgbe: fix packet type for VXLAN and NVGRE on X550

VxLAN & NVGRE are supported by x550. As we know HW can parse
the packet and tell SW the type info. For VxLAN & NVGRE packets
there's some change. HW will not tell SW the info of the outer
header but the inner header instead. But we always take the
info as it's for the outer header. So the packet type info is
not right when x550 receives VxLAN & NVGRE packets.

As x550 only supports IPv4 VxLAN & NVGRE packets, we can tell
the outer header of VxLAN is IPv4 + UDP, and the outer header
of NVGRE is IPv4 only. What we don't know is if there's
optional field in the outer IPv4 header.

This patch implement the support of packet type for VxLAN &
NVGRE. And it fixes the wrong packet type issue either.

BTW:
It doesn't fix any existing commit as although it resolve an
issue it's more like a new feature but not a fix.

Reported-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
8 years agoexamples/performance-thread: restrict to x86_64
Pablo de Lara [Fri, 8 Apr 2016 16:20:15 +0000 (17:20 +0100)]
examples/performance-thread: restrict to x86_64

Performance-thread sample app is only supported for x86_64 targets,
so this commit adds a check to avoid compilation on other targets.

Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
8 years agoexamples/ipsec-secgw: fix anonymous union initialization
Pablo de Lara [Fri, 8 Apr 2016 17:01:09 +0000 (18:01 +0100)]
examples/ipsec-secgw: fix anonymous union initialization

In icc 14.0, compilation was broken:

examples/ipsec-secgw/sa.c(212): error: a designator for an anonymous
union member can only appear within braces corresponding to that anonymous union
        .cipher = { RTE_CRYPTO_CIPHER_OP_ENCRYPT, RTE_CRYPTO_CIPHER_AES_CBC,
         ^

The member in anonymous union initialization should be inside '{}',
otherwise it will report an error.

Fixes: d299106e8e31 ("examples/ipsec-secgw: add IPsec sample application")

Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
8 years agoexamples/ip_pipeline: fix 32-bit build
Jasvinder Singh [Fri, 8 Apr 2016 17:13:27 +0000 (18:13 +0100)]
examples/ip_pipeline: fix 32-bit build

error log:
ip_pipeline/pipeline/pipeline_routing_be.c:1537:
integer constant is too large for 'long' type

Fixes: 0ae7275810f1 ("examples/ip_pipeline: add more functions to routing pipeline")

Signed-off-by: Jasvinder Singh <jasvinder.singh@intel.com>
Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Acked-by: John McNamara <john.mcnamara@intel.com>
8 years agoexamples/ip_pipeline: fix size of allocated memory
Marcin Kerlin [Fri, 8 Apr 2016 13:32:24 +0000 (15:32 +0200)]
examples/ip_pipeline: fix size of allocated memory

CID 120150:
Wrong size of the allocated memory. Passing argument as size of pointer
(8UL) instead of size of structure app_pipeline_firewall_rule.

Fixes: 67ebdbef0c31 ("examples/ip_pipeline: add bulk update of firewall rules")

Signed-off-by: Marcin Kerlin <marcinx.kerlin@intel.com>
8 years agoversion: 16.04-rc4
Thomas Monjalon [Thu, 7 Apr 2016 21:42:07 +0000 (23:42 +0200)]
version: 16.04-rc4

Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
8 years agodoc: announce API change for extended stats
Harry van Haaren [Tue, 5 Apr 2016 17:58:09 +0000 (18:58 +0100)]
doc: announce API change for extended stats

This patch adds a notice that the API for the xstats
functionality will be modified in the 16.07 release, with
no backwards compatibility planned as it would require
code duplication in each PMD that supports xstats.

Signed-off-by: Harry van Haaren <harry.van.haaren@intel.com>
Acked-by: Thomas Monjalon <thomas.monjalon@6wind.com>
Acked-by: Remy Horton <remy.horton@intel.com>
Acked-by: David Harton <dharton@cisco.com>
Acked-by: Maryam Tahhan <maryam.tahhan@intel.com>
8 years agodoc: announce ABI change for pcap in pipeline port
Fan Zhang [Thu, 31 Mar 2016 13:29:11 +0000 (14:29 +0100)]
doc: announce ABI change for pcap in pipeline port

Several new fields will be added to structure rte_port_source_params for
source port enhancement with pcap file reading support.

Signed-off-by: Fan Zhang <roy.fan.zhang@intel.com>
Acked-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
Acked-by: Jasvinder Singh <jasvinder.singh@intel.com>
Acked-by: Piotr Azarewicz <piotrx.t.azarewicz@intel.com>
8 years agodoc: fix spellings
John McNamara [Thu, 7 Apr 2016 21:14:48 +0000 (22:14 +0100)]
doc: fix spellings

Fix some spelling errors and typos.

Signed-off-by: John McNamara <john.mcnamara@intel.com>
8 years agodoc: fill nics features matrix for bnx2x
Rasesh Mody [Thu, 7 Apr 2016 18:22:53 +0000 (11:22 -0700)]
doc: fill nics features matrix for bnx2x

Signed-off-by: Rasesh Mody <rasesh.mody@qlogic.com>
8 years agoscripts: test build with libsso
Thomas Monjalon [Thu, 10 Mar 2016 22:16:18 +0000 (23:16 +0100)]
scripts: test build with libsso

The SNOW3G PMD has a dependency on libsso which can be downloaded
after having passed some Intel validation about export restrictions.

Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
8 years agoscripts: add verbose test build option
Thomas Monjalon [Mon, 21 Mar 2016 19:48:22 +0000 (20:48 +0100)]
scripts: add verbose test build option

The option -v enables the verbose mode when testing a build.

Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
8 years agoscripts: hook build test config
Thomas Monjalon [Mon, 21 Mar 2016 22:14:58 +0000 (23:14 +0100)]
scripts: hook build test config

Insert a hook at the end of the config procedure, after having
adapted the configuration to the environment variables and the options
passed to the script.
It allows to better tune the automatic configuration of the build tests
in a function located in the devel config file.

Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
8 years agoscripts: allow tuning any test build option
Thomas Monjalon [Tue, 29 Mar 2016 09:53:14 +0000 (11:53 +0200)]
scripts: allow tuning any test build option

Any build option can be enabled or disabled by appending the end
of its name to the config name.
Examples:
+INTRINSICS to enable CONFIG_RTE_FORCE_INTRINSICS
~RXTX_CALLBACKS to disable CONFIG_RTE_ETHDEV_RXTX_CALLBACKS

These builtin (lowercase) options are also added for convenience:
+debug to enable every debug options
+default to set target machine as default

Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
8 years agoscripts: allow tuning build options per test target
Thomas Monjalon [Tue, 29 Mar 2016 09:04:32 +0000 (11:04 +0200)]
scripts: allow tuning build options per test target

The global variables are reloaded between each build to allow
having different config options based on DPDK_TARGET.

Some checks can now be removed from the script as they can
be done in the devel config file.

Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
8 years agoscripts: stop build test after first error
Thomas Monjalon [Tue, 8 Mar 2016 15:43:50 +0000 (16:43 +0100)]
scripts: stop build test after first error

Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
8 years agoscripts: test build of performance-thread example
Thomas Monjalon [Mon, 8 Feb 2016 13:41:00 +0000 (14:41 +0100)]
scripts: test build of performance-thread example

This example is not part of the baseline because of its
experimental state. That's why it must be tested separately.

Fixes: b700090c8cec ("examples/performance-thread: mark as experimental")

Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
8 years agoscripts: remove legacy build method test
Thomas Monjalon [Tue, 29 Mar 2016 09:51:27 +0000 (11:51 +0200)]
scripts: remove legacy build method test

Building with "make install T=" is now deprecated.
The script will test only the standard "make" command.

Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
8 years agoscripts: fix run in any directory
Thomas Monjalon [Mon, 14 Mar 2016 20:55:13 +0000 (21:55 +0100)]
scripts: fix run in any directory

The path to load-devel-config.sh must be relative to the script.

Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
8 years agomk: show version as a decimal integer
Thomas Monjalon [Tue, 22 Sep 2015 14:49:23 +0000 (16:49 +0200)]
mk: show version as a decimal integer

In order to ease packaging support of changes in DPDK build system,
introduce a decimal integer to compare version numbers.
It does not show the minor numbers as it is not meaningful for packaging.

Usage for DPDK 16.04:
% make showversionum
1604

Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
8 years agoexamples: fix draining all queues in l3fwd derivatives
Tomasz Kulasek [Thu, 7 Apr 2016 16:38:31 +0000 (18:38 +0200)]
examples: fix draining all queues in l3fwd derivatives

In l3fwd-acl and l3fwd-power not all tx ports was included in tx_port_id
array, used to periodically drain only available ports. This caused that
some packets can remain in buffer when application stops to receiving
packets or when size of burst is small.

Fixes: e2366e74e029 ("examples: use buffered Tx")

Signed-off-by: Tomasz Kulasek <tomaszx.kulasek@intel.com>
8 years agoexamples/l2fwd-crypto: fix string overflow
Pablo de Lara [Thu, 7 Apr 2016 13:23:09 +0000 (14:23 +0100)]
examples/l2fwd-crypto: fix string overflow

When parsing crypto device type, the string was being copied
with strcpy(), which could overflow the destination buffer
(which is 32 byte long), so snprintf() should be used instead.

This fixes coverity issue 124575:
/examples/l2fwd-crypto/main.c: 1005 in l2fwd_crypto_parse_args_long_options()
>>>     CID 124575:    (STRING_OVERFLOW)
>>>     You might overrun the 32 byte fixed-size string
"options->string_auth_algo" by copying "optarg" without checking the length.
1005    strcpy(options->string_auth_algo, optarg);

Fixes: 49f79e86480d ("examples/l2fwd-crypto: add missing string initialization")

Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Acked-by: Declan Doherty <declan.doherty@intel.com>
8 years agoapp/test: fix array overflow warning with gcc 4.5
Tomasz Kulasek [Thu, 7 Apr 2016 14:02:13 +0000 (16:02 +0200)]
app/test: fix array overflow warning with gcc 4.5

DPDK/app/test/test_cryptodev.c:
In function 'test_snow3g_encrypted_authentication.clone.3':
DPDK/x86_64-ivshmem-linuxapp-gcc/include/rte_memcpy.h:796:14: error:
array subscript is above array bounds

In lines like:
    rte_memcpy(sym_op->cipher.iv.data, iv, iv_len);
when "iv" is 64 bytes long array, and "iv_len" is "unsigned int",
compiler tries to evaluate also a code for array size larger than 255 bytes
long and reports error "array subscript is above array bounds" in line:
rte_memcpy.h:796
    rte_mov128((uint8_t *)dst + 128, (const uint8_t *)src + 128);
caused by evaluation to:
    rte_mov128((uint8_t *)sym_op->cipher.iv.data + 128, (const uint8_t *)iv
+ 128);
where "iv" is 64 bytes long buffer and "iv + 128" point out of it, gcc 4.5.

Using uint8_t as a size of copied block prevents to evaluate in rte_memcpy
code for length bigger than 255, causing the problem.

Fixes: 8bdf665fe6c0 ("app/test: add SNOW 3G")

Signed-off-by: Tomasz Kulasek <tomaszx.kulasek@intel.com>
Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
8 years agokni: fix possible deadlock
Ferruh Yigit [Thu, 7 Apr 2016 15:55:17 +0000 (16:55 +0100)]
kni: fix possible deadlock

netif_rx() should be used in interrupt context. Replace it with
netif_rx_ni() which is safe to use in process context.

Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
8 years agovhost: enable guest notification only on enabled queues
Rich Lane [Thu, 7 Apr 2016 00:29:06 +0000 (17:29 -0700)]
vhost: enable guest notification only on enabled queues

If the vhost PMD were configured with more queues than the guest, the old
code would segfault in rte_vhost_enable_guest_notification due to a NULL
virtqueue pointer.

Fixes: ee584e9710b9 ("vhost: add driver on top of the library")

Signed-off-by: Rich Lane <rich.lane@bigswitch.com>
Tested-by: Ciara Loftus <ciara.loftus@intel.com>
Acked-by: Yuanhan Liu <yuanhan.liu@linux.intel.com>
8 years agoivshmem: avoid infinite loop when concatenating segments
Anatoly Burakov [Thu, 7 Apr 2016 11:00:00 +0000 (12:00 +0100)]
ivshmem: avoid infinite loop when concatenating segments

This patch aligns the logic used to check for the presence of
adjacent segments in has_adjacent_segments() with the logic used
in cleanup_segments() when actually deciding to concatenate or
not a pair of segments. Additionally, adjacent segments are
no longer considered overlapping to avoid generating errors for
segments that can happily coexist together.

This fixes an infinite loop that happened when segments where
adjacent in their physical or virtual addresses but not in their
ioremap addresses: has_adjacent_segments() reported the presence
of adjacent segments while cleanup_segments() was not considering
them for concatenation, resulting in an infinite loop since the
result of has_adjacent_segments() is used in the decision to
continue looping in cleanup_segments().

Signed-off-by: David Verbeiren <david.verbeiren@intel.com>
Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
8 years agoethdev: fix unchecked return value
Slawomir Mrozowicz [Thu, 7 Apr 2016 11:46:32 +0000 (13:46 +0200)]
ethdev: fix unchecked return value

It fix coverity issue:
CID 124557 (#1 of 1): Unchecked return value (CHECKED_RETURN)
check_return: Calling rte_eth_tx_buffer_set_err_callback without
checking return value (as is done elsewhere 6 out of 7 times).

Fixes: d6c99e62c852 ("ethdev: add buffered Tx")

Signed-off-by: Slawomir Mrozowicz <slawomirx.mrozowicz@intel.com>
8 years agodoc: fix release notes for 16.04
John McNamara [Thu, 7 Apr 2016 16:02:33 +0000 (17:02 +0100)]
doc: fix release notes for 16.04

Fix grammar, spelling and formatting of DPDK 16.04 release notes.

Signed-off-by: John McNamara <john.mcnamara@intel.com>
8 years agodoc: add l2fwd-crypto sample app guide
Pablo de Lara [Thu, 7 Apr 2016 14:49:52 +0000 (15:49 +0100)]
doc: add l2fwd-crypto sample app guide

Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Acked-by: Declan Doherty <declan.doherty@intel.com>