Commit Graph

3368 Commits

Author SHA1 Message Date
Pablo de Lara
f3a4e40eca i40e: support ieee1588 functions for device time
Add additional functions to support the existing IEEE1588
functionality and to enable getting, setting and adjusting
the device time.

Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Signed-off-by: Daniel Mrzyglod <danielx.t.mrzyglod@intel.com>
Reviewed-by: John McNamara <john.mcnamara@intel.com>
2015-11-13 17:44:42 +01:00
Pablo de Lara
9c857bf6be igb: support ieee1588 functions for device time
Add additional functions to support the existing IEEE1588
functionality and to enable getting, setting and adjusting
the device time.

Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Signed-off-by: Daniel Mrzyglod <danielx.t.mrzyglod@intel.com>
Reviewed-by: John McNamara <john.mcnamara@intel.com>
2015-11-13 17:44:41 +01:00
Daniel Mrzyglod
1c4445e1f2 ixgbe: support ieee1588 functions for device time
Add additional functions to support the existing IEEE1588
functionality and to enable getting, setting and adjusting
the device time.

Signed-off-by: Daniel Mrzyglod <danielx.t.mrzyglod@intel.com>
Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Reviewed-by: John McNamara <john.mcnamara@intel.com>
2015-11-13 17:44:39 +01:00
Daniel Mrzyglod
b6fd85cd65 eal: add helpers for time conversions
Add common functions and structures to handle time, and cycle counts
which will be used for PTP processing.

Signed-off-by: Daniel Mrzyglod <danielx.t.mrzyglod@intel.com>
Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Reviewed-by: John McNamara <john.mcnamara@intel.com>
2015-11-13 17:44:34 +01:00
Daniel Mrzyglod
eb1cbcba48 ethdev: add ieee1588 functions for device clock time
Add additional functions to support the existing IEEE1588
functionality.

  * rte_eth_timesync_write_time():  set the device clock time.
  * rte_eth_timesync_read_time():   get the device clock time.
  * rte_eth_timesync_adjust_time(): adjust the device clock time.

Signed-off-by: Daniel Mrzyglod <danielx.t.mrzyglod@intel.com>
Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Reviewed-by: John McNamara <john.mcnamara@intel.com>
2015-11-13 17:43:05 +01:00
Stephen Hemminger
286b4803b7 fm10k: use common functions to manage DMA zone
Adapt to Xen at runtime.

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Jijiang Liu <jijiang.liu@intel.com>
2015-11-13 11:47:46 +01:00
Stephen Hemminger
98aeb8c5a6 i40e: use common functions to manage DMA zone
Handle Xen support at runtime.

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Jijiang Liu <jijiang.liu@intel.com>
2015-11-13 11:47:40 +01:00
Stephen Hemminger
1e0b2709fe ixgbe: use common functions to manage DMA zone
Adapt DMA memory for Xen at runtime.

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Jijiang Liu <jijiang.liu@intel.com>
2015-11-13 11:47:20 +01:00
Stephen Hemminger
65ed00f834 e1000: use common functions to manage DMA zone
Use common code to handle Xen support at runtime.

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Jijiang Liu <jijiang.liu@intel.com>
2015-11-13 11:43:02 +01:00
Stephen Hemminger
719dbebceb xen: allow determining DOM0 at runtime
Add memory infrastructure for runtime Xen DOM0 support.

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Jijiang Liu <jijiang.liu@intel.com>
2015-11-13 11:34:53 +01:00
Stephen Hemminger
5a1940f080 ethdev: mark deprecated statistics with attribute
Use deprecated attribute to highlight any use of fields that
are marked as going away in the rte_ether device statistics.

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
2015-11-12 23:05:36 +01:00
Thomas Monjalon
99dafd5bf3 examples/ip_pipeline: remove references to deprecated statistics
Keep only basic statistics which should never been deprecated.

Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
2015-11-12 23:05:28 +01:00
Stephen Hemminger
f72a0fa627 app/testpmd: remove references to deprecated statistics
Some of the statistics are deprecated, so don't test them.

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
2015-11-12 23:05:20 +01:00
Stephen Hemminger
476e41929f bonding: do not sum deprecated statistics
These statistics are marked deprecated, leave them alone.
Also keep track of imissed across all ports.

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
2015-11-12 23:05:10 +01:00
Stephen Hemminger
b5d5b4a88b cxgbe: do not report deprecated statistics
Some of the ethernet device statistics are marked deprecated
and should not be reported.

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
2015-11-12 23:05:03 +01:00
Stephen Hemminger
0925b7e11f i40e: do not report deprecated statistics
The fields in ethernet statistics that are marked deprecated
should not be filled in.

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
2015-11-12 23:04:52 +01:00
Stephen Hemminger
66bf77cea8 e1000: do not report deprecated statistics
These fields are marked deprecated don't use them.

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
2015-11-12 23:04:14 +01:00
Harry van Haaren
5936b669b8 i40e: refactor xstats per queue handling
This patch refactors the queue and priority statistic handling.
Generic queue stats are presented by rte_eth_xstats_get(), and the
i40e_xstats_get() exposes only the extra stats.

