dpdk.git
9 years agocxgbe: add link related functions
Rahul Lakkireddy [Mon, 29 Jun 2015 23:28:40 +0000 (04:58 +0530)]
cxgbe: add link related functions

Adds link update, promiscuous and multicast related eth_dev_ops for
cxgbe poll mode driver.

Signed-off-by: Rahul Lakkireddy <rahul.lakkireddy@chelsio.com>
Signed-off-by: Kumar Sanghvi <kumaras@chelsio.com>
9 years agocxgbe: add port statistics
Rahul Lakkireddy [Mon, 29 Jun 2015 23:28:39 +0000 (04:58 +0530)]
cxgbe: add port statistics

Adds stats_get() and stats_reset() eth_dev_ops for cxgbe poll mode driver.

Signed-off-by: Rahul Lakkireddy <rahul.lakkireddy@chelsio.com>
Signed-off-by: Kumar Sanghvi <kumaras@chelsio.com>
9 years agocxgbe: add device related operations
Rahul Lakkireddy [Mon, 29 Jun 2015 23:28:38 +0000 (04:58 +0530)]
cxgbe: add device related operations

Adds dev_start(), dev_stop(), and dev_close() eth_dev_ops for cxgbe poll
mode driver.

Signed-off-by: Rahul Lakkireddy <rahul.lakkireddy@chelsio.com>
Signed-off-by: Kumar Sanghvi <kumaras@chelsio.com>
9 years agocxgbe: add Tx support
Rahul Lakkireddy [Mon, 29 Jun 2015 23:28:37 +0000 (04:58 +0530)]
cxgbe: add Tx support

Adds TX support for the cxgbe poll mode driver.  This patch:

1. Adds tx queue related eth_dev_ops.
2. Adds tx_pkt_burst for transmitting packets.

Signed-off-by: Rahul Lakkireddy <rahul.lakkireddy@chelsio.com>
Signed-off-by: Kumar Sanghvi <kumaras@chelsio.com>
9 years agocxgbe: add device configuration and Rx support
Rahul Lakkireddy [Mon, 29 Jun 2015 23:28:36 +0000 (04:58 +0530)]
cxgbe: add device configuration and Rx support

Adds RX support for the cxgbe poll mode driver.  This patch:

1. Adds rx queue related eth_dev_ops.
2. Adds RSS support.
3. Adds dev_configure() and dev_infos_get() eth_dev_ops.
4. Adds rx_pkt_burst for receiving packets.

Signed-off-by: Rahul Lakkireddy <rahul.lakkireddy@chelsio.com>
Signed-off-by: Kumar Sanghvi <kumaras@chelsio.com>
9 years agocxgbe: add pmd skeleton
Rahul Lakkireddy [Mon, 29 Jun 2015 23:28:35 +0000 (04:58 +0530)]
cxgbe: add pmd skeleton

Adds cxgbe poll mode driver for DPDK under drivers/net/cxgbe directory.
This patch:

1. Adds the Makefile to compile cxgbe pmd.
2. Registers and initializes the cxgbe pmd driver.

Enable cxgbe PMD for compilation and linking with changes to:
1. config/common_linuxapp to add macros for cxgbe pmd.
2. drivers/net/Makefile to add cxgbe pmd to the compile list.
3. mk/rte.app.mk to add cxgbe pmd to link.

Update MAINTAINERS file to claim responsibility for the cxgbe PMD.

Signed-off-by: Rahul Lakkireddy <rahul.lakkireddy@chelsio.com>
Signed-off-by: Kumar Sanghvi <kumaras@chelsio.com>
[Thomas: add disabled config for bsdapp]

9 years agocxgbe/base: add hardware API for Chelsio T5 series adapters
Rahul Lakkireddy [Mon, 29 Jun 2015 23:28:34 +0000 (04:58 +0530)]
cxgbe/base: add hardware API for Chelsio T5 series adapters

Adds hardware specific api for all the Chelsio T5 adapters under
drivers/net/cxgbe/base directory.

Signed-off-by: Rahul Lakkireddy <rahul.lakkireddy@chelsio.com>
Signed-off-by: Kumar Sanghvi <kumaras@chelsio.com>
9 years agovhost: comment unwanted callback
Huawei Xie [Tue, 30 Jun 2015 09:20:50 +0000 (17:20 +0800)]
vhost: comment unwanted callback

add comment for potential unwanted callback on listenfds

Signed-off-by: Huawei Xie <huawei.xie@intel.com>
9 years agovhost: cleanup unix socket
Huawei Xie [Tue, 30 Jun 2015 09:20:48 +0000 (17:20 +0800)]
vhost: cleanup unix socket

rte_vhost_driver_unregister API will remove the listenfd from event list,
and then close it.

Signed-off-by: Huawei Xie <huawei.xie@intel.com>
Signed-off-by: Peng Sun <peng.a.sun@intel.com>
9 years agovhost: fix race for connection fd
Huawei Xie [Tue, 30 Jun 2015 09:20:47 +0000 (17:20 +0800)]
vhost: fix race for connection fd

In the event handler of connection fd, the connection fd could be possibly
closed. The event dispatch loop would then try to remove the fd from fdset.
Between these two actions, another thread might register a new listenfd
reusing the val of just closed fd, so we couldn't call fdset_del which would
wrongly clean up the new listenfd. A new function fdset_del_slot is provided
to cleanup the fd at the specified location.

Signed-off-by: Huawei Xie <huawei.xie@intel.com>
9 years agovhost: turn on by default
Huawei Xie [Mon, 29 Jun 2015 15:58:53 +0000 (23:58 +0800)]
vhost: turn on by default

Previous vhost-cuse implementation requires fuse development package.
Now that we have vhost-user implementation, which is enabled by default
and doesn't require additional library to build, we could turn on vhost.

Signed-off-by: Huawei Xie <huawei.xie@intel.com>
9 years agovhost: realloc device and queues to same numa node as vring desc
Huawei Xie [Thu, 25 Jun 2015 05:47:37 +0000 (13:47 +0800)]
vhost: realloc device and queues to same numa node as vring desc

When we get the address of vring descriptor table in VHOST_SET_VRING_ADDR
message, will try to reallocate vhost device and virt queue to the same
numa node.

