Commit Graph

3370 Commits

Author SHA1 Message Date
Jan Blunck
7109bec9ea cryptodev: deprecate vdev create function
The function rte_cryptodev_create_vdev is an alias
for rte_vdev_init() which is scheduled to move out of the
rte_eal library. Lets deprecate this function to be able to
remove it from the cryptodev library in 17.11.

Signed-off-by: Jan Blunck <jblunck@infradead.org>
Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Acked-by: Declan Doherty <declan.doherty@intel.com>
Acked-by: Sergio Gonzalez Monroy <sergio.gonzalez.monroy@intel.com>
2017-07-28 16:32:19 +02:00
Pablo de Lara
15ed07656d cryptodev: fix doxygen comment of bulk alloc
When calling rte_crypto_op_bulk_alloc, the function may
return either a 0, if not enough objects are available
in the mempool or the number of operations requested,
it there are enough available. However, the Doxygen comments
were not matching these two cases.

Fixes: c0f87eb525 ("cryptodev: change burst API to be crypto op oriented")
Cc: stable@dpdk.org

Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Acked-by: Fiona Trahe <fiona.trahe@intel.com>
2017-07-27 18:49:11 +02:00
Pablo de Lara
27391b53b3 cryptodev: fix session init return value
When calling rte_cryptodev_sym_session_init(),
if there was an error, it returned -1, instead
of returning the specific error code, which can
be valuable for the application for error handling.

Fixes: b3bbd9e5f2 ("cryptodev: support device independent sessions")

Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Acked-by: Akhil Goyal <akhil.goyal@nxp.com>
Acked-by: Fiona Trahe <fiona.trahe@intel.com>
2017-07-27 17:25:54 +02:00
Thomas Monjalon
67c4b6db68 version: 17.08-rc2
Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
2017-07-21 19:33:46 +03:00
Sergio Gonzalez Monroy
f0e0e86aa3 pci: move NUMA node check from scan to probe
Commit 8a04cb6125 ("pci: set default numa node for broken systems")
added logic to default to NUMA node 0 when sysfs numa_node information
was wrong or not available.

Unfortunately there are many devices with wrong NUMA node information
that DPDK does not care about but still show warnings for them.

Instead, only check for invalid NUMA node information for devices
managed by the DPDK.

Signed-off-by: Sergio Gonzalez Monroy <sergio.gonzalez.monroy@intel.com>
2017-07-21 19:26:29 +03:00
Jiayu Hu
a0c1f82392 gro: fix doxygen
This patch updates GRO API comments to generate correct
API documentation by doxygen.

Signed-off-by: Jiayu Hu <jiayu.hu@intel.com>
2017-07-21 18:01:43 +03:00
Shijith Thotton
b58eedfc7d igb_uio: issue FLR during open and release of device file
Set UIO info device file operations open and release. Call pci reset
function inside open and release to clear device state at start and end.
Copied this behaviour from vfio_pci kernel module code. With this patch,
it is not mandatory to issue FLR by PMD's during init and close.

Bus master enable and disable are added in open and release respectively
to take care of device DMA.

Signed-off-by: Shijith Thotton <shijith.thotton@caviumnetworks.com>
Reviewed-by: Jianfeng Tan <jianfeng.tan@intel.com>
Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>
Acked-by: Gregory Etelson <gregory@weka.io>
2017-07-21 01:30:29 +03:00
Adrien Mazarguil
a9510e11ad cmdline: fix dynamic tokens interface
Support for dynamic tokens was added in order to implement the flow command
in testpmd, for which static tokens were not versatile enough due to the
large number of possible parameter combinations.

However, due to its reliance on a temporary array to store dynamic tokens,
this interface suffers from various limitations that need to be addressed
in order to implement more commands in the future:

- The maximum number of dynamic tokens is determined at compilation time
  (CMDLINE_PARSE_DYNAMIC_TOKENS). The larger this value, the more stack
  space is wasted (one pointer per potential token, i.e. 1kB of stack space
  on 64-bit architectures with the default value).

- This temporary array is actually a cache in which entries already present
  are not regenerated. This behavior is not documented, which makes dynamic
  tokens practically unusable by applications as they do not know which
  token is current.

