Commit Graph

1611 Commits

Author SHA1 Message Date
Konstantin Ananyev
da826b7135 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>
2015-01-28 17:11:25 +01:00
Konstantin Ananyev
3858b90d82 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>
2015-01-28 17:11:25 +01:00
Konstantin Ananyev
5c0e6c3de5 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>
2015-01-28 17:11:25 +01:00
Konstantin Ananyev
a726650857 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>
2015-01-28 17:11:25 +01:00
Konstantin Ananyev
ec51901a0b 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>
2015-01-28 17:11:25 +01:00
Konstantin Ananyev
d4132664d8 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>
2015-01-28 17:11:25 +01:00
Konstantin Ananyev
c11f17d7f9 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>
2015-01-28 17:11:25 +01:00
Konstantin Ananyev
efb2529385 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>
2015-01-28 17:11:25 +01:00
Konstantin Ananyev
589758eb1c 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>
2015-01-28 17:11:25 +01:00
Konstantin Ananyev
47b1402088 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>
2015-01-28 17:11:25 +01:00
Neil Horman
88fa98a60b 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>
2015-01-27 16:58:45 +01:00
Michael Qiu
bfca21f8a0 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>
2015-01-27 15:09:29 +01:00
Ouyang Changchun
d0bd0db1ce 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: 42d2f78abc ("configure VF RSS")

Suggested-by: Pawel Wodkowski <pawelx.wodkowski@intel.com>
Signed-off-by: Changchun Ouyang <changchun.ouyang@intel.com>
2015-01-27 12:36:24 +01:00
Stephen Hemminger
359ae1cc65 ixgbe: initialize link status on initialization
The link_status variable is not set when device is initialized.
This can lead to problems with link never being reported as up
if using some SFP modules where the link is instantly on.

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Thomas Monjalon <thomas.monjalon@6wind.com>
2015-01-27 12:36:24 +01:00
Stephen Hemminger
4e4510dfff ethdev: remove useless stats zeroing in drivers
The rte_eth_stats_get is the only API that should call the device
statistics function directly, and it already does a memset of the
resulting structure since commit 02331c16ec. Therefore doing
memset() in the driver is redundant and should be removed.

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Neil Horman <nhorman@tuxdriver.com>
[David: remove also in igbvf and pcap PMDs]
Acked-By: David Marchand <david.marchand@6wind.com>
2015-01-27 12:36:23 +01:00
Stephen Hemminger
ca0038c009 mk: allow application to override clean
In some cases application may want to have additional rules
for clean. This can be handled by allowing the double colon
form of rule.

 https://www.gnu.org/software/make/manual/html_node/Double_002dColon.html

Single colon and double colon rules for same target causes
an error.

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Thomas Monjalon <thomas.monjalon@6wind.com>
2015-01-27 12:36:23 +01:00
Marc Sune
9f516206d9 ip_frag: fix header for C++
Add missing extern 'C' decls in rte_ip_frag.h.

Fixes: 601e279df0 ("move fragmentation/reassembly headers into a library")

Signed-off-by: Marc Sune <marc.sune@bisdn.de>
Acked-by: Thomas Monjalon <thomas.monjalon@6wind.com>
2015-01-27 12:32:45 +01:00
Pablo de Lara
d10096c692 power: fix link with application
rte_power_freq_min function did not include "extern" keyword,
causing linking errors.

Fixes: 445c6528b5 ("power: common interface for guest and host")

Reported-by: Ildar Mustafin <imustafin@bk.ru>
Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Acked-by: Thomas Monjalon <thomas.monjalon@6wind.com>
2015-01-27 12:30:36 +01:00
Remi Pommarel
616dc65bea pcap: fix device name
Ethernet device's data should contain the virtual device name for pcap port.
This name is correctly set by rte_eth_dev_allocate() at initialization time,
but it is directly lost.

Fixes: 83b4113693 ("ethdev: add unique name to devices")

Signed-off-by: Remi Pommarel <repk@triplefau.lt>
Acked-by: Thomas Monjalon <thomas.monjalon@6wind.com>
2015-01-27 12:25:32 +01:00
Remi Pommarel
dd9fecd0bc eal: fix enabled core number with -l option
When using core list argument to define which core to enable (ie -l) the
core_num field of the rte configuration is not updated the same way as using
coremask. This causes rte_lcore_num() to yield different value from the one
using coremask.

Fixes: d888cb8b96 ("add core list input format")

Signed-off-by: Remi Pommarel <repk@triplefau.lt>
Acked-by: Thomas Monjalon <thomas.monjalon@6wind.com>
2015-01-27 12:22:40 +01:00
Daniel Mrzyglod
8acbad88c4 mk: fix build with icc-15
This patch add Support for ICC 15.

