Commit Graph

7871 Commits

Author SHA1 Message Date
Jan Blunck
d39670086a eal: parse driver argument before probing drivers
In some cases the virtual device name should be totally different than
the driver being used for the device. Therefore lets parse the devargs for
the "driver" argument before probing drivers in vdev_probe_all_drivers().

Signed-off-by: Jan Blunck <jblunck@infradead.org>
Acked-by: Stephen Hemminger <stephen@networkplumber.org>
2017-04-18 18:58:27 +02:00
Jan Blunck
beec692c51 eal: add name field to generic device
This adds a name field to the generic struct rte_device. The EAL is
checking for the name being populated when registering a device but
doesn't enforce global unique names as this is left to the bus
implementations.

Signed-off-by: Jan Blunck <jblunck@infradead.org>
Acked-by: Stephen Hemminger <stephen@networkplumber.org>
2017-04-18 18:57:56 +02:00
Jan Blunck
5d2aa461cb vdev: use generic vdev struct for probe and remove
This is a preparation to embed the generic rte_device into the rte_eth_dev
also for virtual devices.

Signed-off-by: Jan Blunck <jblunck@infradead.org>
Signed-off-by: Gaetan Rivet <gaetan.rivet@6wind.com>
2017-04-14 15:41:50 +02:00
Jan Blunck
dda987315c vdev: make virtual bus use its device struct
This allows the virtual bus to be rescanned and probed by tracking the
creation of rte_vdev_device.

Signed-off-by: Jan Blunck <jblunck@infradead.org>
Tested-by: Ferruh Yigit <ferruh.yigit@intel.com>
Acked-by: Shreyansh Jain <shreyansh.jain@nxp.com>
2017-04-14 15:23:29 +02:00
Jan Blunck
7eff02a09a vdev: add virtual device arguments helper function
This adds the rte_vdev_device_args() helper function to prepare for
changing the virtual drivers probe() functions take a rte_vdev_device
pointer instead of the name+args strings.

Signed-off-by: Jan Blunck <jblunck@infradead.org>
2017-04-14 15:23:29 +02:00
Jan Blunck
665146f2c8 vdev: add virtual device name helper function
This adds the rte_vdev_device_name() helper function to retrieve the
rte_vdev_device name which makes moving the name of the low-level
device into struct rte_device easier in the future.

Signed-off-by: Jan Blunck <jblunck@infradead.org>
Acked-by: Shreyansh Jain <shreyansh.jain@nxp.com>
2017-04-14 15:23:29 +02:00
Jan Blunck
6e051f50c9 vdev: add virtual device struct
This adds the rte_vdev_device structure which embeds a generic rte_device.

Signed-off-by: Jan Blunck <jblunck@infradead.org>
Tested-by: Ferruh Yigit <ferruh.yigit@intel.com>
Acked-by: Shreyansh Jain <shreyansh.jain@nxp.com>
2017-04-14 15:23:29 +02:00
Jan Blunck
598639950b vdev: refactor probe/remove
This is a preparation for the introduction of the struct rte_vdev_device.

Signed-off-by: Jan Blunck <jblunck@infradead.org>
Tested-by: Ferruh Yigit <ferruh.yigit@intel.com>
Acked-by: Shreyansh Jain <shreyansh.jain@nxp.com>
2017-04-14 15:23:29 +02:00
Jan Blunck
9721b4d543 eal: remove unused device init function
Signed-off-by: Jan Blunck <jblunck@infradead.org>
Tested-by: Ferruh Yigit <ferruh.yigit@intel.com>
Acked-by: Shreyansh Jain <shreyansh.jain@nxp.com>
2017-04-14 15:23:29 +02:00
Jan Blunck
810e5fa368 vdev: move virtual device probing into a bus
This is a refactoring of the virtual device probing which moves into into
a proper bus structure.

Signed-off-by: Jan Blunck <jblunck@infradead.org>
Tested-by: Ferruh Yigit <ferruh.yigit@intel.com>
Acked-by: Shreyansh Jain <shreyansh.jain@nxp.com>
2017-04-14 15:23:29 +02:00
Jan Blunck
da76cc0234 eal: probe new virtual bus after other bus devices
Also see commit f4ce209a8c ("eal: postpone vdev initialization").