- The cache does not really reduce the number of function calls needed to
  retrieve tokens, it was mainly deemed useful to provide context about
  other tokens to the generator callback.

- Like testpmd, most users will likely use repeated pointers to a fixed
  token header structure (cmdline_token_hdr_t), with internal context-aware
  callbacks that do not need to look at other entries; knowing the index of
  the current token is enough.

Getting rid of the temporary array and properly documenting usage of the
token generator callback greatly simplifies this interface.

Fixes: 4fffc05a2b ("cmdline: support dynamic tokens")
Fixes: 19c90af628 ("app/testpmd: add flow command")
Cc: stable@dpdk.org

Signed-off-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
Acked-by: Olivier Matz <olivier.matz@6wind.com>
2017-07-21 01:03:25 +03:00
Adrien Mazarguil
f627b65cb0 cmdline: fix dynamic tokens initialization
To avoid redundant calls to the token-generating function and provide it
with helpful context, a temporary fixed-size array allocated on the stack
of cmdline_parse() and cmdline_complete() keeps the address of preceding
tokens for the command instance being processed (cmdline_parse_inst_t).

Like the static tokens array in cmdline_parse_inst_t, it must be
NULL-terminated, however this is not properly enforced as it is initialized
once at the beginning of each function and a NULL terminator is never
appended once replaced with generated tokens.

When several commands rely on dynamic tokens, subsequent ones inherit an
already initialized array whose tokens are not regenerated, which causes
various issues such as mixed and repeated tokens from the first command.

Enforcing NULL termination of the dynamic tokens array and reinitializing
its first entry at each iteration solves these issues. Doing so is also
less expensive than a full memset() at each iteration.

Fixes: 4fffc05a2b ("cmdline: support dynamic tokens")
Cc: stable@dpdk.org

Signed-off-by: Bernard Iremonger <bernard.iremonger@intel.com>
Signed-off-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
Acked-by: Olivier Matz <olivier.matz@6wind.com>
2017-07-21 01:03:17 +03:00
Kirill Rybalchenko
26c4ab1a16 cryptodev: remove crypto operation status value
Crypto operation status RTE_CRYPTO_OP_STATUS_ENQUEUED is removed
from rte_crypto.h as it is not needed for crypto operation processing.
This status value is redundant to RTE_CRYPTO_OP_STATUS_NOT_PROCESSED value
and it was not intended to be part of public API.

Signed-off-by: Kirill Rybalchenko <kirill.rybalchenko@intel.com>
Acked-by: Declan Doherty <declan.doherty@intel.com>
2017-07-19 17:26:45 +03:00
Pablo de Lara
9a52f37bd2 cryptodev: reorder auth transform
IV was positioned differently in authentication
transform structure, compared to the other two
transforms (cipher and AEAD).
To keep consistency, digest length is moved to
the end of the transform.

Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Acked-by: Fiona Trahe <fiona.trahe@intel.com>
2017-07-19 14:10:41 +03:00
Pablo de Lara
46a0547f9f cryptodev: rename ADD field
Additional Authenticated Data (AAD) is called "aad" in most
places of cryptodev, but it was called "add_auth_data"
in the AEAD transform transform (aead_xform).

This field is renamed to "aad_length" in order to keep
consistency.

Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Acked-by: Fiona Trahe <fiona.trahe@intel.com>
2017-07-19 14:10:41 +03:00
Pablo de Lara
799dea5783 cryptodev: decrease key and digest sizes
Crypto keys and digests are not expected
to be big, so using a uint16_t to store
their lengths should be enough.

Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Acked-by: Fiona Trahe <fiona.trahe@intel.com>
2017-07-19 14:10:41 +03:00
Pablo de Lara
9333cfba3b cryptodev: fix KASUMI F9 expected parameters
For KASUMI F9 algorithm, COUNT, FRESH and DIRECTION
input values need to be contiguous with
the message, as described in the KASUMI and QAT PMD
documentation.

Before, the COUNT and FRESH values were set
as part of the AAD (now IV), but always set before
the beginning of the message.
Since now the IV is set after the crypto operation,
it is not possible to have these values in the
expected location.

Therefore, as these are required to be contiguous,
cryptodev API will expect these them to be passed
as a single buffer, already constructed, so
authentication IV parameters not needed anymore.

