dpdk.git
9 years agodevargs: remove limit on parameters length
David Marchand [Fri, 13 Feb 2015 15:03:14 +0000 (16:03 +0100)]
devargs: remove limit on parameters length

As far as I know, there is no reason why we should have a limit on the length of
parameters that can be given for a device.
Remove this limit by using dynamic allocations.

Signed-off-by: David Marchand <david.marchand@6wind.com>
Acked-by: Thomas Monjalon <thomas.monjalon@6wind.com>
9 years agodevargs: indent and cleanup
David Marchand [Fri, 13 Feb 2015 15:03:13 +0000 (16:03 +0100)]
devargs: indent and cleanup

Prepare for next commit.
Fix some indent issues, refactor error code.

Signed-off-by: David Marchand <david.marchand@6wind.com>
Acked-by: Thomas Monjalon <thomas.monjalon@6wind.com>
9 years agoapp/test: fix devargs tests
David Marchand [Fri, 13 Feb 2015 15:03:15 +0000 (16:03 +0100)]
app/test: fix devargs tests

Add missing free for devargs->args and fix tests.

Signed-off-by: David Marchand <david.marchand@6wind.com>
Acked-by: Thomas Monjalon <thomas.monjalon@6wind.com>
9 years agomaintainers: claim for fm10k review
Chen Jing D(Mark) [Thu, 12 Feb 2015 10:06:07 +0000 (18:06 +0800)]
maintainers: claim for fm10k review

Claim for fm10k polling mode driver review.

Signed-off-by: Chen Jing D(Mark) <jing.d.chen@intel.com>
Acked-by: Thomas Monjalon <thomas.monjalon@6wind.com>
9 years agofm10k: add PF and VF interrupt handling
Jeff Shaw [Wed, 4 Feb 2015 08:33:53 +0000 (16:33 +0800)]
fm10k: add PF and VF interrupt handling

1. Add functions to enable PF/VF interrupt.
2. Add function to process error message passed from interrupt.
2. Add 2 interrupt handling functions, one for PF and one for VF.
2. Enable interrupt after completing initialization of NIC.

Signed-off-by: Jeff Shaw <jeffrey.b.shaw@intel.com>
Signed-off-by: Chen Jing D(Mark) <jing.d.chen@intel.com>
9 years agofm10k: add VF support
Jeff Shaw [Wed, 4 Feb 2015 08:26:16 +0000 (16:26 +0800)]
fm10k: add VF support

fm10k pmd driver will support both PF and VF device with single
copy of code. The reason is NIC maps registers with same
function in PF and VF to same PCI I/O address. Then, PF/VF drivers
use same address to access registers belonging to it, HW will
translate the request to correct units.

For some functionalities that are unique to PF, driver will check
current driver type and behave correctly.

Signed-off-by: Jeff Shaw <jeffrey.b.shaw@intel.com>
Signed-off-by: Chen Jing D(Mark) <jing.d.chen@intel.com>
9 years agofm10k: add vlan filter
Jeff Shaw [Wed, 4 Feb 2015 08:23:31 +0000 (16:23 +0800)]
fm10k: add vlan filter

Add fm10k_vlan_filter_set to set vlan.

Signed-off-by: Jeff Shaw <jeffrey.b.shaw@intel.com>
Signed-off-by: Chen Jing D(Mark) <jing.d.chen@intel.com>
9 years agofm10k: add scatter receive
Jeff Shaw [Wed, 4 Feb 2015 08:20:06 +0000 (16:20 +0800)]
fm10k: add scatter receive

1. Add fm10k_recv_scattered_pkts function to receive jumbo frame
   and multi-segment packets.
2. Configure correct receive function in rx_init and dev_init.

Signed-off-by: Jeff Shaw <jeffrey.b.shaw@intel.com>
Signed-off-by: Chen Jing D(Mark) <jing.d.chen@intel.com>
9 years agofm10k: add PF RSS
Jeff Shaw [Wed, 4 Feb 2015 08:12:28 +0000 (16:12 +0800)]
fm10k: add PF RSS

1. Configure RSS in fm10k_dev_rx_init function.
2. Add fm10k_rss_hash_update and fm10k_rss_hash_conf_get to get
   and inquery RSS configuration.

Signed-off-by: Jeff Shaw <jeffrey.b.shaw@intel.com>
Signed-off-by: Chen Jing D(Mark) <jing.d.chen@intel.com>
9 years agofm10k: add receive and tranmit
Jeff Shaw [Wed, 4 Feb 2015 08:04:02 +0000 (16:04 +0800)]
fm10k: add receive and tranmit

1. Add fm10k_recv_pkts and fm10k_xmit_pkts functions.
2. Link app function pointer to actual fm10k recv/xmit
   functions.
3. Change Makefile to compile new file fm10k_rxtx.c

Signed-off-by: Jeff Shaw <jeffrey.b.shaw@intel.com>
Signed-off-by: Chen Jing D(Mark) <jing.d.chen@intel.com>
9 years agofm10k: add dev start/stop
Jeff Shaw [Wed, 4 Feb 2015 07:47:01 +0000 (15:47 +0800)]
fm10k: add dev start/stop

1. Add function to initialize RX queues.
2. Add function to initialize TX queues.
3. Add fm10k_dev_start, fm10k_dev_stop and fm10k_dev_close
   functions.
4. Add function to close mailbox service.

Signed-off-by: Jeff Shaw <jeffrey.b.shaw@intel.com>
Signed-off-by: Chen Jing D(Mark) <jing.d.chen@intel.com>
9 years agofm10k: add Rx/Tx single queue start/stop
Jeff Shaw [Tue, 3 Feb 2015 11:07:01 +0000 (19:07 +0800)]
fm10k: add Rx/Tx single queue start/stop

1. Add 4 functions fm10k_dev_rx_queue_start,
   fm10k_dev_rx_queue_stop, fm10k_dev_tx_queue_start,
   and fm10k_dev_tx_queue_stop.
2. verify Rx packet buffer alignment is valid.
   Hardware requires specific alignment for Rx packet buffers. At
   least one of the following two conditions must be satisfied.
       1) Address is 512B aligned
       2) Address is 8B aligned and buffer does not cross 4K boundary.

   Alignment is checked by the driver when the Rx queue is reset. It
   is assumed that if an entire descriptor ring can be filled with
   buffers containing valid alignment, then all buffers in that mempool
   have valid address alignment. It is the responsibility of the user
   to ensure all buffers have valid alignment, as it is the user who
   creates the mempool.

   It is assumed the buffer needs only to store a maximum size Ethernet
   frame.

