dpdk.git
10 years agoi40e: get flow director information
Jingjing Wu [Fri, 21 Nov 2014 00:46:49 +0000 (08:46 +0800)]
i40e: get flow director information

implement operation to get flow director information in i40e pmd driver, includes
 - mode
 - supported flow types
 - table space
 - flexible payload size and granularity
 - configured flexible payload and mask information

Signed-off-by: Jingjing Wu <jingjing.wu@intel.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
10 years agoethdev: get flow director information
Jingjing Wu [Fri, 21 Nov 2014 00:46:48 +0000 (08:46 +0800)]
ethdev: get flow director information

define structures for getting flow director information includes:
 - mode
 - supported flow types
 - table space
 - flexible payload size and granularity
 - configured flexible payload and mask information

Signed-off-by: Jingjing Wu <jingjing.wu@intel.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
10 years agoapp/testpmd: flush flow director table
Jingjing Wu [Fri, 21 Nov 2014 00:46:47 +0000 (08:46 +0800)]
app/testpmd: flush flow director table

Test command is added to flush flow director table

Signed-off-by: Jingjing Wu <jingjing.wu@intel.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
10 years agoi40e: flush flow director table
Jingjing Wu [Fri, 21 Nov 2014 00:46:46 +0000 (08:46 +0800)]
i40e: flush flow director table

implement operation to flush flow director table

Signed-off-by: Jingjing Wu <jingjing.wu@intel.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
10 years agoapp/testpmd: print extended flow director info
Jingjing Wu [Fri, 21 Nov 2014 00:46:45 +0000 (08:46 +0800)]
app/testpmd: print extended flow director info

Extended fdir info is printed in rxonly fwd engine when fdir match.

Signed-off-by: Jingjing Wu <jingjing.wu@intel.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
10 years agoi40e: report flow director matching
Jingjing Wu [Fri, 21 Nov 2014 00:46:44 +0000 (08:46 +0800)]
i40e: report flow director matching

setting the FDIR flag and report FD_ID plus flex bytes in mbuf if match

Signed-off-by: Jingjing Wu <jingjing.wu@intel.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
10 years agombuf: extend flow director field
Jingjing Wu [Fri, 21 Nov 2014 00:46:43 +0000 (08:46 +0800)]
mbuf: extend flow director field

fdir field in rte_mbuf is extended to support flex bytes reported when fdir match.
8 flex bytes can be reported in maximum.
The reported flex bytes are part of flexible payload.

Signed-off-by: Jingjing Wu <jingjing.wu@intel.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
10 years agoi40e: flow director matching counter
Jingjing Wu [Fri, 21 Nov 2014 00:46:42 +0000 (08:46 +0800)]
i40e: flow director matching counter

support to get the fdir_match counter

Signed-off-by: Jingjing Wu <jingjing.wu@intel.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
10 years agoapp/testpmd: add or delete flow director filter
Jingjing Wu [Fri, 21 Nov 2014 00:46:41 +0000 (08:46 +0800)]
app/testpmd: add or delete flow director filter

Commands are added to test adding or deleting flow director filters.
10 flow types in flow director are supported: ipv4, ipv4-frag, tcpv4, udpv4, sctpv4, ipv6, ipv6-frag, tcpv6, udpv6, sctpv6

Signed-off-by: Jingjing Wu <jingjing.wu@intel.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
10 years agoi40e: add or delete flow director
Jingjing Wu [Fri, 21 Nov 2014 00:46:40 +0000 (08:46 +0800)]
i40e: add or delete flow director

deal with two operations for flow director
 - RTE_ETH_FILTER_ADD
 - RTE_ETH_FILTER_DELETE
encode the flow inputs to programming packet
sent the packet to filter programming queue and check status on the status report queue

Signed-off-by: Jingjing Wu <jingjing.wu@intel.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
10 years agoi40e: transition between flow type and pctype
Jingjing Wu [Fri, 21 Nov 2014 00:46:39 +0000 (08:46 +0800)]
i40e: transition between flow type and pctype

- macros to validate flow_type and pctype
- functions for transition between flow_type and pctype:
  - i40e_flowtype_to_pctype
  - i40e_pctype_to_flowtype

Signed-off-by: Jingjing Wu <jingjing.wu@intel.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
10 years agoethdev: structures to add or delete flow director
Jingjing Wu [Fri, 21 Nov 2014 00:46:38 +0000 (08:46 +0800)]
ethdev: structures to add or delete flow director

define structures to add or delete flow director filter
  - struct rte_eth_fdir_filter

Signed-off-by: Jingjing Wu <jingjing.wu@intel.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
10 years agoi40e: initialize flow director flexible payload setting
Jingjing Wu [Fri, 21 Nov 2014 00:46:37 +0000 (08:46 +0800)]
i40e: initialize flow director flexible payload setting

set flexible payload related registers to default value at initialization time.

Signed-off-by: Jingjing Wu <jingjing.wu@intel.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
10 years agoi40e: tear down flow director
Jingjing Wu [Fri, 21 Nov 2014 00:46:36 +0000 (08:46 +0800)]
i40e: tear down flow director

release fortville resources on flow director, includes
 - queue 0 pair release
 - release vsi

Signed-off-by: Jingjing Wu <jingjing.wu@intel.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
10 years agoi40e: set up and initialize flow director
Jingjing Wu [Fri, 21 Nov 2014 00:46:35 +0000 (08:46 +0800)]
i40e: set up and initialize flow director

set up fortville resources to support flow director, includes
 - queue 0 pair allocated and set up for flow director
 - create vsi
 - reserve memzone for flow director programming packet

Signed-off-by: Jingjing Wu <jingjing.wu@intel.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
10 years agoi40evf: support querying and updating redirection table
Helin Zhang [Sat, 15 Nov 2014 16:03:44 +0000 (00:03 +0800)]
i40evf: support querying and updating redirection table

Support of updating/querying redirection table has been added for VF.

Signed-off-by: Helin Zhang <helin.zhang@intel.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
10 years agoethdev: support multiple sizes of redirection table
Helin Zhang [Sat, 15 Nov 2014 16:03:43 +0000 (00:03 +0800)]
ethdev: support multiple sizes of redirection table