Fixes: 681f540da5 ("cryptodev: do not use AAD in wireless algorithms")

Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Acked-by: Fiona Trahe <fiona.trahe@intel.com>
2017-07-19 14:10:41 +03:00
Pablo de Lara
7b3880fdcc cryptodev: remove AAD size in auth capabilities
Additional Authenticated Data (AAD) was removed from the
authentication parameters, but still the supported size
was part of the authentication capabilities of a PMD.

Fixes: 4428eda8bb ("cryptodev: remove AAD from authentication structure")

Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Acked-by: Declan Doherty <declan.doherty@intel.com>
2017-07-19 14:10:41 +03:00
Harry van Haaren
f9a96a50d8 eventdev: fix memory realloc check in port config
This commit fixes the check to use the just reallocated
links_map variable, instead of stale dev->data->links_map.
Later the new variable is written to the dev->data->links_map,
so the stale-ness is only temporary.

Coverity issue: 143456
Fixes: 4f0804bbdf ("eventdev: implement the northbound APIs")

Signed-off-by: Harry van Haaren <harry.van.haaren@intel.com>
Reviewed-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
2017-07-20 07:19:47 +03:00
Gaetan Rivet
d1fe33bfc7 ethdev: count devices consistently
Make the rte_eth_dev_count() return the number of available devices even
after some are detached by the hotplug API or put in a deferred state.

Signed-off-by: Gaetan Rivet <gaetan.rivet@6wind.com>
Acked-by: Thomas Monjalon <thomas@monjalon.net>
2017-07-19 11:59:39 +03:00
Gaetan Rivet
cb894d99ec ethdev: add deferred intermediate device state
This device state means that the device is managed externally, by
whichever party has set this state (PMD or application).

Note: this new device state is only an information. The related device
structure and operators are still valid and can be used normally.

It is however made private by device management helpers within ethdev,
making the device invisible to applications.

Signed-off-by: Gaetan Rivet <gaetan.rivet@6wind.com>
Acked-by: Thomas Monjalon <thomas@monjalon.net>
2017-07-19 11:59:39 +03:00
Zhiyong Yang
78b2e3bae1 vhost: fix initialization
Exception handling is executed in the normal path and it will cause
vhost-user init failure.

Fixes: d6983a70e2 ("vhost: check return of pthread calls")

Reported-by: Lei Yao <lei.a.yao@intel.com>
Signed-off-by: Zhiyong Yang <zhiyong.yang@intel.com>
Tested-by: Lei Yao <lei.a.yao@intel.com>
Reviewed-by: Jens Freimann <jfreimann@redhat.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
2017-07-19 22:49:47 +03:00
Gaetan Rivet
39f403e0d5 devargs: restore device type API
Revert "devargs: make device types generic"

This commit broke the rte_devargs API by changing the meaning of
the rte_devtype enum.

Restore the previous API, unit tests and function calls.
Introduce parallel enum that acts as translation between previous API
and current structures.

Restoring the previous API means that -w and -b are not usable anymore
with any bus having implemented the "parse" operation. Only PCI devices
can be used with -w and -b, virtual devices are declared using vdev.

This (partially) reverts commit bd279a7936.

Signed-off-by: Gaetan Rivet <gaetan.rivet@6wind.com>
2017-07-20 00:40:28 +03:00
Gaetan Rivet
c0e2821041 bus: remove useless plug parameter
The prior scan should link the relevant rte_devargs to the newly
allocated rte_device. As such, it is useless to pass device arguments to
the plug callback. Those arguments are available within the devargs
field of the rte_device structure.

Fixes: 7c8810f43f ("bus: introduce device plug/unplug")
Fixes: 00e62aae69 ("bus/pci: implement plug/unplug operations")
Fixes: a3ee360f44 ("eal: add hotplug add/remove device")

Signed-off-by: Gaetan Rivet <gaetan.rivet@6wind.com>
2017-07-20 00:40:28 +03:00
Gaetan Rivet
cbc30ea872 bus/pci: fix hotplug operations
The device handle is already known and does not have to be infered from
the PCI address. The relevant helpers are already available within the
PCI bus to avoid searching for a handle already known.