Signed-off-by: Jeff Shaw <jeffrey.b.shaw@intel.com>
Signed-off-by: Chen Jing D(Mark) <jing.d.chen@intel.com>
9 years agofm10k: add Tx queue setup/release
Jeff Shaw [Tue, 3 Feb 2015 10:57:34 +0000 (18:57 +0800)]
fm10k: add Tx queue setup/release

Add fm10k_tx_queue_setup and fm10k_tx_queue_release functions.

Signed-off-by: Jeff Shaw <jeffrey.b.shaw@intel.com>
Signed-off-by: Chen Jing D(Mark) <jing.d.chen@intel.com>
9 years agofm10k: add Rx queue setup/release
Jeff Shaw [Tue, 3 Feb 2015 10:48:40 +0000 (18:48 +0800)]
fm10k: add Rx queue setup/release

Add fm10k_rx_queue_setup and fm10k_rx_queue_release functions.

Signed-off-by: Jeff Shaw <jeffrey.b.shaw@intel.com>
Signed-off-by: Chen Jing D(Mark) <jing.d.chen@intel.com>
9 years agofm10k: add reta query/update
Jeff Shaw [Tue, 3 Feb 2015 09:41:25 +0000 (17:41 +0800)]
fm10k: add reta query/update

1. Add fm10k_reta_update and fm10k_reta_query functions.
2. Add fm10k_link_update and fm10k_dev_infos_get functions.

Signed-off-by: Jeff Shaw <jeffrey.b.shaw@intel.com>
Signed-off-by: Chen Jing D(Mark) <jing.d.chen@intel.com>
9 years agofm10k: register PF driver
Jeff Shaw [Wed, 4 Feb 2015 10:48:49 +0000 (18:48 +0800)]
fm10k: register PF driver

1. Add init function to scan and initialize fm10k PF device.
2. Add implementation to register fm10k pmd PF driver.
3. Add 3 functions fm10k_dev_configure, fm10k_stats_get and
   fm10k_stats_get.
4. Add fm10k.h to define macros and basic data structure.
5. Add fm10k_logs.h to control log message output.
6. Change config/common_bsdapp and config/common_linuxapp, add
   macros to control fm10k pmd driver compile for linux and bsd.
7. Add Makefile.
8. Change lib/Makefile to add fm10k driver into compile list.
9. Change mk/rte.app.mk to add fm10k lib into link.
10. Add ABI version of librte_pmd_fm10k

Signed-off-by: Jeff Shaw <jeffrey.b.shaw@intel.com>
Signed-off-by: Chen Jing D(Mark) <jing.d.chen@intel.com>
Signed-off-by: Michael Qiu <michael.qiu@intel.com>
9 years agoeal: add fm10k device id
Jeff Shaw [Tue, 3 Feb 2015 08:05:07 +0000 (16:05 +0800)]
eal: add fm10k device id

Add fm10k device ID list into rte_pci_dev_ids.h.

Signed-off-by: Jeff Shaw <jeffrey.b.shaw@intel.com>
Signed-off-by: Chen Jing D(Mark) <jing.d.chen@intel.com>
9 years agofm10k: add base driver
Jeff Shaw [Tue, 3 Feb 2015 07:57:59 +0000 (15:57 +0800)]
fm10k: add base driver

Base driver is developed and maintained by Intel ND team, includes
basic functional service to Intel Ethernet Switch FM10000 Series
of silicons.
Any suggestion on bug fix and improvement within this directory is
welcome, but need this team to change and update.

Signed-off-by: Chen Jing D(Mark) <jing.d.chen@intel.com>
9 years agoi40e: add debug logs for Tx context descriptors
Olivier Matz [Fri, 13 Feb 2015 09:22:51 +0000 (10:22 +0100)]
i40e: add debug logs for Tx context descriptors

This could be useful to have this values for debug purposes.

Suggested-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
Acked-by: Jijiang Liu <jijiang.liu@intel.com>
9 years agoi40e: fix offloading of outer checksum for IPIP tunnel
Olivier Matz [Fri, 13 Feb 2015 09:22:50 +0000 (10:22 +0100)]
i40e: fix offloading of outer checksum for IPIP tunnel

When offloading the checksums of ipip tunnels, m->l2_len is set to 0
as there is no tunnel or inner l2 header. Since this is a valid value
remove the test.

By the way, also remove the same test with l3_len because at this
point, it is expected that the software provides proper values in the
mbuf. It should avoid a test in dataplane processing and therefore
slightly increase performance.

Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
Acked-by: Jijiang Liu <jijiang.liu@intel.com>
9 years agoapp/testpmd: fix TSO when using outer checksum offloads
Olivier Matz [Fri, 13 Feb 2015 09:22:49 +0000 (10:22 +0100)]
app/testpmd: fix TSO when using outer checksum offloads

The l4_len has also to be copied in mbuf in case we are offloading outer
IP checksum. Currently, TSO + outer checksum is not supported by any
driver but it will soon be supported by i40e.

Reported-by: Jijiang Liu <jijiang.liu@intel.com>
Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
9 years agoapp/testpmd: warn if outer ip cksum is requested but not supported
Olivier Matz [Fri, 13 Feb 2015 09:22:48 +0000 (10:22 +0100)]
app/testpmd: warn if outer ip cksum is requested but not supported

Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
Acked-by: Jijiang Liu <jijiang.liu@intel.com>
9 years agoi40e: advertise outer IPv4 checksum capability
Jijiang Liu [Fri, 13 Feb 2015 09:22:47 +0000 (10:22 +0100)]
i40e: advertise outer IPv4 checksum capability

Advertise the DEV_TX_OFFLOAD_OUTER_IPV4_CKSUM flag in the PMD
features. It means that the i40e PMD supports the offload of outer IP
checksum when transmitting tunneling packet.

Signed-off-by: Jijiang Liu <jijiang.liu@intel.com>
Acked-by: Olivier Matz <olivier.matz@6wind.com>
9 years agoethdev: add outer IP checksum capability flag
Jijiang Liu [Fri, 13 Feb 2015 09:22:46 +0000 (10:22 +0100)]
ethdev: add outer IP checksum capability flag