As 40G NIC supports different sizes (128/512/64 entries) of
redirection table from that (128 entries) of 1G and 10G NICs,
support of multiple sizes of redirection table is needed.
It includes,
* Redefine 'struct rte_eth_rss_reta' in ethdev.
  - To 'struct rte_eth_rss_reta_entry64' which contains 64
    entries and 64 bits mask.
  - Array of above new structure can be used for any number of
    redirection table entries, as long as the number is multiple
    of 64. This is quite flexible for the future expanding of
    redirection table.
* Redefinition of relevant interfaces in ethdev.
  - Interface of reta update has been redefined with new parameters.
  - Interface of reta query has been redefined with new parameters.
* Rework of 1G PMD in igb.
  - reta update has been reworked.
  - reta query has been reworked.
* Rework of 10G PMD in ixgbe.
  - reta update has been reworked.
  - reta query has been reworked.
* Rework of 40G PMD (PF only) in i40e.
  - reta update has been reworked.
  - reta query has been reworked.
* Implement relevant commands in testpmd.

Test report: http://dpdk.org/ml/archives/dev/2014-November/008362.html

Signed-off-by: Helin Zhang <helin.zhang@intel.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
Tested-by: Erlu Chen <erlu.chen@intel.com>
10 years agoi40e: add redirection table size in device info
Helin Zhang [Sat, 15 Nov 2014 16:03:42 +0000 (00:03 +0800)]
i40e: add redirection table size in device info

Returning redirection table size has been supported in ops of
'dev_infos_get' for both PF and VF. Default RX/TX configurations
of VF can be returned in ops of 'dev_infos_get', while it was
missed before.

Signed-off-by: Helin Zhang <helin.zhang@intel.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
10 years agoixgbe: add redirection table size in device info
Helin Zhang [Sat, 15 Nov 2014 16:03:41 +0000 (00:03 +0800)]
ixgbe: add redirection table size in device info

As more and more information are different between PF and VF, ops
of 'dev_infos_get' has been implemented respectively. In addition,
returning redirection table size has been supported in it.

Signed-off-by: Helin Zhang <helin.zhang@intel.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
10 years agoigb: add redirection table size in device info
Helin Zhang [Sat, 15 Nov 2014 16:03:40 +0000 (00:03 +0800)]
igb: add redirection table size in device info

As more and more information are different between PF and VF,
ops of 'dev_infos_get' has been implemented respectively. In
addition, new field of 'reta_size' has been added in
'struct rte_eth_dev_info' for returning redirection table size.

Signed-off-by: Helin Zhang <helin.zhang@intel.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
10 years agoi40e: support setting hash lookup table size
Helin Zhang [Sat, 15 Nov 2014 16:03:39 +0000 (00:03 +0800)]
i40e: support setting hash lookup table size

Add support of setting hash lookup table size according
to the hardawre capability.

Signed-off-by: Helin Zhang <helin.zhang@intel.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
10 years agoi40evf: fix code style
Helin Zhang [Sat, 15 Nov 2014 16:03:38 +0000 (00:03 +0800)]
i40evf: fix code style

Fix of several code style issues.

Signed-off-by: Helin Zhang <helin.zhang@intel.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
10 years agoapp/testpmd: fix code style for redirection table
Helin Zhang [Sat, 15 Nov 2014 16:03:37 +0000 (00:03 +0800)]
app/testpmd: fix code style for redirection table

Fix of several code style issues.

Signed-off-by: Helin Zhang <helin.zhang@intel.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
10 years agoapp/test: refactor bonding checks with macros
Declan Doherty [Mon, 24 Nov 2014 16:33:42 +0000 (16:33 +0000)]
app/test: refactor bonding checks with macros

Signed-off-by: Declan Doherty <declan.doherty@intel.com>
Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
10 years agobond: support link status polling
Declan Doherty [Mon, 24 Nov 2014 16:33:41 +0000 (16:33 +0000)]
bond: support link status polling

Signed-off-by: Declan Doherty <declan.doherty@intel.com>
Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Tested-by: SunX Jiajia <sunx.jiajia@intel.com>
10 years agobond: free mbufs on Tx burst failure
Declan Doherty [Mon, 24 Nov 2014 16:33:39 +0000 (16:33 +0000)]
bond: free mbufs on Tx burst failure

Signed-off-by: Declan Doherty <declan.doherty@intel.com>
Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Tested-by: SunX Jiajia <sunx.jiajia@intel.com>
10 years agobond: fix naming inconsistency
Declan Doherty [Mon, 24 Nov 2014 16:33:38 +0000 (16:33 +0000)]
bond: fix naming inconsistency

Signed-off-by: Declan Doherty <declan.doherty@intel.com>
Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
10 years agobond: remove switch statement from Rx burst
Declan Doherty [Mon, 24 Nov 2014 16:33:37 +0000 (16:33 +0000)]
bond: remove switch statement from Rx burst

Signed-off-by: Declan Doherty <declan.doherty@intel.com>
Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
10 years agobond: support link status interrupt
Declan Doherty [Mon, 24 Nov 2014 16:33:36 +0000 (16:33 +0000)]
bond: support link status interrupt

Adding support for lsc interrupt from bonded device to link
bonding library with supporting unit tests in the test application.

Signed-off-by: Declan Doherty <declan.doherty@intel.com>
Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Tested-by: SunX Jiajia <sunx.jiajia@intel.com>
10 years agoaf_packet: add PMD for AF_PACKET-based virtual devices
John W. Linville [Mon, 17 Nov 2014 15:57:58 +0000 (10:57 -0500)]
af_packet: add PMD for AF_PACKET-based virtual devices

This is a Linux-specific virtual PMD driver backed by an AF_PACKET
socket.  This implementation uses mmap'ed ring buffers to limit copying
and user/kernel transitions.  The PACKET_FANOUT_HASH behavior of
AF_PACKET is used for frame reception.  In the current implementation,
Tx and Rx queues are always paired, and therefore are always equal
in number -- changing this would be a Simple Matter Of Programming.

