dpdk.git
8 years agoi40e: fix base driver allocation when not using first numa node
David Marchand [Thu, 3 Sep 2015 13:23:30 +0000 (15:23 +0200)]
i40e: fix base driver allocation when not using first numa node

Seen by code review.

If dpdk is run with memory only available on a non-0 socket, then i40e pmd
refuses to initialize ports as this pmd requires some memory on socket 0.
Fix this by setting socket to SOCKET_ID_ANY, so that allocations happen on
the caller socket.

Signed-off-by: David Marchand <david.marchand@6wind.com>
Acked-by: Helin Zhang <helin.zhang@intel.com>
8 years agoixgbe: remove burst size restriction of vector Rx
Cunming Liang [Tue, 4 Aug 2015 11:47:12 +0000 (19:47 +0800)]
ixgbe: remove burst size restriction of vector Rx

On receive side, the burst size now floor aligns to RTE_IXGBE_DESCS_PER_LOOP
power of 2. According to this rule, the burst size less than 4 still won't
receive anything.
(Before this change, the burst size less than 32 can't receive anything.)
_recv_*_pkts_vec returns no more than 32(RTE_IXGBE_RXQ_REARM_THRESH) packets.

On transmit side, the max burst size no longer bind with a constant, however
it still requires to check the cross tx_rs_thresh violation.

There's no obvious performance drop found on both recv_pkts_vec
and recv_scattered_pkts_vec on burst size 32.

Signed-off-by: Cunming Liang <cunming.liang@intel.com>
Reviewed-by: Zoltan Kiss <zoltan.kiss@linaro.org>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
8 years agoixgbe: fix X550 DCB
Wenzhuo Lu [Wed, 26 Aug 2015 07:11:09 +0000 (15:11 +0800)]
ixgbe: fix X550 DCB

There's a DCB issue on x550. For 8 TCs, if a packet with user priority 6
or 7 is injected to the NIC, then the NIC will put 3 packets into the
queue. There's also a similar issue for 4 TCs.
The root cause is RXPBSIZE is not right. RXPBSIZE of x550 is 384. It's
different from other 10G NICs. We need to set the RXPBSIZE according to
the NIC type.

Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
Acked-by: Jingjing Wu <jingjing.wu@intel.com>
8 years agohash: fix memory allocation of cuckoo key table
Pablo de Lara [Mon, 31 Aug 2015 13:30:03 +0000 (14:30 +0100)]
hash: fix memory allocation of cuckoo key table

When calculating the size for the table which allocates
the keys, size was calculated wrongly from multiplying
two 32-bit variables, resulting on a 32-bit number,
before casting to 64-bit, so maximum size was 4G.

Fixes: 48a399119619 ("hash: replace with cuckoo hash implementation")

Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
8 years agoeal/linux: fix epoll timeout
Robert Sanford [Tue, 18 Aug 2015 15:53:54 +0000 (11:53 -0400)]
eal/linux: fix epoll timeout

Function rte_epoll_wait should return when underlying call
to epoll_wait times out.

Signed-off-by: Robert Sanford <rsanford@akamai.com>
Acked-by: Cunming Liang <cunming.liang@intel.com>
8 years agoapp/test: replace x86 fence by multi arch function
Jerin Jacob [Sun, 30 Aug 2015 08:55:22 +0000 (14:25 +0530)]
app/test: replace x86 fence by multi arch function

Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
8 years agoapp/test: fix needless build dependency on x86
Jerin Jacob [Tue, 18 Aug 2015 12:40:04 +0000 (18:10 +0530)]
app/test: fix needless build dependency on x86

Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
8 years agosched: remove unused inclusion of intrinsics
Jerin Jacob [Sun, 30 Aug 2015 08:55:20 +0000 (14:25 +0530)]
sched: remove unused inclusion of intrinsics

SSSE3 intrinsics not used in rte_bitmap.h

Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
8 years agodoc: fix ethertype filter example in testpmd guide
Pablo de Lara [Wed, 26 Aug 2015 07:43:09 +0000 (08:43 +0100)]
doc: fix ethertype filter example in testpmd guide

The two examples of ethertype_filter in testpmd documentation
were missing the mac address field, so the example was incorrect.

Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
8 years agoversion: 2.2.0-rc0
Thomas Monjalon [Wed, 2 Sep 2015 13:18:57 +0000 (15:18 +0200)]
version: 2.2.0-rc0

Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
8 years agohash: remove deprecated function and macros
Pablo de Lara [Fri, 4 Sep 2015 09:05:40 +0000 (10:05 +0100)]
hash: remove deprecated function and macros

The function rte_jhash2() was renamed rte_jhash_32b and
macros RTE_HASH_KEY_LENGTH_MAX and RTE_HASH_BUCKET_ENTRIES_MAX
were tagged as deprecated, so they can be removed in 2.2.

RTE_HASH_KEY_LENGTH is replaced in unit tests by an internal macro
for the memory allocation of all keys used.

The library version number is incremented.

Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
8 years agoenic: use appropriate key length in hash table
Pablo de Lara [Fri, 4 Sep 2015 09:05:41 +0000 (10:05 +0100)]
enic: use appropriate key length in hash table

RTE_HASH_KEY_LENGTH_MAX was deprecated, and the hash table
actually is hosting bigger keys than that size, so key length
has been increased to properly allocate all keys.

Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Acked-by: Sujith Sankar <ssujith@cisco.com>
8 years agoring: remove deprecated functions
Stephen Hemminger [Mon, 15 Jun 2015 16:51:11 +0000 (09:51 -0700)]
ring: remove deprecated functions

These were deprecated in 2.0 so remove them from 2.2.
The library version is incremented.

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
Acked-by: Neil Horman <nhorman@tuxdriver.com>
8 years agokni: remove deprecated functions
Stephen Hemminger [Mon, 15 Jun 2015 16:51:12 +0000 (09:51 -0700)]
kni: remove deprecated functions

These functions were tagged as deprecated in 2.0 so they can be
removed in 2.2.
The library version is incremented.

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Helin Zhang <helin.zhang@intel.com>
[Thomas: update doc and version]
Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
Acked-by: Neil Horman <nhorman@tuxdriver.com>
8 years agoacl: remove old API
Thomas Monjalon [Tue, 1 Sep 2015 14:57:31 +0000 (16:57 +0200)]
acl: remove old API

The functions and structures are moved to app/test in order to keep
existing unit tests. Some minor changes were done in these functions
because of library scope restrictions.
An enum is also copied in two other applications to keep existing code.
The library version is incremented.

Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
Acked-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Neil Horman <nhorman@tuxdriver.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
8 years agolpm: remove deprecated field
Thomas Monjalon [Tue, 1 Sep 2015 13:41:05 +0000 (15:41 +0200)]
lpm: remove deprecated field

The library version is incremented.

Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
Acked-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Neil Horman <nhorman@tuxdriver.com>
8 years agomem: remove dummy malloc library
Thomas Monjalon [Tue, 1 Sep 2015 13:29:37 +0000 (15:29 +0200)]
mem: remove dummy malloc library

The malloc library is now part of the EAL.

Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
Acked-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Neil Horman <nhorman@tuxdriver.com>
8 years agoeal: remove deprecated function
Thomas Monjalon [Tue, 1 Sep 2015 12:58:16 +0000 (14:58 +0200)]
eal: remove deprecated function

The function rte_eal_pci_close_one() was renamed rte_eal_pci_detach().

Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
Acked-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Neil Horman <nhorman@tuxdriver.com>
Acked-by: David Marchand <david.marchand@6wind.com>
8 years agoethdev: remove SCTP flow entries switch
Thomas Monjalon [Mon, 31 Aug 2015 15:18:22 +0000 (17:18 +0200)]
ethdev: remove SCTP flow entries switch

The extended SCTP flow entries are now part of the standard API.

Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
Acked-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Neil Horman <nhorman@tuxdriver.com>
8 years agombuf: remove packet type from offload flags
Thomas Monjalon [Mon, 31 Aug 2015 14:51:21 +0000 (16:51 +0200)]
mbuf: remove packet type from offload flags

The extended unified packet type is now part of the standard ABI.
As mbuf struct is changed, the mbuf library version is incremented.

Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
Acked-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Neil Horman <nhorman@tuxdriver.com>
8 years agoethdev: remove Rx interrupt switch
Thomas Monjalon [Wed, 26 Aug 2015 09:18:53 +0000 (11:18 +0200)]
ethdev: remove Rx interrupt switch

The Rx interrupt feature is now part of the standard ABI.
Because of changes in rte_intr_handle and struct rte_eth_conf,
the eal and ethdev library versions are incremented.

Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
Acked-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Neil Horman <nhorman@tuxdriver.com>
8 years agodoc: init next release notes
Thomas Monjalon [Wed, 2 Sep 2015 07:59:58 +0000 (09:59 +0200)]
doc: init next release notes

Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
Acked-by: John McNamara <john.mcnamara@intel.com>
8 years agoversion: 2.1.0
Thomas Monjalon [Tue, 11 Aug 2015 22:56:05 +0000 (00:56 +0200)]
version: 2.1.0

Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
8 years agodoc: add mlx4 release notes for version 2.1
Adrien Mazarguil [Tue, 11 Aug 2015 14:42:45 +0000 (16:42 +0200)]
doc: add mlx4 release notes for version 2.1

Signed-off-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
[Thomas: merged with new release notes style]
Acked-by: John McNamara <john.mcnamara@intel.com>
8 years agodoc: add missing release notes for mlx4 availability in 2.0
Adrien Mazarguil [Tue, 11 Aug 2015 14:42:44 +0000 (16:42 +0200)]
doc: add missing release notes for mlx4 availability in 2.0

Signed-off-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
Acked-by: John McNamara <john.mcnamara@intel.com>
8 years agodoc: update release notes for version 2.1
John McNamara [Thu, 13 Aug 2015 11:04:43 +0000 (12:04 +0100)]
doc: update release notes for version 2.1

Added release notes for the DPDK R2.1 release.

Signed-off-by: John McNamara <john.mcnamara@intel.com>
[Thomas: small fixes]
Acked-by: Thomas Monjalon <thomas.monjalon@6wind.com>
8 years agoapp/test: initialize table parameters
Pablo de Lara [Mon, 17 Aug 2015 16:58:32 +0000 (17:58 +0100)]
app/test: initialize table parameters

In table_autotest, the structures containing the parameters
to create the tables were not initialized, and therefore,
some checks could fail and so the unit test.

Also, due to this initialization, one of the tests that was
checking if the table was improperly initialized has been
removed, as it is not needed anymore (duplicated)

Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
8 years agoapp/test: fix table alignment check
Maciej Gajdzica [Wed, 12 Aug 2015 12:41:27 +0000 (14:41 +0200)]
app/test: fix table alignment check

In commit: 1129992baa61d72c5 checking for offset alignment was removed.
Unit tests wasn't updated to reflect that change. This patch changes
checks with unaligned offsets to make tests pass.

Fixes: 1129992baa61 ("port: fix unaligned access to metadata")

Signed-off-by: Maciej Gajdzica <maciejx.t.gajdzica@intel.com>
Acked-by: Daniel Mrzyglod <danielx.t.mrzyglod@intel.com>
8 years agoeal: fix C++ app build
Joongi Kim [Fri, 3 Jul 2015 12:51:03 +0000 (21:51 +0900)]
eal: fix C++ app build

 * Forward declaration of enum in C++ requires explicit underlying
   type definitions.

 * This fixes the issue at:
   http://dpdk.org/ml/archives/dev/2015-April/017065.html

include/generic/rte_cpuflags.h:50:6:
error: use of enum ‘rte_cpu_flag_t’ without previous declaration
 enum rte_cpu_flag_t;

include/generic/rte_cpuflags.h:55:6:
error: use of enum ‘cpu_register_t’ without previous declaration
 enum cpu_register_t;

Signed-off-by: Joongi Kim <joongi@an.kaist.ac.kr>
[Thomas: fix extended to ppc and tile]

8 years agomempool: fix explicit cast to build C++ app
Sergey Balabanov [Wed, 12 Aug 2015 09:11:04 +0000 (12:11 +0300)]
mempool: fix explicit cast to build C++ app

When DPDK is being compiled in C++ project using g++ then
'invalid conversion from' error appears. Added explicit
typecast on function return to get rid of the error.

Fixes: 6cf14ce4ce6c ("mempool: silence warning on pointer arithmetic")

Signed-off-by: Sergey Balabanov <balabanovsv@ecotelecom.ru>
Acked-by: Olivier Matz <olivier.matz@6wind.com>
8 years agombuf: fix explicit cast to build C++ app
Sergey Balabanov [Wed, 12 Aug 2015 09:11:04 +0000 (12:11 +0300)]
mbuf: fix explicit cast to build C++ app

When DPDK is being compiled in C++ project using g++ then
'invalid conversion from' error appears. Added explicit
typecast on function return to get rid of the error.

Fixes: 7755baae8378 ("mbuf: silence warning on pointer arithmetic")

Signed-off-by: Sergey Balabanov <balabanovsv@ecotelecom.ru>
Acked-by: Olivier Matz <olivier.matz@6wind.com>
8 years agodoc: announce removal of LPM memory location
Thomas Monjalon [Mon, 17 Aug 2015 14:37:56 +0000 (16:37 +0200)]
doc: announce removal of LPM memory location

This field is deprecated for a long time and should be removed.

Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
8 years agodoc: announce removal of jhash2 function
Thomas Monjalon [Mon, 17 Aug 2015 14:32:04 +0000 (16:32 +0200)]
doc: announce removal of jhash2 function

Fixes: 7530c9eea7d9 ("hash: rename a jhash function")

Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
8 years agodoc: announce ring PMD functions removal
Thomas Monjalon [Sun, 16 Aug 2015 22:40:43 +0000 (00:40 +0200)]
doc: announce ring PMD functions removal

These functions are marked as deprecated for a long time:
61934c0956d4 ("ring: convert to use of PMD_REGISTER_DRIVER and fix linking")
As suggested in this patch, it should be removed:
http://dpdk.org/ml/archives/dev/2015-June/019253.html

Suggested-by: Stephen Hemminger <stephen@networkplumber.org>
Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
8 years agodoc: announce removal of kni functions using port id
Thomas Monjalon [Sun, 16 Aug 2015 22:26:09 +0000 (00:26 +0200)]
doc: announce removal of kni functions using port id

These functions are marked as deprecated for a long time:
fbf895d44cfe ("kni: identify device by name")
As suggested in this patch, it should be removed:
http://dpdk.org/ml/archives/dev/2015-June/019254.html

Suggested-by: Stephen Hemminger <stephen@networkplumber.org>
Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
8 years agodoc: announce legacy 7-tuple acl rule removal
Thomas Monjalon [Sun, 16 Aug 2015 21:55:18 +0000 (23:55 +0200)]
doc: announce legacy 7-tuple acl rule removal

These functions are marked as deprecated for a long time.
As suggested in this patch, it should be removed:
http://dpdk.org/ml/archives/dev/2015-June/019255.html

Suggested-by: Stephen Hemminger <stephen@networkplumber.org>
Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
8 years agodoc: announce ABI change for pipeline library
Cristian Dumitrescu [Thu, 16 Jul 2015 17:07:47 +0000 (18:07 +0100)]
doc: announce ABI change for pipeline library

Signed-off-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
Acked-by: Maciej Gajdzica <maciejx.t.gajdzica@intel.com>
Acked-by: Daniel Mrzyglod <danielx.t.mrzyglod@intel.com>
Acked-by: Jasvinder Singh <jasvinder.singh@intel.com>
8 years agodoc: announce ABI change for table library
Cristian Dumitrescu [Thu, 23 Jul 2015 10:59:49 +0000 (11:59 +0100)]
doc: announce ABI change for table library

Signed-off-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
Acked-by: Jasvinder Singh <jasvinder.singh@intel.com>
Acked-by: Daniel Mrzyglod <danielx.t.mrzyglod@intel.com>
Acked-by: Maciej Gajdzica <maciejx.t.gajdzica@intel.com>
8 years agodoc: announce ABI change for port library
Cristian Dumitrescu [Thu, 16 Jul 2015 15:27:02 +0000 (16:27 +0100)]
doc: announce ABI change for port library

Signed-off-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
Acked-by: Jasvinder Singh <jasvinder.singh@intel.com>
Acked-by: Maciej Gajdzica <maciejx.t.gajdzica@intel.com>
Acked-by: Daniel Mrzyglod <danielx.t.mrzyglod@intel.com>
8 years agodoc: announce ABI change for config file library
Cristian Dumitrescu [Thu, 16 Jul 2015 11:36:30 +0000 (12:36 +0100)]
doc: announce ABI change for config file library

Signed-off-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
Acked-by: Maciej Gajdzica <maciejx.t.gajdzica@intel.com>
Acked-by: Daniel Mrzyglod <danielx.t.mrzyglod@intel.com>
Acked-by: Jasvinder Singh <jasvinder.singh@intel.com>
8 years agodoc: announce ABI change for hierarchical scheduler
Stephen Hemminger [Thu, 16 Jul 2015 21:21:39 +0000 (14:21 -0700)]
doc: announce ABI change for hierarchical scheduler

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
Acked-by: Neil Horman <nhorman@tuxdriver.com>
8 years agodoc: announce ABI changes for vhost-user multiple queues
Ouyang Changchun [Tue, 16 Jun 2015 01:38:43 +0000 (09:38 +0800)]
doc: announce ABI changes for vhost-user multiple queues

It announces the planned ABI changes for vhost-user multiple
queues feature on v2.2.

Signed-off-by: Changchun Ouyang <changchun.ouyang@intel.com>
Acked-by: Neil Horman <nhorman@tuxdriver.com>
8 years agodoc: announce ABI changes for new flow director modes
Wenzhuo Lu [Fri, 10 Jul 2015 02:24:27 +0000 (10:24 +0800)]
doc: announce ABI changes for new flow director modes

For x550 supports 2 new flow director modes, MAC VLAN and Cloud.
The MAC VLAN mode means the MAC and VLAN are monitored.
The Cloud mode is for VxLAN and NVGRE, and the tunnel type,
TNI/VNI, inner MAC and inner VLAN are monitored.
So, there're a few new lookup fields for these 2 new modes, like MAC,
tunnel type, TNI/VNI.
We have to change the ABI to support these new lookup fields.

Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
Acked-by: John McNamara <john.mcnamara@intel.com>
8 years agodoc: announce ABI change for SCTP flow director
Jingjing Wu [Mon, 20 Jul 2015 07:03:37 +0000 (15:03 +0800)]
doc: announce ABI change for SCTP flow director

To fix the FVL's flow director issue for SCTP flow, rte_eth_fdir_filter
need to be change to support SCTP flow keys extension. Here announce
the ABI deprecation.

Signed-off-by: Jingjing Wu <jingjing.wu@intel.com>
Acked-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
Acked-by: Cunming Liang <cunming.liang@intel.com>
Acked-by: John McNamara <john.mcnamara@intel.com>
8 years agodoc: announce ABI change for flow director in VF
Jingjing Wu [Wed, 17 Jun 2015 03:36:33 +0000 (11:36 +0800)]
doc: announce ABI change for flow director in VF

It announces the planned ABI change to support flow director filtering
in VF on v2.2.

Signed-off-by: Jingjing Wu <jingjing.wu@intel.com>
8 years agodoc: announce old flow director API removal
Jingjing Wu [Tue, 11 Aug 2015 02:12:04 +0000 (10:12 +0800)]
doc: announce old flow director API removal

APIs for flow director filters has been replaced by rte_eth_dev_filter_ctrl
by previous releases. Enic, ixgbe and i40e are switched to support filter_ctrl
APIs, so the old APIs are useless, and ready to be removed now.
This patch announces the ABI change for these APIs removing.

Signed-off-by: Jingjing Wu <jingjing.wu@intel.com>
Acked-by: Helin Zhang <helin.zhang@intel.com>
Acked-by: Jijiang Liu <jijiang.liu@intel.com>
Acked-by: Thomas Monjalon <thomas.monjalon@6wind.com>
8 years agodoc: announce ABI change for interrupt mode
Cunming Liang [Thu, 30 Jul 2015 05:04:53 +0000 (13:04 +0800)]
doc: announce ABI change for interrupt mode

The patch announces the planned ABI changes for interrupt mode.

Signed-off-by: Cunming Liang <cunming.liang@intel.com>
Acked-by: Marvin Liu <yong.liu@intel.com>
Acked-by: Shaopeng He <shaopeng.he@intel.com>
Acked-by: Helin Zhang <helin.zhang@intel.com>
8 years agodoc: simplify release notes cover
Thomas Monjalon [Tue, 11 Aug 2015 22:50:21 +0000 (00:50 +0200)]
doc: simplify release notes cover

One hierarchical level is enough for this table of content.

Use generated release number.

Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
Acked-by: John McNamara <john.mcnamara@intel.com>
8 years agodoc: update ip pipeline app guide
Cristian Dumitrescu [Tue, 11 Aug 2015 16:47:08 +0000 (17:47 +0100)]
doc: update ip pipeline app guide

Added more extensive documentation for ip_pipeline application.

Signed-off-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
Acked-by: Jasvinder Singh <jasvinder.singh@intel.com>
Acked-by: Piotr Azarewicz <piotrx.t.azarewicz@intel.com>
Acked-by: John McNamara <john.mcnamara@intel.com>
[Thomas: keep in doc/guides/sample_app_ug/ directory]

8 years agodoc: add missing API headers
Thomas Monjalon [Tue, 11 Aug 2015 16:09:44 +0000 (18:09 +0200)]
doc: add missing API headers

Some libraries were not included in doxygen documentation.
Other ones were included but not listed in the index.

The malloc library is now included in EAL.

The libraries compat and jobstats are added but not doxygen compliant.

Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
8 years agodoc: restructure release notes
John McNamara [Tue, 11 Aug 2015 11:57:42 +0000 (12:57 +0100)]
doc: restructure release notes

Restructured the Release Notes documentation into a more useful structure
that is easier to use and to update between releases.

The main changes are:

  * Each release version has it's own section with New Features,
    Resolved Issues, Known Issues and API/ABI Changes.
  * Redundant sections have been removed.

Signed-off-by: John McNamara <john.mcnamara@intel.com>
8 years agodoc: remove old API changes
John McNamara [Tue, 11 Aug 2015 11:57:42 +0000 (12:57 +0100)]
doc: remove old API changes

Each release version will have its own section for API/ABI Changes.

Signed-off-by: John McNamara <john.mcnamara@intel.com>
8 years agodoc: remove old solved issues
John McNamara [Tue, 11 Aug 2015 11:57:42 +0000 (12:57 +0100)]
doc: remove old solved issues

Each release version will have its own Resolved Issues section.

Signed-off-by: John McNamara <john.mcnamara@intel.com>
8 years agodoc: convert known issues to definition lists
John McNamara [Tue, 11 Aug 2015 11:57:42 +0000 (12:57 +0100)]
doc: convert known issues to definition lists

The Known Issues tables have been changed to definition lists.

Signed-off-by: John McNamara <john.mcnamara@intel.com>
8 years agodoc: move FAQ
John McNamara [Tue, 11 Aug 2015 11:57:42 +0000 (12:57 +0100)]
doc: move FAQ

The FAQ section have been moved to a standalone document.

Signed-off-by: John McNamara <john.mcnamara@intel.com>
8 years agodoc: rename guidelines for contributors
Thomas Monjalon [Tue, 11 Aug 2015 12:49:52 +0000 (14:49 +0200)]
doc: rename guidelines for contributors

Clarify target of guidelines by renaming the title and the directory.

Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
Acked-by: John McNamara <john.mcnamara@intel.com>
8 years agodoc: move doxygen section to the doc guidelines
John McNamara [Fri, 10 Jul 2015 15:45:21 +0000 (16:45 +0100)]
doc: move doxygen section to the doc guidelines

Moved and refactored the Doxygen guidelines from the Coding Style doc
to the Documentation Guidelines doc. Replaced the existing Doxygen
references with links.

Signed-off-by: John McNamara <john.mcnamara@intel.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
8 years agodoc: add documentation guidelines
John McNamara [Fri, 10 Jul 2015 15:45:20 +0000 (16:45 +0100)]
doc: add documentation guidelines

Added guidelines on the purpose and structure of the DPDK
documentation, how to build it and guidelines for creating it.

Signed-off-by: John McNamara <john.mcnamara@intel.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
8 years agodoc: reset the default sphinx literal block format
John McNamara [Fri, 10 Jul 2015 15:45:19 +0000 (16:45 +0100)]
doc: reset the default sphinx literal block format

Set the default literal block format for Sphinx docs
to 'none' instead of the implicit default of 'python'.

This means that default :: blocks won't have any
highlighting applied. Explicit highlighting via
the code-block:: directive is already available and
in use in the docs.

Signed-off-by: John McNamara <john.mcnamara@intel.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
8 years agoexamples/vm_power: fix physical core mask
Marvin Liu [Tue, 11 Aug 2015 06:49:23 +0000 (14:49 +0800)]
examples/vm_power: fix physical core mask

Host cpu mapping structure can only support 64 cpus. When run vm_power sample
on platform with more than 64 cpus, will generate improper physical core mask.
After limited supported host cpus to 64 will fix this issue.

Fixes: e9f64db94637 ("examples/vm_power: show warning when more than 64 cores")

Signed-off-by: Marvin Liu <yong.liu@intel.com>
8 years agoversion: 2.1.0-rc4
Thomas Monjalon [Mon, 10 Aug 2015 22:35:04 +0000 (00:35 +0200)]
version: 2.1.0-rc4

Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
8 years agodrivers: add warning note to base dirs
John McNamara [Wed, 10 Jun 2015 17:08:47 +0000 (18:08 +0100)]
drivers: add warning note to base dirs

This patch adds a note to the README files in the
drivers/net/pmd/base dirs to highlight that the code should not
be modifed by the user apart from the pmd_osdep.[ch] files.

Signed-off-by: John McNamara <john.mcnamara@intel.com>
8 years agodoc: add a prog guide note about driver base dirs
John McNamara [Wed, 10 Jun 2015 17:08:46 +0000 (18:08 +0100)]
doc: add a prog guide note about driver base dirs

This patch updates the "Source Organisation" section of the
Programmers Guide to add an note that the code in the
drivers/net/pmd/base directories should not be modifed
by the user apart from the pmd_osdep.[ch] files.

Also fixes some grammar and rst issues in that section.

Signed-off-by: John McNamara <john.mcnamara@intel.com>
8 years agodoc: add Rx interrupt in prog guide
Cunming Liang [Thu, 6 Aug 2015 02:19:10 +0000 (10:19 +0800)]
doc: add Rx interrupt in prog guide

The patch updates the env_abstraction_layer.rst part in prog_guide.
It adds the RX interrupt event declaration and revises the others in
interrupt event section.

Signed-off-by: Cunming Liang <cunming.liang@intel.com>
Acked-by: Danny Zhou <danny.zhou@intel.com>
8 years agoexamples/vm_power: show warning when more than 64 cores
Pablo de Lara [Thu, 6 Aug 2015 11:07:41 +0000 (12:07 +0100)]
examples/vm_power: show warning when more than 64 cores

When using VM power manager app on systems with more than 64 cores,
app could not run even though user does not use cores 64 or higher.
The problem happens only in that case, in which case it will result
in an undefined behaviour.

Thefere, this patch allows the user to run the app on a system with more
than 64 cores, warning the user not to use cores higher than 64 in the VM(s).

Add new known issue where VM power manager app may not work
in a system with more than 64 cores, in release notes.

Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Tested-by: Marvin Liu <yong.liu@intel.com>
Acked-by: Sergio Gonzalez Monroy <sergio.gonzalez.monroy@intel.com>
8 years agoexamples/l3fwd: fix build with exact-match enabled
Pablo de Lara [Sun, 9 Aug 2015 10:28:45 +0000 (11:28 +0100)]
examples/l3fwd: fix build with exact-match enabled

L3fwd was trying to use an inexistent function "simple_ipv6_fwd_4pkts",
instead it should be "simple_ipv6_fwd_8pkts", and "simple_ipv8_fwd_4pkts"
instead of "simple_ipv4_fwd_8pkts".

clang reports some unused functions, used only for LPM lookup:
examples/l3fwd/main.c:545:1: error: unused function 'send_packetsx4'
examples/l3fwd/main.c:1165:1: error: unused function 'rfc1812_process'

Fixes: 80fcb4d4 ("examples/l3fwd: increase lookup burst size to 8")

Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Acked-by: Sergio Gonzalez Monroy <sergio.gonzalez.monroy@intel.com>
[Thomas: more #if to fix clang warnings]
Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
8 years agoexamples/kni: fix crash on exit
Hyun Yoo [Wed, 5 Aug 2015 21:58:04 +0000 (14:58 -0700)]
examples/kni: fix crash on exit

In kni_free_kni(), p[i] should be p[port_id].

Signed-off-by: Hyun Yoo <easetheworld@gmail.com>
Acked-by: Helin Zhang <helin.zhang@intel.com>
8 years agoapp/test: fix bonding mode 5 Tx check
Michal Jastrzebski [Fri, 7 Aug 2015 12:15:31 +0000 (14:15 +0200)]
app/test: fix bonding mode 5 Tx check

Test failed on verification if number of bytes
transmitted on each slave is not less than 90%
and greater than 110% of mean value of bytes transmitted
thru one slave. This was verified on a real system
but is difficult to achieve using virtualpmd.
That's why for unit tests only, it is sufficient to verify that with
high load (2 seconds transmission) all slaves are transmitting
so the traffic is balanced.

Fixes: 0c8396e6d786 ("bond: unit tests for mode 5")

Signed-off-by: Michal Jastrzebski <michalx.k.jastrzebski@intel.com>
8 years agobonding: fix device initialisation error handling
Bernard Iremonger [Wed, 5 Aug 2015 14:04:03 +0000 (15:04 +0100)]
bonding: fix device initialisation error handling

If the name parameter to rte_eth_bond_create() was NULL,
there was a segmentation fault because eth_dev was also NULL.
Add error handling of mac_addrs memory allocation.
Add call to rte_eth_dev_release_port() in error handling.

Signed-off-by: Bernard Iremonger <bernard.iremonger@intel.com>
Tested-by: Marvin Liu <yong.liu@intel.com>
Acked-by: Michal Jastrzebski <michalx.k.jastrzebski@intel.com>
8 years agobonding: fix socket id for LACP slave
Sergey Balabanov [Fri, 7 Aug 2015 09:33:18 +0000 (12:33 +0300)]
bonding: fix socket id for LACP slave

On slave activation in LACP (8023AD) SOCKET_ANY_ID (which is -1)
is being casted to unsigned char and then to signed int.
The result is that socket_id has value of 255, not -1.
This results to memory allocation failure.

Fixes: 46fb43683679 ("bond: add mode 4")

Signed-off-by: Sergey Balabanov <balabanovsv@ecotelecom.ru>
Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
8 years agoi40e: remove unlikely prediction in Tx
Jijiang Liu [Tue, 4 Aug 2015 07:57:11 +0000 (15:57 +0800)]
i40e: remove unlikely prediction in Tx

The i40e_xmit_pkts() is called, which often means HW offload is used here,
so we had better remove 'unlikely' check for checksum offload.

Signed-off-by: Jijiang Liu <jijiang.liu@intel.com>
Acked-by: Marvin Liu <yong.liu@intel.com>
8 years agoethdev: fix illegal port access
Tetsuya Mukawa [Fri, 7 Aug 2015 09:21:26 +0000 (18:21 +0900)]
ethdev: fix illegal port access

To obtain detachable flag, pci_drv is accessed in rte_eth_dev_is_detachable().
But pci_drv is only valid if port is enabled. Not to cause illegal access,
add rte_eth_dev_is_valid_port() before accessing.

Signed-off-by: Tetsuya Mukawa <mukawa@igel.co.jp>
Acked-by: Bernard Iremonger <bernard.iremonger@intel.com>
8 years agomem: fix ivshmem freeing
Sergio Gonzalez Monroy [Fri, 7 Aug 2015 15:27:33 +0000 (16:27 +0100)]
mem: fix ivshmem freeing

There is no sync between host and guest to allow removal of memzones,
and freeing them result in undefined behavior.

In the guest, we identify IVSHMEM memsegs/memzones by having
ioremap_addr != 0. In the host, nothing is done to the memzone, meaning
ioremap_addr == 0.

As a solution, mark memzones being added to IVSHMEM in the host, by
setting ioremap_addr, then return an error whenever we try to free an
IVSHMEM memzone.

Fixes: ff909fe21f0 ("mem: introduce memzone freeing")

Signed-off-by: Sergio Gonzalez Monroy <sergio.gonzalez.monroy@intel.com>
8 years agomem: fix ivshmem in malloc heap
Sergio Gonzalez Monroy [Fri, 7 Aug 2015 15:27:32 +0000 (16:27 +0100)]
mem: fix ivshmem in malloc heap

After the changes introduced by Dynamic Memzones, all the memsegs were
added to the malloc heap during init.

Those changes did not account for IVSHMEM memsegs which should not be
added to the malloc heap as part of available memory.

Fixes: fafcc11985a2 ("mem: rework memzone to be allocated by malloc")

Signed-off-by: Sergio Gonzalez Monroy <sergio.gonzalez.monroy@intel.com>
8 years agoeal/ppc: fix build
Thomas Monjalon [Wed, 5 Aug 2015 08:53:00 +0000 (10:53 +0200)]
eal/ppc: fix build

Byte ordering macros were used without including the needed header.

Fixes: ce10b21bf624 ("eal/ppc: fix cpu cycle count for little endian")

Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
Acked-by: Chao Zhu <chaozhu@linux.vnet.ibm.com>
8 years agopci: fix bsd build with gcc
Thomas Monjalon [Tue, 4 Aug 2015 14:19:43 +0000 (16:19 +0200)]
pci: fix bsd build with gcc

GCC 4.8 raises this error:
lib/librte_eal/bsdapp/eal/eal_pci.c:453:15: error: cast discards
'__attribute__((const))' qualifier from pointer target type
   .pi_data = *(u_int32_t *)buf,
               ^

Note: this assignment seems useless because pi_data is filled
with memset later.

Fixes: 632b2d1deeed ("eal: provide functions to access PCI config")

Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
8 years agoversion: 2.1.0-rc3
Thomas Monjalon [Mon, 3 Aug 2015 22:12:18 +0000 (00:12 +0200)]
version: 2.1.0-rc3

Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
8 years agoapp/test: fix combined options --no-huge and -m
Marvin Liu [Wed, 29 Jul 2015 03:54:29 +0000 (11:54 +0800)]
app/test: fix combined options --no-huge and -m

'--no-huge' option now can workable with -m option.
Unit test for eal flag should change pass criterion.

Fixes: a7de7e6beb69 ("eal: allow combining -m and --no-huge")

Signed-off-by: Marvin Liu <yong.liu@intel.com>
8 years agoapp/test: fix sched mempool allocation
Marvin Liu [Wed, 29 Jul 2015 03:22:01 +0000 (11:22 +0800)]
app/test: fix sched mempool allocation

In previous setting, mempool size and cache_size were both 32.
It does not satisfy with cache_size checking rule by now.
Cache size should be less than CONFIG_RTE_MEMPOOL_CACHE_MAX_SIZE and
mempool size / 1.5.

Fixes: 462321b44a80 ("mempool: limit cache size")

Signed-off-by: Marvin Liu <yong.liu@intel.com>
Acked-by: Jingjing Wu <jingjing.wu@intel.com>
[Thomas: remove unused PKT_BURST_SZ]

8 years agoixgbe: fix Rx with buffer address not word aligned
Konstantin Ananyev [Mon, 3 Aug 2015 17:59:41 +0000 (18:59 +0100)]
ixgbe: fix Rx with buffer address not word aligned

Niantic HW expects Header Buffer Address in the RXD to be word aligned.
So, if mbuf's buf_physaddr is not word aligned then
RX path will not work properly.
Right now, in ixgbe PMD we always setup Packet Buffer Address(PBA) and
Header Buffer Address (HBA) to the same value:
buf_physaddr + RTE_PKTMBUF_HEADROOM.
As ixgbe PMD doesn't support split header feature anyway,
the issue can be fixed just by always setting HBA in the RXD to zero.

Signed-off-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
8 years agoixgbe: support RSS and flow director hashes in vector Rx
Tomasz Kulasek [Fri, 26 Jun 2015 08:07:34 +0000 (10:07 +0200)]
ixgbe: support RSS and flow director hashes in vector Rx

This patch adds management of PKT_RX_FDIR and PKT_RX_RSS_HASH ol_flags in
vPMD for unified packet type as well as for 16 bit field packet_type when
RTE_NEXT_ABI is not defined.

Signed-off-by: Tomasz Kulasek <tomaszx.kulasek@intel.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
8 years agotools: fix comment in bind script
Stephen Hemminger [Wed, 8 Apr 2015 17:37:50 +0000 (10:37 -0700)]
tools: fix comment in bind script

The function documentation was obviously copied and not updated.

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
8 years agoconfig: add KNI kmod option
Nikita Kozlov [Mon, 3 Aug 2015 16:12:17 +0000 (18:12 +0200)]
config: add KNI kmod option

This option permit to build librte_kni.so without building rte_kni.ko
so you can build a sdk without building kernel drivers.

Signed-off-by: Nikita Kozlov <nikita@elyzion.net>
8 years agoeal/linux: fix socket value for undetermined numa node
Cunming Liang [Fri, 31 Jul 2015 01:36:12 +0000 (09:36 +0800)]
eal/linux: fix socket value for undetermined numa node

The patch sets zero as the default value of pci device numa_node
if the socket could not be determined.
It provides the same default value as FreeBSD which has no NUMA support,
and makes the return value of rte_eth_dev_socket_id() be consistent
with the API description.

Signed-off-by: Cunming Liang <cunming.liang@intel.com>
8 years agopci: cleanup scan loop
Stephen Hemminger [Mon, 13 Apr 2015 22:11:11 +0000 (15:11 -0700)]
pci: cleanup scan loop

Do some cleanup of pci scan loop.
  * check errors first
  * don't initialize variables where not necessary
  * cuddle else (follow existing style)
  * chop off conditional after return

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
8 years agopci: fix build on FreeBSD
Thomas Monjalon [Thu, 30 Jul 2015 13:41:33 +0000 (15:41 +0200)]
pci: fix build on FreeBSD

Build log:
lib/librte_eal/bsdapp/eal/eal_pci.c:462:9: error:
incompatible integer to pointer conversion passing 'u_int32_t'
(aka 'unsigned int') to parameter of type 'void *'

It is fixed by passing the pointer of pi.pi_data to memcpy.

By the way, it seems strange that pi_data is initialized twice:
.pi_data = *(u_int32_t *)buf
memcpy(&pi.pi_data, buf, len);

Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
8 years agobnx2x: fix part of 32-bit build
Thomas Monjalon [Tue, 28 Jul 2015 15:47:04 +0000 (17:47 +0200)]
bnx2x: fix part of 32-bit build

Example of errors:
error: cast to pointer from integer of different size [-Werror=int-to-pointer-cast]
error: format ‘%lx’ expects argument of type ‘long unsigned int’, but argument 5 has type ‘uint64_t
error: format ‘%lu’ expects argument of type ‘long unsigned int’, but argument 6 has type ‘unsigned int’

Only 2 files are fixed. The others errors are left as exercise to the authors.

Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
8 years agobnx2x: fix build with clang
Thomas Monjalon [Tue, 28 Jul 2015 15:47:03 +0000 (17:47 +0200)]
bnx2x: fix build with clang

Build log:
error: unused function 'bnx2x_hilo'

No need to keep an unused function.

Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
8 years agobnx2x: fix build with debug enabled
Thomas Monjalon [Tue, 28 Jul 2015 15:47:02 +0000 (17:47 +0200)]
bnx2x: fix build with debug enabled

Build log:
error: unused variable ‘cid’
error: ‘RTE_LOG_WARN’ undeclared
error: expected ‘)’ before ‘sc’

There were unused variables defined for debug but not used in debug log because
it was ifdef'ed a the wrong condition (RTE_LIBRTE_BNX2X_DEBUG_DRIVER).

The warning were using WARN instead of WARNING.

Some debug messages had some extra parameters.

Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
8 years agobnx2x: fix build as shared library
Thomas Monjalon [Tue, 28 Jul 2015 15:47:01 +0000 (17:47 +0200)]
bnx2x: fix build as shared library

Build log:
Must Specify a librte_pmd_bnx2x.so..1 ABI version

Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
8 years agofm10k: fix Tx queue cleaning after start error
Wang Xiao W [Fri, 31 Jul 2015 05:05:47 +0000 (13:05 +0800)]
fm10k: fix Tx queue cleaning after start error

When a Tx queue fails to start in fm10k_dev_start, all Rx queues
and Tx queues that are started should be cleaned before the
function returns an error.

Signed-off-by: Wang Xiao W <xiao.w.wang@intel.com>
Acked-by: Jing Chen <jing.d.chen@intel.com>
8 years agofm10k: fix queue disabling
Wang Xiao W [Fri, 31 Jul 2015 05:05:47 +0000 (13:05 +0800)]
fm10k: fix queue disabling

In Rx and Tx queue_disable functions, the index of queue should
be qnum other than i which is the iteration of time expiration.

Signed-off-by: Wang Xiao W <xiao.w.wang@intel.com>
Acked-by: Jing Chen <jing.d.chen@intel.com>
8 years agoi40e: fix ieee1588 timestamping with next ABI
John McNamara [Fri, 31 Jul 2015 11:39:00 +0000 (12:39 +0100)]
i40e: fix ieee1588 timestamping with next ABI

Fixes issue where ieee15888 timestamping doesn't work for the i40e
pmd when RTE_ABI_NEXT is enabled.

Also refactors repeated ieee15888 flag checking and setting
code into a function.

Test report: http://dpdk.org/ml/archives/dev/2015-August/022496.html

Reported-by: Huilong Xu <huilongx.xu@intel.com>
Signed-off-by: John McNamara <john.mcnamara@intel.com>
Acked-by: Sergio Gonzalez Monroy <sergio.gonzalez.monroy@intel.com>
Acked-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
Tested-by: Huilong Xu <huilongx.xu@intel.com>
8 years agoigb: fix ieee1588 timestamping
Wenzhuo Lu [Fri, 31 Jul 2015 01:20:30 +0000 (09:20 +0800)]
igb: fix ieee1588 timestamping

Ieee1588 reads system time to set its timestamp. On 1G NICs, for example,
i350, system time is disabled by default. It means the ieee1588 timestamp
will always be 0.
This patch enables system time when ieee1588 is enabled.

Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
Acked-by: John McNamara <john.mcnamara@intel.com>
8 years agolpm: fix depth small entry add
Zhe Tao [Thu, 30 Jul 2015 03:19:02 +0000 (11:19 +0800)]
lpm: fix depth small entry add

When adding a "depth small" entry, if its extended flag is not set and
its depth is smaller than the one in the tbl24, nothing should be done
otherwise will operate on the wrong memory area.

Signed-off-by: Zhe Tao <zhe.tao@intel.com>
Acked-by: Cunming Liang <cunming.liang@intel.com>
8 years agotimer: fix race condition
Robert Sanford [Mon, 27 Jul 2015 22:46:06 +0000 (18:46 -0400)]
timer: fix race condition

Eliminate problematic race condition in rte_timer_manage() that can
lead to corruption of per-lcore pending-lists (implemented as
skip-lists). The race condition occurs when rte_timer_manage() expires
multiple timers on lcore A, while lcore B simultaneously invokes
rte_timer_reset() for one of the expiring timers (other than the first
one).

Lcore A splits its pending-list, creating a local list of expired timers
linked through their sl_next[0] pointers, and sets the first expired
timer to the RUNNING state, all during one list-lock round trip.
Lcore A then unlocks the list-lock to run the first callback, and that
is when A and B can have different interpretations of the subsequent
expired timers' true state. Lcore B sees an expired timer still in the
PENDING state, atomically changes the timer to the CONFIG state, locks
lcore A's list-lock, and reinserts the timer into A's pending-list.
The two lcores try to use the same next-pointers to maintain both lists!

Our solution is to remove expired timers from the pending-list and try
to set them all to the RUNNING state in one atomic step, i.e.,
rte_timer_manage() should perform these two actions within one
ownership of the list-lock.

After splitting the pending-list at the current point in time and trying
to set all expired timers to the RUNNING state, we must put back into
the pending-list any timers that we failed to set to the RUNNING state,
all while still holding the list-lock. It is then safe to release the
lock and run the callback functions for all expired timers that remain
on our local run-list.

Signed-off-by: Robert Sanford <rsanford@akamai.com>
8 years agotimer: add race condition test
Robert Sanford [Mon, 27 Jul 2015 22:46:05 +0000 (18:46 -0400)]
timer: add race condition test

Add new timer-manage race-condition test: We wrote a test to confirm
our suspicion that we could crash rte_timer_manage() under the right
circumstances. We repeatedly set several timers to expire at roughly
the same time on the master core. The master lcore just delays and runs
rte_timer_manage() about ten times per second. The slave lcores all
watch the first timer (timer-0) to see when rte_timer_manage() is
running on the master, i.e., timer-0's state is not PENDING.
At this point, each slave attempts to reset a subset of the timers to
a later expiration time. The goal here is to have the slaves moving
most of the timers to a different place in the master's pending-list,
while the master is traversing the same next-pointers (the slaves'
sl_next[0] pointers) and running callback functions. This eventually
results in the master traversing a corrupted linked-list.
In our observations, it results in an infinite loop.

Signed-off-by: Robert Sanford <rsanford@akamai.com>
8 years agotimer: fix synchronization in stress test
Robert Sanford [Mon, 27 Jul 2015 22:46:04 +0000 (18:46 -0400)]
timer: fix synchronization in stress test

Fix app/test timer stress test 2: Sometimes this test fails and
seg-faults because the slave lcores get out of phase with the master.
The master uses a single int, 'ready', to synchronize multiple slave
lcores through multiple phases of the test.

To resolve, we construct simple synchronization primitives that use one
atomic-int state variable per slave. The master tells the slaves when to
start, and then waits for all of them to finish. Each slave waits for
the master to tell it to start, and then tells the master when it has
finished.

Signed-off-by: Robert Sanford <rsanford@akamai.com>
8 years agoeal/ppc: fix cpu cycle count for little endian
Chao Zhu [Mon, 3 Aug 2015 07:16:18 +0000 (15:16 +0800)]
eal/ppc: fix cpu cycle count for little endian

On IBM POWER8 PPC64 little endian architecture, the definition of tsc
union will be different. This patch fix this to enable the right output
from rte_rdtsc().

Signed-off-by: Chao Zhu <chaozhu@linux.vnet.ibm.com>
8 years agoethdev: fix ABI breakage
John McNamara [Mon, 13 Jul 2015 10:26:25 +0000 (11:26 +0100)]
ethdev: fix ABI breakage

Fix for ABI breakage introduced in LRO addition. Moves
lro bitfield to the end of the struct/member.

Fixes: 8eecb3295aed (ixgbe: add LRO support)

Signed-off-by: John McNamara <john.mcnamara@intel.com>
Acked-by: Vlad Zolotarov <vladz@cloudius-systems.com>