If the flag is advertised by a PMD, the NIC supports the outer IP
checksum TX offload of tunneling packets, therefore an application can
set the PKT_TX_OUTER_IP_CKSUM flag in mbufs when transmitting on this
port.

Signed-off-by: Jijiang Liu <jijiang.liu@intel.com>
Acked-by: Olivier Matz <olivier.matz@6wind.com>
9 years agoapp/testpmd: support IPIP tunnel in csum forward engine
Olivier Matz [Fri, 13 Feb 2015 09:22:45 +0000 (10:22 +0100)]
app/testpmd: support IPIP tunnel in csum forward engine

Add support for IP over IP tunnels.

Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
Acked-by: Jijiang Liu <jijiang.liu@intel.com>
9 years agoapp/testpmd: support GRE tunnels in csum fwd engine
Olivier Matz [Fri, 13 Feb 2015 09:22:44 +0000 (10:22 +0100)]
app/testpmd: support GRE tunnels in csum fwd engine

Add support for Ethernet over GRE and IP over GRE tunnels.

Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
Acked-by: Jijiang Liu <jijiang.liu@intel.com>
9 years agoapp/testpmd: introduce vxlan parsing function in csum fwd engine
Olivier Matz [Fri, 13 Feb 2015 09:22:43 +0000 (10:22 +0100)]
app/testpmd: introduce vxlan parsing function in csum fwd engine

Move code parsing vxlan into a function. It will ease the support
of GRE tunnels and IPIP tunnels in next commits.

Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
Acked-by: Jijiang Liu <jijiang.liu@intel.com>
9 years agoapp/testpmd: use a structure to store offload info in csum fwd engine
Olivier Matz [Fri, 13 Feb 2015 09:22:42 +0000 (10:22 +0100)]
app/testpmd: use a structure to store offload info in csum fwd engine

To simplify the API of parse_* functions, store all the offload
information for the current packet in a structure.

No functional change.

Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
Acked-by: Jijiang Liu <jijiang.liu@intel.com>
9 years agoapp/testpmd: introduce IP parsing functions in csum fwd engine
Olivier Matz [Fri, 13 Feb 2015 09:22:41 +0000 (10:22 +0100)]
app/testpmd: introduce IP parsing functions in csum fwd engine

These functions may be used to parse encapsulated layers
when we will support IP over GRE tunnels.

No functional change.

Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
Acked-by: Jijiang Liu <jijiang.liu@intel.com>
9 years agoapp/testpmd: rename vxlan in outer-ip in csum commands
Olivier Matz [Fri, 13 Feb 2015 09:22:40 +0000 (10:22 +0100)]
app/testpmd: rename vxlan in outer-ip in csum commands

The tx_checksum command concerns outer IP checksum, not VxLAN checksum.
Actually there is no checkum in VxLAN header, there is one checksum in
outer IP header, and one checksum in outer UDP header. This option only
controls the outer IP checksum.

Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
Acked-by: Jijiang Liu <jijiang.liu@intel.com>
9 years agoapp/testpmd: add csum parse-tunnel command
Olivier Matz [Fri, 13 Feb 2015 09:22:39 +0000 (10:22 +0100)]
app/testpmd: add csum parse-tunnel command

Add a new command related to csum forward engine:

  csum parse-tunnel (on|off) (tx_port_id)

If enabled, the tunnel packets received by the csum forward engine are
parsed and seen as "outer-headers/inner-headers/data".

If disabled, the parsing of the csum forward engine stops at the first
l4 layer. A tunnel packet is seens as "headers/data" (inner headers are
included in payload).

Note: the port argument is the tx_port. It's more coherent compared
to all other testpmd csum flags.

Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
Acked-by: Jijiang Liu <jijiang.liu@intel.com>
9 years agoapp/testpmd: move checksum config display in a function
Olivier Matz [Fri, 13 Feb 2015 09:22:38 +0000 (10:22 +0100)]
app/testpmd: move checksum config display in a function

No functional changes in this commit, we just move the code
that displays the csum forward engine configuration in a
function.

This makes the next commit easier to read as it will also
use this function.

Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
Acked-by: Jijiang Liu <jijiang.liu@intel.com>
9 years agoapp/testpmd: rename Tx checksum command
Olivier Matz [Fri, 13 Feb 2015 09:22:37 +0000 (10:22 +0100)]
app/testpmd: rename Tx checksum command

Replace the "tx_checksum" command by "csum". It has several
advantages:

- it's more coherent with the forward engine name
- it's shorter
- the next commit will introduce a command that is related to
  the csum forward engine, but about rx side.

Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
9 years agombuf: remove UDP tunnel flag
Olivier Matz [Fri, 13 Feb 2015 09:22:36 +0000 (10:22 +0100)]
mbuf: remove UDP tunnel flag

Since previous commit, the flag PKT_TX_UDP_TUNNEL_PKT is not used by any PMD,
remove it from mbuf API and from csumonly (testpmd). In csumonly, the
PKT_TX_OUTER_IP_CKSUM flag is already set for vxlan checksum, providing
enough information to the underlying driver.

Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
Acked-by: Jijiang Liu <jijiang.liu@intel.com>
9 years agoi40e: remove the use of UDP tunnel flag
Olivier Matz [Fri, 13 Feb 2015 09:22:35 +0000 (10:22 +0100)]
i40e: remove the use of UDP tunnel flag

The definition of the flag PKT_TX_UDP_TUNNEL_PKT in rte_mbuf.h was:
  TX packet is an UDP tunneled packet. It must be specified when using
  outer checksum offload (PKT_TX_OUTER_IP_CKSUM)

This flag was used to tell the NIC that the offload type is UDP
(I40E_TXD_CTX_UDP_TUNNELING flag). In the datasheet, it says it's
required to specify the tunnel type in the register. However, some tests
(see [1]) showed that it also works without this flag.

Moreover, it is not explained how the hardware use this
information. From a network perspective, this information is useless for
calculating the outer IP checksum as it does not depend on the payload.

Having this flag in the API would force the application to specify the
tunnel type for something that looks only useful for this PMD. It will
limit the number of possible tunnel types (we would need a flag for each
tunnel type) and therefore prevent to support outer IP checksum for
proprietary tunnels.

Finally, if a hardware advertises "I support outer IP checksum", it must
be supported for any payload types.

This has been validated by [2], knowing that the ipip test case was fixed
after this test report [3].