Signed-off-by: Huawei Xie <huawei.xie@intel.com>
9 years agovhost: use rte_malloc to allocate device and queues
Huawei Xie [Thu, 25 Jun 2015 05:47:36 +0000 (13:47 +0800)]
vhost: use rte_malloc to allocate device and queues

use rte_malloc to allocate vhost device and queues

Signed-off-by: Huawei Xie <huawei.xie@intel.com>
9 years agolib: remove redundant definition of local symbols
Thomas Monjalon [Mon, 29 Jun 2015 16:25:13 +0000 (18:25 +0200)]
lib: remove redundant definition of local symbols

The new version nodes inherit from the previous ones which
already include a default catch-all line for not exported symbols.

Reported-by: Helin Zhang <helin.zhang@intel.com>
Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
9 years agodoc: link ABI policy to release notes
Thomas Monjalon [Mon, 29 Jun 2015 14:58:09 +0000 (16:58 +0200)]
doc: link ABI policy to release notes

When moving ABI policy to guidelines, the new doc was referred
without using sphinx link.

Fixes: f1ef9794f9bd ("doc: add ABI guidelines")

Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
9 years agodoc: add ABI guidelines
Neil Horman [Mon, 29 Jun 2015 13:59:40 +0000 (09:59 -0400)]
doc: add ABI guidelines

People have been asking for ways to use the ABI macros, heres some docs to
clarify their use.  Included is:

* An overview of what ABI is
* Details of the ABI deprecation process
* Details of the versioning macros
* Examples of their use
* Details of how to use the ABI validator

Thanks to John Mcnamara, who duplicated much of this effort at Intel while I was
working on it.  Much of the introductory material was gathered and cleaned up by
him.

Signed-off-by: Neil Horman <nhorman@tuxdriver.com>
CC: John McNamara <john.mcnamara@intel.com>
Acked-by: Thomas Monjalon <thomas.monjalon@6wind.com>
9 years agocompat: remove unneeded macro
Neil Horman [Mon, 29 Jun 2015 13:59:39 +0000 (09:59 -0400)]
compat: remove unneeded macro

BASE_SYMBOL was only here for completelness.
DPDK currently doesn't need it, so lets remove it.

Signed-off-by: Neil Horman <nhorman@tuxdriver.com>
Acked-by: Thomas Monjalon <thomas.monjalon@6wind.com>
9 years agocompat: add macro to map symbol in static build
Neil Horman [Mon, 29 Jun 2015 13:59:38 +0000 (09:59 -0400)]
compat: add macro to map symbol in static build

It was pointed out in my examples that doing shared library symbol versioning by
partitioning symbols to version specific functions (as opposed to leaving the
latest symol version at the base symbol name), neglects to take into account
static builds.  Add a macro to handle that.  If you choose a versioning approach
that uniquely names every version of the symbol, then this macro lets you map
your symbol choice to the base name when building a static library

Also, while I'm at it, since we're documenting this in the guide, take the
abbreviated example out of the header

Signed-off-by: Neil Horman <nhorman@tuxdriver.com>
[Thomas: remove remaining part of old example]
Acked-by: Thomas Monjalon <thomas.monjalon@6wind.com>
9 years agocompat: clean up
Neil Horman [Mon, 29 Jun 2015 13:59:37 +0000 (09:59 -0400)]
compat: clean up

Clean up some macro definition typos and comments

Signed-off-by: Neil Horman <nhorman@tuxdriver.com>
Acked-by: Thomas Monjalon <thomas.monjalon@6wind.com>
9 years agomk: fix static build on Fedora 22
Bruce Richardson [Tue, 9 Jun 2015 12:51:01 +0000 (13:51 +0100)]
mk: fix static build on Fedora 22

On Fedora 22, the "ar" binary operates by default in deterministic mode,
making the "u" parameter irrelevant, and leading to warning messages
getting printed in the build output like below.

  INSTALL-LIB librte_kvargs.a
ar: `u' modifier ignored since `D' is the default (see `U')

There are two options to remove these warnings:
* add in the "U" flag to make "ar" non-deterministic again
* remove the "u" flag to have all objects always updated

This patch takes the second approach. It also explicitly adds in the "D"
flag to make behaviour consistent across different distributions which
may have different defaults.

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Olivier Matz <olivier.matz@6wind.com>
9 years agoeal: fix pedantic build of mlx4 debug mode
Adrien Mazarguil [Mon, 29 Jun 2015 09:34:52 +0000 (11:34 +0200)]
eal: fix pedantic build of mlx4 debug mode

Since the commit below includes rte_cpuflags.h in rte_spinlock.h,
compilation of the mlx4 driver fails when CONFIG_RTE_LIBRTE_MLX4_DEBUG=y.

This mode adds -pedantic to the compiler's command line for mlx4, which
complains about the static definition of an empty cpu_feature_table[] in
common rte_cpuflags.h, then about its redefinition as a larger array in
arch-specific rte_cpuflags.h.

While DPDK does not officially support -pedantic internally, external
applications may enable it and include rte_spinlock.h from the public API.

Instead of removing -pedantic from mlx4, this commit fixes rte_cpuflags.h.

Fixes: ba7468997ea6 ("spinlock: add HTM lock elision for x86")

Signed-off-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
Acked-by: David Marchand <david.marchand@6wind.com>
9 years agobonding: initialize backpointer from pci device to driver
Stephen Hemminger [Fri, 8 May 2015 02:41:12 +0000 (19:41 -0700)]
bonding: initialize backpointer from pci device to driver

Add missing initialization of to pci_dev driver
The link from pci_dev back to the ethernet driver was not being set.

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
9 years agobonding: fix crash when stopping inactive slave
Jan Blunck [Wed, 24 Jun 2015 21:01:23 +0000 (14:01 -0700)]
bonding: fix crash when stopping inactive slave

When stopping the bond device we don't need to try and free up the LACPDU's
from deactivated devices since this is covered by
bond_mode_8023ad_deactivate_slave().

This fixes the following:
[    0.100569] PANIC in bond_ethdev_stop():
[    0.100589] line 1172        assert "port->rx_ring != NULL" failed