ICC 15 changed inline-max-size and inline-max-total-size default values,
so for ICC 15 flags -no-inline-max-size -no-inline-max-total-size must be added.

additionally disable compile error for:
13368 - loop was not vectorized with "vector always assert"
15527 - loop was not vectorized: function call to fprintf cannot be vectorize

Signed-off-by: Daniel Mrzyglod <danielx.t.mrzyglod@intel.com>
Acked-by: Sergio Gonzalez Monroy <sergio.gonzalez.monroy@intel.com>
2015-01-27 12:09:10 +01:00
Jingjing Wu
675c4ced16 doc: update testpmd commands for ethertype filter
new commands for ethertype filter
  - ethertype_filter (port_id) (add|del) (mac_addr|mac_ignr)
    (mac_address) ethertype (ether_type) (drop|fwd) queue (queue_id)

Signed-off-by: Jingjing Wu <jingjing.wu@intel.com>
2015-01-22 11:49:33 +01:00
Jingjing Wu
75db20648e ethdev: remove old ethertype filter
Structure rte_ethertype_filter is removed.
Following APIs are removed:
  - rte_eth_dev_add_ethertype_filter
  - rte_eth_dev_remove_ethertype_filter
  - rte_eth_dev_get_ethertype_filter

It is replaced by filter_ctrl API.

Signed-off-by: Jingjing Wu <jingjing.wu@intel.com>
Acked-by: Helin Zhang <helin.zhang@intel.com>
2015-01-20 09:14:53 +01:00
Jingjing Wu
fb7a78a12a app/testpmd: new commands for ethertype filter
Following commands of ethertype filter are removed:
  - add_ethertype_filter (port_id) ethertype (eth_value)
  - remove_ethertype_filter (port_id) index (idx)
  - get_ethertype_filter (port_id) index (idx)
New command is added for ethertype filter by using filter_ctrl API and new
ethertype filter structure:
  - ethertype_filter (port_id) (add|del) (mac_addr|mac_ignr)
    (mac_address) ethertype (ether_type) (drop|fwd) queue (queue_id)

Signed-off-by: Jingjing Wu <jingjing.wu@intel.com>
Acked-by: Helin Zhang <helin.zhang@intel.com>
2015-01-20 09:14:53 +01:00
Jingjing Wu
748198ae82 ixgbe: use generic filter control for ethertype filter
This patch removes old functions which deal with ethertype filter in ixgbe driver.
It also defines ixgbe_dev_filter_ctrl which is binding to filter_ctrl API,
and ethertype filter can be dealt with through this new entrance.

Signed-off-by: Jingjing Wu <jingjing.wu@intel.com>
Acked-by: Helin Zhang <helin.zhang@intel.com>
2015-01-20 09:14:53 +01:00
Jingjing Wu
dd5c2dd7e5 igb: use generic filter control for ethertype filter
This patch removes old functions which deal with ethertype filter in igb driver.
It also defines eth_igb_filter_ctrl which is binding to filter_ctrl API,
and ethertype filter can be dealt with through this new entrance.

Signed-off-by: Jingjing Wu <jingjing.wu@intel.com>
Acked-by: Helin Zhang <helin.zhang@intel.com>
2015-01-20 09:14:53 +01:00
Declan Doherty
8e3e065016 mem: fix alignment parameter check
In commit 2fc8d6d the behaviour of function rte_is_power_of_2 was
changed to not return true for 0. memzone_reserve_aligned_thread_unsafe
and rte_malloc_socket both make the assumption that for align = 0
!rte_is_power_of_2(align) will return false. This patch adds a check
that align parameter is non-zero before doing the power of 2 check.

Signed-off-by: Declan Doherty <declan.doherty@intel.com>
Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
[Thomas: use && operator instead of ternary ?: and fix precedence with parens]
Acked-by: Thomas Monjalon <thomas.monjalon@6wind.com>
2015-01-19 09:36:55 +01:00
Ouyang Changchun
a30979f6ad app/testpmd: set Rx VMDq RSS mode
Set VMDq RSS mode if it has VF (VF number is more than 1) and has RSS information.

Signed-off-by: Changchun Ouyang <changchun.ouyang@intel.com>
Reviewed-by: Vlad Zolotarov <vladz@cloudius-systems.com>
2015-01-18 23:15:55 +01:00
Ouyang Changchun
42d2f78abc ixgbe: configure VF RSS
It needs config RSS and IXGBE_MRQC and IXGBE_VFPSRTYPE to enable VF RSS.

The psrtype will determine how many queues the received packets will distribute to,
and the value of psrtype should depends on both facet: max VF rxq number which
has been negotiated with PF, and the number of rxq specified in config on guest.