Signed-off-by: Jan Blunck <jblunck@infradead.org>
2017-04-14 15:23:29 +02:00
Shreyansh Jain
9a8ad786c7 eal: bump ABI version for bus refactoring
Signed-off-by: Shreyansh Jain <shreyansh.jain@nxp.com>
Acked-by: Stephen Hemminger <stephen@networkplumber.org>
2017-04-14 15:23:28 +02:00
Shreyansh Jain
23d96eb688 pci: use bus driver for scan/probe
Remove EAL initiated direct PCI scan/probe and enable PCI Bus linkage.

Signed-off-by: Shreyansh Jain <shreyansh.jain@nxp.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
Reviewed-by: Gaetan Rivet <gaetan.rivet@6wind.com>
Acked-by: Stephen Hemminger <stephen@networkplumber.org>
2017-04-14 15:23:28 +02:00
Shreyansh Jain
0fd1a0eaae pci: add bus driver
Based on EAL Bus APIs, PCI bus callbacks and support functions are
introduced in this patch.

EAL continues to have direct PCI init/scan calls as well. These would be
removed in subsequent patches to enable bus only PCI devices.

Signed-off-by: Shreyansh Jain <shreyansh.jain@nxp.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
Reviewed-by: Gaetan Rivet <gaetan.rivet@6wind.com>
Acked-by: Stephen Hemminger <stephen@networkplumber.org>
2017-04-14 15:23:28 +02:00
Shreyansh Jain
ad3e1dec11 pci: remove loop over drivers in device detach
rte_eal_pci_detach calls pci_detach_all_drivers which loops over all
PCI drivers for detaching the device. This is unnecessary as the device
already has the PCI driver reference which can be used directly.

Removing pci_detach_all_drivers and restructuring rte_eal_pci_detach
and rte_eal_pci_detach_dev to work without looping over driver list.

Signed-off-by: Shreyansh Jain <shreyansh.jain@nxp.com>
Reviewed-by: Gaetan Rivet <gaetan.rivet@6wind.com>
Acked-by: Stephen Hemminger <stephen@networkplumber.org>
2017-04-14 15:23:28 +02:00
Shreyansh Jain
f102b9c37d pci: split match and probe
Matching of PCI device address and driver ID table is being done at two
discreet locations duplicating the code. (rte_eal_pci_probe_one_driver
and rte_eal_pci_detach_dev).

Refactor the match logic as a single function.

Signed-off-by: Shreyansh Jain <shreyansh.jain@nxp.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
Signed-off-by: Gaetan Rivet <gaetan.rivet@6wind.com>
Acked-by: Stephen Hemminger <stephen@networkplumber.org>
2017-04-14 15:23:28 +02:00
Gaetan Rivet
ea9bd00994 test: remove PCI tests
These tests are not suited for the rte_bus PCI implementation anymore.

Signed-off-by: Gaetan Rivet <gaetan.rivet@6wind.com>
Acked-by: Stephen Hemminger <stephen@networkplumber.org>
2017-04-14 15:23:28 +02:00
Ami Sabo
727d83ca23 net/virtio-user: fix multi-process attach
Secondary process doesn't properly attach to the rte_eth_device
initialized by the primary process.

Accessing device from secondary process (e.g. via rte_eth_rx_burst),
causes process to crash. because rte_eth_dev_data is not properly set.

The issue was flood by
'commit 7f95f78a8a ("ethdev: clear data when allocating device")'
which now clears rte_eth_dev_data entry.
For pci devices the struct is initialized by rte_eth_dev_pci_probe
->eth_dev_attach_secondary().
However, for virtio-user virtio_user_pmd_probe() is called instead of
rte_eth_dev_pci_probe().

The fix is to call rte_eth_dev_attach_secondary(), for secondary
process, from virtio_user_pmd_probe.

Fixes: 7f95f78a8a ("ethdev: clear data when allocating device")
Cc: stable@dpdk.org

Signed-off-by: Ami Sabo <amis@radware.com>
2017-04-14 15:22:49 +02:00
Ami Sabo
942661004c ethdev: export secondary attach function
Today eth_dev_attach_secondary is defined as static and can only be
called by pci drivers. However, the functionality is also required for
non-pci drivers - so the patch export the function.