Interfaces of this type are created with a command line option like
"--vdev=eth_af_packet0,iface=...".  There are a number of options available
as arguments:

 - Interface is chosen by "iface" (required)
 - Number of queue pairs set by "qpairs" (optional, default: 1)
 - AF_PACKET MMAP block size set by "blocksz" (optional, default: 4096)
 - AF_PACKET MMAP frame size set by "framesz" (optional, default: 2048)
 - AF_PACKET MMAP frame count set by "framecnt" (optional, default: 512)

Signed-off-by: John W. Linville <linville@tuxdriver.com>
[Thomas: disable because of incompatibility with some kernels]

10 years agoapp/testpmd: add some missing commands in help
Pablo de Lara [Sat, 15 Nov 2014 19:01:36 +0000 (19:01 +0000)]
app/testpmd: add some missing commands in help

set link-up and set link-down were not included
in the help command.

Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Acked-by: Thomas Monjalon <thomas.monjalon@6wind.com>
10 years agoapp/test: fix misplaced braces in devargs check
Bruce Richardson [Wed, 19 Nov 2014 09:06:13 +0000 (09:06 +0000)]
app/test: fix misplaced braces in devargs check

This patch fixes two occurrences where a call to strncmp had the closing
brace in the wrong place. Changing this form:
if (strncmp(X,Y,sizeof(X) != 0))
which does a comparison of length 1, to
if (strncmp(X,Y,sizeof(X)) != 0)
which does the correct length comparison and then compares the result to
zero in the "if" part, as the author presumably originally intended.

Reported-by: Larry Wang <liang-min.wang@intel.com>
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Olivier Matz <olivier.matz@6wind.com>
10 years agoapp/test: remove file prefix option for bsd
Pablo de Lara [Sat, 15 Nov 2014 20:34:09 +0000 (20:34 +0000)]
app/test: remove file prefix option for bsd

eal_flags and multiprocess unit tests use --file-prefix option
which is not supported in FreeBSD, so it has been removed
if compiled for this OS.

Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
10 years agocmdline: fix for bsd
Sergio Gonzalez Monroy [Thu, 20 Nov 2014 14:17:13 +0000 (14:17 +0000)]
cmdline: fix for bsd

Some features of the cmdline were broken in FreeBSD as a result of
termios not being compiled.

Signed-off-by: Sergio Gonzalez Monroy <sergio.gonzalez.monroy@intel.com>
Acked-by: Neil Horman <nhorman@tuxdriver.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
10 years agoexamples/dpdk_qat: fix reference to old mbuf field
Pablo de Lara [Thu, 20 Nov 2014 10:50:07 +0000 (10:50 +0000)]
examples/dpdk_qat: fix reference to old mbuf field

Since commit 08b563ffb19 ("mbuf: replace data pointer by an offset"),
data is not an mbuf field anymore.

Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Acked-by: Thomas Monjalon <thomas.monjalon@6wind.com>
10 years agoxenvirt: fix reference to old mbuf field
Sergio Gonzalez Monroy [Wed, 19 Nov 2014 12:26:25 +0000 (12:26 +0000)]
xenvirt: fix reference to old mbuf field

Since commit 08b563ffb19 ("mbuf: replace data pointer by an offset"),
data is not an mbuf field anymore.

Signed-off-by: Sergio Gonzalez Monroy <sergio.gonzalez.monroy@intel.com>
Acked-by: Thomas Monjalon <thomas.monjalon@6wind.com>
10 years agoalarm: make cancellation thread-safe
Pawel Wodkowski [Wed, 1 Oct 2014 14:20:22 +0000 (15:20 +0100)]
alarm: make cancellation thread-safe

It eliminates a race between threads using rte_alarm_cancel() and
rte_alarm_set().

Signed-off-by: Pawel Wodkowski <pawelx.wodkowski@intel.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
Acked-by: Neil Horman <nhorman@tuxdriver.com>
10 years agotable: fix pointer calculations at initialization
Balazs Nemeth [Fri, 26 Sep 2014 09:37:40 +0000 (09:37 +0000)]
table: fix pointer calculations at initialization

During initialization of rte_table_hash_ext and rte_table_hash_lru, a
contiguous region of memory is allocated to store meta data, buckets,
extended buckets, keys, stack of keys, stack of extended buckets and
data entries. The size of each region depends on the hash table
configuration.

The address of each region is calculated using offsets relative to the
beginning of the memory region. Without this patch, the offsets
contain the size of the table meta data (sizeof(struct
rte_table_hash)). These addresses are stored in pointers which are
used when entries are added or deleted and lookups are performed.

Instead of adding these offsets to the address of the beginning of the
memory region, they are added to the address of the end of the meta
data (= address of the beginning of the memory region + sizeof(struct
rte_table_hash)). The resulting addresses are off by sizeof(struct
rte_table_hash) bytes. As a consequence, memory past the allocated
region can be accessed by the add, delete and lookup operations.

This patch corrects the address calculation by not including the size
of the meta data in the offsets.

Signed-off-by: Balazs Nemeth <balazs.nemeth@intel.com>
Acked-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
10 years agotable: fix incorrect initialization
Balazs Nemeth [Fri, 26 Sep 2014 09:37:39 +0000 (09:37 +0000)]
table: fix incorrect initialization

During initialization of rte_hash_table_ext and rte_hash_table_lru,
t->data_size_shl is calculated.  This member contains the number of
bits to shift left during calculation of the location of entries in
the hash table.  To determine the number of bits to shift left, the
size of the entry (as provided to the rte_table_hash_ext_create and
rte_table_hash_lru_create) has to be used instead of the size of the
key.

Signed-off-by: Balazs Nemeth <balazs.nemeth@intel.com>
Acked-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
10 years agotable: fix checking extended buckets in unoptimized case
Balazs Nemeth [Fri, 26 Sep 2014 09:37:38 +0000 (09:37 +0000)]
table: fix checking extended buckets in unoptimized case

If a key is not found in a bucket and the bucket has been extended,
the extended buckets also have to checked for potentially matching
keys. The extended buckets are checked at the end of the lookup. In
most cases, this logic is skipped as it is uncommon to have buckets in
an extended state.

In case the lookup is performed with less than 5 packets, an
unoptimized version is run instead (the optimized version requires at
least 5 packets). The extended buckets should also be checked in this
case instead of simply ignoring the extended buckets.