Additionally, rte_memcpy.h was erroneously included.

Fixes: 00e62aae69 ("bus/pci: implement plug/unplug operations")

Signed-off-by: Gaetan Rivet <gaetan.rivet@6wind.com>
2017-07-20 00:40:28 +03:00
Gaetan Rivet
be860f4e4d bus/pci: fix generic driver pointer on probe error
The field is set but never resetted on error.
This marks the device as being attached while it is not, and forbid
further attempts to hotplug it.

Fixes: 7917d5f5ea ("pci: initialize generic driver pointer")
Cc: stable@dpdk.org

Signed-off-by: Gaetan Rivet <gaetan.rivet@6wind.com>
2017-07-20 00:40:28 +03:00
Gaetan Rivet
23eaa9059e bus/pci: use given name as generic name
When an application requests the use of a PCI device, it can currently
interchangeably use either the longform DomBDF format (0000:00:00.0) or
the shorter BDF format (00:00.0).

When a device is inserted via the hotplug API, it must first be scanned
and then will be identified by its name using `find_device`. The name of
the device must match the name given by the user to be found and then
probed.

A new function sets the expected name for a scanned PCI device. It was
previously generated from parsing the PCI address. This canonical name
is superseded when an rte_devargs exists describing the device. In such
case, the device takes the given name found within the rte_devargs.

As the rte_devargs is linked to the rte_pci_device during scanning, it
can be avoided during the probe. Additionally, this fixes the issue of
the rte_devargs lookup not being done within rte_pci_probe_one.

Fixes: beec692c51 ("eal: add name field to generic device")
Cc: stable@dpdk.org

Signed-off-by: Gaetan Rivet <gaetan.rivet@6wind.com>
2017-07-20 00:40:28 +03:00
Gaetan Rivet
7e8b266501 eal: fix hotplug add / remove
The hotplug API requires a few properties that were not previously
explicitly enforced:

  - Idempotency, two consecutive scans should result in the same state.
  - Upon returning, internal devices are now allocated and available
    through the new `find_device` operator, meaning that they should be
    identifiable.

The current rte_eal_hotplug_add implementation identifies devices by
their names, as it is readily available and easy to define.

The device name must be passed to the internal rte_device handle in
order to be available during scan, when it is then assigned to the
device. The current way of passing down this information from the device
declaration is through the global rte_devargs list.

Furthermore, the rte_device cannot take a bus-specific generated name,
as it is then not identifiable by the `find_device` operator. The device
must take the user-defined name. Ideally, an rte_device name should not
change during its existence.

This commit generates a new rte_devargs associated with the plugged
device and inserts it in the global rte_devargs list. It consequently
releases it upon device removal.

Fixes: a3ee360f44 ("eal: add hotplug add/remove device")

Signed-off-by: Gaetan Rivet <gaetan.rivet@6wind.com>
2017-07-20 00:40:28 +03:00
Gaetan Rivet
55744d83d5 devargs: introduce insert function
Some buses will operate either in whitelist or blacklist mode.
This mode is currently passed down by the rte_eal_devargs_add function
with the devtype argument.

When inserting devices using the hotplug API, the implicit assumption is
that this device is being whitelisted, meaning that it is explicitly
requested by the application to be used. This can conflict with the
initial bus configuration.

While the rte_eal_devargs_add API is being deprecated soon, it cannot
be modified at the moment to accommodate this situation.
As such, this new experimental API offers a bare interface for inserting
rte_devargs without directly manipulating the global rte_devargs list.

This new function expects a fully-formed rte_devargs, previously parsed
and allocated.

It does not check whether the new rte_devargs is compatible with current
bus configuration, but will replace any eventual existing one for the same
device, allowing the hotplug operation to proceed. i.e. a previously
blacklisted device can be redefined as being whitelisted.

Signed-off-by: Gaetan Rivet <gaetan.rivet@6wind.com>
2017-07-20 00:40:28 +03:00
Gaetan Rivet
275e70a426 devargs: introduce removal function
Hotplug support introduces the possibility of removing devices from the
system. Allocated resources must be freed.

Extend the rte_devargs API to allow freeing allocated resources.

This API is experimental and bound to change. It is currently designed
as a symetrical to rte_eal_devargs_add(), but the latter will evolve
shortly anyway.