[1] http://dpdk.org/ml/archives/dev/2015-January/011380.html
[2] http://dpdk.org/ml/archives/dev/2015-January/011475.html
[3] http://dpdk.org/ml/archives/dev/2015-January/011610.html

Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
Acked-by: Jijiang Liu <jijiang.liu@intel.com>
9 years agoi40e: enable Tx checksum only for offloaded packets
Olivier Matz [Fri, 13 Feb 2015 09:22:34 +0000 (10:22 +0100)]
i40e: enable Tx checksum only for offloaded packets

From i40e datasheet:

  The IP header type and its offload. In case of tunneling, the IIPT
  relates to the inner IP header. See also EIPT field for the outer
  (External) IP header offload.

  00 - non IP packet or packet type is not defined by software
  01 - IPv6 packet
  10 - IPv4 packet with no IP checksum offload
  11 - IPv4 packet with IP checksum offload

Therefore it is not needed to fill the IIPT field if no offload is
requested (we can keep the value to 00). For instance, the linux driver
code does not set it when (skb->ip_summed != CHECKSUM_PARTIAL). We can
do the same in the dpdk driver.

The function i40e_txd_enable_checksum() that fills the offload registers
can only be called for packets requiring an offload.

Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
Acked-by: Jijiang Liu <jijiang.liu@intel.com>
9 years agombuf: enhance the API documentation of offload flags
Olivier Matz [Fri, 13 Feb 2015 09:22:33 +0000 (10:22 +0100)]
mbuf: enhance the API documentation of offload flags

Based on http://dpdk.org/ml/archives/dev/2015-January/011127.html

Also adapt the csum forward engine code to the API.

Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
Acked-by: Jijiang Liu <jijiang.liu@intel.com>
9 years agombuf: remove flag alias for IP checksum
Olivier Matz [Fri, 13 Feb 2015 09:22:32 +0000 (10:22 +0100)]
mbuf: remove flag alias for IP checksum

The alias PKT_TX_IPV4_CSUM is only used in one place of i40e driver.
Remove it and only keep the legacy flag PKT_TX_IP_CSUM.

Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
Acked-by: Jijiang Liu <jijiang.liu@intel.com>
9 years agoixgbe: fix link issue in loopback mode
Cunming Liang [Thu, 5 Feb 2015 08:45:18 +0000 (16:45 +0800)]
ixgbe: fix link issue in loopback mode

In loopback mode, it's expected force link up even when there's no cable connect.
But in codes, setup_sfp() rewrites the related register.
It causes in the case 'multispeed_fiber', it can't link up without cable connect.

Signed-off-by: Cunming Liang <cunming.liang@intel.com>
Acked-by: Patrick Lu <patrick.lu@intel.com>
9 years agoapp/testpmd: use default Rx/Tx port configuration
Pablo de Lara [Thu, 12 Feb 2015 14:56:38 +0000 (14:56 +0000)]
app/testpmd: use default Rx/Tx port configuration

Function to get rx/tx port configuration from the PMDs
was added in previous release to simplify the port configuration
in all sample apps, but testpmd was not modified.

This patch makes testpmd get the default rx/tx port configuration,
but still uses the parameters passed by the command line.

Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Acked-by: John McNamara <john.mcnamara@intel.com>
9 years agoapp/testpmd: force user to stop forwarding when changing port/core list
Pablo de Lara [Tue, 10 Feb 2015 14:53:17 +0000 (14:53 +0000)]
app/testpmd: force user to stop forwarding when changing port/core list

Testpmd has the capability of changing the forwarding cores and ports in runtime.
If these are changed when forwarding, two issues may be encountered:

- If "show config fwd" is used, changes made in the core list are applied.
  Therefore, trying to stop forwarding may hang testpmd,
  since it could be waiting for cores to stop that are not actually running anything

- If the port list is changed, when stopping forwarding,
  it may miss the stats of some of the ports that were actually being used.

Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Acked-by: Helin Zhang <helin.zhang@intel.com>
9 years agoapp/testpmd: remove incorrect parameter limits in help command line
Pablo de Lara [Fri, 6 Feb 2015 14:22:52 +0000 (14:22 +0000)]
app/testpmd: remove incorrect parameter limits in help command line

Ring threshold parameters an RX/TX queue (pthresh, wthresh and hthresh)
had an incorrect range of values shown in help command line.

Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Acked-by: Sergio Gonzalez Monroy <sergio.gonzalez.monroy@intel.com>
9 years agoapp/testpmd: remove duplicated parameter parsing
Pablo de Lara [Fri, 6 Feb 2015 14:15:21 +0000 (14:15 +0000)]
app/testpmd: remove duplicated parameter parsing

Several parameters were being parsed twice in testpmd,
so this patch gets rid of the second parsing.

Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Acked-by: Sergio Gonzalez Monroy <sergio.gonzalez.monroy@intel.com>
9 years agoapp/testpmd: fix port parsing in show port info command
Xuelin Shi [Fri, 6 Feb 2015 01:29:20 +0000 (09:29 +0800)]
app/testpmd: fix port parsing in show port info command

The port number type should be consistent with librte_cmdline,
else there is potential endian issue.

Signed-off-by: Xuelin Shi <xuelin.shi@freescale.com>
Acked-by: Olivier Matz <olivier.matz@6wind.com>
9 years agopci: fix max VFs for non igb_uio drivers
Michael Qiu [Wed, 11 Feb 2015 13:25:55 +0000 (21:25 +0800)]
pci: fix max VFs for non igb_uio drivers

max_vfs will only be created by igb_uio driver, for other
drivers like vfio or pci_uio_generic, max_vfs will miss.

But sriov_numvfs is not driver related, just get the vf numbers
from that field.

Signed-off-by: Michael Qiu <michael.qiu@intel.com>
Acked-by: David Marchand <david.marchand@6wind.com>
9 years agomk: fix vhost linking
Panu Matilainen [Wed, 11 Feb 2015 13:43:10 +0000 (15:43 +0200)]
mk: fix vhost linking

librte_vhost is not a plugin but a library, move it to proper section
to fix sample app build in shared, non-combined library setup.

Signed-off-by: Panu Matilainen <pmatilai@redhat.com>
Acked-by: Sergio Gonzalez Monroy <sergio.gonzalez.monroy@intel.com>
9 years agomaintainers: claim review for virtio and vhost
Ouyang Changchun [Thu, 5 Feb 2015 01:57:28 +0000 (09:57 +0800)]
maintainers: claim review for virtio and vhost