Signed-off-by: Jan Blunck <jblunck@infradead.org>
Acked-by: Declan Doherty <declan.doherty@intel.com>
9 years agobonding: fix initial link status of slave
Tomasz Kulasek [Wed, 24 Jun 2015 08:50:45 +0000 (10:50 +0200)]
bonding: fix initial link status of slave

On Fortville NIC, link status change interrupt callback is not executed when
slave in bonding is (re-)started. It causes that slave's NIC is inactive even
if its link status is up on the start.

This patch invokes lsc callback, just after port's start, to check its initial
link status and manage properly.

Signed-off-by: Tomasz Kulasek <tomaszx.kulasek@intel.com>
Acked-by: Declan Doherty <declan.doherty@intel.com>
9 years agoixgbe/base: optimize link up time
Wenzhuo Lu [Wed, 24 Jun 2015 03:26:25 +0000 (11:26 +0800)]
ixgbe/base: optimize link up time

This patch adds max_link_up_time parameter to mac structure.
This parameter is used to control maximum link polling time in
ixgbe_check_mac_link functions. It is required to prevent long wait
time on x550 PHY that have no external link.

Since x550 is handled by software, we have to reset internal (PHY to
PHY) link when external link changes, and after reset, we have to wait for
this link to be established. As a result of not having interrupts, we have
to poll for link state, and we know that this link comes up much faster
than default 9 seconds. This parameter is added to prevent waiting 9
seconds for link when external link is not established.

Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
Acked-by: Helin Zhang <helin.zhang@intel.com>
9 years agoixgbe/base: add a new 82599 device id
Wenzhuo Lu [Wed, 24 Jun 2015 03:26:02 +0000 (11:26 +0800)]
ixgbe/base: add a new 82599 device id

Since this 82599 device supports WoL(Wake on LAN), driver needs
a define for the sub device ID.

Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
Acked-by: Helin Zhang <helin.zhang@intel.com>
9 years agoixgbe/base: add new X550 PHY ids
Wenzhuo Lu [Wed, 24 Jun 2015 03:26:26 +0000 (11:26 +0800)]
ixgbe/base: add new X550 PHY ids

This patch adds support for new x550 PHY IDs:
0x0154 0x0223
0x0154 0x0221

Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
Acked-by: Helin Zhang <helin.zhang@intel.com>
9 years agoixgbe/base: add new mac-dependent values for X540 and X550
Wenzhuo Lu [Wed, 24 Jun 2015 03:26:17 +0000 (11:26 +0800)]
ixgbe/base: add new mac-dependent values for X540 and X550

Add new values that vary by MAC type that are introduced in
x540, x550.
And remove some meaningless comments BTW.

Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
Acked-by: Helin Zhang <helin.zhang@intel.com>
9 years agoixgbe/base: rework mac-type-dependent constants
Wenzhuo Lu [Wed, 24 Jun 2015 03:26:13 +0000 (11:26 +0800)]
ixgbe/base: rework mac-type-dependent constants

Add a const u32 *mvals pointer to the ixgbe_hw struct to point to an
array of mac-type-dependent values. These can include register
offsets, masks, whatever can be in a u32. When the ixgbe_hw struct
is initialized, a pointer to the appropriate array must be set.

The IXGBE_I2CCTL register references are changed to use it.
Use the mvals array to hold differing values used for
IXGBE_I2C_* symbols.
Use the mvals array to hold differing values used for
IXGBE_*_GPI* symbols.
Use the mvals array to hold differing values use for CIAA and
CIAD symbols.

Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
Acked-by: Helin Zhang <helin.zhang@intel.com>
9 years agoixgbe/base: fix X550em CS4227 speed mode
Wenzhuo Lu [Wed, 24 Jun 2015 03:26:24 +0000 (11:26 +0800)]
ixgbe/base: fix X550em CS4227 speed mode

According to the hardware, the LINE side of the cs4227 needs to be
set to 10 Gbps SR mode regardless of the configuration of the link.

Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
Acked-by: Helin Zhang <helin.zhang@intel.com>
9 years agoixgbe/base: fix X550em flow control to be KR only
Wenzhuo Lu [Wed, 24 Jun 2015 03:26:22 +0000 (11:26 +0800)]
ixgbe/base: fix X550em flow control to be KR only

The code in the if statement is specific to the KR PHY. However,
the conditional was only checking for backplane. If the driver
was using the KX4 backplane PHY, this code would execute but
would write to the wrong PHY.

Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
Acked-by: Helin Zhang <helin.zhang@intel.com>
9 years agoixgbe/base: disable software LPLU implementation for X557 V2
Wenzhuo Lu [Wed, 24 Jun 2015 03:26:18 +0000 (11:26 +0800)]
ixgbe/base: disable software LPLU implementation for X557 V2

This patch disables SW LPLU on x557 V2. It also sets the
enter_lplu function pointer to NULL on x557 V2. LPLU will be
implemented in FW for all x557 V2 interfaces. The SW LPLU
implementation must be disabled on V2 to avoid conflicts with
FW. SW LPLU support is still required for x557 V1.

Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
Acked-by: Helin Zhang <helin.zhang@intel.com>
9 years agoixgbe/base: add X557 PHY LEDs support
Wenzhuo Lu [Wed, 24 Jun 2015 03:26:11 +0000 (11:26 +0800)]
ixgbe/base: add X557 PHY LEDs support

This patch implements ixgbe_led_on_t_X550em and ixgbe_led_off_t_X550em
function for turning on and off LEDs on X557 external PHY.

Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
Acked-by: Helin Zhang <helin.zhang@intel.com>
9 years agoixgbe/base: configure MDIO clock for X550em
Wenzhuo Lu [Wed, 24 Jun 2015 03:26:10 +0000 (11:26 +0800)]
ixgbe/base: configure MDIO clock for X550em

The MDIO clock needs to be configured for a specific speed for
x550em. We expected this to be done automatically, but in
the early days of the project this was not happening. We put
code in to do this ourselves.
Eventually, we decided that there is no harm in having SW do
this all the time, so we may not remove this code in the future.

Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
Acked-by: Helin Zhang <helin.zhang@intel.com>
9 years agoixgbe/base: check X550em link again after getting speed
Wenzhuo Lu [Wed, 24 Jun 2015 03:26:09 +0000 (11:26 +0800)]
ixgbe/base: check X550em link again after getting speed