Signed-off-by: Balazs Nemeth <balazs.nemeth@intel.com>
Acked-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
10 years agotable: fix empty bucket removal during entry deletion
Balazs Nemeth [Fri, 26 Sep 2014 09:37:37 +0000 (09:37 +0000)]
table: fix empty bucket removal during entry deletion

When an entry is deleted from an extensible rte_table_hash, the bucket
that stored the entry can become empty. If this is the case, the
bucket needs to be removed from the chain of buckets.

During removal of the bucket, the chain should be updated first. If
the bucket that will be removed is cleared first, the chain is broken
and the information to update the chain is lost.

Signed-off-by: Balazs Nemeth <balazs.nemeth@intel.com>
Acked-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
Acked-by: Neil Horman <nhorman@tuxdriver.com>
10 years agodoc: programmers guide
Bernard Iremonger [Fri, 14 Nov 2014 11:53:41 +0000 (11:53 +0000)]
doc: programmers guide

The 1.7 DPDK_Prog_Guide document in MSWord has been converted to rst format for
use with Sphinx. There is an rst file for each chapter and an index.rst file
which contains the table of contents.
The top level index file has been modified to include this guide.

This document contains some png image files. If any of these png files are modified
they should be replaced with an svg file.

This is the sixth document from a set of 6 documents.

Signed-off-by: Bernard Iremonger <bernard.iremonger@intel.com>
10 years agodoc: fix eal paths
Thomas Monjalon [Mon, 17 Nov 2014 08:17:14 +0000 (09:17 +0100)]
doc: fix eal paths

Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
10 years agoexamples/distributor: new sample app
Reshma Pattan [Mon, 3 Nov 2014 15:49:44 +0000 (15:49 +0000)]
examples/distributor: new sample app

A new sample app that shows the usage of the distributor library. This
app works as follows:

* An RX thread runs which pulls packets from each ethernet port in turn
  and passes those packets to worker using a distributor component.
* The workers take the packets in turn, and determine the output port
  for those packets using basic l2forwarding doing an xor on the source
  port id.
* The RX thread takes the returned packets from the workers and enqueue
  those packets into an rte_ring structure.
* A TX thread pulls the packets off the rte_ring structure and then
  sends each packet out the output port specified previously by the worker
* Command-line option support provided only for portmask.

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Signed-off-by: Reshma Pattan <reshma.pattan@intel.com>
Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
10 years agovmxnet3: leverage data ring on Tx path
Yong Wang [Wed, 5 Nov 2014 01:49:43 +0000 (17:49 -0800)]
vmxnet3: leverage data ring on Tx path

Data_ring is a pre-mapped guest ring buffer that vmxnet3
backend has access to directly without a need for buffer
address mapping and unmapping during packet transmission.
It is useful in reducing device emulation cost on the tx
path.  There are some additional cost though on the guest
driver for packet copy and overall it's a win.

This patch leverages the data_ring for packets with a
length less than or equal to the data_ring entry size
(128B).  For larger packet, we won't use the data_ring
as that requires one extra tx descriptor and it's not
clear if doing this will be beneficial.

Performance results show that this patch significantly
boosts vmxnet3 64B tx performance (pkt rate) for l2fwd
application on a Ivy Bridge server by >20% at which
point we start to hit some bottleneck on the rx side.

Signed-off-by: Yong Wang <yongwang@vmware.com>
10 years agovmxnet3: improve Rx performance
Yong Wang [Wed, 5 Nov 2014 01:49:42 +0000 (17:49 -0800)]
vmxnet3: improve Rx performance

This patch includes two small performance optimizations
on the rx path:

(1) It adds unlikely hints on various infrequent error
paths to the compiler to make branch prediction more
efficient.

(2) It also moves a constant assignment out of the pkt
polling loop.  This saves one branching per packet.

Performance evaluation configs:
- On the DPDK-side, it's running some l3 forwarding app
inside a VM on ESXi with one core assigned for polling.
- On the client side, pktgen/dpdk is used to generate
64B tcp packets at line rate (14.8M PPS).

Performance results on a Nehalem box (4cores@2.8GHzx2)
shown below.  CPU usage is collected factoring out the
idle loop cost.
- Before the patch, ~900K PPS with 65% CPU of a core
used for DPDK.
- After the patch, only 45% of a core used, while
maintaining the same packet rate.

Signed-off-by: Yong Wang <yongwang@vmware.com>
10 years agovmxnet3: add Rx check offloads
Yong Wang [Wed, 5 Nov 2014 01:49:41 +0000 (17:49 -0800)]
vmxnet3: add Rx check offloads

Only supports IPv4 so far.

Signed-off-by: Yong Wang <yongwang@vmware.com>
10 years agovmxnet3: fix stop/restart
Yong Wang [Wed, 5 Nov 2014 01:49:40 +0000 (17:49 -0800)]
vmxnet3: fix stop/restart

This change makes vmxnet3 consistent with other pmds in
terms of dev_stop behavior: rather than releasing tx/rx
rings, it only resets the ring structure and release the
pending mbufs.

Verified with various tests (test-pmd and pktgen) over
vmxnet3 that dev stop/restart works fine.

Signed-off-by: Yong Wang <yongwang@vmware.com>
10 years agovmxnet3: add vlan Tx offload
Yong Wang [Wed, 5 Nov 2014 01:49:39 +0000 (17:49 -0800)]
vmxnet3: add vlan Tx offload

Signed-off-by: Yong Wang <yongwang@vmware.com>
10 years agovmxnet3: fix vlan Rx stripping
Yong Wang [Wed, 5 Nov 2014 01:49:38 +0000 (17:49 -0800)]
vmxnet3: fix vlan Rx stripping

Shouldn't reset vlan_tci to 0 if a valid VLAN tag is stripped.

Signed-off-by: Yong Wang <yongwang@vmware.com>
10 years agoacl: fix code typos
Thomas Monjalon [Fri, 14 Nov 2014 15:22:31 +0000 (16:22 +0100)]
acl: fix code typos

Replace indicies by indices.

Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
10 years agoacl: fix comments typos
Thomas Monjalon [Fri, 14 Nov 2014 14:59:31 +0000 (15:59 +0100)]
acl: fix comments typos

Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
10 years agodistributor: enhance and fix tag matching
Qinglai Xiao [Mon, 10 Nov 2014 14:44:02 +0000 (16:44 +0200)]
distributor: enhance and fix tag matching