Signed-off-by: Changchun Ouyang <changchun.ouyang@intel.com>
Reviewed-by: Vlad Zolotarov <vladz@cloudius-systems.com>
2015-01-18 23:13:57 +01:00
Ouyang Changchun
db858dd021 ethdev: check VMDq RSS mode
Check mq mode for VMDq RSS, handle it correctly instead of returning an error;
Also remove the limitation of per pool queue number has max value of 1, because
the per pool queue number could be 2 or 4 if it is VMDq RSS mode;

The number of rxq specified in config will determine the mq mode for VMDq RSS.

Signed-off-by: Changchun Ouyang <changchun.ouyang@intel.com>
Reviewed-by: Vlad Zolotarov <vladz@cloudius-systems.com>
2015-01-18 23:12:44 +01:00
Ouyang Changchun
46b14c2311 ixgbe: get VF queue number
Get the available Rx and Tx queue number when receiving IXGBE_VF_GET_QUEUES
message from VF.

Signed-off-by: Changchun Ouyang <changchun.ouyang@intel.com>
Reviewed-by: Vlad Zolotarov <vladz@cloudius-systems.com>
2015-01-18 23:12:06 +01:00
Ouyang Changchun
6972eae614 ixgbe: negotiate VF API version
Negotiate API version with VF when receiving the IXGBE_VF_API_NEGOTIATE message.

Signed-off-by: Changchun Ouyang <changchun.ouyang@intel.com>
Reviewed-by: Vlad Zolotarov <vladz@cloudius-systems.com>
2015-01-18 23:11:41 +01:00
Ouyang Changchun
d0a4d79832 ixgbe: code cleanup
Put global register configuring out of loop for queue; also fix typo and indent.

Signed-off-by: Changchun Ouyang <changchun.ouyang@intel.com>
Reviewed-by: Vlad Zolotarov <vladz@cloudius-systems.com>
2015-01-18 23:10:46 +01:00
Tomasz Kulasek
b4f60f5557 eal/linux: check fscanf return when parsing modules list
The lack of result checking of fscanf function, breaks compilation
for default "-Werror=unused-result" flag.

Signed-off-by: Tomasz Kulasek <tomaszx.kulasek@intel.com>
Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
2015-01-16 17:35:40 +01:00
Bruce Richardson
01e66999ef nic_uio: fix thread structure compatibility for future FreeBSD
Replace d_thread_t with struct thread in nic_uio.

Ref: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=196691
Quote:
"The d_thread_t typedef is a compat shim to support FreeBSD 4.x.
I'm planning to remove this shim from 11 and dpdk is very unlikely
to ever be ported to 4.x.
If it does it will need far more changes than just d_thread_t"

Reported-by: John Baldwin <jhb@freebsd.org>
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
2015-01-16 14:43:16 +01:00
Bruce Richardson
950d15163a app/testpmd: remove duplicated function for list parsing
There were two static functions called "parse_item_list" in testpmd app.
Since one was a superset of the functionality of the other, we can
collapse the two calls down into a single one, shared between the two
C files.

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
2015-01-15 13:41:39 +01:00
Declan Doherty
7b00a204bb bond: fix vlan flag interpretation
This patch contains a fix for link bonding handling of vlan tagged packets in mode 3 and 5.
Currently xmit_slave_hash function misinterprets the PKT_RX_VLAN_PKT flag to mean that
there is a vlan tag within the packet when in actually means that there is a valid entry
in the vlan_tci field in the mbuf.

- Fixed VLAN tag support in hashing functions.
- Adds support for TCP in layer 4 header hashing.
- Splits transmit hashing function into separate functions for each policy to
  reduce branching and to make the code clearer.
- Fixed incorrect flag set in test application packet generator.

Test report: http://dpdk.org/ml/archives/dev/2015-January/010792.html

Signed-off-by: Declan Doherty <declan.doherty@intel.com>
Acked-by: Pawel Wodkowski <pawelx.wodkowski@intel.com>
Tested-by: SunX Jiajia <sunx.jiajia@intel.com>
2015-01-15 13:41:39 +01:00
Michael Qiu
021d935a03 vfio: avoid enabling while the module is not loaded
When vfio module is not loaded when kernel support vfio feature,
the routine still try to open the container to get file
description.

This action is not safe, and of course got error messages:

EAL: Detected 40 lcore(s)
EAL:   unsupported IOMMU type!
EAL: VFIO support could not be initialized
EAL: Setting up memory...

This may make user confuse, this patch make it reasonable
and much more smooth to user.