Ensure link is still up after getting the speed, to ensure that the
speed read is valid.

Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
Acked-by: Helin Zhang <helin.zhang@intel.com>
9 years agoixgbe/base: remove FEC disablement for X550em
Wenzhuo Lu [Wed, 24 Jun 2015 03:26:19 +0000 (11:26 +0800)]
ixgbe/base: remove FEC disablement for X550em

This patch removes the clearing of the FEC(Forward Error Correction)
bits in ixgbe_setup_kr_speed_x550em.  FEC default enablement is
configured via the NVM and SW should not be overriding these defaults
in this function.

Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
Acked-by: Helin Zhang <helin.zhang@intel.com>
9 years agoixgbe/base: add X550em KR/iXFI internal link mode support
Wenzhuo Lu [Wed, 24 Jun 2015 03:26:08 +0000 (11:26 +0800)]
ixgbe/base: add X550em KR/iXFI internal link mode support

This patch adds support for x550em KR/iXFI internal link modes. The initial
x550em-10GBASET and x550em-SFP designs use iXFI internal link mode between
the internal PHY and the external PHY.
However future designs will use a KR internal link. This patch is intended
to future proof the driver by adding the KR internal link support in the
driver now.

Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
Acked-by: Helin Zhang <helin.zhang@intel.com>
9 years agoixgbe/base: update EEE/FEC support for X550EM_X_KR
Wenzhuo Lu [Wed, 24 Jun 2015 03:26:12 +0000 (11:26 +0800)]
ixgbe/base: update EEE/FEC support for X550EM_X_KR

EEE(Energy Efficient Ethernet) is not supported on the initial revision
of IXGBE_DEV_ID_X550EM_X_KR. We determine the revision by reading a fuse
register.

Also, the requirements for FEC(Forward Error Correction) have changed
slightly. Now, we don't change the "request" bit at all. When EEE is
enabled, we advertise that we are capable. When EEE is disabled, we do
not advertise that we are capable. This change makes us consistent with
the power-on defaults that are in the NVM.

Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
Acked-by: Helin Zhang <helin.zhang@intel.com>
9 years agoixgbe/base: enable X550 FEC when EEE is disabled
Wenzhuo Lu [Wed, 24 Jun 2015 03:26:03 +0000 (11:26 +0800)]
ixgbe/base: enable X550 FEC when EEE is disabled

The FEC(Forward Error Correction) feature had been disabled
because it increases power consumption. However, some customers
want to use it. This patch enables FEC when EEE(Energy Efficient
Ethernet) is disabled; FEC was already being disabled when EEE
was enabled, but now both are done in the same function. The two
features are not allowed to be enabled at the same time. The two
features cannot both be disabled. If this ability is ever
determined to be needed, we will need to define a new user parameter
to control FEC independently of EEE.

Fixes: d4c9ffd4fe1c ("ixgbe/base: disable X550em FEC to save power")

Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
Acked-by: Helin Zhang <helin.zhang@intel.com>
9 years agoixgbe/base: check for functional CS4227 ucode
Wenzhuo Lu [Wed, 24 Jun 2015 03:26:07 +0000 (11:26 +0800)]
ixgbe/base: check for functional CS4227 ucode

During init, check the ucode running in the CS4227. If
it is not responding correctly, reset the part. This is
a global reset so it must only be done the first time a
driver loads after power-on.

Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
Acked-by: Helin Zhang <helin.zhang@intel.com>
9 years agoixgbe/base: use a semaphore to serialize X550 IOSF accesses
Wenzhuo Lu [Wed, 24 Jun 2015 03:26:06 +0000 (11:26 +0800)]
ixgbe/base: use a semaphore to serialize X550 IOSF accesses

Because each IOSF access requires the use of multiple registers,
use a semaphore to serialize those accesses.

Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
Acked-by: Helin Zhang <helin.zhang@intel.com>
9 years agoixgbe/base: add wait helper for X550 IOSF accesses
Wenzhuo Lu [Wed, 24 Jun 2015 03:26:05 +0000 (11:26 +0800)]
ixgbe/base: add wait helper for X550 IOSF accesses

Add a helper function to wait for IOSF accesses to complete. Also
perform this wait before each access, as specified in the datasheet.

Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
Acked-by: Helin Zhang <helin.zhang@intel.com>
9 years agoixgbe/base: add macros for X550em bus speed fuse
Wenzhuo Lu [Wed, 24 Jun 2015 03:26:01 +0000 (11:26 +0800)]
ixgbe/base: add macros for X550em bus speed fuse

x550em has two different bus speeds, 300 MHz and 400 MHz.
A bit in a fuse register tells which it is, with a 1 meaning
the bus is running at 300 MHz.

Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
Acked-by: Helin Zhang <helin.zhang@intel.com>
9 years agoixgbe/base: fix X550em UniPHY link configuration
Wenzhuo Lu [Wed, 24 Jun 2015 03:26:00 +0000 (11:26 +0800)]
ixgbe/base: fix X550em UniPHY link configuration

In UniPHY we have 2 IOSF targets that are UniPHY related. We can
write to PHY and PCS. In earlier times I've been told that there
were 2 separate PCS targets for IOSF commands and that's why I
implemented it with 2 defines and adding hw->bus.lan_id, but lately
I confirmed with HW that FW takes care of which PCS "slice" we are
talking to and is directing writes to correct one, so KX4_PCS1
target is dead now and we cannot use it.

Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
Acked-by: Helin Zhang <helin.zhang@intel.com>
9 years agoixgbe/base: power down the X550em PHY on overtemp event
Wenzhuo Lu [Wed, 24 Jun 2015 03:25:58 +0000 (11:25 +0800)]
ixgbe/base: power down the X550em PHY on overtemp event

This patch powers down the x550em PHY on over-temp events. The
PHY firmware is supposed to do this autonomously but that isn't
implemented. The short-term stop-gap solution is for SW to power
down the PHY when it reports an overtemp event.

Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
Acked-by: Helin Zhang <helin.zhang@intel.com>
9 years agoixgbe/base: check X550em SFP support
Wenzhuo Lu [Wed, 24 Jun 2015 03:25:55 +0000 (11:25 +0800)]
ixgbe/base: check X550em SFP support