With introduction of in_flight_bitmask, the whole 32 bits of tag can be
used. Further more, this patch fixed the integer overflow when finding
the matched tags.
The maximum number workers is now defined as 64, which is length of
double-word. The link between number of workers and RTE_MAX_LCORE is
now removed. Compile time check is added to ensure the
RTE_DISTRIB_MAX_WORKERS is less than or equal to size of double-word.

Signed-off-by: Qinglai Xiao <jigsaw@gmail.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
10 years agombuf: add usr alias for hash
Qinglai Xiao [Mon, 10 Nov 2014 12:52:46 +0000 (14:52 +0200)]
mbuf: add usr alias for hash

This field is added for librte_distributor. User of librte_distributor
is advocated to set value of mbuf->hash.usr before calling
rte_distributor_process. The value of usr is the tag which stands as
identifier of flow.

Signed-off-by: Qinglai Xiao <jigsaw@gmail.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
10 years agoeal: update i40e supported devices
Helin Zhang [Thu, 13 Nov 2014 08:29:52 +0000 (16:29 +0800)]
eal: update i40e supported devices

According to the changes of the i40e base driver, two device
IDs (0x1573, 0x1582) are not supported anymore, and one new
device ID (0x1586) is supported. The list of i40e device IDs
DPDK supported should be modified accordingly.

Signed-off-by: Helin Zhang <helin.zhang@intel.com>
Acked-by: Thomas Monjalon <thomas.monjalon@6wind.com>
10 years agodoc: fix file attributes of guides
Bernard Iremonger [Tue, 11 Nov 2014 13:39:38 +0000 (13:39 +0000)]
doc: fix file attributes of guides

The file attributes of the rst files have been changed to 644

Signed-off-by: Bernard Iremonger <bernard.iremonger@intel.com>
10 years agodoc: sample application user guide
Bernard Iremonger [Tue, 11 Nov 2014 12:27:01 +0000 (12:27 +0000)]
doc: sample application user guide

The 1.7 DPDK_SampleApp_UG document in MSWord has been converted to rst format for
use with Sphinx. There is an rst file for each chapter and an index.rst file
which contains the table of contents.
The top level index file has been modified to include this guide.

This document contains some png image files. If any of thes png files are modified
they should be replaced with an svg file.

This is the fifth document from a set of 6 documents.

Signed-off-by: Bernard Iremonger <bernard.iremonger@intel.com>
10 years agoapp/test: measure cycles per packet in Rx/Tx
Cunming Liang [Wed, 12 Nov 2014 06:24:35 +0000 (14:24 +0800)]
app/test: measure cycles per packet in Rx/Tx

The unit test can be used to measure cycles per packet in different rx/tx routines.
The NIC works in loopback mode. So it doesn't require test equipment to measure throughput.
As result, the unit test shows the average cycles per packet consuming.
When doing the test, make sure the link is UP.

Usage Example:
1. Run unit test app in interactive mode
    app/test -c f -n 4 -- -i
2. Run and wait for the result
    pmd_perf_autotest

There's option to choose rx/tx pair, default is vector.
    set_rxtx_mode [vector|scalar|full|hybrid]
Note: To get acurate scalar fast, please choose 'vector' or 'hybrid' without INC_VEC=y in config

It supports to measure standalone rx or tx.
Usage Example:
Choose rx or tx standalone, default is both
    set_rxtx_anchor [rxtx|rxonly|txonly]

It also supports to measure standalone RX burst cycles.
In this way, it won't repeat re-send received packets.
Now it measures two situations, poll before/after xmit(w or w/o desc. cache conflict)
Usage Example:
Set stream control mode, by default is continuous
    set_rxtx_sc [continuous|poll_before_xmit|poll_after_xmit]

Test report: http://dpdk.org/ml/archives/dev/2014-October/007145.html

Signed-off-by: Cunming Liang <cunming.liang@intel.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Neil Horman <nhorman@tuxdriver.com>
Tested-by: Yong Liu <yong.liu@intel.com>
10 years agoapp/test: allow to create packets of different sizes
Cunming Liang [Wed, 12 Nov 2014 06:24:30 +0000 (14:24 +0800)]
app/test: allow to create packets of different sizes

Add support to allow packet burst generator to create packets
in different sizes.

Signed-off-by: Cunming Liang <cunming.liang@intel.com>
Acked-by: Declan Doherty <declan.doherty@intel.com>
10 years agoixgbe: fix reconfiguration of Rx method
Cunming Liang [Wed, 12 Nov 2014 06:24:31 +0000 (14:24 +0800)]
ixgbe: fix reconfiguration of Rx method

The scattered_rx configuration is updated in dev_start().
For the execution sequence "stop, re-configure and then re-start",
it expects using the new configuration.
But during re-configure, the stored data may still be the old one.
The patch clean the configuration anyway in dev_stop().
So that make sure always get the best Rx routine.

Signed-off-by: Cunming Liang <cunming.liang@intel.com>
10 years agoethdev: fix Rx/Tx return in debug mode
Cunming Liang [Wed, 12 Nov 2014 06:24:36 +0000 (14:24 +0800)]
ethdev: fix Rx/Tx return in debug mode

Per definition, rte_eth_rx_burst/rte_eth_tx_burst/rte_eth_rx_queue_count
returns the packet number.
When RTE_LIBRTE_ETHDEV_DEBUG turns on, retval of FUNC_PTR_OR_ERR_RTE was
set to -ENOTSUP. It makes confusing.
The patch always return 0 no matter no packet or there's error.

Signed-off-by: Cunming Liang <cunming.liang@intel.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
10 years agoether: new function to format mac address
Cunming Liang [Wed, 12 Nov 2014 06:24:32 +0000 (14:24 +0800)]
ether: new function to format mac address

Signed-off-by: Cunming Liang <cunming.liang@intel.com>
10 years agovhost: enable promiscuous and multicast
Ouyang Changchun [Sat, 8 Nov 2014 04:26:16 +0000 (12:26 +0800)]
vhost: enable promiscuous and multicast

