Commit Graph

2230 Commits

Author SHA1 Message Date
Marvin Liu
5c23bef99a fm10k: fix build with gcc < 4.4
Build fm10k driver in Suse11 SP3 will be failed for unrecognized flag.
cc1: error: unrecognized command line option "-Wno-unused-but-set-variable"

This flag is supported from gcc 4.4, so add gcc version check in fm10k.
In the same time, make option check more clear in ixgbe driver.

Signed-off-by: Marvin Liu <yong.liu@intel.com>
Acked-by: Thomas Monjalon <thomas.monjalon@6wind.com>
2015-03-23 00:31:19 +01:00
Marvin Liu
55900aa94d eal/x86: fix build sse3 functions with gcc < 4.4
In Suse11 SP3, there'll be errors for not found sse3 functions.
rte_memcpy.h: In function ‘rte_memcpy’:
rte_memcpy.h:625: error: implicit declaration of function ‘_mm_alignr_epi8’
rte_memcpy.h:625: error: nested extern declaration of ‘_mm_alignr_epi8’
rte_memcpy.h:625: error: incompatible type for argument 2 of ‘_mm_storeu_si128’

These functions defined in tmmintrin.h and should be included in.

Fixes: 9144d6bcde ("eal/x86: optimize memcpy for SSE and AVX")

Signed-off-by: Marvin Liu <yong.liu@intel.com>
2015-03-23 00:31:19 +01:00
Marvin Liu
89085f13e6 eal/linux: fix build functions pread and pwrite
Function pread need macro _XOPEN_SOURCE be defined.
Add _GNU_SOURCE will fix this issue.

error: implicit declaration of function ‘pread’

Fixes: 4a499c6495 ("eal/linux: enable uio_pci_generic support")

Signed-off-by: Marvin Liu <yong.liu@intel.com>
Acked-by: Thomas Monjalon <thomas.monjalon@6wind.com>
2015-03-23 00:30:47 +01:00
Yong Liu
6ae9bee6c6 app/testpmd: fix reconfig flag for all ports
When port id is RTE_PORT_ALL, port_id_is_invalid will also return zero.
So this function will only set ports[255] need_reconfig flag, other ports will
be skipped.

Fixes: edab33b1c0 ("app/testpmd: support port hotplug")

Signed-off-by: Marvin Liu <yong.liu@intel.com>
Acked-by: Changchun Ouyang <changchun.ouyang@intel.com>
2015-03-21 00:21:56 +01:00
Huawei Xie
857af048ac vhost: fix build
Fix the error "missing initializer" and "cast to pointer from integer of different size".

For the pointer to integer cast issue, need to investigate changing the typeof mapped_address.

Signed-off-by: Huawei Xie <huawei.xie@intel.com>
Acked-by: Changchun Ouyang <changchun.ouyang@intel.com>
2015-03-20 23:01:42 +01:00
Pawel Wodkowski
6cb0bf3383 ixgbe: fix buffer overrun in non-bulk alloc mode
When bulk alloc is enabled at compile time but preconditions for
it are not met at runtime the ixgbe_reset_rx_queue() function
overrides rxq->sw_ring not allocated elements.

Fixes: 01fa1d6215 ("ixgbe: unify Rx setup")

Signed-off-by: Pawel Wodkowski <pawelx.wodkowski@intel.com>
Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
2015-03-20 22:42:51 +01:00
Konstantin Ananyev
79586d502a ixgbe: fix build without builk alloc
If RTE_LIBRTE_IXGBE_RX_ALLOW_BULK_ALLOC is disabled in the config file,
RTE_PMD_IXGBE_RX_MAX_BURST macro and ixgbe_recv_pkts_bulk_alloc function
are not declared, and some parts of the ixgbe code were still trying to
use them.

Fixes: 01fa1d6215 ("ixgbe: unify Rx setup")

Signed-off-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
2015-03-20 22:30:29 +01:00
Konstantin Ananyev
1e496d6fdf eal/x86: move header file for vector instructions
lib/librte_eal/common/include/rte_common_vect.h ->
lib/librte_eal/common/include/arch/x86/rte_vect.h

Signed-off-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
Acked-by: Thomas Monjalon <thomas.monjalon@6wind.com>
2015-03-20 19:24:38 +01:00
Thomas Monjalon
fe4810a01e doc: remove blank pages in pdf
The "manual" Latex template provided by Sphinx introduce a lot
of useless and confusing blank pages.
Let's remove them.

Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
Acked-by: John McNamara <john.mcnamara@intel.com>
2015-03-19 17:58:49 +01:00
John McNamara
10fe0ce59a doc: tune pdf fonts
This mainly adds metadata but also includes an override to the
Latex formatter to control the font size in code blocks.