This patch adds identify SFP module support for x550em. x550em
support returns an error for SFP module types not supported by
x550em design.

Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
Acked-by: Helin Zhang <helin.zhang@intel.com>
9 years agoixgbe/base: fix X550em link setup without SFP
Wenzhuo Lu [Wed, 24 Jun 2015 03:25:53 +0000 (11:25 +0800)]
ixgbe/base: fix X550em link setup without SFP

This patch updates the x550em SFP link setup by adding
ixgbe_sfp_type_unknown and ixgbe_sfp_type_not_present case expression
to the ixgbe_setup_mac_link_sfp_x550em SFP type switch statement. This
handles the case when no module is present.

Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
Acked-by: Helin Zhang <helin.zhang@intel.com>
9 years agoixgbe/base: fix uninitialized variable
Wenzhuo Lu [Wed, 24 Jun 2015 03:25:56 +0000 (11:25 +0800)]
ixgbe/base: fix uninitialized variable

Fix the warning caused by an uninitialized variable which might have
been used.

Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
Acked-by: Helin Zhang <helin.zhang@intel.com>
9 years agoixgbe/base: fix X550em SFP+ link stability
Wenzhuo Lu [Wed, 24 Jun 2015 03:25:52 +0000 (11:25 +0800)]
ixgbe/base: fix X550em SFP+ link stability

Configure the CS4227 correctly for both 1G and 10G operation,
by moving the code to ixgbe_setup_mac_link_sfp_x550em(). It
needs to be in this function because we need both the module
type and the speed, and this is the only function in the init
flow that knows the speed. In contrast,
ixgbe_setup_sfp_modules_X550em() does not know the speed, so we
can't do anything useful here. This is a fundamental difference
from the 82599 flow.

Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
Acked-by: Helin Zhang <helin.zhang@intel.com>
9 years agoixgbe/base: restore advertised autoneg after setting X550em LPLU
Wenzhuo Lu [Wed, 24 Jun 2015 03:25:59 +0000 (11:25 +0800)]
ixgbe/base: restore advertised autoneg after setting X550em LPLU

On systems that support LPLU in the firmware, the driver wouldn't be
aware of the LPLU speed change, and it wouldn't cache the new value when
the driver resumes. This patch emulates the same behavior by restoring
the previous autoneg settings to autoneg_advertised.

Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
Acked-by: Helin Zhang <helin.zhang@intel.com>
9 years agoixgbe/base: update X550em LPLU
Wenzhuo Lu [Wed, 24 Jun 2015 03:25:51 +0000 (11:25 +0800)]
ixgbe/base: update X550em LPLU

This patch updates x550em LPLU (Low Power Link Up) to use the
MAC ops setup_link function pointer.
This removes redundant code and provides iXFI and KR support
between internal and external PHY.

Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
Acked-by: Helin Zhang <helin.zhang@intel.com>
9 years agoixgbe/base: release X540 semaphores in proper order
Wenzhuo Lu [Wed, 24 Jun 2015 03:26:04 +0000 (11:26 +0800)]
ixgbe/base: release X540 semaphores in proper order

Because we acquire two semaphore bits before setting the SWFW_SYNC
register, we should release them in the reverse order that they
were acquired.

Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
Acked-by: Helin Zhang <helin.zhang@intel.com>
9 years agoixgbe/base: fix X550 PCIe master disabling
Wenzhuo Lu [Wed, 24 Jun 2015 03:26:21 +0000 (11:26 +0800)]
ixgbe/base: fix X550 PCIe master disabling

This patch skips the PCI transactions pending check in
ixgbe_disable_pcie_master. The PCI transactions pending bit sticks high
when there were pending transactions, we should wait and then continue
with our reset flow.

Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
Acked-by: Helin Zhang <helin.zhang@intel.com>
9 years agoixgbe/base: fix speed comments
Wenzhuo Lu [Wed, 24 Jun 2015 03:26:23 +0000 (11:26 +0800)]
ixgbe/base: fix speed comments

This patch fixes comment description for setting 2.5G and 5G speeds in
ixgbe_setup_phy_link_generic.

Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
Acked-by: Helin Zhang <helin.zhang@intel.com>
9 years agoixgbe/base: add a shift constant for EEE
Wenzhuo Lu [Wed, 24 Jun 2015 03:25:54 +0000 (11:25 +0800)]
ixgbe/base: add a shift constant for EEE

Adds define for the number of bits needed to shift the EEE_SU register
in order to get the value of TEEE_DLY.

Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
Acked-by: Helin Zhang <helin.zhang@intel.com>
9 years agoixgbe/base: change register definition code style
Wenzhuo Lu [Wed, 24 Jun 2015 03:26:20 +0000 (11:26 +0800)]
ixgbe/base: change register definition code style

This path changes ((P == 0) ? (<value for port 0>) : (<value for port 1>))
register definition into ((P) ? <value for port 1> : <value for port 0>)
style.

Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
Acked-by: Helin Zhang <helin.zhang@intel.com>
9 years agoixgbe/base: update readme
Wenzhuo Lu [Wed, 24 Jun 2015 03:25:50 +0000 (11:25 +0800)]
ixgbe/base: update readme

Update readme file to show the version of the base code.

Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
Acked-by: Helin Zhang <helin.zhang@intel.com>
9 years agoexamples/tep_term: fix vhost dependency
Jijiang Liu [Thu, 25 Jun 2015 08:56:09 +0000 (16:56 +0800)]
examples/tep_term: fix vhost dependency

The VXLAN example needs vhost library.

Signed-off-by: Jijiang Liu <jijiang.liu@intel.com>
9 years agombuf: use offset macro
Cyril Chemparathy [Mon, 22 Jun 2015 18:34:23 +0000 (11:34 -0700)]
mbuf: use offset macro

This patch simply applies the transform previously committed in
scripts/cocci/mtod-offset.cocci.  No other modifications have been
made here.