This is to enable user space vhost receiving and forwarding broadcast
and multicast packets:
Use new option in command line to enable promisc mode;
Enable 2 bits in VMDQ RX mode: ETH_VMDQ_ACCEPT_BROADCAST and ETH_VMDQ_ACCEPT_MULTICAST.

Signed-off-by: Changchun Ouyang <changchun.ouyang@intel.com>
10 years agovirtio: support promiscuous and allmulticast
Ouyang Changchun [Sat, 8 Nov 2014 04:26:15 +0000 (12:26 +0800)]
virtio: support promiscuous and allmulticast

Add codes for supporting promiscuous and allmulticast enable and disable.

Signed-off-by: Changchun Ouyang <changchun.ouyang@intel.com>
10 years agoixgbe: VMDQ Rx mode
Ouyang Changchun [Sat, 8 Nov 2014 04:26:14 +0000 (12:26 +0800)]
ixgbe: VMDQ Rx mode

Config PFVML2FLT register in ixgbe PMD to enable it receive broadcast and multicast packets;
also factorize the common logic with ixgbe_set_pool_rx_mode.

Signed-off-by: Changchun Ouyang <changchun.ouyang@intel.com>
Acked-by: Thomas Monjalon <thomas.monjalon@6wind.com>
10 years agoigb: VMDQ Rx mode
Ouyang Changchun [Sat, 8 Nov 2014 04:26:13 +0000 (12:26 +0800)]
igb: VMDQ Rx mode

Config VM offload register in igb PMD to enable it receive broadcast and multicast packets.

Signed-off-by: Changchun Ouyang <changchun.ouyang@intel.com>
Acked-by: Thomas Monjalon <thomas.monjalon@6wind.com>
10 years agoethdev: VMDQ Rx mode
Ouyang Changchun [Sat, 8 Nov 2014 04:26:12 +0000 (12:26 +0800)]
ethdev: VMDQ Rx mode

Add vmdq rx mode field into rx config struct, it is flag from ETH_VMDQ_ACCEPT_*.

Signed-off-by: Changchun Ouyang <changchun.ouyang@intel.com>
Acked-by: Thomas Monjalon <thomas.monjalon@6wind.com>
10 years agoexamples/vmdq: fix code style
Huawei Xie [Mon, 10 Nov 2014 00:29:39 +0000 (08:29 +0800)]
examples/vmdq: fix code style

Signed-off-by: Huawei Xie <huawei.xie@intel.com>
Acked-by: Jing Chen <jing.d.chen@intel.com>
10 years agoexamples/vmdq: use new VMDQ API
Huawei Xie [Mon, 10 Nov 2014 00:29:38 +0000 (08:29 +0800)]
examples/vmdq: use new VMDQ API

This patch supports new VMDQ API in vmdq example.
Besides, it allows users to specify num_pools different with
max_nb_pools, thus the polling thread needn't to poll queues
of all pools.

Due to i40e implementation issue, there is no default mac for
VMDQ pool, so app needs to specify mac address for each pool
explicitly.

Signed-off-by: Huawei Xie <huawei.xie@intel.com>
Acked-by: Jing Chen <jing.d.chen@intel.com>
10 years agokni: add build-time checks for mbuf mapping
Jia Yu [Fri, 7 Nov 2014 17:49:15 +0000 (09:49 -0800)]
kni: add build-time checks for mbuf mapping

Adding this check is to avoid breakage from future data structure changes.

Signed-off-by: Jia Yu <jyu@vmware.com>
Acked-by: Thomas Monjalon <thomas.monjalon@6wind.com>
10 years agokni: fix build
Thomas Monjalon [Fri, 7 Nov 2014 14:45:34 +0000 (15:45 +0100)]
kni: fix build

Since commit 08b563ffb19 ("mbuf: replace data pointer by an offset"),
KNI vhost compilation (CONFIG_RTE_KNI_VHOST=y) was broken.

rte_pktmbuf_mtod() is not used in the kernel context but is replaced
by a simple addition of the base address and the offset.

Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
Acked-by: Olivier Matz <olivier.matz@6wind.com>
10 years agoapp,examples: remove references to drivers config
Thomas Monjalon [Fri, 7 Nov 2014 11:48:59 +0000 (12:48 +0100)]
app,examples: remove references to drivers config

These references to drivers break the layering isolation between
application and drivers.

Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
Acked-by: Helin Zhang <helin.zhang@intel.com>
10 years agodistributor: add comments
Bruce Richardson [Thu, 6 Nov 2014 13:55:32 +0000 (13:55 +0000)]
distributor: add comments

Add in some additional comments around more complex areas of the code
so as to make the code easier to read and understand.

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
10 years agoeal: fix C++ compilation after headers rework
David Marchand [Fri, 7 Nov 2014 06:26:20 +0000 (07:26 +0100)]
eal: fix C++ compilation after headers rework

Following the big headers rework, all C++ stuff has moved to arch-specific
headers. The generic headers should not contain this so that this is done only
once.
There was a remaining #ifdef __cplusplus in "eal: split CPU cycle operation to
architecture specific" (fa4001c30ee9).

Reported-by: Keunhong Lee <dlrmsghd@gmail.com>
Signed-off-by: David Marchand <david.marchand@6wind.com>
Acked-by: Thomas Monjalon <thomas.monjalon@6wind.com>
10 years agoi40e: fix build with icc
Thomas Monjalon [Thu, 6 Nov 2014 22:56:59 +0000 (23:56 +0100)]
i40e: fix build with icc

Since commit d798a94 ("mac vlan filter"),
ICC reports this error:
lib/librte_pmd_i40e/i40e_ethdev.c(1763): error #188:
enumerated type mixed with another type

Indeed, RTE_ETH_FILTER_NONE comes from enum rte_filter_type but
enum rte_filter_op is expected.

Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
10 years agoi40evf: support configurable crc stripping
Helin Zhang [Thu, 6 Nov 2014 12:53:50 +0000 (20:53 +0800)]
i40evf: support configurable crc stripping

Configurable CRC stripping needs to be supported in VF,
and the configuration should be finally set in relevant
RX queue context with PF host support.