Signed-off-by: John McNamara <john.mcnamara@intel.com>
Acked-by: Bernard Iremonger <bernard.iremonger@intel.com>
2015-03-19 17:58:41 +01:00
Thomas Monjalon
7f7e3eb729 doc: fix version for python 3
When generating Latex for PDF, this error occurs:
    ! Undefined control sequence.
    \version ->b'2.0.0-rc2\n
Decoding bytes stream into UTF-8 fixes the issue.

Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
Acked-by: John McNamara <john.mcnamara@intel.com>
2015-03-19 17:58:34 +01:00
John McNamara
ebf8050afd doc: add pdf output
Add make system support for building PDF versions of
the guides. Requires Python Sphinx and TexLive Full.

Signed-off-by: John McNamara <john.mcnamara@intel.com>
Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
Acked-by: John McNamara <john.mcnamara@intel.com>
2015-03-19 17:58:09 +01:00
John McNamara
ba9e05cb6b doc: convert image extensions to wildcard
Changed all image.svg and image.png extensions to image.*
This allows Sphinx to decide the appropriate image type
from the available image options.

In case of PDF, SVG images are converted and Sphinx must pick
the converted version.

Signed-off-by: John McNamara <john.mcnamara@intel.com>
Acked-by: Bernard Iremonger <bernard.iremonger@intel.com>
2015-03-19 11:43:21 +01:00
John McNamara
1e7055ac8a doc: refactor split cell formatting in table
Refactored split cell in test_pipeline table to allow it to
convert cleanly to PDF.

The Sphinx/Latex converter doesn't handle split cells like the
following:

  +-------------+--------------+
  | Header 1    | Header 2     |
  +=============+==============+
  |             |              |
  |             |              |
  +-------------+              |
  |             |              |
  |             |              |
  +-------------+--------------+

Instead the table was refactored to a simpler format:

  +-------------+--------------+
  | Header 1    | Header 2     |
  +=============+==============+
  |             |              |
  |             |              |
  +-------------+--------------+
  |             |              |
  |             |              |
  +-------------+--------------+

The same information was retained in the table.

Signed-off-by: John McNamara <john.mcnamara@intel.com>
Acked-by: Bernard Iremonger <bernard.iremonger@intel.com>
2015-03-19 11:43:21 +01:00
John McNamara
fdaeae9937 doc: fix encoding of (r) character
Change encoding of (r) from Latin-1 to UTF8 to match the other
symbols in the doc and to allow it to convert cleanly to PDF.

Signed-off-by: John McNamara <john.mcnamara@intel.com>
Acked-by: Bernard Iremonger <bernard.iremonger@intel.com>
2015-03-19 11:43:21 +01:00
Thomas Monjalon
d9f7996554 i40e: revert internal switch of PF
VEB switching is blocking VF.
If the source mac address of packet sent from VF is not listed in the
VEB’s mac table, the VEB will switch the packet back to the VF.
It's an hardware issue.

Reverts: 2ccabd8cd1 ("i40e: enable internal switch of PF").

Reported-by: Jingjing Wu <jingjing.wu@intel.com>
Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
Acked-by: Jingjing Wu <jingjing.wu@intel.com>
Acked-by: Helin Zhang <helin.zhang@intel.com>
2015-03-19 09:02:48 +01:00
Thomas Monjalon
1a5994ac2c version: 2.0.0-rc2
Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
2015-03-17 23:02:56 +01:00
Thomas Monjalon
f7ff1d7476 version: fix include
When including rte_version.h without string.h, there is a compilation error:
include/rte_version.h: error: implicit declaration of function ‘strlen’

Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
2015-03-17 23:01:31 +01:00
Tetsuya Mukawa
8d59064fb3 null: fix dereference before null check
This patch fixes potential null pointer access of eth_null_copy_tx().

Reported-by: John Mcnamara <john.mcnamara@intel.com>
Signed-off-by: Tetsuya Mukawa <mukawa@igel.co.jp>
2015-03-17 23:01:31 +01:00
Tetsuya Mukawa
6e225d6a21 null: fix memory leak of kvargs
'struct rte_kvargs' is allocated in rte_kvargs_parse(), and should be
freed with rte_kvargs_free().