I will be a volunteer of reviewing the following files:
   lib/librte_pmd_virtio/
   doc/guides/prog_guide/poll_mode_drv_emulated_virtio_nic.rst
   lib/librte_vhost/
   doc/guides/prog_guide/vhost_lib.rst
   examples/vhost/
   doc/guides/sample_app_ug/vhost.rst

Signed-off-by: Changchun Ouyang <changchun.ouyang@intel.com>
Acked-by: Sergio Gonzalez Monroy <sergio.gonzalez.monroy@intel.com>
Acked-by: Thomas Monjalon <thomas.monjalon@6wind.com>
9 years agomaintainers: claim eal common and linux
David Marchand [Mon, 9 Feb 2015 13:50:43 +0000 (14:50 +0100)]
maintainers: claim eal common and linux

As discussed with Thomas, I would like to take care of the common eal and linux
implementation.

Signed-off-by: David Marchand <david.marchand@6wind.com>
Acked-by: Thomas Monjalon <thomas.monjalon@6wind.com>
9 years agomaintainers: claim i40e and KNI
Helin Zhang [Mon, 9 Feb 2015 00:37:04 +0000 (08:37 +0800)]
maintainers: claim i40e and KNI

Claim i40e and KNI modules.

Signed-off-by: Helin Zhang <helin.zhang@intel.com>
Acked-by: Thomas Monjalon <thomas.monjalon@6wind.com>
9 years agomaintainers: claim hash and lpm libraries
Bruce Richardson [Fri, 6 Feb 2015 13:57:07 +0000 (13:57 +0000)]
maintainers: claim hash and lpm libraries

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Acked-by: Helin Zhang <helin.zhang@intel.com>
Acked-by: Thomas Monjalon <thomas.monjalon@6wind.com>
9 years agomaintainers: claim FreeBSD eal and distributor
Bruce Richardson [Fri, 6 Feb 2015 13:55:35 +0000 (13:55 +0000)]
maintainers: claim FreeBSD eal and distributor

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Acked-by: Thomas Monjalon <thomas.monjalon@6wind.com>
9 years agomaintainers: claim IP fragmentation and ACL
Konstantin Ananyev [Fri, 6 Feb 2015 12:35:49 +0000 (12:35 +0000)]
maintainers: claim IP fragmentation and ACL

Signed-off-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
Acked-by: Sergio Gonzalez Monroy <sergio.gonzalez.monroy@intel.com>
Acked-by: Thomas Monjalon <thomas.monjalon@6wind.com>
9 years agomaintainers: claim metering, sched and packet framework
Cristian Dumitrescu [Wed, 4 Feb 2015 15:53:25 +0000 (15:53 +0000)]
maintainers: claim metering, sched and packet framework

As original author of these DPDK components, I am volunteering to maintain
them going forward:
- Traffic Metering
- Hierarchical Scheduler
- Packet Framework
- Configuration File

Signed-off-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
Acked-by: Sergio Gonzalez Monroy <sergio.gonzalez.monroy@intel.com>
Acked-by: Helin Zhang <helin.zhang@intel.com>
Acked-by: Thomas Monjalon <thomas.monjalon@6wind.com>
9 years agomaintainers: claim responsibility for testpmd
Pablo de Lara [Wed, 4 Feb 2015 10:17:44 +0000 (10:17 +0000)]
maintainers: claim responsibility for testpmd

Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Acked-by: Sergio Gonzalez Monroy <sergio.gonzalez.monroy@intel.com>
Acked-by: Thomas Monjalon <thomas.monjalon@6wind.com>
9 years agomaintainers: claim responsibility for vmxnet3 PMD
Yong Wang [Tue, 3 Feb 2015 21:44:32 +0000 (13:44 -0800)]
maintainers: claim responsibility for vmxnet3 PMD

Signed-off-by: Yong Wang <yongwang@vmware.com>
Acked-by: Thomas Monjalon <thomas.monjalon@6wind.com>
9 years agoscripts: find areas without maintainer
Thomas Monjalon [Fri, 6 Feb 2015 19:24:29 +0000 (20:24 +0100)]
scripts: find areas without maintainer

The section titles are filtered to print only those which
are not associated with an email address.

Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
9 years agoscripts: check wrong patterns in maintainers file
Thomas Monjalon [Wed, 4 Feb 2015 08:51:20 +0000 (09:51 +0100)]
scripts: check wrong patterns in maintainers file

Each F or X pattern is checked and printed if there is no match
with a file in the repository.

The wildcard must be temporarily replaced to prevent from shell expansion.

Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
9 years agomaintainers: dispatch more doc
Thomas Monjalon [Wed, 4 Feb 2015 08:08:45 +0000 (09:08 +0100)]
maintainers: dispatch more doc

Documentation of build system, EAL and ring lib should be covered by
the maintainers of the respective areas.

Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
Acked-by: Olivier Matz <olivier.matz@6wind.com>
9 years agomaintainers: add ABI versioning
Thomas Monjalon [Wed, 4 Feb 2015 07:46:20 +0000 (08:46 +0100)]
maintainers: add ABI versioning

Reference the new framework and policy for ABI versioning,
in the MAINTAINERS file.

Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
Acked-by: Neil Horman <nhorman@tuxdriver.com>
9 years agomk: add DT_SONAME to shared libraries
Panu Matilainen [Wed, 4 Feb 2015 08:22:50 +0000 (10:22 +0200)]
mk: add DT_SONAME to shared libraries

This is all-important now that the libraries are versioned: DT_SONAME
presence instructs the runtime dynamic linker to load the shared object
by the versioned name in DT_SONAME instead of the the unversioned symlink
name used during build.

Signed-off-by: Panu Matilainen <pmatilai@redhat.com>
Acked-by: Neil Horman <nhorman@tuxdriver.com>
9 years agocmdline: fix link due to missing symbol in version map
Panu Matilainen [Wed, 4 Feb 2015 07:07:14 +0000 (09:07 +0200)]
cmdline: fix link due to missing symbol in version map

cmdline_token_portlist_ops fell through cracks in the initial symbol
versioning patch, breaking pktgen build.

Signed-off-by: Panu Matilainen <pmatilai@redhat.com>
Acked-by: Olivier Matz <olivier.matz@6wind.com>
Acked-by: Neil Horman <nhorman@tuxdriver.com>
9 years agodoc: add ABI documentation
Neil Horman [Mon, 2 Feb 2015 17:40:22 +0000 (12:40 -0500)]
doc: add ABI documentation