Signed-off-by: Helin Zhang <helin.zhang@intel.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
10 years agoi40e: support configurable crc stripping
Helin Zhang [Thu, 6 Nov 2014 12:53:49 +0000 (20:53 +0800)]
i40e: support configurable crc stripping

Support of configurable crc stripping in context of
VF RX queues.

Signed-off-by: Helin Zhang <helin.zhang@intel.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
10 years agoi40e: fix code style
Helin Zhang [Thu, 6 Nov 2014 12:53:48 +0000 (20:53 +0800)]
i40e: fix code style

Rename some local variables to express more accurately
and briefly. Fix several code style issues reported by
checkpatch.pl. Line warpping for some source lines which
has more than 80 characters, and merge lines together for
those source lines which does not need any line wrapping
actually. Add macros for numeric or calculating memory
sizes.

Signed-off-by: Helin Zhang <helin.zhang@intel.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
10 years agoi40evf: rework mailbox version check
Helin Zhang [Thu, 6 Nov 2014 12:53:47 +0000 (20:53 +0800)]
i40evf: rework mailbox version check

API version number is straightfoward enough for checking
the PF host, and no need to use 'host_is_dpdk'.

Signed-off-by: Helin Zhang <helin.zhang@intel.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
10 years agoconfig: remove useless option for i40e crc stripping
Helin Zhang [Thu, 6 Nov 2014 12:53:46 +0000 (20:53 +0800)]
config: remove useless option for i40e crc stripping

Remove 'CONFIG_RTE_LIBRTE_I40E_PF_DISABLE_STRIP_CRC'
from config files, as nowhere uses it.

Signed-off-by: Helin Zhang <helin.zhang@intel.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
10 years agovhost: fix mem path check
Ouyang Changchun [Mon, 3 Nov 2014 08:11:53 +0000 (16:11 +0800)]
vhost: fix mem path check

Commit aec8283d47 fixes the compilation issue, but it leads to
one runtime issue: early exit wrongly. In some case, 'path' is NULL, but
'resolved_path' has effective path, it should continue going ahead rather
than exit.
This is due to that qemu unlink the file after it maps the huge page file.
In this special case, it is ok to check the resolved path
when path is NULL if errno indicates "No such file or directory".

Signed-off-by: Changchun Ouyang <changchun.ouyang@intel.com>
Acked-by: Huawei Xie <huawei.xie@intel.com>
10 years agovhost: fix code style
Huawei Xie [Wed, 5 Nov 2014 23:31:41 +0000 (07:31 +0800)]
vhost: fix code style

Fix alignment issues, lengthy lines, misordered type and other coding style issues.

Signed-off-by: Huawei Xie <huawei.xie@intel.com>
Acked-by: Neil Horman <nhorman@tuxdriver.com>
10 years agodoc: testpmd application user guide
Bernard Iremonger [Tue, 4 Nov 2014 13:56:59 +0000 (13:56 +0000)]
doc: testpmd application user guide

The 1.7 DPDK_TestPMD_App_UG  document in MSWord has been converted to rst format for
use with Sphinx. There is an rst file for each chapter and an index.rst file
which contains the table of contents.
The top level index file has been modified to include this guide.

This is the fourth document from a set of 6 documents.

Signed-off-by: Bernard Iremonger <bernard.iremonger@intel.com>
10 years agoexamples/vhost: check offset with vlan
Ouyang Changchun [Wed, 5 Nov 2014 07:10:35 +0000 (15:10 +0800)]
examples/vhost: check offset with vlan

This patch checks the packet length offset value, and checks if the
extra bytes inside buffer cross page boundary.

Signed-off-by: Changchun Ouyang <changchun.ouyang@intel.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
10 years agoexamples/vhost: rework duplicated code
Ouyang Changchun [Wed, 5 Nov 2014 07:10:34 +0000 (15:10 +0800)]
examples/vhost: rework duplicated code

Extract a function to replace duplicated codes in one copy and zero copy TX function.

Signed-off-by: Changchun Ouyang <changchun.ouyang@intel.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
10 years agoexamples/vhost: fix packet length
Ouyang Changchun [Wed, 5 Nov 2014 07:10:33 +0000 (15:10 +0800)]
examples/vhost: fix packet length

As HW vlan strip will reduce the packet length by minus length of vlan tag,
so it need restore the packet length by plus it.

Signed-off-by: Changchun Ouyang <changchun.ouyang@intel.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
Acked-by: Huawei Xie <huawei.xie@intel.com>
10 years agoeal: factorize x86 headers
David Marchand [Tue, 28 Oct 2014 12:50:57 +0000 (13:50 +0100)]
eal: factorize x86 headers

No need to keep the same code duplicated for 32 and 64bits x86.

Signed-off-by: David Marchand <david.marchand@6wind.com>
Acked-by: Chao Zhu <bjzhuc@cn.ibm.com>
Acked-by: Thomas Monjalon <thomas.monjalon@6wind.com>
10 years agoeal: install all arch headers
David Marchand [Tue, 28 Oct 2014 12:50:56 +0000 (13:50 +0100)]
eal: install all arch headers

Architecture can have their own specific headers, just install all headers from
arch directory.

Signed-off-by: David Marchand <david.marchand@6wind.com>
Acked-by: Chao Zhu <bjzhuc@cn.ibm.com>
Acked-by: Thomas Monjalon <thomas.monjalon@6wind.com>
10 years agoeal: split CPU flags operations to architecture specific
Chao Zhu [Tue, 28 Oct 2014 12:50:55 +0000 (13:50 +0100)]
eal: split CPU flags operations to architecture specific

This patch splits CPU flags related operations from DPDK and push them
to architecture specific arch directories, so that other processor
architecture can implement its own CPU flag functions to support DPDK.

Signed-off-by: Chao Zhu <bjzhuc@cn.ibm.com>
Signed-off-by: David Marchand <david.marchand@6wind.com>
Acked-by: Thomas Monjalon <thomas.monjalon@6wind.com>
10 years agoeal: split memcpy operation to architecture specific
Chao Zhu [Tue, 28 Oct 2014 12:50:54 +0000 (13:50 +0100)]
eal: split memcpy operation to architecture specific

This patch splits the SSE based memory copy function from DPDK and push
them to architecture specific arch directories. Other processor
architecture can implement its own vector based memory copy functions.