Its DEVTYPE parameter is currently only used to specify scan policies,
and those will evolve in the next release. This evolution should
rationalize the rte_devargs API.

As such, the proposed API here is not the most convenient, but is
taylored to follow the current design and integrate easily with its main
use within rte_eal_hotplug_* functions.

Signed-off-by: Gaetan Rivet <gaetan.rivet@6wind.com>
2017-07-20 00:40:28 +03:00
Gaetan Rivet
925288bee3 bus/vdev: implement plug operation
This method must be implemented to allow using a unified, generic API to
hotplug devices, including virtual ones.

VDEV devices actually exist unattached after performing a scan on the
rte_devargs list. As such it makes sense to be able to perform a device
hotplug afterward.

Finally, missing this generic interface forces the EAL to be dependent
on vdev-specific API, which hinders the plan of moving the vdev bus to
drivers/bus.

Signed-off-by: Gaetan Rivet <gaetan.rivet@6wind.com>
2017-07-20 00:40:28 +03:00
Rami Rosen
501d4a65c8 jobstats: fix typo in doxygen comment
This patch fixes a trivial typo in rte_jobstats.h.

Signed-off-by: Rami Rosen <rami.rosen@intel.com>
2017-07-20 00:40:27 +03:00
Remy Horton
fa43ac7729 metrics: fix name string termination
The public API (struct rte_metric_name) includes the NULL terminator
byte in RTE_METRICS_MAX_NAME_LENGTH but the library itself internally
excludes it. This makes it possible for an application to receive an
unterminated name string. Fix be enforcing the NULL termination of all
name strings to the length that the public API expects.

Fixes: 349950ddb9 ("metrics: add information metrics library")
Cc: stable@dpdk.org

Signed-off-by: Remy Horton <remy.horton@intel.com>
2017-07-20 00:06:07 +03:00
Cian Ferriter
838d6b775b mbuf: fix VXLAN port in comment
IANA assigns a destination port of 4789 for the VXLAN in the Service
Name and Transport Protocol Port Number Registry. This is mentioned in
RFC 7348.

Fixes: f295a00a2b ("mbuf: add definitions of unified packet types")
Cc: stable@dpdk.org

Signed-off-by: Cian Ferriter <cian.ferriter@intel.com>
Acked-by: Olivier Matz <olivier.matz@6wind.com>
2017-07-19 09:17:35 +03:00
Harry van Haaren
7dbd7a6413 service: add -S corelist option
This commit allows the -S (captial 's') to be used to indicate
a corelist for Services. This is a "nice to have" patch, and does
not modify any of the service core functionality.

Suggested-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Suggested-by: Thomas Monjalon <thomas@monjalon.net>
Signed-off-by: Harry van Haaren <harry.van.haaren@intel.com>
2017-07-19 08:42:48 +03:00
Jerin Jacob
7146aa19ac ethdev: introduce lock-free Tx queue capability
Introducing the DEV_TX_OFFLOAD_MT_LOCKFREE TX capability flag.
if a PMD advertises DEV_TX_OFFLOAD_MT_LOCKFREE capable, multiple threads
can invoke rte_eth_tx_burst() concurrently on the same tx queue without
SW lock. This PMD feature will be useful in the following use cases and
found in the OCTEON family of NPUs.

1) Remove explicit spinlock in some applications where lcores
to TX queues are not mapped 1:1.
example: OVS has such instance
https://github.com/openvswitch/ovs/blob/master/lib/netdev-dpdk.c#L299
https://github.com/openvswitch/ovs/blob/master/lib/netdev-dpdk.c#L1859
See the the usage of tx_lock spinlock.

2) In the eventdev use case, avoid dedicating a separate TX core for
transmitting and thus enables more scaling as all workers can
send the packets.

Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com>
Acked-by: Santosh Shukla <santosh.shukla@caviumnetworks.com>
2017-07-18 15:32:55 +03:00
Harry van Haaren
25175fb2ab service: add coremask option -s
Add logic for parsing a coremask from EAL, which allows
the application to be unaware of the cores being taken from
its coremask.