Adding a document describing rudimentary ABI policy and adding notice space for
any deprecation announcements

Signed-off-by: Neil Horman <nhorman@tuxdriver.com>
Acked-by: Sergio Gonzalez Monroy <sergio.gonzalez.monroy@intel.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Siobhan Butler <siobhan.a.butler@intel.com>
Acked-by: Thomas Monjalon <thomas.monjalon@6wind.com>
9 years agomk: add library version extension
Neil Horman [Mon, 2 Feb 2015 17:40:21 +0000 (12:40 -0500)]
mk: add library version extension

To differentiate libraries that break ABI, we add a library version number
suffix to the library, which must be incremented when a given libraries ABI is
broken.  This patch enforces that addition, sets the initial abi soname
extension to 1 for each library and creates a symlink to the base SONAME so that
the test applications will link properly.

Signed-off-by: Neil Horman <nhorman@tuxdriver.com>
Acked-by: Sergio Gonzalez Monroy <sergio.gonzalez.monroy@intel.com>
9 years agolib: provide initial versioning
Neil Horman [Mon, 2 Feb 2015 17:40:20 +0000 (12:40 -0500)]
lib: provide initial versioning

Add linker version script files to each DPDK library to put a stake in the
ground from which we can start cleaning up API's

Signed-off-by: Neil Horman <nhorman@tuxdriver.com>
Acked-by: Sergio Gonzalez Monroy <sergio.gonzalez.monroy@intel.com>
9 years agocompat: add infrastructure to support symbol versioning
Neil Horman [Mon, 2 Feb 2015 17:40:19 +0000 (12:40 -0500)]
compat: add infrastructure to support symbol versioning

Add initial pass header files to support symbol versioning.

Signed-off-by: Neil Horman <nhorman@tuxdriver.com>
Acked-by: Sergio Gonzalez Monroy <sergio.gonzalez.monroy@intel.com>
9 years agoapp/testpmd: add hash configuration
Helin Zhang [Thu, 22 Jan 2015 07:36:59 +0000 (15:36 +0800)]
app/testpmd: add hash configuration

To demonstrate the hash filter control, commands are added.
They are,
- get_sym_hash_ena_per_port
- set_sym_hash_ena_per_port
- get_hash_global_config
- set_hash_global_config

Signed-off-by: Helin Zhang <helin.zhang@intel.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
9 years agoi40e: add hash configuration
Helin Zhang [Thu, 22 Jan 2015 07:36:58 +0000 (15:36 +0800)]
i40e: add hash configuration

Hash filter control has been implemented for i40e. It includes
getting/setting,
- global hash configurations (hash function type, and symmetric
  hash enable per flow type)
- symmetric hash enable per port

Signed-off-by: Helin Zhang <helin.zhang@intel.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
9 years agoethdev: add hash configuration
Helin Zhang [Thu, 22 Jan 2015 07:36:57 +0000 (15:36 +0800)]
ethdev: add hash configuration

In order to support hash filter configuration, filter type of hash
is added, also the corresponding structures, macros and definitions
are added.

Signed-off-by: Helin Zhang <helin.zhang@intel.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
9 years agoethdev: move some comments
Helin Zhang [Thu, 22 Jan 2015 07:36:56 +0000 (15:36 +0800)]
ethdev: move some comments

Added code style fixes.

Signed-off-by: Helin Zhang <helin.zhang@intel.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
9 years agoi40e: use constant as default hash keys
Helin Zhang [Thu, 22 Jan 2015 07:36:55 +0000 (15:36 +0800)]
i40e: use constant as default hash keys

Calculating the default RSS hash keys at run time is not needed
at all, and may have race conditions. The alternative is to use
array of random values which were generated manually as the
default hash keys.

Signed-off-by: Helin Zhang <helin.zhang@intel.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
9 years agomaintainers: claim mbuf, mempool, ring, mk, kvargs, cmdline
Olivier Matz [Fri, 30 Jan 2015 15:52:22 +0000 (16:52 +0100)]
maintainers: claim mbuf, mempool, ring, mk, kvargs, cmdline

I'm volunteer to maintain the following components of dpdk:

- mbuf packet api
- mempool library
- ring library
- build system
- kvargs
- command line library

Note: I've split rte_mempool and rte_malloc as these two libraries
are different enough.

Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
Acked-by: Thomas Monjalon <thomas.monjalon@6wind.com>
9 years agomaintainers: claim responsibility for link bonding PMD
Declan Doherty [Fri, 30 Jan 2015 10:05:56 +0000 (10:05 +0000)]
maintainers: claim responsibility for link bonding PMD

Signed-off-by: Declan Doherty <declan.doherty@intel.com>
Acked-by: Thomas Monjalon <thomas.monjalon@6wind.com>
9 years agobond: remove offload flags from transmit policy checks
Declan Doherty [Fri, 30 Jan 2015 17:02:17 +0000 (17:02 +0000)]
bond: remove offload flags from transmit policy checks

The Link bonding library is incorrectly using receive packet type flags
in the transmit policy hashing functions, which would cause packets
generated locally to be incorrectly distributed across the slave
devices. This patch completely removes the dependency on the packet
type flags and uses the ether_type from either the Ethernet header or
the VLAN headers for branching.

This patch also includes the associate changes in the test suite and in
the packet_burst_generator code to remove the dependences on the packet
type flags.

Signed-off-by: Declan Doherty <declan.doherty@intel.com>
Reviewed-by: Pawel Wodkowski <pawelx.wodkowski@intel.com>
9 years agobond: fix headers for C++
Pawel Wodkowski [Fri, 30 Jan 2015 13:21:11 +0000 (14:21 +0100)]
bond: fix headers for C++

Add missing declarations to rte_bond_8023ad.h.
Remove 'extern "C"' declarations from bond private header file.

Signed-off-by: Pawel Wodkowski <pawelx.wodkowski@intel.com>
Acked-by: Declan Doherty <declan.doherty@intel.com>
9 years agoacl: remove standalone header
Thomas Monjalon [Thu, 29 Jan 2015 22:27:20 +0000 (23:27 +0100)]
acl: remove standalone header