Signed-off-by: Harry van Haaren <harry.van.haaren@intel.com>
Acked-by: Maryam Tahhan <maryam.tahhan@intel.com>
2015-11-12 17:35:43 +01:00
Harry van Haaren
664c51f792 ixgbe: refactor xstats per queue handling
This patch refactors the queue handling. Generic queue stats are
handled by rte_eth_xstats_get() and the ixgbe_xstats_get() exposes
only the extra stats.

Signed-off-by: Harry van Haaren <harry.van.haaren@intel.com>
Acked-by: Maryam Tahhan <maryam.tahhan@intel.com>
2015-11-12 17:35:27 +01:00
Harry van Haaren
ee4340a69d ethdev: format generic xstats per queue always
This patch refactors the generic queue stats to be exposed
by rte_ethdev_xstats_get().

Signed-off-by: Harry van Haaren <harry.van.haaren@intel.com>
Acked-by: Maryam Tahhan <maryam.tahhan@intel.com>
2015-11-12 17:35:26 +01:00
Panu Matilainen
9f8eb1d9ca eal: support driver loading from directory
Add support for directories as arguments to -d for loading all drivers
from a given directory. Additionally a default driver directory can be
set in build-time configuration, in which case it will be always be used
when EAL is initialized.

This simplifies usage in shared library configuration significantly over
manually loading individual drivers with -d, and allows distros to
establish a drop-in driver directory for seamless integration
with 3rd party drivers etc.

Suggested-by: Thomas Monjalon <thomas.monjalon@6wind.com>
Suggested-by: David Marchand <david.marchand@6wind.com>
Signed-off-by: Panu Matilainen <pmatilai@redhat.com>
Acked-by: David Marchand <david.marchand@6wind.com>
2015-11-12 16:56:45 +01:00
Panu Matilainen
fa9cdc6f84 eal: move plugin loading from linuxapp to common
There's no good reason to limit plugins to Linux, make it available
on FreeBSD too. Refactor the plugin code from Linux EAL to common
helper functions, also check for and fail on errors during initialization.

Signed-off-by: Panu Matilainen <pmatilai@redhat.com>
Acked-by: David Marchand <david.marchand@6wind.com>
2015-11-12 16:53:22 +01:00
Reshma Pattan
3ca3325578 maintainers: replace for reorder library
Updated maintainers list for reorder library

Signed-off-by: Reshma Pattan <reshma.pattan@intel.com>
Acked-by: Sergio Gonzalez Monroy <sergio.gonzalez.monroy@intel.com>
2015-11-12 16:49:00 +01:00
Reshma Pattan
0c24ec40e0 reorder: fix unit test for random starting point
The reorder library unit test was performed under the assumption that
the start sequence number was always 0.
This is not the case anymore as the start sequence number is initialized
by the first packet inserted into the reorder buffer.

This patch updates the unit test to reflect the new behavior.

Fixes: 7e1fa1de8a ("reorder: allow random number as starting point")