Signed-off-by: Chao Zhu <bjzhuc@cn.ibm.com>
Signed-off-by: David Marchand <david.marchand@6wind.com>
Acked-by: Thomas Monjalon <thomas.monjalon@6wind.com>
10 years agoeal: split spinlock operations to architecture specific
Chao Zhu [Tue, 28 Oct 2014 12:50:53 +0000 (13:50 +0100)]
eal: split spinlock operations to architecture specific

This patch splits the spinlock operations from DPDK and push them to
architecture specific arch directories, so that other processor
architecture to support DPDK can be easily adopted.

Signed-off-by: Chao Zhu <bjzhuc@cn.ibm.com>
Signed-off-by: David Marchand <david.marchand@6wind.com>
Acked-by: Thomas Monjalon <thomas.monjalon@6wind.com>
10 years agoeal: split prefetch operations to architecture specific
Chao Zhu [Tue, 28 Oct 2014 12:50:52 +0000 (13:50 +0100)]
eal: split prefetch operations to architecture specific

This patch splits the prefetch operations from DPDK and push them to
architecture specific arch directories, so that other processor
architecture to support DPDK can implement their own functions.

Signed-off-by: Chao Zhu <bjzhuc@cn.ibm.com>
Signed-off-by: David Marchand <david.marchand@6wind.com>
Acked-by: Thomas Monjalon <thomas.monjalon@6wind.com>
10 years agoeal: split CPU cycle operation to architecture specific
Chao Zhu [Tue, 28 Oct 2014 12:50:51 +0000 (13:50 +0100)]
eal: split CPU cycle operation to architecture specific

This patch splits the CPU TSC read operations from DPDK and push them to
architecture specific arch directories, so that other processors that
don't have tsc register can implement its own functions.

Signed-off-by: Chao Zhu <bjzhuc@cn.ibm.com>
Signed-off-by: David Marchand <david.marchand@6wind.com>
Acked-by: Thomas Monjalon <thomas.monjalon@6wind.com>
10 years agoeal: split byte order operations to architecture specific
Chao Zhu [Tue, 28 Oct 2014 12:50:50 +0000 (13:50 +0100)]
eal: split byte order operations to architecture specific

This patch splits the byte order operations from DPDK and push them to
architecture specific arch directories, so that other processor
architecture to support DPDK can be easily adopted.

Signed-off-by: Chao Zhu <bjzhuc@cn.ibm.com>
Signed-off-by: David Marchand <david.marchand@6wind.com>
Acked-by: Thomas Monjalon <thomas.monjalon@6wind.com>
10 years agoeal: split atomic operations to architecture specific
David Marchand [Tue, 28 Oct 2014 12:50:48 +0000 (13:50 +0100)]
eal: split atomic operations to architecture specific

This patch first adds architecture specific directories to eal.
Then split the atomic operations to architecture specific and generic files.
Architecture specific files are put into the corresponding architecture
directory and common header are put into generic directory.

Update documentation generation with new generic/ directory.

Signed-off-by: Chao Zhu <bjzhuc@cn.ibm.com>
Signed-off-by: David Marchand <david.marchand@6wind.com>
Acked-by: Thomas Monjalon <thomas.monjalon@6wind.com>
10 years agoeal/linux: fix inaccurate numa node error comment
Matthew Hall [Thu, 30 Oct 2014 03:40:08 +0000 (03:40 +0000)]
eal/linux: fix inaccurate numa node error comment

Signed-off-by: Matthew Hall <mhall@mhcomputing.net>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
10 years agoeal/bsd: fix pci mapping in secondary process
Pablo de Lara [Thu, 30 Oct 2014 12:23:39 +0000 (12:23 +0000)]
eal/bsd: fix pci mapping in secondary process

On FreeBSD, when initializing a secondary process,
EAL was complaining if there were ports not bound
to nic_uio module, exiting the application, which
should not happen, as this is expected behaviour,
and not an error

Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Acked-by: Thomas Monjalon <thomas.monjalon@6wind.com>
10 years agomk: fix bsd module build
Sergio Gonzalez Monroy [Thu, 30 Oct 2014 16:58:54 +0000 (16:58 +0000)]
mk: fix bsd module build

When building shared libs (for both GCC and CLANG targets), -fPIC flag
has been added to CFLAGS and leaks to BSD module build system causing
the following error:

fatal error: error in backend: Cannot select: 0x802ad8010: i64 = X86ISD::WrapperRIP 0x802ade110
      [ID=13]
  0x802ade110: i64 = TargetGlobalAddress<i8** @__stack_chk_guard> 0 [TF=5] [ID=10]

Reset CFLAGS to MODULE_CFLAGS before building BSD module.

Signed-off-by: Sergio Gonzalez Monroy <sergio.gonzalez.monroy@intel.com>
Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
10 years agoixgbe: fix build with icc
Bruce Richardson [Mon, 3 Nov 2014 17:01:08 +0000 (17:01 +0000)]
ixgbe: fix build with icc

When using Intel C++ compiler(icc) 14.0.1.106 or the older icc 13.x
version, the mbuf initializer variable was not getting configured
correctly, as the mb_def variable was not set correctly. This is due
to an issue with icc (DPD200249565 which already been fixed in
icc 14.0.2 and newer compiler release) where it incorrectly calculates
the field offsets with initializers when zero-sized fields
are used in a structure.
To work around this, the code in ixgbe_rxq_vec_setup does not setup the
fields using an initializer, but instead assigns the values individually
in code.
NOTE: There is no performance impact to this change as the queue
setup functions are not data-plane APIs, but are only used at app
initialization.

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Reviewed-by: David Marchand <david.marchand@6wind.com>
Acked-by: Thomas Monjalon <thomas.monjalon@6wind.com>
10 years agoi40e: fix build with debug enabled
Choonho Son [Wed, 5 Nov 2014 15:15:47 +0000 (00:15 +0900)]
i40e: fix build with debug enabled

The commit 15dbb63ef9e9 ("VXLAN packet identification") didn't compile,
if CONFIG_RTE_LIBRTE_I40E_DEBUG_DRIVER is enabled.

Signed-off-by: Choonho Son <choonho.son@gmail.com>
Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>