dpdk.git
9 years agovirtio: check for ip checksum offload
Stephen Hemminger [Sat, 14 Jun 2014 01:06:22 +0000 (18:06 -0700)]
virtio: check for ip checksum offload

This driver does not support receive IP checksum offload,
therefore must check and return error if configured incorrectly.

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Alan Carew <alan.carew@intel.com>
9 years agovirtio: check for transmit checksum config error
Stephen Hemminger [Sat, 14 Jun 2014 01:06:21 +0000 (18:06 -0700)]
virtio: check for transmit checksum config error

This driver does not support transmit checksum or vlan offload
therefore check for this when device is configured.

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Alan Carew <alan.carew@intel.com>
9 years agovirtio: deinline some code
Stephen Hemminger [Sat, 14 Jun 2014 01:06:20 +0000 (18:06 -0700)]
virtio: deinline some code

This driver has lots of functions marked always inline which is actually
counterproductive with modern compilers. Better to move the functions to
the one file they are used (proper scope) and let compiler decide.

For trivial functions leave them as static inline.

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Alan Carew <alan.carew@intel.com>
9 years agovirtio: dont double space log messages
Stephen Hemminger [Sat, 14 Jun 2014 01:06:19 +0000 (18:06 -0700)]
virtio: dont double space log messages

PMD_INIT_LOG macro already adds a newline, no need to double space.

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Alan Carew <alan.carew@intel.com>
9 years agovirtio: maintain stats per queue
Stephen Hemminger [Sat, 14 Jun 2014 01:06:18 +0000 (18:06 -0700)]
virtio: maintain stats per queue

Avoid cache collision and thrashing of the software statistics
by keeping them per-queue in the driver.

Signed-off-by: Stephen Hemminger <shemming@brocade.com>
Acked-by: Alan Carew <alan.carew@intel.com>
9 years agovirtio: fix incorrect parens
Matthew Hall [Mon, 21 Jul 2014 03:47:39 +0000 (20:47 -0700)]
virtio: fix incorrect parens

Signed-off-by: Matthew Hall <mhall@mhcomputing.net>
Acked-by: Thomas Monjalon <thomas.monjalon@6wind.com>
9 years agovirtio: fix 32-bit build for 64-bit kernel
Vijayakumar Muthuvel Manickam [Fri, 18 Jul 2014 10:53:48 +0000 (03:53 -0700)]
virtio: fix 32-bit build for 64-bit kernel

virtio_net_hdr_mem member within virtqueue structure stores a
physical address and is defined as void ptr. When 32bit pmd is used
with 64bit kernel this leads to truncation of 64bit physical address
and pkt i/o does not work.
Changed virtio_net_hdr_mem to phys_addr_t type and
removed the typecasts

Signed-off-by: Vijayakumar Muthuvel Manickam <mmvijay@gmail.com>
Acked-by: Thomas Monjalon <thomas.monjalon@6wind.com>
9 years agovirtio: fix device specific header offset when MSI-X is disabled
Alan Carew [Mon, 16 Jun 2014 11:10:26 +0000 (12:10 +0100)]
virtio: fix device specific header offset when MSI-X is disabled

Suggested-by: Neil Horman <nhorman@tuxdriver.com>
Suggested-by: Stephen Hemminger <stephen@networkplumber.org>
Signed-off-by: Alan Carew <alan.carew@intel.com>
9 years agoigb_uio: fix build with kernel older than 3.3
Thomas Monjalon [Tue, 22 Jul 2014 12:27:55 +0000 (14:27 +0200)]
igb_uio: fix build with kernel older than 3.3

Since Linux commit fb51ccbf217 (PCI: Rework config space blocking services),
the functions pci_(un)block_user_cfg_access are replaced by
pci_cfg_access_(un)lock.

The compatibility with older functions was broken since commit 399a3f0db8b0
(igb_uio: fix IRQ mode handling).

Reported-by: Yerden Zhumabekov <e_zhumabekov@sts.kz>
Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
9 years agoigb_uio: fix typos for kernel older than 3.3
Yerden Zhumabekov [Mon, 21 Jul 2014 12:03:52 +0000 (18:03 +0600)]
igb_uio: fix typos for kernel older than 3.3

Signed-off-by: Yerden Zhumabekov <e_zhumabekov@sts.kz>
Acked-by: Thomas Monjalon <thomas.monjalon@6wind.com>
9 years agoigb_uio: MSI IRQ mode
Stephen Hemminger [Fri, 6 Jun 2014 23:50:36 +0000 (16:50 -0700)]
igb_uio: MSI IRQ mode