This is a duplication of some EAL parts for a standalone packaging
which is not documented.
Packaging should be done outside of DPDK.

Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
9 years agomk: revert "allow application to override clean"
Thomas Monjalon [Fri, 30 Jan 2015 10:35:14 +0000 (11:35 +0100)]
mk: revert "allow application to override clean"

This reverts commit ca0038c0094dd8a63fc7595e26d0071a3e3bd72e.

It forces clean target of application to have double-colon.
As stated in make doc:
"Double-colon rules are somewhat obscure and not often very useful"
And it's not needed since POSTCLEAN allow to add some clean targets.

Reported-by: Olivier Matz <olivier.matz@6wind.com>
Reported-by: John Mcnamara <john.mcnamara@intel.com>
Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
9 years agoexamples/vhost: fix crash when linking device to VMDQ fails
Huawei Xie [Fri, 30 Jan 2015 07:13:36 +0000 (15:13 +0800)]
examples/vhost: fix crash when linking device to VMDQ fails

Signed-off-by: Huawei Xie <huawei.xie@intel.com>
Acked-by: Changchun Ouyang <changchun.ouyang@intel.com>
9 years agomaintainers: claim responsibility for Linux AF_PACKET PMD
John W. Linville [Fri, 23 Jan 2015 18:12:25 +0000 (13:12 -0500)]
maintainers: claim responsibility for Linux AF_PACKET PMD

Signed-off-by: John W. Linville <linville@tuxdriver.com>
Acked-by: Neil Horman <nhorman@tuxdriver.com>
Acked-by: Thomas Monjalon <thomas.monjalon@6wind.com>
9 years agomaintainers: start a Linux-style file
Thomas Monjalon [Fri, 23 Jan 2015 12:31:59 +0000 (13:31 +0100)]
maintainers: start a Linux-style file

This MAINTAINERS file is inspired from the Linux one.

Almost all files are split into areas in order to identify maintainers of
each DPDK area. Note that a maintainer is not a git tree manager.
Candidates are welcome to send a patch to sign up for one or several areas.

There is a script to check coverage, especially when adding or moving files.

Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
Acked-by: Neil Horman <nhorman@tuxdriver.com>
9 years agoacl: add comments about internal layout
Konstantin Ananyev [Tue, 20 Jan 2015 18:41:07 +0000 (18:41 +0000)]
acl: add comments about internal layout

Signed-off-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
Acked-by: Neil Horman <nhorman@tuxdriver.com>
9 years agoacl: remove unused constant
Konstantin Ananyev [Tue, 20 Jan 2015 18:41:06 +0000 (18:41 +0000)]
acl: remove unused constant

Signed-off-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
Acked-by: Neil Horman <nhorman@tuxdriver.com>
9 years agoacl: introduce config parameter for performance/space trade-off
Konstantin Ananyev [Tue, 20 Jan 2015 18:41:05 +0000 (18:41 +0000)]
acl: introduce config parameter for performance/space trade-off

If at build phase we don't make any trie splitting,
then temporary build structures and resulting RT structure might be
much bigger than current.
>From other side - having just one trie instead of multiple can speedup
search quite significantly.
>From my measurements on rule-sets with ~10K rules:
RT table up to 8 times bigger, classify() up to 80% faster
than current implementation.
To make it possible for the user to decide about performance/space trade-off -
new parameter for build config structure (max_size) is introduced.
Setting it to the value greater than zero, instructs  rte_acl_build() to:
- make sure that size of RT table wouldn't exceed given value.
- attempt to minimise number of tries in the table.
Setting it to zero maintains current behaviour.
That introduces a minor change in the public API, but I think the possible
performance gain is too big to ignore it.

Signed-off-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
Acked-by: Neil Horman <nhorman@tuxdriver.com>
9 years agoacl: deduplicate some SSE and AVX2 code
Konstantin Ananyev [Tue, 20 Jan 2015 18:41:04 +0000 (18:41 +0000)]
acl: deduplicate some SSE and AVX2 code

Vector code reorganisation/deduplication:
To avoid maintaining two nearly identical implementations of calc_addr()
(one for SSE, another for AVX2), replace it with a new macro that suits
both SSE and AVX2 code-paths.
Also remove no needed any more MM_* macros.

Signed-off-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
Acked-by: Neil Horman <nhorman@tuxdriver.com>
9 years agoacl: move SSE dwords shuffle
Konstantin Ananyev [Tue, 20 Jan 2015 18:41:03 +0000 (18:41 +0000)]
acl: move SSE dwords shuffle

Reorganise SSE code-path a bit by moving lo/hi dwords shuffle
out from calc_addr().
That allows to make calc_addr() for SSE and AVX2 practically identical
and opens opportunity for further code deduplication.

Signed-off-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
Acked-by: Neil Horman <nhorman@tuxdriver.com>
9 years agoacl: use scalar method fastest for some cases
Konstantin Ananyev [Tue, 20 Jan 2015 18:41:02 +0000 (18:41 +0000)]
acl: use scalar method fastest for some cases

Previous improvements made scalar method the fastest one
for tiny bunch of packets (< 4).
That allows us to remove specific vector code-path for small number of packets
(search_sse_2) and always use scalar method for such cases.

Signed-off-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
Acked-by: Neil Horman <nhorman@tuxdriver.com>
9 years agoapp/test-acl: add ability to manually select RT method
Konstantin Ananyev [Tue, 20 Jan 2015 18:41:01 +0000 (18:41 +0000)]
app/test-acl: add ability to manually select RT method

In test-acl replace command-line option "--scalar" with new one:
"--alg=scalar|sse|avx2".
Allows user manually select preferred classify() method.

Signed-off-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
Acked-by: Neil Horman <nhorman@tuxdriver.com>
9 years agoacl: add AVX2 classify method
Konstantin Ananyev [Tue, 20 Jan 2015 18:41:00 +0000 (18:41 +0000)]
acl: add AVX2 classify method

Introduce new classify() method that uses AVX2 instructions.

>From my measurements:
On HSW boards when processing >= 16 packets per call,
AVX2 method outperforms it's SSE counterpart by 10-25%,
(depending on the ruleset).

When build with the compilers that don't support AVX2 instructions,
make rte_acl_classify_avx2() do nothing and return an error.
At runtime, if librte_acl was build with the compiler that supports AVX2,
this method is selected as default one on HW that supports AVX2.