Signed-off-by: Ami Sabo <amis@radware.com>
2017-04-14 15:22:31 +02:00
Bruce Richardson
fc0ddc6848 ring: fix return value for single dequeue
The error return code for rte_ring_dequeue() function should be -ENOENT
rather than -ENOBUFS (which is the error value from the enqueue() fn).

Fixes: cfa7c9e6fc ("ring: make bulk and burst return values consistent")

Reported-by: Zhihong Wang <zhihong.wang@intel.com>
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
2017-04-13 17:18:27 +02:00
Stephen Hemminger
4b6fa6d32d test: remove unnecessary cast of void pointer
Remove unnecessary casts of void * pointers to a specific type.

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
2017-04-11 18:05:10 +02:00
Stephen Hemminger
c5ba278876 lib: remove unnecessary void cast
Remove unnecessary casts of void * pointers to a specific type.

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
2017-04-11 18:05:10 +02:00
Jeff Guo
3c32113a1a app/testpmd: fix IPv6 tunnel checksum
When ipv6 packet is tunnel packet, "PKT_TX_OUTER_IPV6" flag must
be set, to let prepare the correct mbuf meta data for tx forward.

Fixes: 2b76648872 ("net/e1000: add Tx preparation")
Cc: stable@dpdk.org

Signed-off-by: Jeff Guo <jia.guo@intel.com>
2017-04-10 22:50:01 +02:00
Jeff Guo
ff643f7d02 lib: fix IPv6 tunnel checksum
When packet is flag of "PKT_TX_OUTER_IPV6", it also need to be
considered to be tunnel case, in order to calculate the correct
csum value.

Fixes: 2b76648872 ("net/e1000: add Tx preparation")
Cc: stable@dpdk.org

Signed-off-by: Jeff Guo <jia.guo@intel.com>
2017-04-10 22:49:57 +02:00
Jeff Guo
60da774e6e examples: enable HW CRC strip by default
Since VF can not disable/enable HW CRC strip for non-DPDK PF drivers,
and kernel driver almost default enable that feature, if disable it in
example app's rxmode, VF driver will report the VF launch failure. So
this patch default to enable HW CRC strip to let VF launch successful.

Cc: stable@dpdk.org

Signed-off-by: Jeff Guo <jia.guo@intel.com>
Acked-by: Jingjing Wu <jingjing.wu@intel.com>
2017-04-10 22:36:37 +02:00
Jeff Guo
b219c8cc07 test: enable HW CRC strip by default
Since VF can not disable/enable HW CRC strip for non-DPDK PF drivers,
and kernel driver almost default enable that feature, if disable it in
test app's rxmode, VF driver will report the VF launch failure. So
this patch default to enable HW CRC strip to let VF launch successful.

Cc: stable@dpdk.org

Signed-off-by: Jeff Guo <jia.guo@intel.com>
Acked-by: Jingjing Wu <jingjing.wu@intel.com>
2017-04-10 22:36:31 +02:00
Jeff Guo
79dd163fca app: enable HW CRC strip by default
Since VF can not disable/enable HW CRC strip for non-DPDK PF drivers,
and kernel driver almost default enable that feature, if disable it in
app's rxmode, VF driver will report the VF launch failure. So this
patch default to enable HW CRC strip to let VF launch successful.

Cc: stable@dpdk.org

Signed-off-by: Jeff Guo <jia.guo@intel.com>
Acked-by: Jingjing Wu <jingjing.wu@intel.com>
2017-04-10 22:35:48 +02:00
Pascal Mazon
be1d4e8564 mk: fix quoting for ARM mtune argument
The mtune argument needs an unquoted argument, otherwise the compiler
complains:

  arm-buildroot-linux-gnueabi-gcc.br_real: error:
    unrecognized argument in option ‘-mtune="cortex-a9"’

Fixes: 02a8686263 ("mk: introduce ARMv7 architecture")
Fixes: 4a7e462697 ("mk: introduce NXP dpaa2 architecture based on armv8-a")
Cc: stable@dpdk.org