Reported-by: John Mcnamara <john.mcnamara@intel.com>
Signed-off-by: Tetsuya Mukawa <mukawa@igel.co.jp>
Acked-by: Neil Horman <nhorman@tuxdriver.com>
2015-03-17 22:58:21 +01:00
Tetsuya Mukawa
8eb680e452 pcap: fix memory leak of kvargs
'struct rte_kvargs' is allocated in rte_kvargs_parse(), and should be
freed with rte_kvargs_free().

Reported-by: John Mcnamara <john.mcnamara@intel.com>
Signed-off-by: Tetsuya Mukawa <mukawa@igel.co.jp>
Acked-by: Neil Horman <nhorman@tuxdriver.com>
2015-03-17 22:58:21 +01:00
Ouyang Changchun
527740ccfa af_packet: fix some leaks
Fix possible memory leak issue: free kvlist before return;
Fix possible resource lost issue: close qssockfd before return;

Signed-off-by: Changchun Ouyang <changchun.ouyang@intel.com>
Acked-by: Michael Qiu <michael.qiu@intel.com>
Acked-by: Neil Horman <nhorman@tuxdriver.com>
Acked-by: John W. Linville <linville@tuxdriver.com>
2015-03-17 22:58:21 +01:00
Andre Richter
83246086ab tools: remove absolute path of chmod for vfio setup
setup.sh uses /usr/bin/chmod, but depending on distribution, it is not always there.
For example, Ubuntu has /bin/chmod. Fix this by removing the absolute path, like it is
done e.g. with grep.

Signed-off-by: Andre Richter <andre.o.richter@gmail.com>
2015-03-17 22:58:21 +01:00
Neil Horman
cec1b9f3af scripts: add ABI checking utility
There was a request for an abi validation utilty for the ongoing ABI stability
work.  As it turns out there is a abi compliance checker in development that
seems to be under active development and provides fairly detailed ABI compliance
reports.  Its not yet intellegent enough to understand symbol versioning, but it
does provide the ability to identify symbols which have changed between
releases, along with details of the change, and offers developers the
opportunity to identify which symbols then need versioning and validation for a
given update via manual testing.

This script automates the use of the compliance checker between two arbitrarily
specified tags within the dpdk tree.  To execute enter the $RTE_SDK directory
and run:

./scripts/validate_abi.sh $GIT_TAG1 $GIT_TAG2 $CONFIG

where $GIT_TAG1 and 2 are git tags and $CONFIG is a config specification
suitable for passing as the T= variable in the make config command.

Note the upstream source for the abi compliance checker is here:
http://ispras.linuxbase.org/index.php/ABI_compliance_checker

It generates a report for each DSO built from the requested tags that developers
can review to find ABI compliance issues.

Signed-off-by: Neil Horman <nhorman@tuxdriver.com>
Acked-by: Thomas Monjalon <thomas.monjalon@6wind.com>
2015-03-17 22:39:57 +01:00
Siobhan Butler
41492ef891 doc: remove copyright from base of html page
Removing Intel copyright from base of page for each document.

Signed-off-by: Siobhan Butler <siobhan.a.butler@intel.com>
Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
2015-03-17 22:16:51 +01:00
Jingjing Wu
3ac95df07b doc: fix quote
remove the coma character by using ' character

Signed-off-by: Jingjing Wu <jingjing.wu@intel.com>
2015-03-17 22:16:51 +01:00
Chen Jing D(Mark)
b7417fa11c doc: update release notes for fm10k
Add feature list for fm10k driver.

Signed-off-by: Chen Jing D(Mark) <jing.d.chen@intel.com>
Acked-by: Siobhan Butler <siobhan.a.butler@intel.com>
2015-03-17 22:16:46 +01:00
Chen Jing D(Mark)
a49ae04e85 doc: update fm10k prog guide
DPDK introduced pmd driver for PCIE host-interface of Intel Ethernet
Switch FM10000 Series, update programming guide to describe the new
driver and usage.

Signed-off-by: Chen Jing D(Mark) <jing.d.chen@intel.com>
Acked-by: Siobhan Butler <siobhan.a.butler@intel.com>
[Thomas: fix title underline]
2015-03-17 22:16:46 +01:00
Ouyang Changchun
227cce519f doc: update virtio prog guide
This patch add contents for major change in single virtio implementation,
also add back something for merge-able feature and promiscuous mode in virtio.

Signed-off-by: Changchun Ouyang <changchun.ouyang@intel.com>
Acked-by: Siobhan Butler <siobhan.a.butler@intel.com>
2015-03-17 22:16:46 +01:00
John McNamara
0d8d3df6b8 doc: add Rx and Tx callbacks sample app user guide
Added a sample application guide for the rxtx_callbacks app.