Reported-by: Mukesh Dua <mukesh.dua81@gmail.com>
Signed-off-by: Reshma Pattan <reshma.pattan@intel.com>
Acked-by: Sergio Gonzalez Monroy <sergio.gonzalez.monroy@intel.com>
2015-11-12 16:49:00 +01:00
John Daley
83f4460634 doc: add enic Tx improvement in release notes
Signed-off-by: John Daley <johndale@cisco.com>
2015-11-12 16:22:24 +01:00
John Daley
e66f05ae63 maintainers: add maintainers for enic
Signed-off-by: John Daley <johndale@cisco.com>
Acked-by: Thomas Monjalon <thomas.monjalon@6wind.com>
2015-11-12 16:22:13 +01:00
Yuanhan Liu
76758b2ef8 maintainers: claim to be reviewer of virtio and vhost
Firstly, Chuangchun's email address's been invalid for a while.

Secondly, I'd like to take the responsibility to review patches
of virtio/vhost component.

Cc: Huawei Xie <huawei.xie@intel.com>
Cc: Thomas Monjalon <thomas.monjalon@6wind.com>
Signed-off-by: Yuanhan Liu <yuanhan.liu@linux.intel.com>
Acked-by: Thomas Monjalon <thomas.monjalon@6wind.com>
2015-11-12 12:39:58 +01:00
Yuanhan Liu
87308b5370 vhost: reset device properly
Currently, we reset all fields of a device to zero when reset
happens, which is wrong, since for some fields like device_fh,
ifname, and virt_qp_nb, they should be same and be kept after
reset until the device is removed. And this is what's the new
helper function reset_device() for.

And use rte_zmalloc() instead of rte_malloc, so that we could
avoid init_device(), which basically dose zero reset only so far.
Hence, init_device() is dropped in this patch.