Reported-by: Jan Viktorin <viktorin@rehivetech.com>
Signed-off-by: Pascal Mazon <pascal.mazon@6wind.com>
Tested-by: Jan Viktorin <viktorin@rehivetech.com>
2017-04-10 19:52:17 +02:00
Matej Vido
4bf0ab48b5 maintainers: rename section for szedata2 driver
The name of company is listed for other drivers.
Use the company name also for szedata2 driver.
Cards are available from Netcope rather than Cesnet.

Signed-off-by: Matej Vido <vido@cesnet.cz>
2017-04-10 16:42:45 +02:00
Matej Vido
171c4fb245 doc: update szedata2 guide
NICs are available from Netcope under the names NFB-*.
Change names and direct the links to Netcope web.

Signed-off-by: Matej Vido <vido@cesnet.cz>
Acked-by: John McNamara <john.mcnamara@intel.com>
2017-04-10 16:42:36 +02:00
Ilya Maximets
5ae1274fb0 app: do not build test-crypto-perf if cryptodev disabled
This fixes build in following configuration:

	CONFIG_RTE_LIBRTE_CRYPTODEV=n
	CONFIG_RTE_APP_CRYPTO_PERF=y

Fixes: f8be1786b1 ("app/crypto-perf: introduce performance test application")
Cc: stable@dpdk.org

Signed-off-by: Ilya Maximets <i.maximets@samsung.com>
Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
2017-04-10 12:00:06 +02:00
Olivier Matz
a4dad8a0c1 latency: fix build without timer library
Remove the include to "rte_timer.h" which is not needed
by latencystats library (only "rte_cycles.h" is used).

Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
2017-04-07 11:43:43 +02:00
Thomas Monjalon
9097125100 version: 17.05-rc1
Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
2017-04-06 23:25:18 +02:00
Andrew Rybchenko
2ed8fd9d10 pci: do not log false failures for non-whitelisted devices
If probe of the whitelisted PCI device fails, reset ret to zero
to silently skip non-whitelisted PCI devices.

Fixes: 10f6c93cea ("eal: do not panic on PCI failures")

Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
2017-04-06 23:13:06 +02:00
Aaron Conole
e9980a7573 eal: deprecate old cpu features check function
It's likely that this function isn't used anywhere, but since it was part
of the public API, mark the function for deprecation for at least one
release.

Signed-off-by: Aaron Conole <aconole@redhat.com>
2017-04-06 23:03:42 +02:00
Aaron Conole
b8951127a0 eal: add missing function to symbol map
This function rte_cpu_is_supported is now part of the public ABI,
so should be advertised as such.

Fixes: 37e97ad2c5 ("eal: do not panic when CPU is not supported")

Signed-off-by: Aaron Conole <aconole@redhat.com>
2017-04-06 22:54:44 +02:00
Thomas Monjalon
acd6dc98a9 doc: add maintainer role about replying questions
The first line of the MAINTAINERS file are:
"
The intention of this file is to provide a set of names that we can rely on
for helping in patch reviews and questions.
"

Unfortunately, some maintainers do not endorse their role for questions
asked on the mailing list.
Hope making it clear in the contribution guide will enforce more
responsive maintainer participation.

Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
Acked-by: John McNamara <john.mcnamara@intel.com>
2017-04-06 22:36:55 +02:00
Wenzhuo Lu
a83d9f26a0 doc: add how to use VF daemon
VFd (the VF daemon) is a mechanism which can be used to configure
features on a VF without direct access to the PF.

Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
Acked-by: John McNamara <john.mcnamara@intel.com>
2017-04-06 22:32:56 +02:00
John McNamara
6a767a694d doc: fix doc warning due to missing architecture
TILE-GX is no longer supported but the tap driver includes it in its
NIC overview ini file which causes a doc warning:

    $ make doc-guides-html
    sphinx processing guides-html...
    Warning generate_nic_overview_table():
    Unknown feature 'TILE-Gx' in 'tap.ini'

Fixes: 04b2c3c943 ("doc: add tap features")