Signed-off-by: Cyril Chemparathy <cchemparathy@ezchip.com>
Acked-by: Olivier Matz <olivier.matz@6wind.com>
9 years agombuf: add script to convert code to offset macro
Cyril Chemparathy [Mon, 22 Jun 2015 18:34:22 +0000 (11:34 -0700)]
mbuf: add script to convert code to offset macro

This patch adds a coccinelle (see http://coccinelle.lip6.fr/)
transform to use the newly added rte_pktmbuf_mtod_offset() helper.  In
addition, we add a simple script to apply all available transforms to
a codebase.

Signed-off-by: Cyril Chemparathy <cchemparathy@ezchip.com>
Acked-by: Olivier Matz <olivier.matz@6wind.com>
9 years agombuf: add macro for offset arithmetic
Cyril Chemparathy [Mon, 22 Jun 2015 18:34:21 +0000 (11:34 -0700)]
mbuf: add macro for offset arithmetic

There are a number of instances in the code where rte_pktmbuf_mtod()
is used to get the mbuf data pointer, only to add an offset before
casting the result to some other header type.  This patch adds a new
rte_pktmbuf_mtod_offset() macro to eliminate these awful double cast
situations.

Signed-off-by: Cyril Chemparathy <cchemparathy@ezchip.com>
Acked-by: Olivier Matz <olivier.matz@6wind.com>
9 years agoapp/testpmd: pack GRE header
Cyril Chemparathy [Mon, 22 Jun 2015 18:34:20 +0000 (11:34 -0700)]
app/testpmd: pack GRE header

Not packing this causes -Wcast-align breakage on machines that are
strict on alignment.  This patch fixes this bug.

Signed-off-by: Cyril Chemparathy <cchemparathy@ezchip.com>
Acked-by: Olivier Matz <olivier.matz@6wind.com>
9 years agoeal: add and use unaligned integer types
Cyril Chemparathy [Mon, 22 Jun 2015 18:34:19 +0000 (11:34 -0700)]
eal: add and use unaligned integer types

On machines that are strict on pointer alignment, current code breaks
on GCC's -Wcast-align checks on casts from narrower to wider types.
This patch introduces new unaligned_uint(16|32|64)_t types, which
correctly retain alignment in such cases.  Strict alignment
architectures will need to define CONFIG_RTE_ARCH_STRICT_ALIGN in
order to effect these new types.

Signed-off-by: Cyril Chemparathy <cchemparathy@ezchip.com>
Acked-by: Olivier Matz <olivier.matz@6wind.com>
9 years agohash: silence warning on pointer arithmetic
Cyril Chemparathy [Mon, 22 Jun 2015 18:34:18 +0000 (11:34 -0700)]
hash: silence warning on pointer arithmetic

Since sig_tbl_bucket_size and key_tbl_key_size are explicitly aligned
at initialization, offset dereferences in the hash table code cannot
possibly be unaligned.  However, the compiler is unaware of this fact
and complains on -Wcast-align.  This patch modifies the code to use
RTE_PTR_ADD(), thereby silencing the compiler by casting through (void
*).

Signed-off-by: Cyril Chemparathy <cchemparathy@ezchip.com>
Acked-by: Olivier Matz <olivier.matz@6wind.com>
9 years agoethdev: silence warning on pointer arithmetic
Cyril Chemparathy [Mon, 22 Jun 2015 18:34:17 +0000 (11:34 -0700)]
ethdev: silence warning on pointer arithmetic

Statistics offsets in the rte_stats_strings[] array are always 64-bit aligned.
However, the compiler is unaware of this fact and complains on -Wcast-align.
This patch modifies the code to use RTE_PTR_ADD(), thereby silencing the
compiler by casting through (void *).

Signed-off-by: Cyril Chemparathy <cchemparathy@ezchip.com>
Acked-by: Olivier Matz <olivier.matz@6wind.com>
9 years agombuf: silence warning on pointer arithmetic
Cyril Chemparathy [Mon, 22 Jun 2015 18:34:16 +0000 (11:34 -0700)]
mbuf: silence warning on pointer arithmetic

Translating from an mbuf element to the mbuf pointer does not break alignment
constraints.  However, the compiler is unaware of this fact and complains on
-Wcast-align.  This patch modifies the code to use RTE_PTR_SUB(), thereby
silencing the compiler by casting through (void *).

Signed-off-by: Cyril Chemparathy <cchemparathy@ezchip.com>
Acked-by: Olivier Matz <olivier.matz@6wind.com>
9 years agomempool: silence warning on pointer arithmetic
Cyril Chemparathy [Mon, 22 Jun 2015 18:34:15 +0000 (11:34 -0700)]
mempool: silence warning on pointer arithmetic

Translating from a mempool object to the mempool pointer does not break
alignment constraints.  However, the compiler is unaware of this fact and
complains on -Wcast-align.  This patch modifies the code to use RTE_PTR_SUB(),
thereby silencing the compiler by casting through (void *).

Signed-off-by: Cyril Chemparathy <cchemparathy@ezchip.com>
Acked-by: Olivier Matz <olivier.matz@6wind.com>
9 years agomempool: fix doxygen documentation
John McNamara [Tue, 23 Jun 2015 12:07:47 +0000 (13:07 +0100)]
mempool: fix doxygen documentation

Added Doxygen @param for missing API parameter in
rte_mempool_obj_iter(), to fix Doxygen warning. Also added
minor grammar fixes to that function documentation.

Signed-off-by: John McNamara <john.mcnamara@intel.com>
Acked-by: Olivier Matz <olivier.matz@6wind.com>
9 years agopci: fix licenses
Anatoly Burakov [Wed, 10 Jun 2015 10:19:21 +0000 (11:19 +0100)]
pci: fix licenses

Fixes: 88701645c98c ("eal: move interrupt type out of igb_uio")

Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
Acked-by: Thomas Monjalon <thomas.monjalon@6wind.com>
9 years agolib: remove extra parenthesis after return
Ferruh Yigit [Mon, 11 May 2015 14:10:25 +0000 (17:10 +0300)]
lib: remove extra parenthesis after return

Remove extra parenthesis from return statements.

Signed-off-by: Ferruh Yigit <ferruhy@gmail.com>
9 years agombuf: fix indent in version map
Huawei Xie [Thu, 18 Jun 2015 17:55:53 +0000 (01:55 +0800)]
mbuf: fix indent in version map

Use tab rather than space.

Signed-off-by: Huawei Xie <huawei.xie@intel.com>
Acked-by: Olivier Matz <olivier.matz@6wind.com>
9 years agopipeline: add statistics for ports and tables
Pawel Wodkowski [Fri, 19 Jun 2015 11:13:09 +0000 (13:13 +0200)]
pipeline: add statistics for ports and tables

This patch adds statistics collection for librte_pipeline.
Those statistics are disabled by default during build time.

Signed-off-by: Pawel Wodkowski <pawelx.wodkowski@intel.com>
Acked-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
9 years agotable: add stub stats
Maciej Gajdzica [Fri, 19 Jun 2015 10:28:44 +0000 (12:28 +0200)]
table: add stub stats

Added stub table statistics.

Signed-off-by: Maciej Gajdzica <maciejx.t.gajdzica@intel.com>
Acked-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
9 years agotable: add lpm stats
Maciej Gajdzica [Fri, 19 Jun 2015 10:28:42 +0000 (12:28 +0200)]
table: add lpm stats

Added lpm table statistics.
Added lpm ipv6 table statistics.

Signed-off-by: Maciej Gajdzica <maciejx.t.gajdzica@intel.com>
Acked-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
9 years agotable: add hash stats
Maciej Gajdzica [Fri, 19 Jun 2015 10:28:37 +0000 (12:28 +0200)]
table: add hash stats

Added statistics for hash ext table.
Added statistics for hash key8 table.
Added statistics for hash key16 table.
Added statistics for hash key32 table.
Added statistics for hash_lru table.

Signed-off-by: Maciej Gajdzica <maciejx.t.gajdzica@intel.com>
Acked-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
9 years agotable: add array stats
Maciej Gajdzica [Fri, 19 Jun 2015 10:28:36 +0000 (12:28 +0200)]
table: add array stats

Added statistics for array table.

Signed-off-by: Maciej Gajdzica <maciejx.t.gajdzica@intel.com>
Acked-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
9 years agotable: add acl stats
Maciej Gajdzica [Fri, 19 Jun 2015 10:28:35 +0000 (12:28 +0200)]
table: add acl stats

Added statistics for ACL table.

Signed-off-by: Maciej Gajdzica <maciejx.t.gajdzica@intel.com>
Acked-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
9 years agotable: add stats structure and config option
Maciej Gajdzica [Fri, 19 Jun 2015 10:28:34 +0000 (12:28 +0200)]
table: add stats structure and config option

Added common structure for table statistics.
Added config option to enable table stats collecting.

Signed-off-by: Maciej Gajdzica <maciejx.t.gajdzica@intel.com>
Acked-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
9 years agoport: add source stats
Maciej Gajdzica [Fri, 19 Jun 2015 09:41:24 +0000 (11:41 +0200)]
port: add source stats

Added statistics for source port.

Signed-off-by: Maciej Gajdzica <maciejx.t.gajdzica@intel.com>
Acked-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
9 years agoport: add sched stats
Maciej Gajdzica [Fri, 19 Jun 2015 09:41:22 +0000 (11:41 +0200)]
port: add sched stats

Added statistics for sched reader port.
Added statistics for sched writer port.

Signed-off-by: Maciej Gajdzica <maciejx.t.gajdzica@intel.com>
Acked-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
9 years agoport: add ring stats
Maciej Gajdzica [Fri, 19 Jun 2015 09:41:19 +0000 (11:41 +0200)]
port: add ring stats

Added statistics for ring reader port.
Added statistics for port writer port.
Added statistics for ring writer nodrop port.

Signed-off-by: Maciej Gajdzica <maciejx.t.gajdzica@intel.com>
Acked-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
9 years agoport: add reassembly stats
Maciej Gajdzica [Fri, 19 Jun 2015 09:41:18 +0000 (11:41 +0200)]
port: add reassembly stats

Added statistics for IPv4 and IPv6 reassembly ports.

Signed-off-by: Maciej Gajdzica <maciejx.t.gajdzica@intel.com>
Acked-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
9 years agoport: add fragmentation stats
Maciej Gajdzica [Fri, 19 Jun 2015 09:41:17 +0000 (11:41 +0200)]
port: add fragmentation stats

Added statistics for IPv4 and IPv6 fragmentation ports.

Signed-off-by: Maciej Gajdzica <maciejx.t.gajdzica@intel.com>
Acked-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
9 years agoport: add ethdev stats
Maciej Gajdzica [Fri, 19 Jun 2015 09:41:14 +0000 (11:41 +0200)]
port: add ethdev stats

Added statistics for ethdev reader port.
Added statistics for ethdev writer port.
Added statistics for ethdev writer nodrop port.

Signed-off-by: Maciej Gajdzica <maciejx.t.gajdzica@intel.com>
Acked-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
9 years agoport: add stats structures and config option
Maciej Gajdzica [Fri, 19 Jun 2015 09:41:13 +0000 (11:41 +0200)]
port: add stats structures and config option

Added common data structures for port statistics.
Added config option to enable stats collecting.

Signed-off-by: Maciej Gajdzica <maciejx.t.gajdzica@intel.com>
Acked-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
9 years agodoc: guidelines for library statistics
Cristian Dumitrescu [Tue, 16 Jun 2015 13:35:57 +0000 (14:35 +0100)]
doc: guidelines for library statistics

Signed-off-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
Acked-by: John McNamara <john.mcnamara@intel.com>
9 years agodoc: move env/arch guidelines in design section
Thomas Monjalon [Tue, 23 Jun 2015 13:29:59 +0000 (15:29 +0200)]
doc: move env/arch guidelines in design section

Move EAL subdirs guidelines from coding style to design section.

Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
9 years agoexamples/tep_term: add encap/decap configuration
Jijiang Liu [Mon, 22 Jun 2015 16:41:05 +0000 (00:41 +0800)]
examples/tep_term: add encap/decap configuration

Add the encapsulation and decapsulation options.

The two flags are enabled by default.

Sometimes we want to know the performance influence of
the encapsulation and decapsulation operations, and
I think we should add the two configuration options.

Signed-off-by: Jijiang Liu <jijiang.liu@intel.com>
9 years agoexamples/tep_term: add bad Rx checksum statistics
Jijiang Liu [Mon, 22 Jun 2015 16:41:04 +0000 (00:41 +0800)]
examples/tep_term: add bad Rx checksum statistics

Add the bad Rx checksum statistics of inner IP and L4.

The number of packets with bad RX IP and L4 checksum in inner header is recorded.

Signed-off-by: Jijiang Liu <jijiang.liu@intel.com>
9 years agoexamples/tep_term: add TSO offload configuration
Jijiang Liu [Mon, 22 Jun 2015 16:41:03 +0000 (00:41 +0800)]
examples/tep_term: add TSO offload configuration

Add the tso-segsz option for TSO offload.

If the 'tso-segsz' is not 0, it means TSO offload is enabled.

Signed-off-by: Jijiang Liu <jijiang.liu@intel.com>
9 years agoexamples/tep_term: add inner checksum Tx offload configuration
Jijiang Liu [Mon, 22 Jun 2015 16:41:02 +0000 (00:41 +0800)]
examples/tep_term: add inner checksum Tx offload configuration

Add Tx checksum offload configuration for inner header.

For UDP tunneling packet, the inner Tx checksum offload means
inner IPv4 and inner L4(TCP/UDP/SCTP).

Signed-off-by: Jijiang Liu <jijiang.liu@intel.com>
9 years agoexamples/tep_term: add tunnel filter type configuration
Jijiang Liu [Mon, 22 Jun 2015 16:41:01 +0000 (00:41 +0800)]
examples/tep_term: add tunnel filter type configuration

Add the filter types for VXLAN packet.

The following filter type are added here.

  - Inner MAC&VLAN and tenant ID

  - Inner MAC and tenent ID, and Outer MAC

  - Inner MAC and tenant ID

Signed-off-by: Jijiang Liu <jijiang.liu@intel.com>
9 years agoexamples/tep_term: add UDP tunneling port configuration
Jijiang Liu [Mon, 22 Jun 2015 16:41:00 +0000 (00:41 +0800)]
examples/tep_term: add UDP tunneling port configuration

The port number of UDP tunneling packet is configurable.

For i40e, it has 16 entries in total.

Signed-off-by: Jijiang Liu <jijiang.liu@intel.com>
9 years agoexamples/tep_term: implement VXLAN processing
Jijiang Liu [Mon, 22 Jun 2015 16:40:59 +0000 (00:40 +0800)]
examples/tep_term: implement VXLAN processing

Implement the VXLAN packet processing functions.

  - VXLAN port configuration

  - VXLAN tunnel setup

  - VXLAN tunnel destroying

  - VXLAN packet processing for Rx side

  - VXLAN packet processing for Tx side

Signed-off-by: Jijiang Liu <jijiang.liu@intel.com>
Signed-off-by: Thomas Long <thomas.long@intel.com>
9 years agoexamples/tep_term: add structures for VXLAN processing
Jijiang Liu [Mon, 22 Jun 2015 16:40:58 +0000 (00:40 +0800)]
examples/tep_term: add structures for VXLAN processing

Add the common APIs of tunneling packet processing.

We are trying to create a framework for tunneling packet processing, which includes

  - Tunnel port configuration

  - Tunnel setup

  - Tunnel destroying

  - Tunneling packet processing for Rx side

  - Tunneling packet processing for Tx side

  - Tunnel parameter processing

Signed-off-by: Jijiang Liu <jijiang.liu@intel.com>
Signed-off-by: Thomas Long <thomas.long@intel.com>
9 years agoexamples/tep_term: define basic VXLAN port information
Jijiang Liu [Mon, 22 Jun 2015 16:40:57 +0000 (00:40 +0800)]
examples/tep_term: define basic VXLAN port information

Add some basic VXLAN definitions in vxlan.h file.

It includes VXLAN port information and VXLAN device structures.

Signed-off-by: Jijiang Liu <jijiang.liu@intel.com>
Signed-off-by: Thomas Long <thomas.long@intel.com>
9 years agoexamples/tep_term: initialize VXLAN sample
Jijiang Liu [Mon, 22 Jun 2015 16:40:56 +0000 (00:40 +0800)]
examples/tep_term: initialize VXLAN sample

This patch creates the virtio devices management mechanism.

These functions are from the vHost example, which include:

  - virtio device creation.

  - virtio device destroying.

  - virtio device maintenance.

Signed-off-by: Jijiang Liu <jijiang.liu@intel.com>
[Thomas: remove unused function validate_nb_devices()]
[Thomas: add maintainers section]

9 years agoapp/test: fix crash after mbuf allocation failure
Tetsuya Mukawa [Fri, 12 Jun 2015 02:54:00 +0000 (11:54 +0900)]
app/test: fix crash after mbuf allocation failure

The patch fixes potential null pointer accesses in test_mbuf.
If 'm[i]' is null, stop accessing it.

Signed-off-by: Tetsuya Mukawa <mukawa@igel.co.jp>
9 years agoexamples/distributor: fix debug macro
Bruce Richardson [Fri, 5 Jun 2015 16:01:17 +0000 (17:01 +0100)]
examples/distributor: fix debug macro

The macro to turn on additional debug output when the app was compiled
with "-DDEBUG" was missing a ";".

Fixes: 07db4a975094 ("examples/distributor: new sample app")

Signed-off-by: Anbarasan Murugesan <anbarasanx.murugesan@intel.com>
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
9 years agoreorder: allow random number as starting point
Simon Kagstrom [Wed, 20 May 2015 11:02:05 +0000 (13:02 +0200)]
reorder: allow random number as starting point

We use sequence numbers from a generator which has potentially started
long before the receiver. Therefore, the first number will typically
be > 0. The rte_reorder code will not work in this case, since the
packet is seen as outside of the buffer.

The patch instead records the first sequence number inserted as the
starting point.

Signed-off-by: Simon Kagstrom <simon.kagstrom@netinsight.net>
Signed-off-by: Johan Faltstrom <johan.faltstrom@netinsight.net>
Acked-by: Sergio Gonzalez Monroy <sergio.gonzalez.monroy@intel.com>