Marvin Liu [Thu, 19 Mar 2015 03:16:57 +0000 (11:16 +0800)]
app/test: fix build with gcc < 4.4
Option var-tracking-assignments supported in gcc from 4.4.
Add gcc version check wil fix this issue.
error: unrecognized command line option "-fno-var-tracking-assignments"
Fixes:
74adbc5ef704 ("app/test: disable variable tracking assignment for memcpy")
Signed-off-by: Marvin Liu <yong.liu@intel.com>
Marvin Liu [Thu, 19 Mar 2015 03:16:56 +0000 (11:16 +0800)]
app/test: fix build constructor with gcc < 4.4
Build app/test will be failed for function only defined but not used.
test_prefetch.c:65: error: ‘testfn_prefetch_cmd’ defined but not used
Add attribute used in test function declaration can fix this.
static void __attribute__((used)) testfn_##t(void);
Fixes:
727909c59231 ("app/test: introduce dynamic commands list")
Signed-off-by: Marvin Liu <yong.liu@intel.com>
Marvin Liu [Thu, 19 Mar 2015 03:16:55 +0000 (11:16 +0800)]
enic: fix build with gcc < 4.4
gcc4.3 will raise warnings in blow code for initialized field overwritten.
enic_main.c: In function ‘enic_set_rsskey’:
enic_main.c:845: error: initialized field overwritten
enic_main.c:845: error: (near initialization for ‘rss_key.key’)
enic_main.c:846: error: initialized field overwritten
enic_main.c:846: error: (near initialization for ‘rss_key.key’)
enic_main.c:847: error: initialized field overwritten
enic_main.c:847: error: (near initialization for ‘rss_key.key’)
static union vnic_rss_key rss_key = {
.key[0] = ...,
.key[1] = ...,
.key[2] = ...,
.key[3] = ...,
};
Change struct initialized code reference to ISO 9899 section 6.7.8.
gcc4.3 will happy for that.
static union vnic_rss_key rss_key = {
.key = {
[0] = ...,
[1] = ...,
[2] = ...,
[3] = ...,
}
Signed-off-by: Marvin Liu <yong.liu@intel.com>
Marvin Liu [Thu, 19 Mar 2015 03:16:54 +0000 (11:16 +0800)]
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>
Marvin Liu [Thu, 19 Mar 2015 03:16:52 +0000 (11:16 +0800)]
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:
9144d6bcdefd ("eal/x86: optimize memcpy for SSE and AVX")
Signed-off-by: Marvin Liu <yong.liu@intel.com>
Marvin Liu [Thu, 19 Mar 2015 03:16:58 +0000 (11:16 +0800)]
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:
4a499c649590 ("eal/linux: enable uio_pci_generic support")
Signed-off-by: Marvin Liu <yong.liu@intel.com>
Acked-by: Thomas Monjalon <thomas.monjalon@6wind.com>
Yong Liu [Fri, 13 Mar 2015 02:38:23 +0000 (10:38 +0800)]
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:
edab33b1c01d ("app/testpmd: support port hotplug")
Signed-off-by: Marvin Liu <yong.liu@intel.com>
Acked-by: Changchun Ouyang <changchun.ouyang@intel.com>
Huawei Xie [Thu, 19 Mar 2015 10:43:24 +0000 (18:43 +0800)]
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>
Pawel Wodkowski [Thu, 19 Mar 2015 16:09:16 +0000 (17:09 +0100)]
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:
01fa1d6215fa ("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>
Konstantin Ananyev [Fri, 20 Mar 2015 13:59:37 +0000 (13:59 +0000)]
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:
01fa1d6215fa ("ixgbe: unify Rx setup")
Signed-off-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Konstantin Ananyev [Wed, 18 Mar 2015 17:08:15 +0000 (17:08 +0000)]
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>
Thomas Monjalon [Wed, 18 Mar 2015 17:41:57 +0000 (18:41 +0100)]
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>
John McNamara [Tue, 3 Feb 2015 14:11:15 +0000 (14:11 +0000)]
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>
Thomas Monjalon [Wed, 18 Mar 2015 17:25:51 +0000 (18:25 +0100)]
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>
John McNamara [Tue, 3 Feb 2015 14:11:14 +0000 (14:11 +0000)]
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>
John McNamara [Tue, 3 Feb 2015 14:11:18 +0000 (14:11 +0000)]
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>
John McNamara [Tue, 3 Feb 2015 14:11:17 +0000 (14:11 +0000)]
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>
John McNamara [Tue, 3 Feb 2015 14:11:16 +0000 (14:11 +0000)]
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>
Thomas Monjalon [Wed, 18 Mar 2015 09:55:09 +0000 (10:55 +0100)]
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:
2ccabd8cd1f6 ("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>
Thomas Monjalon [Tue, 17 Mar 2015 22:02:56 +0000 (23:02 +0100)]
version: 2.0.0-rc2
Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
Thomas Monjalon [Fri, 13 Mar 2015 17:25:44 +0000 (18:25 +0100)]
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>
Tetsuya Mukawa [Mon, 16 Mar 2015 03:43:21 +0000 (12:43 +0900)]
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>
Tetsuya Mukawa [Tue, 17 Mar 2015 04:12:41 +0000 (13:12 +0900)]
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>
Tetsuya Mukawa [Tue, 17 Mar 2015 04:12:41 +0000 (13:12 +0900)]
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>
Ouyang Changchun [Wed, 11 Mar 2015 01:34:01 +0000 (09:34 +0800)]
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>
Andre Richter [Thu, 12 Mar 2015 17:18:00 +0000 (18:18 +0100)]
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>
Neil Horman [Tue, 17 Mar 2015 18:08:41 +0000 (14:08 -0400)]
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>
Siobhan Butler [Thu, 12 Mar 2015 10:59:29 +0000 (10:59 +0000)]
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>
Jingjing Wu [Tue, 3 Mar 2015 07:53:39 +0000 (15:53 +0800)]
doc: fix quote
remove the coma character by using ' character
Signed-off-by: Jingjing Wu <jingjing.wu@intel.com>
Chen Jing D(Mark) [Fri, 13 Mar 2015 09:14:19 +0000 (17:14 +0800)]
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>
Chen Jing D(Mark) [Fri, 13 Mar 2015 09:14:18 +0000 (17:14 +0800)]
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]
Ouyang Changchun [Mon, 2 Mar 2015 08:40:47 +0000 (16:40 +0800)]
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>
John McNamara [Wed, 25 Feb 2015 19:46:02 +0000 (19:46 +0000)]
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>
John McNamara [Wed, 25 Feb 2015 19:46:01 +0000 (19:46 +0000)]
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>
John McNamara [Wed, 25 Feb 2015 19:46:00 +0000 (19:46 +0000)]
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>
Konstantin Ananyev [Wed, 11 Mar 2015 11:14:30 +0000 (11:14 +0000)]
maintainers: claim EAL Intel x86
Signed-off-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
Acked-by: Thomas Monjalon <thomas.monjalon@6wind.com>
Bruce Richardson [Wed, 11 Mar 2015 10:48:07 +0000 (10:48 +0000)]
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>
Bruce Richardson [Wed, 11 Mar 2015 10:31:54 +0000 (10:31 +0000)]
maintainers: claim ring pmd library
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Thomas Monjalon <thomas.monjalon@6wind.com>
Benoît Canet [Fri, 27 Feb 2015 10:22:45 +0000 (11:22 +0100)]
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>
Vlad Zolotarov [Thu, 12 Mar 2015 21:17:32 +0000 (23:17 +0200)]
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>
Vlad Zolotarov [Thu, 12 Mar 2015 21:17:31 +0000 (23:17 +0200)]
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>
Vlad Zolotarov [Thu, 12 Mar 2015 21:17:30 +0000 (23:17 +0200)]
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>
Michael Qiu [Fri, 6 Mar 2015 07:56:47 +0000 (15:56 +0800)]
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>
Huawei Xie [Thu, 12 Mar 2015 15:30:23 +0000 (23:30 +0800)]
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>
John McNamara [Mon, 16 Mar 2015 17:05:06 +0000 (17:05 +0000)]
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>
Thomas Monjalon [Mon, 16 Mar 2015 15:55:50 +0000 (16:55 +0100)]
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>
David Marchand [Wed, 11 Mar 2015 17:25:23 +0000 (18:25 +0100)]
eal: fix tailq init for uio and vfio resources
Commit
a2348166ea18 ("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:
a2348166ea18 ("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>
Yong Liu [Wed, 11 Mar 2015 07:23:10 +0000 (15:23 +0800)]
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:
edab33b1c01d ("app/testpmd: support port hotplug")
Signed-off-by: Yong Liu <yong.liu@intel.com>
Acked-by: Thomas Monjalon <thomas.monjalon@6wind.com>
Thomas Monjalon [Tue, 10 Mar 2015 16:55:25 +0000 (17:55 +0100)]
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>
Siobhan Butler [Fri, 27 Feb 2015 16:27:11 +0000 (16:27 +0000)]
maintainers: claim responsibility for docs
Signed-off-by: Siobhan Butler <siobhan.a.butler@intel.com>
Acked-by: Thomas Monjalon <thomas.monjalon@6wind.com>
Konstantin Ananyev [Tue, 10 Mar 2015 00:53:14 +0000 (00:53 +0000)]
maintainers: claim ixgbe PMD
Signed-off-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
Acked-by: Thomas Monjalon <thomas.monjalon@6wind.com>
Robert Sanford [Wed, 25 Feb 2015 20:18:05 +0000 (14:18 -0600)]
maintainers: claim responsibility for timers
Signed-off-by: Robert Sanford <rsanford@akamai.com>
Acked-by: Thomas Monjalon <thomas.monjalon@6wind.com>
Jingjing Wu [Fri, 6 Mar 2015 09:36:14 +0000 (17:36 +0800)]
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>
Jingjing Wu [Fri, 6 Mar 2015 09:36:13 +0000 (17:36 +0800)]
ixgbe: fix supported flow types
Ixgbe doesn't support the ipv4-frag and ipv6-frag flow types, remove them.
Ixgbe doesn't support configure flex mask on each kind of flow type, this
patch uses RTE_ETH_FLOW_UNKNOWN to specify global flex mask setting.
This patch also changes the string "raw" to "none" to indicate flex mask
setting unrelated with flow type in testpmd for ixgbe.
Signed-off-by: Jingjing Wu <jingjing.wu@intel.com>
Pablo de Lara [Fri, 27 Feb 2015 11:18:39 +0000 (11:18 +0000)]
app/testpmd: stop forwarding when quitting
When user quits testpmd, and there is traffic being forwarded,
that may produce a segmentation fault, due to ports being closed,
while they are still transmitting packets.
This patch prevents the issue from happening,
by stopping packet forwarding before closing the ports.
Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Bruce Richardson [Mon, 2 Mar 2015 16:34:20 +0000 (16:34 +0000)]
eal/bsd: enable contigmem blocks >1GB in size
The contigmem module was using an "int" type for specifying the
size of blocks of memory to be reserved. A 2GB block was therefore
overflowing the signed 32-bit value, making 1GB the largest block
size that could be reserved as a single unit.
The fix is to change the type used for the buffer/block size to
an "int64_t" value.
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Pawel Wodkowski [Mon, 9 Mar 2015 16:05:29 +0000 (17:05 +0100)]
examples/l2fwd-jobstats: fix error handling in init sequence
Fix check of returned values during application init phase.
Signed-off-by: Pawel Wodkowski <pawelx.wodkowski@intel.com>
Adrien Mazarguil [Fri, 27 Feb 2015 18:27:00 +0000 (19:27 +0100)]
mlx4: avoid init errors when kernel modules are not loaded
Mimic UIO/VFIO drivers behavior by not causing errors when a device cannot
be initialized due to missing or mismatching kernel modules. Display helpful
messages instead, such as:
[...]
EAL: PCI device 0000:83:00.0 on NUMA socket 1
EAL: probe driver: 15b3:1007 librte_pmd_mlx4
PMD: librte_pmd_mlx4: PCI information matches, using device "mlx4_0" (VF: false)
PMD: librte_pmd_mlx4: cannot use device, are drivers up to date?
EAL: PCI device 0000:84:00.0 on NUMA socket 1
EAL: probe driver: 15b3:1007 librte_pmd_mlx4
PMD: librte_pmd_mlx4: PCI information matches, using device "mlx4_1" (VF: false)
PMD: librte_pmd_mlx4: cannot use device, are drivers up to date?
EAL: No probed ethernet devices
[...]
Signed-off-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
Stephen Hemminger [Sat, 7 Mar 2015 02:23:24 +0000 (18:23 -0800)]
ixgbe: rename igb prefix
To avoid any possible confusion or breakage, rename all the structures
of ixgbe driver to use ixgbe_ rather than igb_ because igb is a
different driver.
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Changchun Ouyang <changchun.ouyang@intel.com>
Stephen Hemminger [Sat, 7 Mar 2015 02:23:23 +0000 (18:23 -0800)]
ixgbe: prefix global function
All global functions in a driver should use the same prefix
to avoid any future name collisions.
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Reviewed-by: Bruce Richardson <bruce.richardson@intel.com>
[Bruce: one instance was missing]
Acked-by: Changchun Ouyang <changchun.ouyang@intel.com>
Stephen Hemminger [Sat, 7 Mar 2015 02:23:22 +0000 (18:23 -0800)]
ixgbe: make bulk alloc static
Only used in this file, make it static.
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Changchun Ouyang <changchun.ouyang@intel.com>
Stephen Hemminger [Sat, 7 Mar 2015 02:23:21 +0000 (18:23 -0800)]
ixgbe: make register maps const
These are const data structures, just put them in txt segment
rather than having compiler emit code to set them up on the stack.
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Changchun Ouyang <changchun.ouyang@intel.com>
Stephen Hemminger [Sat, 7 Mar 2015 02:23:20 +0000 (18:23 -0800)]
ixgbe: make txq_ops const
All virtual function tables should be const so they are put
in text segment rather than data.
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Changchun Ouyang <changchun.ouyang@intel.com>
David Marchand [Wed, 4 Mar 2015 21:50:10 +0000 (22:50 +0100)]
eal: remove useless errno
There is no remaining reference to E_RTE_NO_TAILQ.
Signed-off-by: David Marchand <david.marchand@6wind.com>
Acked-by: Neil Horman <nhorman@tuxdriver.com>
David Marchand [Wed, 4 Mar 2015 21:50:09 +0000 (22:50 +0100)]
tailq: remove static slots
No static entry remaining, the rte_tailq api is for "internal use" only, get rid
of the static slots.
Signed-off-by: David Marchand <david.marchand@6wind.com>
Acked-by: Neil Horman <nhorman@tuxdriver.com>
David Marchand [Wed, 4 Mar 2015 21:50:08 +0000 (22:50 +0100)]
tailq: move to dynamic tailq
Use dynamic tailq rather than static entries.
Signed-off-by: David Marchand <david.marchand@6wind.com>
Acked-by: Neil Horman <nhorman@tuxdriver.com>
David Marchand [Wed, 4 Mar 2015 21:50:07 +0000 (22:50 +0100)]
tailq: introduce dynamic register system
This register system makes it possible to reserve a tailq for the dpdk
libraries.
The "dynamic" tailqs are right after the "static" tailqs in shared mem.
Primary process is responsible for writing the tailq names, so that secondary
processes can find them.
This is a temp commit, "static" tailqs are removed after conversion of all
users in next commits.
Signed-off-by: David Marchand <david.marchand@6wind.com>
Acked-by: Neil Horman <nhorman@tuxdriver.com>
David Marchand [Wed, 4 Mar 2015 21:50:06 +0000 (22:50 +0100)]
tailq: remove unused macros
A lot of places just protect against concurrent access and I can not see the
gain of having those macros.
Signed-off-by: David Marchand <david.marchand@6wind.com>
Acked-by: Neil Horman <nhorman@tuxdriver.com>
David Marchand [Wed, 4 Mar 2015 21:50:05 +0000 (22:50 +0100)]
tailq: get rid of broken reserve api
The "reserve" macros and functions do not check if the requested entry is free.
They do nothing more than the lookup function (which itself "creates" entries
...).
The rte_tailq api is marked as "internal use" in documentation and these macros
are only used in test application, so just get rid of them.
Signed-off-by: David Marchand <david.marchand@6wind.com>
Acked-by: Neil Horman <nhorman@tuxdriver.com>
David Marchand [Wed, 4 Mar 2015 21:50:04 +0000 (22:50 +0100)]
tailq: use a single cast macro
No need to cast everywhere, define a common macro for this, plus it can be used
in future commits.
Signed-off-by: David Marchand <david.marchand@6wind.com>
Acked-by: Neil Horman <nhorman@tuxdriver.com>
David Marchand [Wed, 4 Mar 2015 21:50:03 +0000 (22:50 +0100)]
tailq: remove unneeded inclusions
Only keep inclusion where really needed.
Signed-off-by: David Marchand <david.marchand@6wind.com>
Acked-by: Neil Horman <nhorman@tuxdriver.com>
David Marchand [Wed, 4 Mar 2015 21:50:02 +0000 (22:50 +0100)]
pci: use lookup tailq api
There is no reason why we should use the "reserve" tailq api, since the pci
entry is already statically reserved.
Signed-off-by: David Marchand <david.marchand@6wind.com>
Acked-by: Neil Horman <nhorman@tuxdriver.com>
David Marchand [Wed, 4 Mar 2015 21:50:01 +0000 (22:50 +0100)]
eal: remove remaining reference to pm
Hopefully, this is the last reference to pm.
Signed-off-by: David Marchand <david.marchand@6wind.com>
Acked-by: Neil Horman <nhorman@tuxdriver.com>
Thomas Monjalon [Thu, 5 Mar 2015 18:24:59 +0000 (19:24 +0100)]
ethdev: remove useless parameter in init functions
The pointer to struct eth_driver is not used and is already set
in struct rte_eth_dev.
It's a small cleanup in PMD API which probably needs more
attention to make clear what is a driver, a PCI driver, an
ethernet driver, etc.
Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
Michael Qiu [Fri, 6 Mar 2015 03:53:32 +0000 (11:53 +0800)]
app/test: fix printf format
test_hash.c: In function ‘test_crc32_hash_alg_equiv’:
error: format ‘%lu’ expects argument of type ‘long unsigned int’,
but argument 2 has type ‘size_t’ [-Werror=format]
According to C99, for size_t type should use format "%zu"
Signed-off-by: Michael Qiu <michael.qiu@intel.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
Michael Qiu [Mon, 9 Mar 2015 05:58:05 +0000 (13:58 +0800)]
hash: fix unsupported crc instruction in i686 platform
Error: unsupported instruction `crc32'
The root cause is that i686 platform does not support 'crc32q'
Need make it only available in x86_64 platform.
Signed-off-by: Michael Qiu <michael.qiu@intel.com>
Acked-by: Yerden Zhumabekov <yerden.zhumabekov@sts.kz>
Michael Qiu [Thu, 5 Mar 2015 13:57:43 +0000 (21:57 +0800)]
eal/x86: fix redeclaration of registers
include/rte_cpuflags.h:154:2: error: redeclaration of enumerator ‘REG_EAX’
In i686, from REG_EAX to REG_EDX are all defined in
/usr/include/sys/ucontext.h
Rename to RTE_REG_EAX to avoid this issue.
Signed-off-by: Michael Qiu <michael.qiu@intel.com>
Acked-by: David Marchand <david.marchand@6wind.com>
Konstantin Ananyev [Fri, 6 Mar 2015 15:59:47 +0000 (15:59 +0000)]
eal: fix C++11 compilation
When compiling C++11-code or above (--std=c++11), the build fails with
lots of
rte_eth_ctrl.h:517:3: note: in expansion of macro RTE_ALIGN
(RTE_ALIGN(RTE_ETH_FLOW_MAX, UINT32_BIT)/UINT32_BIT)
^
When reading the GCC info pages, I get the feeling that __typeof__ is
a better choice, and that indeed works when including the headers in
C++ files (--std=c++11).
Signed-off-by: Simon Kagstrom <simon.kagstrom@netinsight.net>
Signed-off-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
Ouyang Changchun [Fri, 6 Mar 2015 08:10:06 +0000 (16:10 +0800)]
doc: more vlan offload commands in testpmd
Update the testpmd doc as there are new HW VLAN commands/options.
Signed-off-by: Changchun Ouyang <changchun.ouyang@intel.com>
Acked-by: Michael Qiu <michael.qiu@intel.com>
Acked-by: Siobhan Butler <siobhan.a.butler@intel.com>
Ouyang Changchun [Fri, 6 Mar 2015 08:10:05 +0000 (16:10 +0800)]
app/testpmd: more vlan offload commands
This patch enables testpmd user can config port hw_vlan with more fine granularity:
hw vlan filter, hw vlan strip, and hw vlan extend.
Don't remove the original command(hw-vlan) considering that some user still want to use
only one command to switch on/off all 3 options.
Signed-off-by: Changchun Ouyang <changchun.ouyang@intel.com>
Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Michal Jastrzebski [Fri, 20 Feb 2015 10:26:12 +0000 (11:26 +0100)]
app/testpmd: check vlan filter configuration
This patch modifies testpmd behavior when setting:
rx_vlan add all vf_port (enabling all vlanids
to be passed thru rx filter on VF).
Rx_vlan_all_filter_set() function,
checks if the next vlanid can be enabled by the driver.
Number of vlanids is limited by the NIC and thus the NIC
do not allow to enable more vlanids than it can allocate
in VFTA table.
Signed-off-by: Michal Jastrzebski <michalx.k.jastrzebski@intel.com>
Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Michal Jastrzebski [Fri, 20 Feb 2015 10:26:11 +0000 (11:26 +0100)]
doc: warn about limited number of vlan ids
This patch adds information to testpmd_funcs.rst file,
about limited number of vlan_ids possible to be enabled
in a filter. This is limited to the maximum number of entries
possible in the VFTA table.
Signed-off-by: Michal Jastrzebski <michalx.k.jastrzebski@intel.com>
Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Michal Jastrzebski [Fri, 6 Mar 2015 07:38:59 +0000 (08:38 +0100)]
app/testpmd: fix bond port creation
When invoking creation of bonded device using:
create bonded device mode socket in testpmd the bonded port was not
enabled at the end of cmd_create_bonded_device_parsed function.
This caused commands 'show port info' and 'show port stats' not working
properly with bonding device. This patch fixed it.
Signed-off-by: Michal Jastrzebski <michalx.k.jastrzebski@intel.com>
Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Michael Qiu [Mon, 9 Mar 2015 06:05:47 +0000 (14:05 +0800)]
app/testpmd: forbid actions on invalid port
Currently, if try to start/stop/close one invalid port,
no error shows in testpmd.
This is a bug, need check the port number.
Signed-off-by: Michael Qiu <michael.qiu@intel.com>
Acked-by: Tetsuya Mukawa <mukawa@igel.co.jp>
Michael Qiu [Mon, 2 Mar 2015 08:31:37 +0000 (16:31 +0800)]
app/testpmd: fix log with no bound device
As hotplug has been enabled, start the testpmd with no nic binded
will show one error log "Please stop the ports first":
Interactive-mode selected
Please stop the ports first
Done
testpmd>
This issue is cause by the logic of check link status.
Signed-off-by: Michael Qiu <michael.qiu@intel.com>
Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Takuya Asada [Mon, 23 Feb 2015 07:51:25 +0000 (16:51 +0900)]
virtio: add default Tx configuration
When I tried to launch test-pmd on KVM guest of Fedora21, I got following error:
Configuring Port 0 (socket 0)
Fail to configure port 0 tx queues
EAL: Error - exiting with code: 1
Cause: Start ports failed
I found that the error caused here, and actual error message was
"TX checksum offload not supported".
This patch adds default_txconf on virtio pmd, to avoid the error.
Signed-off-by: Takuya Asada <syuu@cloudius-systems.com>
Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Huawei Xie [Fri, 6 Mar 2015 11:05:43 +0000 (19:05 +0800)]
vhost: check file descriptor before closing
This avoids closing -1 in our case.
Signed-off-by: Huawei Xie <huawei.xie@intel.com>
Acked-by: Changchun Ouyang <changchun.ouyang@intel.com>
Acked-by: Tetsuya Mukawa <mukawa@igel.co.jp>
Huawei Xie [Fri, 6 Mar 2015 10:39:18 +0000 (18:39 +0800)]
vhost: fix file descriptors naming
Previous vhost implementation wrongly name kickfd as callfd and callfd as kickfd.
It is functional correct, but causes confusion.
Exchange kickfd and callfd to avoid confusion.
Signed-off-by: Huawei Xie <huawei.xie@intel.com>
Acked-by: Changchun Ouyang <changchun.ouyang@intel.com>
Acked-by: Tetsuya Mukawa <mukawa@igel.co.jp>
Huawei Xie [Fri, 6 Mar 2015 05:52:43 +0000 (13:52 +0800)]
vhost: use loop instead of goto
This patch reorder the code a bit to use loop instead of goto.
Besides, remove abudant check 'fd != -1'.
Signed-off-by: Huawei Xie <huawei.xie@intel.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
Huawei Xie [Fri, 6 Mar 2015 05:52:27 +0000 (13:52 +0800)]
vhost: combine select with sleep
combine sleep into select when there is no file descriptors to be monitored.
Signed-off-by: Huawei Xie <huawei.xie@intel.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
Ouyang Changchun [Mon, 2 Mar 2015 12:25:45 +0000 (20:25 +0800)]
ixgbe: fix VF Tx for X550
X550 should use the correct macro to set the VFTDT and VFRDT register address.
This patch fixes the VF TX issue for Sageville.
Signed-off-by: Changchun Ouyang <changchun.ouyang@intel.com>
Acked-by: Cunming Liang <cunming.liang@intel.com>
Michael Qiu [Fri, 6 Mar 2015 03:13:07 +0000 (11:13 +0800)]
eal/x86: fix integer cast in memcpy
./i686-native-linuxapp-gcc/include/rte_memcpy.h:592:23: error:
cast from pointer to integer of different size
[-Werror=pointer-to-int-cast]
dstofss = 16 - (int)((long long)(void *)dst & 0x0F) + 16;
Type 'long long' is 64-bit in i686 platform while 'void *'
is 32-bit.
Signed-off-by: Michael Qiu <michael.qiu@intel.com>
Signed-off-by: Zhihong Wang <zhihong.wang@intel.com>
Zhihong Wang [Mon, 2 Mar 2015 09:03:50 +0000 (17:03 +0800)]
eal/x86: fix strict aliasing rules
Fixed strict-aliasing rules breaking errors for some GCC version.
Signed-off-by: Zhihong Wang <zhihong.wang@intel.com>
Acked-by: Cunming Liang <cunming.liang@intel.com>
Acked-by: Michael Qiu <michael.qiu@intel.com>
Keith Wiles [Wed, 4 Mar 2015 17:13:09 +0000 (11:13 -0600)]
mk: move internal file
Move the rte.extvars.mk to an internal directory and
update rte.vars.mk to find the file in the new location.
Signed-off-by: Keith Wiles <keith.wiles@intel.com>
Acked-by: Olivier Matz <olivier.matz@6wind.com>
Huawei Xie [Tue, 3 Mar 2015 02:26:04 +0000 (10:26 +0800)]
vhost: fix crash by removing device when requested
This patch fixes the segfault issue in the case vhost receives
new VHOST_SET_MEM_TABLE message without VHOST_VRING_GET_VRING_BASE
(which we uses as the stop message).
Signed-off-by: Huawei Xie <huawei.xie@intel.com>
Acked-by: Tommy Long <thomas.long@intel.com>
Panu Matilainen [Wed, 4 Mar 2015 06:12:12 +0000 (08:12 +0200)]
ethdev: add missing symbol export for port release
Fixes:
36ec8585b298 ("ethdev: release port")
Signed-off-by: Panu Matilainen <pmatilai@redhat.com>
Acked-by: Thomas Monjalon <thomas.monjalon@6wind.com>
Ouyang Changchun [Wed, 4 Mar 2015 02:55:35 +0000 (10:55 +0800)]
tools: fix binding to unsupported driver
The dpdk_nic_bind script will not allow ports to be bound or unbound if none of the
kernel modules supported by DPDK is loaded. This patch relaxes this restriction by
checking if a DPDK module is actually requested. The example below illustrates this
problem:
In virtio test, on the guest
1. Bind virtio port to igb_uio driver;
2. Remove igb_uio module;
3. Bind virtio port to virtio-pci driver, it fails and reports:
"Error - no supported modules are loaded"
The script should check the to-be-bound driver flag, if it is dpdk driver(igb_uio, vfio etc),
and the corresponding module is not loaded, then exit, otherwise, just report a warning,
and continue to bind the non-dpdk driver(like virtio-pci) to dev.
Signed-off-by: Changchun Ouyang <changchun.ouyang@intel.com>
Tested-by: Qian Xu <qian.q.xu@intel.com>
Acked-by: Michael Qiu <michael.qiu@intel.com>
Keith Wiles [Thu, 26 Feb 2015 14:00:32 +0000 (08:00 -0600)]
ethdev: fix hotplug check for Rx and Tx callbacks
Some checks with rte_eth_dev_is_valid_port() were missed when merging
hotplug and callbacks features.
Fixes:
c282abd2a6cd ("ethdev: remove assumption that port will not be detached")
Signed-off-by: Keith Wiles <keith.wiles@intel.com>
Acked-by: John McNamara <john.mcnamara@intel.com>
Cunming Liang [Mon, 2 Mar 2015 13:28:24 +0000 (21:28 +0800)]
ixgbe: check rxd number to avoid mbuf leak
The mbuf leak happens when the assigned number of rx descriptor is not
power of 2 in vector mode.
As it's presumed on vpmd rx (for rx_tail wrap), adding condition check
to prevent it.
The root cause reference code in *_recv_raw_pkts_vec* as below.
"rxq->rx_tail = (uint16_t)(rxq->rx_tail & (rxq->nb_rx_desc - 1));".
Reported-by: Stephen Hemminger <stephen@networkplumber.org>
Signed-off-by: Cunming Liang <cunming.liang@intel.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
Tetsuya Mukawa [Thu, 5 Mar 2015 07:31:01 +0000 (16:31 +0900)]
mk: fix config build on freebsd
The '-fdirectives-only' flag doesn't exist in cpp of FreeBSD.
To remove expanding macros when parsing the config files won't
add any issue.
Suggested-by: Olivier Matz <olivier.matz@6wind.com>
Signed-off-by: Tetsuya Mukawa <mukawa@igel.co.jp>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>