Signed-off-by: Michael Qiu <michael.qiu@intel.com>
Acked-by: Anatoly Burakov <anatoly.burakov@intel.com>
2015-01-15 13:41:39 +01:00
Stephen Hemminger
985cba0c5c log: remove unnecessary stubs
The read/seek/close stub functions are unnecessary on the
log stream.  Per glibc fopencookie man page:

       cookie_read_function_t *read
              If *read is a null pointer, then reads from  the  custom  stream
              always return end of file.

       cookie_seek_function_t *seek
              If *seek is a null pointer, then it is not possible  to  perform
              seek operations on the stream.

       cookie_close_function_t *close
              If  *close is NULL, then no special action is performed when the
              stream is closed.

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Thomas Monjalon <thomas.monjalon@6wind.com>
2015-01-15 13:41:39 +01:00
Vlad Zolotarov
8cf8fe6c3e mem: search only dpdk hugetlbfs maps
When scanning the hugetlbfs maps search only for the DPDK maps.
This will allow the application create its own hugetlbfs mappings
and use the DPDK facilities on the same hugetlbfs mount point.

Signed-off-by: Vlad Zolotarov <vladz@cloudius-systems.com>
Acked-by: Thomas Monjalon <thomas.monjalon@6wind.com>
2015-01-15 13:41:39 +01:00
Pawel Wodkowski
8d62edecaa ethdev: fix missing parenthesis in mac check
Fix check introduced in commit 4bdefaade6 (VMDQ enhancements).

Signed-off-by: Pawel Wodkowski <pawelx.wodkowski@intel.com>
Acked-by: Thomas Monjalon <thomas.monjalon@6wind.com>
2015-01-15 13:41:39 +01:00
Ravi Kerur
2fc8d6daa4 eal: fix check for power of 2 in 0 case
rte_is_power_of_2 returns true for 0 and 0 is not power_of_2.
Fix by checking for n.

Signed-off-by: Ravi Kerur <rkerur@gmail.com>
Acked-by: Neil Horman <nhorman@tuxdriver.com>
2015-01-15 13:41:39 +01:00
Neil Horman
9b0895e864 mk: fix link to static combined library
When building static archives with CONFIG_COMBINED_LIBS, we still need to
specify --whole-archive to pull in all the proper constructors.

Signed-off-by: Neil Horman <nhorman@tuxdriver.com>
Reported-by: Lyn M <netinal7@gmail.com>
Tested-by: Lyn M <netinal7@gmail.com>
Acked-by: Thomas Monjalon <thomas.monjalon@6wind.com>
2015-01-15 13:41:39 +01:00
Thomas Monjalon
ec0b5f4fbd version: 2.0.0-rc0
Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
2015-01-15 10:55:25 +01:00
Thomas Monjalon
6fb3161060 version: 1.8.0
Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
2014-12-20 00:38:39 +01:00
Thomas Monjalon
9a46da6da8 pkg: remove Intel references
Synchronize naming with changes done in documentation,
e.g. commit ac8ada0 ("doc: remove Intel references from release notes").

Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
Acked-by: Siobhan Butler <siobhan.a.butler@intel.com>
Acked-by: Neil Horman <nhorman@tuxdriver.com>
2014-12-20 00:38:39 +01:00
Thomas Monjalon
7c765072b5 pkg: support sphinx documentation
Guides have been added in release 1.8.0.
They use sphinx to process rst files.

Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
Acked-by: Siobhan Butler <siobhan.a.butler@intel.com>
Acked-by: Neil Horman <nhorman@tuxdriver.com>
2014-12-20 00:38:39 +01:00
Thomas Monjalon
cff1a077be pkg: fix link to bind tool
The NIC bind tool has been renamed in commit f0e14c5f66.

Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
Acked-by: Siobhan Butler <siobhan.a.butler@intel.com>
Acked-by: Neil Horman <nhorman@tuxdriver.com>
2014-12-20 00:38:39 +01:00
Siobhan Butler
5ef25d82fd doc: updating to 1.8 release note
Added instructions for updating from DPDK 1.7.0 to 1.8.0

Signed-off-by: Siobhan Butler <siobhan.a.butler@intel.com>
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Bernard Iremonger <bernard.iremonger@intel.com>
2014-12-20 00:38:39 +01:00
Sergio Gonzalez Monroy
7547be1efc doc: add known issue for iommu and igb_uio
Known issue regarding iommu/VT-d and igb_uio in Linux kernel version 3.15
to 3.17 where unbinding the device from the driver removes the 1:1 mapping
in the iommu resulting in IOMMU/DMAR errors when the device tries to
access memory.

Signed-off-by: Sergio Gonzalez Monroy <sergio.gonzalez.monroy@intel.com>
Acked-by: Bernard Iremonger <bernard.iremonger@intel.com>
2014-12-20 00:38:39 +01:00