Signed-off-by: John McNamara <john.mcnamara@intel.com>
Acked-by: Siobhan Butler <siobhan.a.butler@intel.com>
Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
2015-03-17 22:16:46 +01:00
John McNamara
1443da3bbd doc: add basic forwarding skeleton user guide
Added a sample application guide for the basic forwarding
/skeleton app.

Signed-off-by: John McNamara <john.mcnamara@intel.com>
Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
2015-03-17 22:16:46 +01:00
John McNamara
0f91352cff examples/skeleton: improve documentation
Minor refactoring and comments to make the sample app and
code examples clearer for the sample app guide.

Signed-off-by: John McNamara <john.mcnamara@intel.com>
Acked-by: Siobhan Butler <siobhan.a.butler@intel.com>
Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
2015-03-17 22:16:46 +01:00
Konstantin Ananyev
37b786347c maintainers: claim EAL Intel x86
Signed-off-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
Acked-by: Thomas Monjalon <thomas.monjalon@6wind.com>
2015-03-17 14:27:35 +01:00
Bruce Richardson
84a79ff1bc maintainers: claim misc sample applications
Claim the following sample applications:
* dpdk_qat
* helloworld
* l2fwd
* skeleton

Signed-off-by: Bruce Richardson <bruce.richarsdon@intel.com>
Acked-by: Thomas Monjalon <thomas.monjalon@6wind.com>
2015-03-17 14:27:35 +01:00
Bruce Richardson
329c2f627d maintainers: claim ring pmd library
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Thomas Monjalon <thomas.monjalon@6wind.com>
2015-03-17 14:27:34 +01:00
Benoît Canet
45db8927a8 vhost: add hint on how to add or remove device to a data core
Let's make sure people will not forget to set and unset VIRTIO_DEV_RUNNING.

Signed-off-by: Benoît Canet <benoit.canet@nodalink.com>
Acked-by: Huawei Xie <huawei.xie@intel.com>
2015-03-17 12:39:52 +01:00
Vlad Zolotarov
01fa1d6215 ixgbe: unify Rx setup
- Set the callback in a single function that is called from
     ixgbe_dev_rx_init() for a primary process and from eth_ixgbe_dev_init()
     for a secondary processes. This is instead of multiple, hard to track places.
   - Added ixgbe_hw.rx_bulk_alloc_allowed - see ixgbe_hw.rx_vec_allowed description below.
   - Added ixgbe_hw.rx_vec_allowed: like with Bulk Allocation, Vector Rx is
     enabled or disabled on a per-port level. All queues have to meet the appropriate
     preconditions and if any of them doesn't - the feature has to be disabled.
     Therefore ixgbe_hw.rx_vec_allowed will be updated during each queues configuration
     (rte_eth_rx_queue_setup()) and then used in rte_eth_dev_start() to configure the
     appropriate callbacks. The same happens with ixgbe_hw.rx_vec_allowed in a Bulk Allocation
     context.
   - Bugs fixed:
      - Vector scattered packets callback was called regardless the appropriate
        preconditions:
         - Vector Rx specific preconditions.
         - Bulk Allocation preconditions.
      - Vector Rx was enabled/disabled according to the last queue setting and not
        based on all queues setting (which may be different for each queue).

Signed-off-by: Vlad Zolotarov <vladz@cloudius-systems.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
2015-03-17 00:46:01 +01:00
Vlad Zolotarov
18f81142d6 ixgbe: fix Rx CRC stripping for X540
According to x540 spec chapter 8.2.4.8.9 CRCSTRIP field of RDRXCTL should
be configured to the same value as HLREG0.RXCRCSTRP.

Clearing the RDRXCTL.RSCFRSTSIZE field for x540 is not required by the spec
but seems harmless.

Signed-off-by: Vlad Zolotarov <vladz@cloudius-systems.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
2015-03-17 00:46:01 +01:00
Vlad Zolotarov
d07fb25860 ixgbe: fix endianness of ring descriptor access
Use the rte_le_to_cpu_xx()/rte_cpu_to_le_xx() when reading/setting HW ring
descriptor fields.
Fixed the above in ixgbe_rx_alloc_bufs() and in ixgbe_recv_scattered_pkts().

Signed-off-by: Vlad Zolotarov <vladz@cloudius-systems.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
2015-03-17 00:46:01 +01:00
Michael Qiu
9fc985ae9d fm10k: set pointer to NULL after free
It could be a potential not safe issue.