Signed-off-by: John McNamara <john.mcnamara@intel.com>
2017-04-06 22:17:11 +02:00
Bruce Richardson
99a7213b14 devtools: add test apps to build script
Since the test app is no longer being build by default as part of a build,
we need to update the testbuild script to take account of this.

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Declan Doherty <declan.doherty@intel.com>
Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
2017-04-06 21:44:06 +02:00
Bruce Richardson
94bef80770 config: enable crypto scheduler PMD by default
The crypto scheduler PMD has no external dependencies to enable that by
default.

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Declan Doherty <declan.doherty@intel.com>
2017-04-06 21:37:19 +02:00
Bruce Richardson
a894e13ede examples: enable build of performance-thread
The performance-thread example was not build by default in the make
examples build target. It will compile ok for x86_64 targets so add it to
the examples makefile list for that platform.

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Declan Doherty <declan.doherty@intel.com>
2017-04-06 21:37:19 +02:00
Yuanhan Liu
87efbcc7ab devtools: make commits with stable tag outstanding
So that, as a stable maintainer while picking commits to a stable release,
I could pay less attention to those have it and pay more attention to those
don't have it.

Signed-off-by: Yuanhan Liu <yuanhan.liu@linux.intel.com>
2017-04-06 21:26:16 +02:00
Qi Zhang
c23a1a3000 eal: clean up interrupt handle
The patch change the prototype of callback function
(rte_intr_callback_fn) by removing the unnecessary parameter.

Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
2017-04-06 21:15:55 +02:00
Qi Zhang
13b38e79e1 vfio: keep interrupt source read only
Remove the inappropriate modification on get_max_intr
field that keep the intr_source read only.

Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
Acked-by: Anatoly  Burakov <anatoly.burakov@intel.com>
2017-04-06 21:15:55 +02:00
Ferruh Yigit
0c145b7eea drivers/net: remove unused DEPDIRS from makefiles
Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
2017-04-06 20:58:59 +02:00
Beilei Xing
ab5169a6c2 net/i40e: fix tunnel filter to VF
Failed to destroy tunnel filter rule if the action of
the tunnel filter is VF, root cause is the wrong vsi
used.

Fixes: c50474f31e ("net/i40e: support tunnel filter to VF")

Signed-off-by: Beilei Xing <beilei.xing@intel.com>
Acked-by: Bernard Iremonger <bernard.iremonger@intel.com>
2017-04-06 20:54:03 +02:00
Ferruh Yigit
1e846151cf event/sw: fix build for gcc 4.5.1
build error:
.../event/sw/sw_evdev_worker.c: In function ‘sw_event_release’:
.../event/sw/sw_evdev_worker.c:52:3: error: unknown field ‘op’ specified
in initializer

Fixed by updating struct initialization.

Fixes: 656af91800 ("event/sw: add worker core functions")

Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
Acked-by: Harry van Haaren <harry.van.haaren@intel.com>
2017-04-06 20:40:31 +02:00
Ferruh Yigit
1daa21de5b event/octeontx: fix build for gcc < 4.6
-Ofast option supported from gcc4.6 [1], for older versions using
"-O3 -ffast-math" instead.

[1] build error:
cc1: error: invalid option argument ‘-Ofast’

Also struct initialization build error [2] fixed.

[2] build error:
.../event/octeontx/ssovf_mbox.c: In function ‘mbox_send_request’:
.../event/octeontx/ssovf_mbox.c:95:9: error: unknown field ‘u64’
specified in initializer

Fixes: 32ff26393b ("event/octeontx: add SSO HW device operations")

Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
Acked-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
2017-04-06 20:40:31 +02:00
Ferruh Yigit
0b9ce550c4 net/thunderx: disable PMD for old compilers
Disable for gcc < 4.7 and icc <= 14.0

PMD uses some compiler builtins and new compiler options. Tested with
gcc 4.5.1 and following were not supported:

option:
-Ofast

macros:
_Static_assert

__ORDER_LITTLE_ENDIAN__
__ORDER_BIG_ENDIAN__
__BYTE_ORDER__

__atomic_fetch_add
__ATOMIC_ACQUIRE
__atomic_load_n
__ATOMIC_RELAXED
__atomic_store_n
__ATOMIC_RELEASE

It is not easy to fix all in PMD, disabling PMD for older compilers.

Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
2017-04-06 20:40:27 +02:00