Add MSI to the list of possible IRQ modes.

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
[Thomas: isolate MSI code from other patch and don't set info.irq twice]
Acked-by: Thomas Monjalon <thomas.monjalon@6wind.com>
9 years agoigb_uio: fix IRQ mode handling
Stephen Hemminger [Fri, 6 Jun 2014 23:50:36 +0000 (16:50 -0700)]
igb_uio: fix IRQ mode handling

This pach reworks how IRQ mode handling is done.

The biggest code change is to use the standard INTX management
code that exists in more recent kernels (and provide backport version).
This also fixes the pci_lock code which was broken, since it was
not protecting against config access, and was doing trylock.

Make this driver behave like other Linux drivers.
Start at MSI-X and degrade to less desireable modes
automatically if the desired type is not available.

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Thomas Monjalon <thomas.monjalon@6wind.com>
9 years agoigb_uio: MSI-X cleanups
Stephen Hemminger [Fri, 6 Jun 2014 23:50:33 +0000 (16:50 -0700)]
igb_uio: MSI-X cleanups

Since only one MSI-X entry is ever defined, there is no need to
put it as an array in the driver private data structure. One msix_entry
can just be put on the stack and initialized there.

Also remove the unused backport defines related to MSI-X.
I suspect this code was just inherited from some other project and
never cleaned up.

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Thomas Monjalon <thomas.monjalon@6wind.com>
9 years agoigb_uio: make irq mode param read-only
Stephen Hemminger [Fri, 6 Jun 2014 23:50:35 +0000 (16:50 -0700)]
igb_uio: make irq mode param read-only

The module parameter is read-only since changing mode after loading
isn't going to work.

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Thomas Monjalon <thomas.monjalon@6wind.com>
9 years agoigb_uio: add missing locking to config access
Stephen Hemminger [Fri, 18 Jul 2014 16:14:55 +0000 (09:14 -0700)]
igb_uio: add missing locking to config access

Access to PCI config space should be inside pci_cfg_access_lock
to avoid read/modify/write races.

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Thomas Monjalon <thomas.monjalon@6wind.com>
9 years agoigb_uio: propogate error numbers in probe code
Stephen Hemminger [Fri, 6 Jun 2014 23:50:34 +0000 (16:50 -0700)]
igb_uio: propogate error numbers in probe code

It is good practice to propogate the return values of failing
functions so that more information can be reported. The failed result
of probe will make it out to errno and get printed by modprobe
and will aid in diagnosis of failures.

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Thomas Monjalon <thomas.monjalon@6wind.com>
9 years agoigb_uio: dont wrap pci_num_vf function needlessly
Stephen Hemminger [Fri, 6 Jun 2014 23:50:32 +0000 (16:50 -0700)]
igb_uio: dont wrap pci_num_vf function needlessly

It is better style to just use the pci_num_vf directly, rather
than wrapping it with a local (but globally named) function with
the same effect.

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Thomas Monjalon <thomas.monjalon@6wind.com>
9 years agoigb_uio: fix checkpatch warnings
Stephen Hemminger [Fri, 6 Jun 2014 23:50:31 +0000 (16:50 -0700)]
igb_uio: fix checkpatch warnings

Fix style issues reported by checkpatch.
There was a real bug in that the setup code was returning
positive value for errors which goes against convention and
might have caused a problem.

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Thomas Monjalon <thomas.monjalon@6wind.com>
9 years agoigb_uio: use standard uio naming
Stephen Hemminger [Fri, 6 Jun 2014 23:50:30 +0000 (16:50 -0700)]
igb_uio: use standard uio naming

Don't put capitialization and space in name since it will show
up in /proc/interrupts. Instead use driver name to follow the
conventions used in the kernel by other drivers.

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Thomas Monjalon <thomas.monjalon@6wind.com>
9 years agoigb_uio: use kernel standard log message
Stephen Hemminger [Fri, 6 Jun 2014 23:50:29 +0000 (16:50 -0700)]
igb_uio: use kernel standard log message

Use Linux kernel standard coding conventions for console messages.
Bare use of printk() is not desirable and is reported as a style
problem by checkpatch. Instead use pr_info() and dev_info()
to print out log messages where appropriate.

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Thomas Monjalon <thomas.monjalon@6wind.com>
9 years agokni: allow setting MAC address
Padam Jeet Singh [Tue, 1 Jul 2014 14:14:12 +0000 (19:44 +0530)]
kni: allow setting MAC address

Add relevant callback function to change a KNI device's MAC address.

Signed-off-by: Padam Jeet Singh <padam.singh@inventum.net>
Reviewed-by: Helin Zhang <helin.zhang@intel.com>
9 years agokni: fix deadlock in netif_receive_skb
Yao-Po Wang [Fri, 11 Jul 2014 15:37:24 +0000 (23:37 +0800)]
kni: fix deadlock in netif_receive_skb

Per netif_receive_skb function description, it may only be called from
interrupt contex, but KNI is run on kthread that like as user-space
context. It may occur deadlock, if netif_receive_skb called from kthread,
so it should be repleaced by netif_rx or adding local_bh_disable/enable
around netif_receive_skb.

Signed-off-by: Yao-Po Wang <blue119@gmail.com>
Acked-by: Alex Markuze <alex@weka.io>
9 years agoconfig: add clang
Bruce Richardson [Mon, 7 Jul 2014 23:36:58 +0000 (00:36 +0100)]
config: add clang

Add compilation support for clang on Linux and FreeBSD.
clang is the default compiler on FreeBSD 10.

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Tested-by: Zhaochen Zhan <zhaochen.zhan@intel.com>
[Thomas: update comments]
Acked-by: Thomas Monjalon <thomas.monjalon@6wind.com>
9 years agoconfig: cleanup duplicated comments
Thomas Monjalon [Fri, 18 Jul 2014 23:10:16 +0000 (01:10 +0200)]
config: cleanup duplicated comments

Comments to help on basic configuration are already located
in common configs.
No need to duplicate (and maintain) them in inherited configurations.

Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
9 years agomk: add clang toolchain
Bruce Richardson [Mon, 7 Jul 2014 23:36:58 +0000 (00:36 +0100)]
mk: add clang toolchain

Add support for clang by adding a toolchain folder for it with the
appropriate files.

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Tested-by: Zhaochen Zhan <zhaochen.zhan@intel.com>
[Thomas: CC from command line overrides HOSTCC]
Acked-by: Thomas Monjalon <thomas.monjalon@6wind.com>
9 years agomk: fix detection of SSE4.2 on FreeBSD
Bruce Richardson [Mon, 7 Jul 2014 23:36:56 +0000 (00:36 +0100)]
mk: fix detection of SSE4.2 on FreeBSD

Add a special case to the native target makefile, where we check if
-march=native shows SSE4.2 support. If it does not, then not everything may
build, so we check if the hardware supports SSE4.2, and use a corei7 target
explicitly to get the SSE4.2 support.

Then ACL library, which requires SSE4.2, can be re-enabled for FreeBSD.

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Tested-by: Zhaochen Zhan <zhaochen.zhan@intel.com>
Acked-by: Thomas Monjalon <thomas.monjalon@6wind.com>
9 years agovmxnet3/base: disable some clang warnings
Bruce Richardson [Mon, 7 Jul 2014 23:36:55 +0000 (00:36 +0100)]
vmxnet3/base: disable some clang warnings

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Tested-by: Zhaochen Zhan <zhaochen.zhan@intel.com>
9 years agoi40e/base: disable some clang warnings
Bruce Richardson [Mon, 7 Jul 2014 23:36:55 +0000 (00:36 +0100)]
i40e/base: disable some clang warnings

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Tested-by: Zhaochen Zhan <zhaochen.zhan@intel.com>
9 years agoixgbe/base: disable some clang warnings
Bruce Richardson [Mon, 7 Jul 2014 23:36:55 +0000 (00:36 +0100)]
ixgbe/base: disable some clang warnings

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Tested-by: Zhaochen Zhan <zhaochen.zhan@intel.com>
9 years agoacl: fix header include for intrinsics
Bruce Richardson [Mon, 7 Jul 2014 23:36:57 +0000 (00:36 +0100)]
acl: fix header include for intrinsics

Clang compile fails without nmmintrin.h being explicitly included.

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Tested-by: Zhaochen Zhan <zhaochen.zhan@intel.com>
Acked-by: Thomas Monjalon <thomas.monjalon@6wind.com>
9 years agobond: fix variable initialization
Bruce Richardson [Mon, 7 Jul 2014 23:36:54 +0000 (00:36 +0100)]
bond: fix variable initialization

Variable "valid_slave" wasn't getting properly zero-initialized.
This error is flagged by clang on compile.

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Tested-by: Zhaochen Zhan <zhaochen.zhan@intel.com>
Acked-by: Thomas Monjalon <thomas.monjalon@6wind.com>
9 years agoexamples/pipeline: build with all examples
Thomas Monjalon [Thu, 17 Jul 2014 08:30:52 +0000 (10:30 +0200)]
examples/pipeline: build with all examples

When adding this packet framework sample (commit 77a3346),
it has been forgotten to add it into the global makefile for
"make examples".

Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
9 years agoexamples: fix default build target
Pablo de Lara [Wed, 16 Jul 2014 13:35:56 +0000 (14:35 +0100)]
examples: fix default build target

L3fwd-acl and ip pipeline apps were using old
x86_64-default-linuxapp-gcc as their default target,
instead of x86_64-native-linuxapp-gcc

Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Acked-by: Thomas Monjalon <thomas.monjalon@6wind.com>
9 years agonic_uio: add i40e device ids
Richardson, Bruce [Fri, 11 Jul 2014 00:12:37 +0000 (00:12 +0000)]
nic_uio: add i40e device ids

The FreeBSD nic_uio driver was missing the #defines to include the device ids
for devices using the i40e driver. This change adds in the missing defines.

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Helin Zhang <helin.zhang@intel.com>
9 years agoport: fix doxygen comment
Yao Zhao [Tue, 15 Jul 2014 14:06:03 +0000 (10:06 -0400)]
port: fix doxygen comment

Fix doxygen comment for rte_port_out_op_flush.

Signed-off-by: Yao Zhao <yao.zhao@windriver.com>
Acked-by: Thomas Monjalon <thomas.monjalon@6wind.com>
9 years agodoc: remove extraneous comma
Thomas Monjalon [Fri, 4 Jul 2014 09:12:31 +0000 (11:12 +0200)]
doc: remove extraneous comma

Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
9 years agoversion: 1.7.1-rc0
Thomas Monjalon [Wed, 16 Jul 2014 07:44:50 +0000 (09:44 +0200)]
version: 1.7.1-rc0

Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
9 years agoversion: 1.7.0
Thomas Monjalon [Fri, 4 Jul 2014 08:18:07 +0000 (10:18 +0200)]
version: 1.7.0

The makefile rule "showversion" needs a fix to handle empty RTE_VER_SUFFIX.

Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
9 years agopkg: update RPM
Thomas Monjalon [Wed, 2 Jul 2014 16:31:45 +0000 (18:31 +0200)]
pkg: update RPM

- no version in name
- rename dpdk-core and dpdk-core-devel to dpdk and dpdk-devel
- devel depends on main package
- split API doc in a separated package
- prefer %global over %define
- add scripts/ directory (needed for libraries based on DPDK)
- build for Nehalem CPU (ixgbe-vec and acl don't build for default CPU)
- build pcap PMD
- build xen PMD

Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
9 years agobond: fix doxygen
Thomas Monjalon [Thu, 3 Jul 2014 19:11:07 +0000 (21:11 +0200)]
bond: fix doxygen

Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
9 years agoexamples/qos_sched: fix flow pause after 2M packets
Yong Liu [Thu, 3 Jul 2014 08:59:36 +0000 (16:59 +0800)]
examples/qos_sched: fix flow pause after 2M packets

After enable vector pmd, qos_sched only send 32 packets every burst.
That will cause some packets not transmitted and therefore mempool
will be drain after a while.
App qos_sched now will re-send the packets which failed to send out in
previous tx function.

Signed-off-by: Yong Liu <yong.liu@intel.com>
Acked-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
Tested-by: Waterman Cao <waterman.cao@intel.com>
9 years agoxen: fix build
Thomas Monjalon [Thu, 3 Jul 2014 14:06:04 +0000 (16:06 +0200)]
xen: fix build

There were 2 errors:

lib/librte_pmd_xenvirt/rte_xen_lib.c:409:2:
error: zero-length gnu_printf format string [-Werror=format-zero-length]

lib/librte_pmd_xenvirt/rte_xen_lib.c:424:2:
error: format '%p' expects argument of type 'void *', but argument 4 has
type 'uintptr_t' [-Werror=format=]

Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
9 years agoversion: 1.7.0-rc4
Thomas Monjalon [Wed, 2 Jul 2014 22:21:28 +0000 (00:21 +0200)]
version: 1.7.0-rc4

Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
9 years agoexamples: ignore linux apps on bsd
Thomas Monjalon [Wed, 2 Jul 2014 22:07:15 +0000 (00:07 +0200)]
examples: ignore linux apps on bsd

Do not try to build Linux examples in a BSD environment.

Reported-by: Bruce Richardson <bruce.richardson@intel.com>
Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
9 years agoconfig: fix bsd options
Thomas Monjalon [Wed, 2 Jul 2014 20:53:44 +0000 (22:53 +0200)]
config: fix bsd options

Add some missing options (disabled) and disable i40e debug.

Reported-by: Bruce Richardson <bruce.richardson@intel.com>
Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
9 years agoixgbe/base: fix build with debug
Thomas Monjalon [Wed, 2 Jul 2014 13:10:59 +0000 (15:10 +0200)]
ixgbe/base: fix build with debug

The upgraded base driver, especially commit 9ba80bde4c, didn't compile if
CONFIG_RTE_LIBRTE_IXGBE_DEBUG_DRIVER is enabled.

Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
9 years agovmxnet3: fix build with debug
Thomas Monjalon [Wed, 2 Jul 2014 13:11:47 +0000 (15:11 +0200)]
vmxnet3: fix build with debug

Functions for queue dump are not used and cause compilation error if
CONFIG_RTE_LIBRTE_VMXNET3_DEBUG_DRIVER is enabled.
Fixed by disabling them.

Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
9 years agovirtio: fix build of debug dump
Thomas Monjalon [Wed, 2 Jul 2014 13:11:31 +0000 (15:11 +0200)]
virtio: fix build of debug dump

The commit 591a9d7985c1230 (add FILE argument to debug functions) didn't
compile if CONFIG_RTE_LIBRTE_VIRTIO_DEBUG_DUMP is enabled.

Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
9 years agopcap: fix build
Thomas Monjalon [Wed, 2 Jul 2014 13:09:32 +0000 (15:09 +0200)]
pcap: fix build

The commit 83b41136934 (add unique name to devices) didn't compile if
CONFIG_RTE_LIBRTE_PMD_PCAP is enabled.

Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
9 years agoethdev: fix build of named allocation debug
Thomas Monjalon [Wed, 2 Jul 2014 13:10:10 +0000 (15:10 +0200)]
ethdev: fix build of named allocation debug

The commit 83b41136934 (add unique name to devices) didn't compile if
CONFIG_RTE_LIBRTE_ETHDEV_DEBUG is enabled.

Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
9 years agoethdev: fix build of Tx rate limitation debug
Thomas Monjalon [Wed, 2 Jul 2014 13:10:30 +0000 (15:10 +0200)]
ethdev: fix build of Tx rate limitation debug

The commit 8dbe82b0733 (Tx rate limitation) didn't compile if
CONFIG_RTE_LIBRTE_ETHDEV_DEBUG is enabled.

Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
9 years agoeal: fix build for bsd
Thomas Monjalon [Wed, 2 Jul 2014 09:14:03 +0000 (11:14 +0200)]
eal: fix build for bsd

When adding link bonding to EAL initialization (a155d430119),
an include was missing for BSD.

Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
Tested-by: Zhaochen Zhan <zhaochen.zhan@intel.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
9 years agoi40e: add required steps in Tx queue management
Helin Zhang [Wed, 2 Jul 2014 03:10:25 +0000 (11:10 +0800)]
i40e: add required steps in Tx queue management

Hardware specification changed recently which requires to set
or clear TX queue disable flags before actually enabling or
disabling a specific TX queue. 'QTX_HEAD' register needs to
be cleared before setting the QENA_REQ flag.

Signed-off-by: Helin Zhang <helin.zhang@intel.com>
Acked-by: Jijiang Liu <jijiang.liu@intel.com>
Acked-by: Jing Chen <jing.d.chen@intel.com>
Tested-by: Min Cao <min.cao@intel.com>
9 years agoi40e: use new function to clear hardware before PF reset
Helin Zhang [Wed, 2 Jul 2014 03:10:24 +0000 (11:10 +0800)]
i40e: use new function to clear hardware before PF reset

i40e_clear_hw() was provided recently in shared code (base driver)
to clear hardware, which can cover disabling all queues.
The code changes are to remove i40e_pf_disable_all_queues() and use
i40e_clear_hw() instead.

Signed-off-by: Helin Zhang <helin.zhang@intel.com>
Acked-by: Jijiang Liu <jijiang.liu@intel.com>
Acked-by: Jing Chen <jing.d.chen@intel.com>
Tested-by: Min Cao <min.cao@intel.com>
9 years agobond: fix build on 32-bit Oracle Linux 6.4
Helin Zhang [Wed, 2 Jul 2014 07:29:52 +0000 (15:29 +0800)]
bond: fix build on 32-bit Oracle Linux 6.4

The compile error on 32 bits Oracle Linux 6.4 is as below.

Kernel: 2.6.39
GCC: 4.4.7 20120313

In file included from /usr/include/stdlib.h:320,
from i686-native-linuxapp-gcc/include/rte_mempool.h:63,
from i686-native-linuxapp-gcc/include/rte_mbuf.h:61,
from lib/librte_pmd_bond/rte_eth_bond_api.c:37:
/usr/include/sys/types.h:61: error: conflicting types for dev_t
/usr/include/linux/types.h:22: note: previous declaration of dev_t was here
/usr/include/sys/types.h:66: error: conflicting types for gid_t
/usr/include/linux/types.h:52: note: previous declaration of gid_t was here
/usr/include/sys/types.h:71: error: conflicting types for mode_t
/usr/include/linux/types.h:24: note: previous declaration of mode_t was here
/usr/include/sys/types.h:76: error: conflicting types for nlink_t
/usr/include/linux/types.h:25: note: previous declaration of nlink_t was here
/usr/include/sys/types.h:81: error: conflicting types for uid_t
/usr/include/linux/types.h:51: note: previous declaration of uid_t was here

Signed-off-by: Helin Zhang <helin.zhang@intel.com>
Acked-by: Cunming Liang <cunming.liang@intel.com>
9 years agoversion: 1.7.0-rc3
Thomas Monjalon [Tue, 1 Jul 2014 22:15:41 +0000 (00:15 +0200)]
version: 1.7.0-rc3

Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
9 years agoapp/test: fix and separate --vdev unit test
Pablo de Lara [Tue, 1 Jul 2014 16:13:57 +0000 (17:13 +0100)]
app/test: fix and separate --vdev unit test

In EAL flags unit test, vdev test was being included
(and broken) in whitelist test. It has been separated
in different test and fixed, by calling another
primary process, instead of a secondary one.

Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Acked-by: Thomas Monjalon <thomas.monjalon@6wind.com>
9 years agoapp/test: remove writes in NULL buffer from cmdline tests
Pablo de Lara [Mon, 30 Jun 2014 10:52:55 +0000 (11:52 +0100)]
app/test: remove writes in NULL buffer from cmdline tests

Cmdline unit test calls several functions that use snprintf,
with NULL pointer as the destination buffer. This patch
eliminates these NULL pointer tests.

Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Acked-by: Olivier Matz <olivier.matz@6wind.com>
Tested-by: Waterman Cao <waterman.cao@intel.com>
9 years agoapp/test: fix build switches to enable cmdline tests
Thomas Monjalon [Fri, 27 Jun 2014 09:21:11 +0000 (11:21 +0200)]
app/test: fix build switches to enable cmdline tests

There were 2 typos since these commits (in 1.6.0 releases):
21a7f4e264 fix build without librte_cmdline
cac6d08c8b replace --use-device option by --pci-whitelist and --vdev
In makefiles, the build options are prefixed with CONFIG_RTE_
but in .c file, it is only RTE_.

These typos were disabling cmdline unit tests and test of "--vdev eth_ring" option.

Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
9 years agokni: fix build with kernel 3.16
Aaro Koskinen [Tue, 17 Jun 2014 14:32:03 +0000 (17:32 +0300)]
kni: fix build with kernel 3.16

SET_ETHTOOL_OPS is gone in 3.16, so modify drivers accordingly.

Signed-off-by: Aaro Koskinen <aaro.koskinen@nsn.com>
Acked-by: Thomas Monjalon <thomas.monjalon@6wind.com>
9 years agokni: fix build with min/max Tx rate configuration of igbvf
Aaro Koskinen [Tue, 17 Jun 2014 14:32:04 +0000 (17:32 +0300)]
kni: fix build with min/max Tx rate configuration of igbvf

This follows the mainline Linux kernel commit
ed616689a3d95eb6c9bdbb1ef74b0f50cbdf276a (Add support to configure SR-IOV
VF minimum and maximum Tx rate) by Sucheta Chakraborty, and enables to
build the driver against 3.16.

Signed-off-by: Aaro Koskinen <aaro.koskinen@nsn.com>
Acked-by: Thomas Monjalon <thomas.monjalon@6wind.com>
9 years agokni: fix build on RHEL 7
Hiroshi Shimamoto [Thu, 12 Jun 2014 08:09:54 +0000 (08:09 +0000)]
kni: fix build on RHEL 7

Compilation in RHEL7 is failed. This fixes the build issue.

RHEL7 has skb_set_hash, the kernel version is 3.10 though.
Don't define skb_set_hash for RHEL7.

Signed-off-by: Hiroshi Shimamoto <h-shimamoto@ct.jp.nec.com>
Reviewed-by: Hayato Momma <h-momma@ce.jp.nec.com>
Tested-by: Waterman Cao <waterman.cao@intel.com>
9 years agobond: testpmd support
Declan Doherty [Wed, 25 Jun 2014 20:07:47 +0000 (21:07 +0100)]
bond: testpmd support

 - Includes the ability to create new bonded devices.
 - Add /remove bonding slave devices.
 - Interogate bonded device stats/configuration
 - Change bonding modes and select balance transmit polices

Signed-off-by: Declan Doherty <declan.doherty@intel.com>
Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
9 years agobond: unit tests
Declan Doherty [Wed, 25 Jun 2014 20:07:46 +0000 (21:07 +0100)]
bond: unit tests

Including:
 - code to generate packet bursts for testing rx and tx
   functionality of bonded device
 - virtual/stubbed out ethdev for use as slave ethdev in testing

Signed-off-by: Declan Doherty <declan.doherty@intel.com>
Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
9 years agoeal: support link bonding device initialization
Declan Doherty [Wed, 25 Jun 2014 20:07:45 +0000 (21:07 +0100)]
eal: support link bonding device initialization

Updating functionality in EAL to support adding link bonding
devices via –vdev option. Link bonding devices will be
initialized after all physical devices have been probed and
initialized.

Signed-off-by: Declan Doherty <declan.doherty@intel.com>
Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
9 years agoethdev: add unique name to devices
Declan Doherty [Wed, 25 Jun 2014 20:07:44 +0000 (21:07 +0100)]
ethdev: add unique name to devices

Adding support to rte_eth_dev_data structure to support unique
name identifier for ethdevs to support adding slave ethdevs
(specifically virtual devices which have no public unique
identifier) to a link bonding device. This changes the API
rte_eth_dev_allocate() to require a const char *name when
allocating a ethdev, which also verifies that the name is
unique and hasn’t been already used by an existed allocated
rte_eth_dev. Also contains updates to virtual pmd’s to now call
the API with a name parameter.

Signed-off-by: Declan Doherty <declan.doherty@intel.com>
Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
9 years agobond: new link bonding library
Declan Doherty [Wed, 25 Jun 2014 20:07:43 +0000 (21:07 +0100)]
bond: new link bonding library

Initial release with support for
 Mode 0 - Round Robin
 Mode 1 - Active Backup
 Mode 2 - Balance -> Supports 3 transmit polices (layer 2, layer 2+3, layer 3+4)
 Mode 3 - Broadcast

Signed-off-by: Declan Doherty <declan.doherty@intel.com>
Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Reviewed-by: Robert Sanford <rsanford2@gmail.com>
9 years agoversion: 1.7.0-rc2
Thomas Monjalon [Fri, 27 Jun 2014 01:12:30 +0000 (03:12 +0200)]
version: 1.7.0-rc2

Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
9 years agotools: allow nic status query without igb_uio
Bruce richardson [Thu, 26 Jun 2014 03:36:38 +0000 (04:36 +0100)]
tools: allow nic status query without igb_uio

Allow the nic bind/unbind script to print out its status messages even
if the igb_uio driver is not loaded. For binding and unbinding NICs, the
behaviour is the same, and the igb_uio driver still needs to be loaded.

Signed-off-by: Bruce richardson <bruce.richardson@intel.com>
Acked-by: Thomas Monjalon <thomas.monjalon@6wind.com>
9 years agotools: unbind ports that were erroneously bound
Anatoly Burakov [Wed, 18 Jun 2014 16:57:58 +0000 (17:57 +0100)]
tools: unbind ports that were erroneously bound

When binding devices to a generic driver (i.e. one that doesn't have a
PCI ID table, some devices that are not bound to any other driver could
be bound even if no one has asked them to. hence, we check the list of
drivers again, and see if some of the previously-unbound devices were
erroneously bound. if such devices are found, they are unbound back.

Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
Acked-by: Thomas Monjalon <thomas.monjalon@6wind.com>
9 years agoapp/testpmd: allow to set part of flow control parameters
David Marchand [Tue, 24 Jun 2014 13:06:52 +0000 (15:06 +0200)]
app/testpmd: allow to set part of flow control parameters

We might want to only change a parameter rather than have to set all possible
parameters, so add "partial" commands.
These commands only change the specified parameter.

To avoid duplicating code all around, a unique parser is kept. This parser uses
the .data parameter to select the right behavior.

Signed-off-by: David Marchand <david.marchand@6wind.com>
Acked-by: Thomas Monjalon <thomas.monjalon@6wind.com>
9 years agoapp/testpmd: move flow control parser
David Marchand [Tue, 24 Jun 2014 13:06:51 +0000 (15:06 +0200)]
app/testpmd: move flow control parser

Move parser after declarations to prepare rework in next commit.

Signed-off-by: David Marchand <david.marchand@6wind.com>
Acked-by: Thomas Monjalon <thomas.monjalon@6wind.com>
9 years agoapp/testpmd: add missing autoneg field to set flow control
David Marchand [Tue, 24 Jun 2014 13:06:50 +0000 (15:06 +0200)]
app/testpmd: add missing autoneg field to set flow control

Following commit 2d95b84aaacb3d2d0bd70367c0530d15e0cbb14e, rte_eth_fc_conf
struct contains a autoneg field that must be set by callers.
Add this parameter to testpmd.

Signed-off-by: David Marchand <david.marchand@6wind.com>
Acked-by: Thomas Monjalon <thomas.monjalon@6wind.com>
9 years agoeal: fix invalid memory read
Aaron Campbell [Thu, 26 Jun 2014 14:54:34 +0000 (10:54 -0400)]
eal: fix invalid memory read

Valgrind reports this issue:

==29880== Invalid read of size 1
==29880==    at 0x56FF9A5: cpu_socket_id (eal_lcore.c:101)
==29880==    by 0x56FFAE9: rte_eal_cpu_init (eal_lcore.c:168)
==29880==    by 0x56F944A: rte_eal_init (eal.c:975)

The problem is that endptr points to memory allocated underneath the DIR
handle, which has already been freed. So move the closedir() call lower.

Signed-off-by: Aaron Campbell <aaron@arbor.net>
Acked-by: Thomas Monjalon <thomas.monjalon@6wind.com>
9 years agoeal: deprecate rte_snprintf
Stephen Hemminger [Tue, 24 Jun 2014 18:15:28 +0000 (11:15 -0700)]
eal: deprecate rte_snprintf

The function rte_snprintf serves no useful purpose. It is the
same as snprintf() for all valid inputs. Deprecate it and
replace all uses in current code.

Leave the tests for the deprecated function in place.

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Thomas Monjalon <thomas.monjalon@6wind.com>
9 years agoeal: fix usage of printf-like functions
Bruce Richardson [Fri, 20 Jun 2014 23:34:30 +0000 (00:34 +0100)]
eal: fix usage of printf-like functions

Mark the rte_log, cmdline_printf and rte_snprintf functions as
being printf-style functions. This causes compilation errors
due to mis-matched parameter types, so the parameter types are
fixed where appropriate.

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Thomas Monjalon <thomas.monjalon@6wind.com>
9 years agomk: override HOSTCC when overriding CC
Bruce Richardson [Tue, 24 Jun 2014 00:23:03 +0000 (01:23 +0100)]
mk: override HOSTCC when overriding CC

When overriding the CC variable on the commandline, the HOSTCC value
was remaining at "gcc", which caused errors on Free BSD10 when using a gcc
as e.g. gcc48, without a binary just called "gcc". This change overrides
HOSTCC when CC is overridden, which means that setting CC=gcc48, will
now also set HOSTCC=gcc48, allowing the "testhost" app to compile on
BSD10.

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Thomas Monjalon <thomas.monjalon@6wind.com>
9 years agoacl: disable for bsd
Bruce Richardson [Tue, 24 Jun 2014 00:23:04 +0000 (01:23 +0100)]
acl: disable for bsd

Using gcc 4.8 on FreeBSD 10, support for SSE4.x is not detected by
the compiler, meaning that the ACL library, which depends on SSE4.2
cannot compile. Disable this library for the native target allows
compiles to succeed on FreeBSD 10 using gcc.

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Thomas Monjalon <thomas.monjalon@6wind.com>
9 years agomem: fix build because of missing stdio.h for FILE
Hiroshi Shimamoto [Thu, 12 Jun 2014 08:10:50 +0000 (08:10 +0000)]
mem: fix build because of missing stdio.h for FILE

Since commit "add FILE argument to debug functions" (591a9d7985c1230),
application which includes rte_memory.h without stdio.h will be hit
compilation failure:

/path/to/include/rte_memory.h:146:30: error: unknown type name ‘FILE’
 void rte_dump_physmem_layout(FILE *f);

Signed-off-by: Hiroshi Shimamoto <h-shimamoto@ct.jp.nec.com>
Reviewed-by: Hayato Momma <h-momma@ce.jp.nec.com>
Acked-by: Thomas Monjalon <thomas.monjalon@6wind.com>
9 years agoethdev: add link state interrupt flag
Stephen Hemminger [Thu, 19 Jun 2014 22:12:38 +0000 (15:12 -0700)]
ethdev: add link state interrupt flag

Only some devices support the link state interrupt configuration option.
Link state control does not work in virtual drivers
(virtio, vmxnet3, igbvf, and ixgbevf). Instead of having the application
try and guess whether it will work or not provide a driver flag that
can be checked instead.

Note: if device driver doesn't support link state control, what
would happen previously is that the code would never detect link
transitions. This prevents that.

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
[Thomas: rename flag]
Acked-by: Thomas Monjalon <thomas.monjalon@6wind.com>
9 years agoethdev: read link state interrupt without link update service
Thomas Monjalon [Fri, 20 Jun 2014 13:13:58 +0000 (15:13 +0200)]
ethdev: read link state interrupt without link update service

It is now possible to read link status updated by interrupt without
having manual link_update() service provided by the PMD.
Indeed link_update() is useless in interrupt case. So check of this
function pointer must be done in the interrupt case only.

Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
Acked-by: Olivier Matz <olivier.matz@6wind.com>
9 years agoexamples/ip_reassembly: reduce memory usage
Anatoly Burakov [Wed, 18 Jun 2014 14:50:36 +0000 (15:50 +0100)]
examples/ip_reassembly: reduce memory usage

Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
Acked-by: Thomas Monjalon <thomas.monjalon@6wind.com>
9 years agoexamples/ip_frag: fix socket detection
Anatoly Burakov [Wed, 18 Jun 2014 14:50:35 +0000 (15:50 +0100)]
examples/ip_frag: fix socket detection

Make everything NUMA-related depend on lcore sockets, not device
sockets. This is because the init_mem() function allocates all data
structures based on NUMA nodes of the lcores in the coremask. Therefore,
when no cores are on socket 0, but there are devices on socket 0, it may
lead to segmentation faults.

Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
Acked-by: Thomas Monjalon <thomas.monjalon@6wind.com>
9 years agoexamples/ip_frag: check for non-existent ports
Anatoly Burakov [Wed, 18 Jun 2014 14:50:35 +0000 (15:50 +0100)]
examples/ip_frag: check for non-existent ports

Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
Acked-by: Thomas Monjalon <thomas.monjalon@6wind.com>
9 years agoip_frag: add config option to enable statistics
Anatoly Burakov [Wed, 18 Jun 2014 14:50:31 +0000 (15:50 +0100)]
ip_frag: add config option to enable statistics

Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
Acked-by: Thomas Monjalon <thomas.monjalon@6wind.com>
9 years agoip_frag: custom memmove
Anatoly Burakov [Wed, 18 Jun 2014 14:50:33 +0000 (15:50 +0100)]
ip_frag: custom memmove

Some implementations of memmove may make a copy of src before writing to
dst. We avoid that by explicitly writing from src to dst backwards.

Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
Acked-by: Thomas Monjalon <thomas.monjalon@6wind.com>
9 years agoip_frag: fix order of key compare arguments
Anatoly Burakov [Wed, 18 Jun 2014 14:50:34 +0000 (15:50 +0100)]
ip_frag: fix order of key compare arguments

When using key compare function, it uses key length of the first
argument to determine how long should be the keys that are compared.
However, currently we are passing a key from the fragmentation table as
first argument. the problem with this is that this key is potentially
uninitialized (i.e. contains all zeroes, including key length). this
leads to a nasty bug of comparing only the key id's and not keys
themselves.

Of course, a safer way would be to do RTE_MAX between key lengths, but
since this compare is done per-packet, every cycle counts, so we just
use the key whose length is guaranteed to be correct because it comes
from an actual packet.

Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
Acked-by: Thomas Monjalon <thomas.monjalon@6wind.com>
9 years agoip_frag: fix debug macros
Anatoly Burakov [Wed, 18 Jun 2014 14:50:29 +0000 (15:50 +0100)]
ip_frag: fix debug macros

Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
Acked-by: Thomas Monjalon <thomas.monjalon@6wind.com>
9 years agoip_frag: fix comment
Anatoly Burakov [Wed, 18 Jun 2014 14:50:37 +0000 (15:50 +0100)]
ip_frag: fix comment

Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
Acked-by: Thomas Monjalon <thomas.monjalon@6wind.com>
9 years agoip_frag: replace hardcoded value with a macro
Anatoly Burakov [Wed, 18 Jun 2014 14:50:32 +0000 (15:50 +0100)]
ip_frag: replace hardcoded value with a macro

Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
Acked-by: Thomas Monjalon <thomas.monjalon@6wind.com>
9 years agoip_frag: remove unneeded rte prefixes
Anatoly Burakov [Wed, 18 Jun 2014 14:50:28 +0000 (15:50 +0100)]
ip_frag: remove unneeded rte prefixes

Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
Acked-by: Thomas Monjalon <thomas.monjalon@6wind.com>
9 years agomalloc: fix unit tests
Robert Sanford [Mon, 23 Jun 2014 21:17:10 +0000 (17:17 -0400)]
malloc: fix unit tests

Fix typos and false assumptions in malloc unit tests.

Without enhancements to lib rte_malloc, malloc autotest fails every
second (2nd) run. With enhancements, malloc autotest fails in
function test_multi_alloc_statistics, because we compare the wrong
sets of statistics.

Signed-off-by: Robert Sanford <rsanford2@gmail.com>
Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
9 years agomalloc: fix linear complexity
Robert Sanford [Mon, 23 Jun 2014 21:17:09 +0000 (17:17 -0400)]
malloc: fix linear complexity

Problems with lib rte_malloc:
1. Rte_malloc searches a heap's entire free list looking for the best
   fit, resulting in linear complexity.
2. Heaps store free blocks in a singly-linked list, resulting in
   linear complexity when rte_free needs to remove an adjacent block.
3. The library inserts and removes free blocks with ad hoc, in-line
   code, rather than using linked-list functions or macros.
4. The library wastes potential small blocks of size 64 and 128 bytes
   (plus overhead of 64 bytes) as padding when reusing free blocks or
   resizing allocated blocks.

This patch addresses those problems as follows:
1. Replace single free list with a handful of free lists. Each free
   list contains blocks of a specified size range, for example:
     list[0]: (0   , 2^8]
     list[1]: (2^8 , 2^10]
     list[2]: (2^10, 2^12]
     list[3]: (2^12, 2^14]
     list[4]: (2^14, MAX_SIZE]

   When allocating a block, start at the first list that can contain
   a big enough block. Search subsequent lists, if necessary.
   Terminate the search as soon as we find a block that is big enough.
2. Use doubly-linked lists, so that we can remove free blocks in
   constant time.
3. Use BSD LIST macros, as defined in sys/queue.h and the QUEUE(3)
   man page.
4. Change code to utilize small blocks of data size 64 and 128, when
   splitting larger blocks.

Signed-off-by: Robert Sanford <rsanford2@gmail.com>
Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
9 years agoapp/testpmd: tune default parameters
Cunming Liang [Thu, 26 Jun 2014 06:53:34 +0000 (14:53 +0800)]
app/testpmd: tune default parameters

We usually use testpmd fwd to demonstrate IO forwarding throughput.
For best throughput, it has to assign special parameters to testpmd.
To make it easier to run, now set it as defalut value.
Such parameters are MBUF Mempool Cache and RX/TX threshold registers.
    MBCACHE: 250
    RX threshold registers: pthresh=8 hthresh=8 wthresh=0
    TX threshold registers: pthresh=32 hthresh=0 wthresh=0

Signed-off-by: Cunming Liang <cunming.liang@intel.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Yong Liu <yong.liu@intel.com>
Tested-by: Zhaochen Zhan <zhaochen.zhan@intel.com>
9 years agoapp/testpmd: increase default burst size to 32
Cunming Liang [Thu, 26 Jun 2014 06:53:33 +0000 (14:53 +0800)]
app/testpmd: increase default burst size to 32

The vpmd RX don't accept burst size less than 32.
As vPMD is set =y by default, while default testpmd burst size is 16.
Which will cause RX nothing if not assign burst size correctly.

Signed-off-by: Cunming Liang <cunming.liang@intel.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Yong Liu <yong.liu@intel.com>
Tested-by: Zhaochen Zhan <zhaochen.zhan@intel.com>
9 years agoixgbe: prefer enabling olflags rather than not disabling
Cunming Liang [Thu, 26 Jun 2014 06:53:32 +0000 (14:53 +0800)]
ixgbe: prefer enabling olflags rather than not disabling

RTE_IXGBE_RX_OLFLAGS_ENABLE gives a hint whick keeping packet type
in RX ol_flags or not.
By default it is set to update ol_flags in RX mbuf header.
If unset it, will gain addtional performance, but will lose packet
type information.

Signed-off-by: Cunming Liang <cunming.liang@intel.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Yong Liu <yong.liu@intel.com>
Tested-by: Zhaochen Zhan <zhaochen.zhan@intel.com>
9 years agoixgbe: fix build with IEEE1588 enabled
Cunming Liang [Thu, 26 Jun 2014 06:53:31 +0000 (14:53 +0800)]
ixgbe: fix build with IEEE1588 enabled

Vectorized Rx cannot be enabled if RTE_LIBRTE_IEEE1588=y.
So variable dev is not used in this case.

Signed-off-by: Cunming Liang <cunming.liang@intel.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Yong Liu <yong.liu@intel.com>
Tested-by: Zhaochen Zhan <zhaochen.zhan@intel.com>
9 years agoixgbe: fix build of standard Rx with vectorized Tx
Cunming Liang [Thu, 26 Jun 2014 06:53:30 +0000 (14:53 +0800)]
ixgbe: fix build of standard Rx with vectorized Tx

The vpmd RX routine won't be used if RTE_LIBRTE_IXGBE_RX_ALLOW_BULK_ALLOC
is not defined or its condition check fail.
The case RTE_LIBRTE_IXGBE_RX_ALLOC_BULK_ALLOC=n and RTE_IXGBE_INC_VECTOR=y
may exist when choose to use standard RX and optimized TX
(ixgbe_xmit_pkts_vec/ixgbe_xmit_pkts_simple).

Signed-off-by: Cunming Liang <cunming.liang@intel.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Yong Liu <yong.liu@intel.com>
Tested-by: Zhaochen Zhan <zhaochen.zhan@intel.com>
9 years agoixgbe: rework fix of media type for bypass device
Pablo de Lara [Tue, 24 Jun 2014 14:41:29 +0000 (15:41 +0100)]
ixgbe: rework fix of media type for bypass device

This was previously solved in commit 60a70d4e042350ca
(fix link status interrupt of bypass device),
but this alternative fix reverts the previous one and solves the
same issue without modifying the base driver (also named "shared code").

Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
9 years agoi40e/base: ignore warning
Chen Jing D(Mark) [Tue, 24 Jun 2014 05:22:57 +0000 (13:22 +0800)]
i40e/base: ignore warning

There is a warning in base driver (shared code) on 32-bits RHEL6.3/6.5:
lib/librte_pmd_i40e/i40e/i40e_lan_hmc.c:917:
error: integer constant is too large for ‘long’ type

As we don't modify base driver, this warning must be ignored.

Signed-off-by: Chen Jing D(Mark) <jing.d.chen@intel.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
Acked-by: Helin Zhang <helin.zhang@intel.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>