Signed-off-by: Michael Qiu <michael.qiu@intel.com>
Acked-by: Jing Chen <jing.d.chen@intel.com>
2015-03-17 00:46:01 +01:00
Huawei Xie
28a1ccca41 vhost: add build option for vhost-user
Turn on CONFIG_RTE_LIBRTE_VHOST to enable vhost.
vhost-user is turned on by default. Turn off CONFIG_RTE_LIBRTE_VHOST_USER to
enable vhost-cuse implementation.

Signed-off-by: Huawei Xie <huawei.xie@intel.com>
Acked-by: Changchun Ouyang <changchun.ouyang@intel.com>
2015-03-17 00:46:01 +01:00
John McNamara
66abc3f310 eal: fix type casting of value to align
Fix a warning when the rte_common.h header is included in a compilation
using  -Wbad-function-cast, such as in Open vSwitch where the
following warning is emitted repeatedly:

    ../rte_common.h: In function 'rte_is_aligned':
    ../rte_common.h:184:9: warning: cast from function call of
    type 'uintptr_t' to non-matching type 'void *' [-Wbad-function-cast]

This change fixes the issue in rte_common.h by using the RTE_ALIGN_FLOOR
macro to get the aligned floor value with generic type casting.

Also removed the rte_align_floor_int() function and replaced it with
the RTE_PTR_ALIGN_FLOOR() macro.

Signed-off-by: John McNamara <john.mcnamara@intel.com>
Acked-by: Neil Horman <nhorman@tuxdriver.com>
2015-03-17 00:46:01 +01:00
Thomas Monjalon
9a01c31b94 eal: fix build with icc and gcc < 4.4
x86intrin.h cannot be directly included as it is not
always available.
rte_common_vect.h handles compiler differences.

Suggested-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
2015-03-16 16:59:53 +01:00
David Marchand
f07246766d eal: fix tailq init for uio and vfio resources
Commit a2348166ea ("tailq: move to dynamic tailq") introduced a bug in
uio/vfio resources list init.

These resources list were pointed at through a pointer initialised only once but
too early in the eal init (before tailqs init).

Fix this by "resolving" this pointer when used (which is well after tailqs
init).

Fixes: a2348166ea ("tailq: move to dynamic tailq")

Reported-by: Marvin Liu <yong.liu@intel.com>
Reported-by: Tetsuya Mukawa <mukawa@igel.co.jp>
Signed-off-by: David Marchand <david.marchand@6wind.com>
Tested-by: John McNamara <john.mcnamara@intel.com>
Tested-by: Tetsuya Mukawa <mukawa@igel.co.jp>
2015-03-12 08:32:48 +01:00
Yong Liu
0a530f0d58 app/testpmd: fix incorrect port number check
testpmd parameter "nb-port" mean the number of forwarding port.
It's incorrect to use function port_id_is_invalid to check number of ports.

Fixes: edab33b1c0 ("app/testpmd: support port hotplug")

Signed-off-by: Yong Liu <yong.liu@intel.com>
Acked-by: Thomas Monjalon <thomas.monjalon@6wind.com>
2015-03-11 15:59:56 +01:00
Thomas Monjalon
efa2084a84 scripts: remove useless build tools
test-framework.sh is an old script to check building of some dependencies.
testhost is an old app used to check HOSTCC.

Let's clean the scripts directory.

Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
2015-03-10 17:55:25 +01:00
Siobhan Butler
9879553ff5 maintainers: claim responsibility for docs
Signed-off-by: Siobhan Butler <siobhan.a.butler@intel.com>
Acked-by: Thomas Monjalon <thomas.monjalon@6wind.com>
2015-03-10 17:31:37 +01:00
Konstantin Ananyev
8489eecad4 maintainers: claim ixgbe PMD
Signed-off-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
Acked-by: Thomas Monjalon <thomas.monjalon@6wind.com>
2015-03-10 17:31:37 +01:00
Robert Sanford
852d388c33 maintainers: claim responsibility for timers
Signed-off-by: Robert Sanford <rsanford@akamai.com>
Acked-by: Thomas Monjalon <thomas.monjalon@6wind.com>
2015-03-10 17:31:28 +01:00
Jingjing Wu
1ad89e0d08 doc: update testpmd commands for flow director
Because of the changing of unified flow type, commands for flow
director need to be updated.

Signed-off-by: Jingjing Wu <jingjing.wu@intel.com>
2015-03-10 16:46:57 +01:00