Signed-off-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
Acked-by: Neil Horman <nhorman@tuxdriver.com>
9 years agoeal: introduce ymm type for AVX 256-bit
Konstantin Ananyev [Tue, 20 Jan 2015 18:40:59 +0000 (18:40 +0000)]
eal: introduce ymm type for AVX 256-bit

New data type to manipulate 256 bit AVX values.
Rename field in the rte_xmm to keep common naming across SSE/AVX fields.

Signed-off-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
Acked-by: Neil Horman <nhorman@tuxdriver.com>
9 years agoacl: deduplicate a bit of RT code
Konstantin Ananyev [Tue, 20 Jan 2015 18:40:58 +0000 (18:40 +0000)]
acl: deduplicate a bit of RT code

Move common check for input parameters up into rte_acl_classify_alg().

Signed-off-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
Acked-by: Neil Horman <nhorman@tuxdriver.com>
9 years agoacl: make scalar RT code more similar to vector one
Konstantin Ananyev [Tue, 20 Jan 2015 18:40:57 +0000 (18:40 +0000)]
acl: make scalar RT code more similar to vector one

Make classify_scalar to behave in the same way as it's vector counterpart:
move match check out of the inner loop, etc.
That makes scalar and vector code look more identical.
Plus it improves scalar code performance.

Signed-off-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
Acked-by: Neil Horman <nhorman@tuxdriver.com>
9 years agoacl: simplify match nodes allocation
Konstantin Ananyev [Tue, 20 Jan 2015 18:40:56 +0000 (18:40 +0000)]
acl: simplify match nodes allocation

Right now we allocate indexes for all types of nodes, except MATCH,
at 'gen final RT table' stage.
For MATCH type nodes we are doing it at building temporary tree stage.
This is totally unnecessary and makes code more complex and error prone.
Rework the code and make MATCH indexes being allocated at the same stage
as all others.

Signed-off-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
Acked-by: Neil Horman <nhorman@tuxdriver.com>
9 years agoacl: introduce DFA nodes compression (group64) for identical entries
Konstantin Ananyev [Tue, 20 Jan 2015 18:40:55 +0000 (18:40 +0000)]
acl: introduce DFA nodes compression (group64) for identical entries

Introduced division of whole 256 child transition enties
into 4 sub-groups (64 kids per group).
So 2 groups within the same node with identical children,
can use one set of transition entries.
That allows to compact some DFA nodes and get space savings in the RT table,
without any negative performance impact.
>From what I've seen an average space savings: ~20%.

Signed-off-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
Acked-by: Neil Horman <nhorman@tuxdriver.com>
9 years agoacl: fix overwritten matches
Konstantin Ananyev [Tue, 20 Jan 2015 18:40:54 +0000 (18:40 +0000)]
acl: fix overwritten matches

There was a bug at build phase that can cause matches beeing overwritten.

Signed-off-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
Acked-by: Neil Horman <nhorman@tuxdriver.com>
9 years agoacl: remove build phase heuristic with negative performance effect
Konstantin Ananyev [Tue, 20 Jan 2015 18:40:53 +0000 (18:40 +0000)]
acl: remove build phase heuristic with negative performance effect

Current rule-wildness based heuristics can cause unnecessary splits of
the ruleset.
That might have negative performance effect:
more tries to traverse, bigger RT tables.
After removing it, on some test-cases with big rulesets (~10K)
observed ~50% speedup.
No difference for smaller rulesets.

Signed-off-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
Acked-by: Neil Horman <nhorman@tuxdriver.com>
9 years agoacl: make data indexes long enough to survive idle transitions
Konstantin Ananyev [Tue, 20 Jan 2015 18:40:52 +0000 (18:40 +0000)]
acl: make data indexes long enough to survive idle transitions

Make data_indexes long enough to survive idle transitions.
That allows to simplify match processing code.
Also fix incorrect size calculations for data indexes.

Signed-off-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
Acked-by: Neil Horman <nhorman@tuxdriver.com>
9 years agoapp/test: few small fixes for acl
Konstantin Ananyev [Tue, 20 Jan 2015 18:40:51 +0000 (18:40 +0000)]
app/test: few small fixes for acl

Make sure that test_acl would not ignore error conditions.
Run classify() with all possible values.

Signed-off-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
Acked-by: Neil Horman <nhorman@tuxdriver.com>
9 years agoacl: fix build in standalone mode
Konstantin Ananyev [Tue, 20 Jan 2015 18:40:50 +0000 (18:40 +0000)]
acl: fix build in standalone mode

Fix compilation with RTE_LIBRTE_ACL_STANDALONE=y

Signed-off-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
Acked-by: Neil Horman <nhorman@tuxdriver.com>
9 years agovhost: fix combined lib link with -lfuse
Neil Horman [Tue, 27 Jan 2015 14:39:54 +0000 (09:39 -0500)]
vhost: fix combined lib link with -lfuse

The vhost library relies on libfuse, and thats included when we do a normal
shared object build, but when we specify combined libs, its gets left out.  Add
it back in.

Reported-by: Flavio Leitner <fbl@redhat.com>
Signed-off-by: Neil Horman <nhorman@tuxdriver.com>
Acked-by: Thomas Monjalon <thomas.monjalon@6wind.com>
9 years agoixgbe: add queue start failure check
Michael Qiu [Tue, 27 Jan 2015 12:16:18 +0000 (20:16 +0800)]
ixgbe: add queue start failure check

For ixgbe, when queue start fails, for example, mbuf allocate
failure, the device will still start successfully, which could be
an issue.

Add return status check of queue start to avoid this issue.

Signed-off-by: Michael Qiu <michael.qiu@intel.com>
Acked-by: Thomas Monjalon <thomas.monjalon@6wind.com>
9 years agoixgbe: remove an useless check in VF RSS
Ouyang Changchun [Wed, 21 Jan 2015 03:38:43 +0000 (11:38 +0800)]
ixgbe: remove an useless check in VF RSS

To follow up the comments from Pawel Wodkowski, remove this unnecessary check,
as check_mq_mode has already check the queue number in device configure stage,
if the queue number of vf is not correct, it will return error code and exit,
so it doesn't need check again here in device start stage (note: pf_host_configure
is called in device start stage).

Fixes: 42d2f78abcb77 ("configure VF RSS")

Suggested-by: Pawel Wodkowski <pawelx.wodkowski@intel.com>
Signed-off-by: Changchun Ouyang <changchun.ouyang@intel.com>