Signed-off-by: Harry van Haaren <harry.van.haaren@intel.com>
Acked-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
2017-07-16 20:34:13 +02:00
Harry van Haaren
e398245008 service: initialize with EAL
This commit shows the changes required in rte_eal_init()
to transparently launch the service threads. The threads
are launched into the service worker functions here because
after rte_eal_init() the application is not gauranteed to
call any other DPDK API.

As the registration of services happens at initialization
time, the services that require CPU time are already available
when we reach the end of rte_eal_init().

Signed-off-by: Harry van Haaren <harry.van.haaren@intel.com>
Acked-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
2017-07-16 20:32:45 +02:00
Harry van Haaren
21698354c8 service: introduce service cores concept
Add header files, update .map files with new service
functions, and add the service header to the doxygen
for building.

This service header API allows DPDK to use services as
a concept of something that requires CPU cycles. An example
is a PMD that runs in software to schedule events, where a
hardware version exists that does not require a CPU.

Signed-off-by: Harry van Haaren <harry.van.haaren@intel.com>
Acked-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
2017-07-16 20:31:50 +02:00
Stephen Hemminger
d24b29d167 lib: remove duplicate includes
Include files only need to be refrenced once per file.

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
2017-07-16 17:30:06 +02:00
Thomas Monjalon
722de4c3e7 ethdev: fix build with gcc 5.4.0
Seen on Ubuntu 16.04 with GCC 5.4.0:

lib/librte_ether/rte_ethdev.c: In function 'get_mac_addr_index':
lib/librte_ether/rte_ethdev.c:2369:26: error:
'dev_info.max_mac_addrs' may be used uninitialized in this function

Indeed, rte_eth_dev_info_get() do not write into dev_info
if the port_id is not valid.
So we need to check the port_id and return in case of error.

This extra check should not be needed because the port_id is always
checked before calling get_mac_addr_index().
However it does not hurt.

Reported-by: Matan Azrad <matan@mellanox.com>
Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Tested-by: Matan Azrad <matan@mellanox.com>
2017-07-13 11:36:57 +02:00
Cristian Dumitrescu
5d109deffa ethdev: add traffic management API
This patch introduces the generic ethdev API for the traffic manager
capability, which includes: hierarchical scheduling, traffic shaping,
congestion management, packet marking.

Main features:
- Exposed as ethdev plugin capability (similar to rte_flow)
- Capability query API per port, per level and per node
- Scheduling algorithms: Strict Priority (SP), Weighed Fair Queuing (WFQ)
- Traffic shaping: single/dual rate, private (per node) and shared (by
  multiple nodes) shapers
- Congestion management for hierarchy leaf nodes: algorithms of tail drop,
  head drop, WRED; private (per node) and shared (by multiple nodes) WRED
  contexts
- Packet marking: IEEE 802.1q (VLAN DEI), IETF RFC 3168 (IPv4/IPv6 ECN for
  TCP and SCTP), IETF RFC 2597 (IPv4 / IPv6 DSCP)

Signed-off-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
Acked-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Acked-by: Balasubramanian Manoharan <balasubramanian.manoharan@caviumnetworks.com>
Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com>
2017-07-11 19:38:02 +02:00
Cristian Dumitrescu
530beded12 ethdev: add traffic management ops get API
The rte_flow feature breaks the monolithic approach for ethdev by
introducing the new rte_flow API to ethdev using a plugin-like approach.

Basically, the rte_flow API is still logically part of ethdev:
- It extends the ethdev functionality: rte_flow is a new feature/
  capability of ethdev;
- all its functions work on an Ethernet device: the first parameter of the
  rte_flow functions is Ethernet device port ID.

Also, the rte_flow API is a sort of capability plugin for ethdev:
- the rte_flow API functions have their own name space: they are called
  rte_flow_operationXYZ() as opposed to rte_eth_dev_flow_operationXYZ());
- the rte_flow API functions are placed in separate files in the same
  librte_ether folder as opposed to rte_ethdev.[hc].

The way it works is by using the existing ethdev API function
rte_eth_dev_filter_ctrl() to query the current Ethernet device port ID for
the support of the rte_flow capability and return the pointer to the
rte_flow operations when supported and NULL otherwise:

struct rte_flow_ops *eth_flow_ops;
int rte = rte_eth_dev_filter_ctrl(eth_port_id,
	RTE_ETH_FILTER_GENERIC, RTE_ETH_FILTER_GET, &eth_flow_ops);

This patch reuses the same approach for ethdev Traffic Management API.

Signed-off-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
Acked-by: Keith Wiles <keith.wiles@intel.com>
Acked-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com>
2017-07-11 19:16:39 +02:00
Pablo de Lara
f51fd44d64 cryptodev: fix build with icc
Removed unnecessary macro RTE_STD_C11, which is used
for unnamed structs.
Since there is no longer an unnamed structure in
rte_cryptodev_sym_session, this is not needed and
it is actually breaking compilation on icc:

lib/librte_cryptodev/rte_cryptodev.h(887): error: expected a declaration
  	__extension__ void *sess_private_data[0];
  	^
Fixes: 7c110ce7aa ("cryptodev: remove mempool from session")

Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Acked-by: Declan Doherty <declan.doherty@intel.com>
2017-07-12 14:40:40 +02:00
Jan Blunck
db2592be2f bus/vdev: allocate empty arguments string
Signed-off-by: Jan Blunck <jblunck@infradead.org>
Acked-by: Gaetan Rivet <gaetan.rivet@6wind.com>
2017-07-12 14:16:51 +02:00
Jan Blunck
48af1214f9 bus/vdev: use local bus reference
It isn't necessary to use rte_bus_find_by_name() to find a reference to
our own bus.

Signed-off-by: Jan Blunck <jblunck@infradead.org>
Acked-by: Gaetan Rivet <gaetan.rivet@6wind.com>
2017-07-12 14:16:17 +02:00
Jan Blunck
f671351752 bus/vdev: get name from embedded generic device
Instead of getting the name from the devargs lets take it from the
rte_device.

Signed-off-by: Jan Blunck <jblunck@infradead.org>
Acked-by: Gaetan Rivet <gaetan.rivet@6wind.com>
2017-07-12 14:15:44 +02:00
Shreyansh Jain
fcee050aa1 update NXP copyright headers
NXP Copyright has been wrongly worded with '(c)' at various places.
This patch removes these extra characters. It also removes
"All rights reserved".

Only NXP copyright syntax is changed. Freescale copyright is not
modified.

Signed-off-by: Shreyansh Jain <shreyansh.jain@nxp.com>
2017-07-10 12:26:40 +02:00
Jerin Jacob
c553139afa eal/armv7: emulate vaddvq u16 variant
vaddvq_u16() is not available for armv7.
Emulate the vaddvq_u16() using armv7 NEON intrinsics.

Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Acked-by: Jianbo Liu <jianbo.liu@linaro.org>
2017-07-10 09:37:42 +02:00
Thomas Monjalon
bdd7083174 version: 17.08-rc1
Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
2017-07-10 00:55:30 +02:00
Tom Barbette
e6d902be09 ethdev: document VMDq Rx configuration
From documentation it is very unclear how VMDq configuration can be
tweaked, and online search offer very poor results.

This patch will ultimately spawn an online documentation page
for the rte_eth_vmdq_rx_conf struct which will eventually add a bit of
documentation about the rx_mode tag and how to allow e.g. VMDq pools
to receive packets without VLAN tags.

Signed-off-by: Tom Barbette <tom.barbette@ulg.ac.be>
Acked-by: John McNamara <john.mcnamara@intel.com>
2017-07-10 00:46:38 +02:00
Gaetan Rivet
4188620d02 ethdev: save VLAN filter setting
In order to be able to replicate a configuration onto a second port,
device configuration should be fully described and available.
Other configuration items (i.e. MAC addresses) are stored within
rte_eth_dev_data, but not this one.

Signed-off-by: Gaetan Rivet <gaetan.rivet@6wind.com>
2017-07-10 00:46:38 +02:00
Rami Rosen
2cb89ccd0a bus: remove wrong doxygen for dump function
This trivial patch removes wrong comments about
the return value of the rte_bus_dump(), as
this method does not return any value
(it's return type is void)

Fixes: a97725791e ("bus: introduce bus abstraction")

Signed-off-by: Rami Rosen <rami.rosen@intel.com>
2017-07-10 00:46:38 +02:00