This patch also removes a hack of using the offset a specific
field (which is virtqueue now) inside of `virtio_net' structure
to do reset, which could be broken easily if someone changed the
field order without caution.

Cc: Tetsuya Mukawa <mukawa@igel.co.jp>
Cc: Huawei Xie <huawei.xie@intel.com>
Signed-off-by: Yuanhan Liu <yuanhan.liu@linux.intel.com>
Acked-by: Rich Lane <rich.lane@bigswitch.com>
2015-11-12 12:39:08 +01:00
Rich Lane
d243ecf0c2 vhost: make destroy callback on reset owner message
QEMU sends VHOST_RESET_OWNER first when shutting down.
There was previously no way for the dataplane to know that the
virtio_net instance had become unusable and it would segfault
when trying to do RX/TX.

Signed-off-by: Rich Lane <rich.lane@bigswitch.com>
Acked-by: Yuanhan Liu <yuanhan.liu@linux.intel.com>
2015-11-12 12:39:08 +01:00
Helin Zhang
50687c312a i40e: fix VSI allocation for VMDq
It fixes the issue of trying to allocate more VSIs for VMDq than
hardware remaining. It adds a check of the hardware remaining
before allocating VSIs for VMDq.

Fixes: c80707a0fd ("i40e: fix VMDq pool limit")

Signed-off-by: Helin Zhang <helin.zhang@intel.com>
2015-11-12 12:39:08 +01:00
Tomasz Kulasek
6b6a94ee17 bonding: fix build with icc
ICC complains about enumerated types being mixed in link bonding driver,
as ETH_MQ_RX_RSS is an enum type of mq_mode and not a bitmask as it was
being treated.

Fixes: 734ce47f71 ("bonding: support RSS dynamic configuration")

Signed-off-by: Tomasz Kulasek <tomaszx.kulasek@intel.com>
Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
2015-11-12 00:22:26 +01:00
Konstantin Ananyev
71f39b07b6 ixgbe: fix Tx hang when RS distance exceeds HW limit
One of the ways to reproduce the issue:

testpmd <EAL-OPTIONS> -- -i --txqflags=0
testpmd> set fwd txonly
testpmd> set txpkts 64,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4
testpmd> set txsplit rand
testpmd> start

After some time TX on ixgbe queue will hang,
and all packet transmission on that queue will stop.

This bug was first reported and investigated by
Vlad Zolotarov <vladz@cloudius-systems.com>:
"We can reproduce this issue when stressed the xmit path with a lot of highly
fragmented TCP frames (packets with up to 33 fragments with non-headers
fragments as small as 4 bytes) with all offload features enabled."

The root cause is that ixgbe_xmit_pkts() in some cases violates the HW rule
that the distance between TDs with RS bit set should not exceed 40 TDs.

>From the latest 82599 spec update:
"When WTHRESH is set to zero, the software device driver should set the RS bit
in the Tx descriptors with the EOP bit set and at least once in the 40
descriptors."

The fix is to make sure that the distance between TDs with RS bit set
would never exceed HW limit.
As part of that fix, tx_rs_thresh for ixgbe PMD is not allowed to be greater
then to 32 to comply with HW restrictions.

With that fix slight slowdown for the full-featured ixgbe TX path
might be observed (from our testing - up to 4%).

ixgbe simple TX path is unaffected by that patch.

Reported-by: Vlad Zolotarov <vladz@cloudius-systems.com>
Signed-off-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
2015-11-12 00:22:26 +01:00
Konstantin Ananyev
79bec05b32 app/testpmd: add ability to split outgoing packets
For CSUM forwarding mode add ability to copy & split outgoing packet
into the new mbuf that consists of multiple segments.
For TXONLY and CSUM forwarding modes add ability to make number of
segments in the outgoing packet to vary on a per packet basis.
Number of segments and size of each segment is controlled by
'set txpkts' command.
Split policy is controlled by 'set txsplit' command.
Possible values are: on | off | rand.
Tha allows to increase test coverage for TX PMD codepaths.

Signed-off-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
2015-11-12 00:22:26 +01:00
Harry van Haaren
a4aca79ba4 i40e: fix stats reset
This patch fixes a bug where only some of the statistics were being
reset when calling rte_eth_stats_reset() or rte_eth_xstats_reset().
As both the stats reset and xstats reset do the same, refactor away
the duplicated function.

This patch marks the VSI to update its offset, causing the stats be
look like they are reset.

Fixes: 9aace75fc8 ("i40e: fix statistics")

Signed-off-by: Harry van Haaren <harry.van.haaren@intel.com>
Acked-by: Maryam Tahhan <maryam.tahhan@intel.com>
2015-11-11 19:38:47 +01:00
Helin Zhang
3f50f072ff i40e: fix memzone freeing
This fixes the issue of not freeing memzone in a call to free the
memory for adminq DMA.

Fixes: 4861cde461 ("i40e: new poll mode driver")

Signed-off-by: Helin Zhang <helin.zhang@intel.com>
Acked-by: Jingjing Wu <jingjing.wu@intel.com>
2015-11-11 19:38:47 +01:00
Helin Zhang
c80707a0fd i40e: fix VMDq pool limit
It fixes the issue of cannot using more than 1 poor for VMDq,
according to the queues left.

Fixes: 705b57f820 ("i40e: enlarge the number of supported queues")

Signed-off-by: Helin Zhang <helin.zhang@intel.com>
2015-11-11 19:38:11 +01:00
Pablo de Lara
6e4775cc9b i40e: fix build with icc 2015
Fix for the following error on icc 2015, due to incorrect type:
	drivers/net/i40e/i40e_fdir.c(1376): error #188:
	enumerated type mixed with another type
		case RTE_ETH_FDIR_FILTER_INPUT_SET_SELECT:

Fixes: 98f05570 ("i40e: configure input fields for RSS or flow director")

Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Acked-by: Helin Zhang <helin.zhang@intel.com>
2015-11-11 19:38:11 +01:00
Helin Zhang
60e2b41df5 i40e: fix build with icc 13
It fixes compile issue on ICC 13.0.0.

Error logs:
i40e_ethdev.c(7943): error #188: enumerated type mixed with another type

Fixes: c8b9a3e3fe ("i40e: support DCB mode")

Signed-off-by: Helin Zhang <helin.zhang@intel.com>
Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
2015-11-11 19:38:11 +01:00
Helin Zhang
64ee9e4815 app/testpmd: fix build with icc 13
It fixes compile issue on ICC 13.0.0.

Error logs:
app/test-pmd/cmdline.c(8160): error #188: enumerated type mixed
with another type
    entry.input.flow.tunnel_flow.tunnel_type =
        str2fdir_tunneltype(res->tunnel_type);

Fixes: 53b2bb9b7e ("app/testpmd: new flow director commands")

Signed-off-by: Helin Zhang <helin.zhang@intel.com>
Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
2015-11-11 19:38:11 +01:00
David Marchand
695ae2788e app/testpmd: fix icmp echo Tx queues
icmp echo forward engine relies on the core rank rather than the number of
queues available.
This fix is still wrong, because if we set a nb-rxq > nb-txq, then we will
use an invalid txq, but with this, we are aligned on other fwd engines.

Signed-off-by: David Marchand <david.marchand@6wind.com>
Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
2015-11-10 17:22:07 +01:00
Julien Meunier
6a5f84590a igbvf: fix vlan filtering
Once posted through mailbox, we must check for nack from the PF
and report an error in this case.

Signed-off-by: Julien Meunier <julien.meunier@6wind.com>
Signed-off-by: David Marchand <david.marchand@6wind.com>
Acked-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
2015-11-10 17:14:52 +01:00
Julien Meunier
4d4a76a6c9 enic: fix vlan filtering
Report an error when something went wrong.

Signed-off-by: Julien Meunier <julien.meunier@6wind.com>
Signed-off-by: David Marchand <david.marchand@6wind.com>
Acked-by: Sujith Sankar <ssujith@cisco.com>
2015-11-10 17:06:53 +01:00
Bernard Iremonger
7a69f72451 ethdev: fix error handling in PCI fields copy
add return statement to if branch

Dereferencing NULL pointer reported by Coverity, CID 119256.
Dereferencing NULL pointer reported by Coverity, CID 119257.

Fixes: 494adb7f63 ("ethdev: add device fields from PCI layer")

Signed-off-by: Bernard Iremonger <bernard.iremonger@intel.com>
2015-11-10 17:06:53 +01:00
Wenzhuo Lu
2892fcc14e app/testpmd: fix flow director help and doc
After implementing the fdir new modes for x550, the CLIs are modified.
Forgot to update the related help info and doc.

Fixes: 53b2bb9b7e ("app/testpmd: new flow director commands")

Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
2015-11-10 17:06:53 +01:00
John McNamara
4c28fb7685 ring: fix memory freeing on error
Fix minor memory free issue in error clean-up.

Reported-by Coverity (CID 119258)

Fixes: 651c505af8 ("ring: enhance device setup from rings")

Signed-off-by: John McNamara <john.mcnamara@intel.com>
2015-11-07 00:08:36 +01:00
Pablo de Lara
f03924c32e app/test: increase memory for hash unit tests
Hash_autotest is in test group 2 which had only 32 MB
of memory, which is increased to 64 MB to make it run.

Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
2015-11-06 17:43:54 +01:00
Pablo de Lara
1e0b51fd4b app/test: fix unit test for option -n
eal_flags_autotest was broken after commit
19bfa4dd ("eal: make the -n argument optional"),
since the unit test was checking that app would not run
if -n flag was missing, which now it is possible.

Also, subtest test_missing_n_flag() has been renamed
to test_invalid_n_flag(), as now -n flag is not compulsory.

Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
2015-11-06 16:32:40 +01:00
Thomas Monjalon
c4d404d7c1 version: 2.2.0-rc1
Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
2015-11-05 00:48:18 +01:00
Thomas Monjalon
03e5ff41ce doc: fix release notes
A fix in hash library was in the drivers section.
Some ABI changes have been done without removing the notices.

Fixes: 62dbd2ffea ("ethdev: add more flow director modes")
Fixes: 381316f6a2 ("vhost-user: support protocol features")
Fixes: 5915699153 ("hash: fix scaling by reducing contention")

Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
2015-11-05 00:40:39 +01:00
David Hunt
761f5a5680 igb_uio: fix build with kernel 4.3
Fix to take this change into account: https://lkml.org/lkml/2015/7/9/101
Has been applied to Kernel 4.3.0-rc6

Linux: 4a7cc831 ("genirq/MSI: Move msi_list from struct pci_dev to struct device")

Signed-off-by: David Hunt <david.hunt@intel.com>
Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
2015-11-05 00:02:52 +01:00