Commit Graph

6950 Commits

Author SHA1 Message Date
Qi Zhang
eac3ed949a net/i40e/base: add admin queue definitions for cloud filters
Add new admin queue definitions and extended fields for cloud
filter support. Define big buffer for extended general fields
in Add/Remove Cloud filters command.

Also rename i40e_aqc_add_remove_cloud_filters_element_data to
i40e_aq__cloud_filters_element_data.

Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
Acked-by: Beilei Xing <beilei.xing@intel.com>
2018-10-11 18:53:47 +02:00
Qi Zhang
413c157dde net/i40e/base: enable cloud filter mode for switch config
Add definitions for L4 filters and switch modes based on cloud filters
modes and extend the set switch config command to include the additional
cloud filter mode.

Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
Acked-by: Beilei Xing <beilei.xing@intel.com>
2018-10-11 18:53:47 +02:00
Qi Zhang
df935a8703 net/i40e/base: introduce PHY type bitmask
This patch introduces a helper macro define.

Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
Acked-by: Beilei Xing <beilei.xing@intel.com>
2018-10-11 18:53:47 +02:00
Qi Zhang
188d0bda2b net/i40e/base: fix partition id calculation for X722
This patch overwrites number of ports for X722 devices with support for
OCP PHY mezzanine. The old method with checking if port is disabled in
the PRTGEN_CNF register cannot be used in this case. When the OCP is
removed, ports were seen as disabled, which resulted in wrong calculation
of partition id, that caused WoL to be disabled on certain ports.

Fixes: 3c89193a36 ("i40e/base: support WOL config for X722")
Cc: stable@dpdk.org

Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
Acked-by: Beilei Xing <beilei.xing@intel.com>
2018-10-11 18:53:47 +02:00
Qi Zhang
547be3f01f net/i40e/base: replace license text with SPDX tag
Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
2018-10-11 18:53:47 +02:00
Qi Zhang
0a1b657838 net/i40e: fix send admin queue command before init
We should not issue Admin Queue command before Admin Queue is initialized.
But this happened in i40e_hw_init and i40e_filter_input_set_init.

The patch fixes the issue by proper reordering.

Fixes: b6a0ec4182 ("i40e: use AQ for Rx control register read/write")
Cc: stable@dpdk.org

Reported-by: Anand Rawat <anand.rawat@intel.com>
Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
Acked-by: Beilei Xing <beilei.xing@intel.com>
2018-10-11 18:53:47 +02:00
Thomas Monjalon
911462eb4a eal: simplify parameters of hotplug functions
All information about a device to probe can be grouped
in a common string, which is what we usually call devargs.
An application should not have to parse this string before
calling the EAL probe function.
And the syntax could evolve to be more complex and support
matching multiple devices in one string.
That's why the bus name and device name should be removed from
rte_eal_hotplug_add().
Instead of changing this function, a simpler one is added
and used in the old one, which may be deprecated later.

When removing a device, we already know its rte_device handle
which can be directly passed as parameter of rte_eal_hotplug_remove().
If the rte_device is not known, it can be retrieved with the devargs,
by iterating in the device list (future RTE_DEV_FOREACH()).
Similarly to the probing case, a new function is added
and used in the old one, which may be deprecated later.
The new function is used in failsafe, because the replacement is easy.

Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Reviewed-by: Andrew Rybchenko <arybchenko@solarflare.com>
Acked-by: Gaetan Rivet <gaetan.rivet@6wind.com>
Reviewed-by: Stephen Hemminger <stephen@networkplumber.org>
2018-10-11 14:09:24 +02:00
Thomas Monjalon
6844d146ff eal: add bus pointer in device structure
When a device is added with a devargs (hotplug or whitelist),
the bus pointer can be retrieved via its devargs.
But there is no such devargs.bus in case of standard scan.

A pointer to the rte_bus handle is added to rte_device.
When a device is allocated (during a scan),
the pointer to its bus is assigned.

It will make possible to remove a rte_device,
using the function pointer from its bus.

The function rte_bus_find_by_device() becomes useless,
and may be removed later.

Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Acked-by: Gaetan Rivet <gaetan.rivet@6wind.com>
Reviewed-by: Stephen Hemminger <stephen@networkplumber.org>
2018-10-11 14:09:24 +02:00
Thomas Monjalon
2effa126fb devargs: simplify parameters of removal function
The function rte_devargs_remove(), which is intended to be internal,
can take a devargs structure as argument.
The matching is still using string comparison of bus name and
device name.
It is simpler and may allow a different devargs matching in future.

Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Reviewed-by: Andrew Rybchenko <arybchenko@solarflare.com>
Acked-by: Gaetan Rivet <gaetan.rivet@6wind.com>
Reviewed-by: Stephen Hemminger <stephen@networkplumber.org>
2018-10-11 14:09:24 +02:00
Thomas Monjalon
3f7a40c670 devargs: rename enum items with singular form
The enum names are *_params (plural form).
And the items are also using the plural form: *_PARAMS_*.
It looks more natural to use the singular form *_PARAM_* for items.

Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Reviewed-by: Andrew Rybchenko <arybchenko@solarflare.com>
2018-10-11 13:57:29 +02:00
Thomas Monjalon
4e7a69c9d9 bus/pci: rename devargs parameter id to addr
We could match devices by their PCI id (vendor id, device id, etc).
But for now, only matching by PCI address is implemented.
The devargs parameter "id" is renamed "addr" to reflect its real meaning.

Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Reviewed-by: Andrew Rybchenko <arybchenko@solarflare.com>
2018-10-11 13:57:29 +02:00
Anatoly Burakov
f32c7c9de9 malloc: enable event callbacks for external memory
When adding or removing external memory from the memory map, there
may be actions that need to be taken on account of this memory (e.g.
DMA mapping). Add support for triggering callbacks when adding,
removing, attaching or detaching external memory.

Some memory event callback handlers will need additional logic to
handle external memory regions. For example, virtio callback has to
completely ignore externally allocated memory, because there is no
way to find file descriptors backing the memory address in a
generic fashion. All other callbacks have also been adjusted to
handle RTE_BAD_IOVA as IOVA address, as this is one of the expected
use cases for external memory support.

Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
2018-10-11 11:56:55 +02:00
Anatoly Burakov
5282bb1c36 mem: allow memseg lists to be marked as external
When we allocate and use DPDK memory, we need to be able to
differentiate between DPDK hugepage segments and segments that
were made part of DPDK but are externally allocated. Add such
a property to memseg lists.

This breaks the ABI, so document the change in release notes.
This also breaks a few internal assumptions about memory
contiguousness, so adjust malloc code in a few places.

All current calls for memseg walk functions were adjusted to
ignore external segments where it made sense.

Mempools is a special case, because we may be asked to allocate
a mempool on a specific socket, and we need to ignore all page
sizes on other heaps or other sockets. Previously, this
assumption of knowing all page sizes was not a problem, but it
will be now, so we have to match socket ID with page size when
calculating minimum page size for a mempool.

Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
Acked-by: Andrew Rybchenko <arybchenko@solarflare.com>
Acked-by: Yongseok Koh <yskoh@mellanox.com>
2018-10-11 10:24:29 +02:00
Anatoly Burakov
4104b2a485 mem: add length to memseg list
Previously, to calculate length of memory area covered by a memseg
list, we would've needed to multiply page size by length of fbarray
backing that memseg list. This is not obvious and unnecessarily
low level, so store length in the memseg list itself.

This breaks ABI, so bump the EAL ABI version and document the
change. Also, while we're breaking ABI, pack the members a little
better.

Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
Acked-by: Shreyansh Jain <shreyansh.jain@nxp.com>
2018-10-11 10:24:16 +02:00
Xiao Wang
5f73c2670f net/ifc: fix build with Linux < 3.19
The typedef of "__virtio16" is introduced into Linux kernel in v3.19.
To prevent build error on old kernel, this patch replaces the
"__virtio" usage with "uint16_t".

Fixes: d7fe5a2861 ("net/ifc: support live migration")

Signed-off-by: Xiao Wang <xiao.w.wang@intel.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
2018-10-09 01:58:56 +02:00
Hemant Agrawal
77b5311d0e event/dpaa: support select based event
This patch add support to use select call with qman portal fd
for timeout based dequeue request for eventdev.

If there is a event available qman portal fd will be set
and the function will be awakened. If no event is available,
it will only wait till the given timeout value.

In case of interrupt the timeout ticks are used as usecs.

Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
2018-10-04 16:38:54 +02:00
Hemant Agrawal
e7bbddb846 event/dpaa: remove duplicate log macros
align and cleanup the debug log prints

Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
2018-10-04 16:38:54 +02:00
Mattias Rönnblom
85046e4ee9 event/dsw: fix build with icc
Make the -Wno-format-nonliteral flag conditional, and only set in
clang and gcc builds, since this flag is not supported (nor needed)
when building dsw with icc.

Fixes: 46a186b1f0 ("event/dsw: add device registration and build system")

Signed-off-by: Mattias Rönnblom <mattias.ronnblom@ericsson.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
2018-10-04 16:17:07 +02:00
Anatoly Burakov
03ba15ca65 vfio: allow mapping MSI-X BARs if kernel allows it
Currently, DPDK will skip mapping some areas (or even an entire BAR)
if MSI-X table happens to be in them but is smaller than page size.

Kernels 4.16+ will allow mapping MSI-X BARs [1], and will report this
as a capability flag. Capability flags themselves are also only
supported since kernel 4.6 [2].

This commit will introduce support for checking VFIO capabilities,
and will use it to check if we are allowed to map BARs with MSI-X
tables in them, along with backwards compatibility for older
kernels, including a workaround for a variable rename in VFIO
region info structure [3].

[1] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/
linux.git/commit/?id=a32295c612c57990d17fb0f41e7134394b2f35f6

[2] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/
linux.git/commit/?id=c84982adb23bcf3b99b79ca33527cd2625fbe279

[3] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/
linux.git/commit/?id=ff63eb638d63b95e489f976428f1df01391e15e4

Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
2018-10-04 00:45:50 +02:00
Gaetan Rivet
ac91bc493c bus/vdev: implement device iteration
Signed-off-by: Gaetan Rivet <gaetan.rivet@6wind.com>
2018-10-03 14:22:39 +02:00
Gaetan Rivet
4410c1b0c0 bus/pci: add iteration filter on address
The PCI bus can now parse a matching field "id" as follows:

   "bus=pci,id=0000:00:00.0"

           or

   "bus=pci,id=00:00.0"

Signed-off-by: Gaetan Rivet <gaetan.rivet@6wind.com>
2018-10-03 14:20:07 +02:00
Gaetan Rivet
46521ca27b bus/pci: implement device iteration
Signed-off-by: Gaetan Rivet <gaetan.rivet@6wind.com>
2018-10-03 14:19:58 +02:00
Pavan Nikhilesh
1dedffeba7 event/octeontx: support Tx adapter
Add Tx adapter support and move few routines around to avoid code
duplication.

Signed-off-by: Pavan Nikhilesh <pbhagavatula@caviumnetworks.com>
Acked-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
2018-10-01 16:52:07 +02:00
Harry van Haaren
1638261a69 event/sw: add unit test for unlinks in progress
This commit adds a unit test that checks the behaviour
of the unlinks_in_progress() function, ensuring that the
returned values are the number of unlinks requested,
until the scheduler runs and "acks" the requests, after
which the count should be zero again.

Signed-off-by: Harry van Haaren <harry.van.haaren@intel.com>
2018-10-01 16:49:10 +02:00
Harry van Haaren
bd5ac24fea event/sw: implement unlinks in progress function
This commit adds a counter to each port, which counts the
number of unlinks that have been performed. When the scheduler
thread starts its scheduling routine, it "acks" all unlinks that
have been requested, and the application is gauranteed that no
more events will be scheduled to the port from the unlinked queue.

Signed-off-by: Harry van Haaren <harry.van.haaren@intel.com>
2018-10-01 16:48:57 +02:00
Harry van Haaren
733fc6ca0b event/sw: fix cq index check for unlink usecases
This commit fixes the cq index checks when unlinking
ports/queues while the scheduler core is running.
Previously, the == comparison could be "skipped" if
in particular corner cases. With the check being changed
to >= this is resolved as the cq idx gets reset to zero.

Bugzilla ID: 60
Fixes: 617995dfc5 ("event/sw: add scheduling logic")
Cc: stable@dpdk.org

Suggested-by: Matias Elo <matias.elo@nokia.com>
Signed-off-by: Harry van Haaren <harry.van.haaren@intel.com>
2018-10-01 16:48:24 +02:00
Hemant Agrawal
4ab57b042e event/dpaa2: affine portal at runtime during I/O
This patch restructure the code to have the QBMAN portal
affliated at run time for per lcore basis.
The device cleanup is also improved.

Signed-off-by: Sunil Kumar Kori <sunil.kori@nxp.com>
Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
2018-10-01 16:47:41 +02:00
Hemant Agrawal
9943f56e35 event/dpaa2: support max event port value
dev_info->max_event_ports shall be number of available cores.

Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
2018-10-01 16:47:27 +02:00
Hemant Agrawal
5d024f0f86 event/dpaa2: enchance timeout handling
This patch enhances:
1. Configure the dequeue time out value as per the given
method or per dequeue, global or default.
2. The timeout values were being mixed as ns or ms timeouts,
Now the values are stored as ns and scale is in ms.

Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
2018-10-01 16:47:12 +02:00
Hemant Agrawal
047188552b event/dpaa2: rename info structure
This is to keep the dpaa2 driver aligned with dpaa driver.

Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
2018-10-01 16:46:57 +02:00
Hemant Agrawal
be0c42bfa8 event/dpaa2: fix mbuf assignment in atomic processing
Fixes: 7b6edb640b ("event/dpaa2: have separate structure to hold dqrr entries")
Cc: stable@dpdk.org

Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
2018-10-01 16:46:43 +02:00
Mattias Rönnblom
f3c5899bb9 event/dsw: implement xstats counters
The DSW event device now implements the 'xstats' interface and a
number of port- and device-level counters.

Signed-off-by: Mattias Rönnblom <mattias.ronnblom@ericsson.com>
2018-10-01 16:46:17 +02:00
Mattias Rönnblom
4ba0dcaa42 event/dsw: sort events on dequeue
With this patch, the DSW event device will (optionally) sort the event
burst before giving it to the application. The sorting will primarily
be on queue id, and secondary on flow id.

The sorting is an attempt to optimize data and instruction cache usage
for the application, at the cost of additional event device overhead.

Signed-off-by: Mattias Rönnblom <mattias.ronnblom@ericsson.com>
2018-10-01 16:46:03 +02:00
Mattias Rönnblom
f6257b22e7 event/dsw: add load balancing
The DSW event device will now attempt to migrate (move) flows between
ports in order to balance the load.

Signed-off-by: Mattias Rönnblom <mattias.ronnblom@ericsson.com>
2018-10-01 16:45:50 +02:00
Mattias Rönnblom
2b7bc6a5b2 event/dsw: add port load measurements
The DSW event device port now attempts to estimate its load (i.e. how
busy it is). This is required for load balancing to work (although
load balancing is not included in this patch), and may also be useful
for debugging purposes.

Signed-off-by: Mattias Rönnblom <mattias.ronnblom@ericsson.com>
2018-10-01 16:45:37 +02:00
Mattias Rönnblom
1c8e3caa3b event/dsw: add event scheduling and device start/stop
With this patch, the DSW event device can be started and stopped,
and also supports scheduling events between ports.

Signed-off-by: Mattias Rönnblom <mattias.ronnblom@ericsson.com>
Acked-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
2018-10-01 16:45:23 +02:00
Mattias Rönnblom
0cb8b0a03e event/dsw: support linking/unlinking ports
Added support for linking and unlinking ports to queues in a DSW event
device.

Signed-off-by: Mattias Rönnblom <mattias.ronnblom@ericsson.com>
Acked-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
2018-10-01 16:45:10 +02:00
Mattias Rönnblom
236acd0dc5 event/dsw: add port configuration
Allow port setup and release in the DSW event device.

Signed-off-by: Mattias Rönnblom <mattias.ronnblom@ericsson.com>
Acked-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
2018-10-01 16:44:56 +02:00
Mattias Rönnblom
4540ee9c68 event/dsw: add device and queue configuration
Allow queue- and device-level configuration for and retrieval of
contextual information from a DSW event device.

Signed-off-by: Mattias Rönnblom <mattias.ronnblom@ericsson.com>
Acked-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
2018-10-01 16:44:42 +02:00
Mattias Rönnblom
46a186b1f0 event/dsw: add device registration and build system
This patch contains the Meson and GNU Make build system extensions
required for the Distributed Event Device, and also the initialization
code for the driver itself.

Signed-off-by: Mattias Rönnblom <mattias.ronnblom@ericsson.com>
Acked-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
2018-10-01 16:44:14 +02:00
Fiona Trahe
78c5ea9132 compress/qat: remove unnecessary assignment
Same variable was assigned twice, remove one.

Fixes: 6a7ea14819 ("compress/qat: add xform processing")
Cc: stable@dpdk.org

Signed-off-by: Fiona Trahe <fiona.trahe@intel.com>
Acked-by: Tomasz Jozwiak <tomaszx.jozwiak@intel.com>
2018-09-27 13:40:22 +02:00
Fiona Trahe
7586c57873 compress/qat: fix checksum on decompression
Checksum was always 0 on QAT decompression due to
incorrect use of union variable.

Fixes: 6a7ea14819 ("compress/qat: add xform processing")
Cc: stable@dpdk.org

Signed-off-by: Fiona Trahe <fiona.trahe@intel.com>
Acked-by: Tomasz Jozwiak <tomaszx.jozwiak@intel.com>
2018-09-27 13:40:22 +02:00
Hemant Agrawal
05b12700cd crypto/dpaa_sec: support null algos for protocol offload
NULL cipher and NULL auth support is added.

Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
Acked-by: Akhil Goyal <akhil.goyal@nxp.com>
2018-09-26 13:18:38 +02:00
Hemant Agrawal
e117c18a1d crypto/dpaa2_sec: restructure session management
Code for session create is restructured to make scalable to
support different algorithms.

Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
Acked-by: Akhil Goyal <akhil.goyal@nxp.com>
2018-09-26 13:18:38 +02:00
Hemant Agrawal
547a4d40e7 crypto/dpaa2_sec: support out of place protocol offload
OOP support for look aside protocol support is added.

Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
Acked-by: Akhil Goyal <akhil.goyal@nxp.com>
2018-09-26 13:18:38 +02:00
Akhil Goyal
db60e550d5 crypto/dpaa2_sec: enable sequence no rollover
With this patch sequence number will be rolled over and
SEC block will ignore the sequence number overflow error.

Signed-off-by: Akhil Goyal <akhil.goyal@nxp.com>
2018-09-26 13:18:38 +02:00
Akhil Goyal
79fde9d00c crypto/dpaa_sec: enable sequence no rollover
With this patch sequence number will be rolled over and
SEC block will ignore the sequence number overflow error.

Signed-off-by: Akhil Goyal <akhil.goyal@nxp.com>
2018-09-26 13:18:38 +02:00
Hemant Agrawal
551a42a993 crypto/dpaa_sec: reduce number of qp per device
In dpaa_sec, there are unlimited queues, but in order
to match the DPDK handling of queue pairs, rx side queues
are still unlimited, but the application will see only limited
qp (tx queues) from dpaa_sec hw.

Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
Acked-by: Akhil Goyal <akhil.goyal@nxp.com>
2018-09-26 13:18:38 +02:00
Akhil Goyal
9198b2c227 crypto/dpaa_sec: do not attach session for non-matching qp
if session->qp != qp to be enqueued, it should show an error and
not try to re-attach another qp.

Signed-off-by: Akhil Goyal <akhil.goyal@nxp.com>
2018-09-26 13:18:38 +02:00
Akhil Goyal
3b617ee775 crypto/dpaa_sec: add lock before Rx HW queue attach
This is to safeguard as the session config can be done from multi-threads.

Signed-off-by: Akhil Goyal <akhil.goyal@nxp.com>
2018-09-26 13:18:38 +02:00
Akhil Goyal
b0894102cb crypto/dpaa: reset session before init
Signed-off-by: Akhil Goyal <akhil.goyal@nxp.com>
2018-09-26 13:20:26 +02:00
Hemant Agrawal
3373a36ba7 crypto/dpaa: update the flib RTA
hw flib code is updated as per the latest set of APIs and macros

Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
Acked-by: Akhil Goyal <akhil.goyal@nxp.com>
2018-09-26 13:18:38 +02:00
Pablo de Lara
ceb8639387 crypto/aesni_gcm: support all truncated digest sizes
The full digest size of GCM/GMAC algorithms is 16 bytes.
However, it is sometimes truncated to a smaller size (such as in IPSec).
This commit allows a user to generate a digest of any size
up to the full size.

Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Acked-by: Marko Kovacevic <marko.kovacevic@intel.com>
2018-09-26 12:43:57 +02:00
Pablo de Lara
c7c29f1058 crypto/aesni_gcm: remove unneeded J0 calculation
When IV size is 12, padding to 16 bytes is required
and the LSB must be set to 1, according to the spec.
However, the Multi-buffer library is already doing this,
so it is not necessary to do it in the PMD.

Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Acked-by: Marko Kovacevic <marko.kovacevic@intel.com>
2018-09-26 12:43:57 +02:00
Pablo de Lara
d0fe8c48a4 crypto/aesni_mb: support large HMAC key sizes
Add support for SHAx-HMAC key sizes larger than the block size.
For these sizes, the input key is digested with the non-HMAC
version of the algorithm and used as the key.

Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Acked-by: Marko Kovacevic <marko.kovacevic@intel.com>
2018-09-26 12:45:13 +02:00
Pablo de Lara
035ecca5ea crypto/aesni_mb: support all truncated CMAC digest sizes
The full digest size of CMAC algorithm is 16 bytes.
However, it is sometimes truncated to a smaller size (such as in IPSec).
This commit allows a user to generate a digest of any size
up to the full size.

Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Acked-by: Marko Kovacevic <marko.kovacevic@intel.com>
2018-09-26 12:45:05 +02:00
Pablo de Lara
16a3558e0b crypto/aesni_mb: fix truncated digest size for CMAC
The truncated digest size for AES-CMAC is 12 and not 16,
as the Multi-buffer library can output both 12 and 16 bytes.

Fixes: 6491dbbece ("crypto/aesni_mb: support AES CMAC")
Cc: stable@dpdk.org

Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Acked-by: Marko Kovacevic <marko.kovacevic@intel.com>
2018-09-26 12:44:57 +02:00
Pablo de Lara
c4c0c312a8 crypto/aesni_mb: check for invalid digest size
When creating a crypto session, check if
ther requested digest size is supported for
AES-XCBC-MAC and AES-CCM.

Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Acked-by: Marko Kovacevic <marko.kovacevic@intel.com>
2018-09-26 12:44:51 +02:00
Pablo de Lara
763c24917d crypto/aesni_mb: support all truncated HMAC digest sizes
HMAC algorithms (MD5 and SHAx) have different full digest sizes.
However, they are often truncated to a smaller size (such as in IPSec).
This commit allows a user to generate a digest of any size
up to the full size.

Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Acked-by: Marko Kovacevic <marko.kovacevic@intel.com>
2018-09-26 12:43:57 +02:00
Pablo de Lara
95978a85a4 crypto/aesni_mb: fix possible array overrun
In order to process crypto operations in the AESNI MB PMD,
they need to be sent to the buffer manager of the Multi-buffer library,
through the "job" structure.

Currently, it is checked if there are outstanding operations to process
in the ring, before getting a new job. However, if there are no available
jobs in the manager, a flush operation needs to take place, freeing some
of the jobs, so it can be used for the outstanding operation.

In order to avoid leaving the dequeued operation without being processed,
the maximum number of operations that can be flushed is the remaining
operations to return, which is the maximum number of operations that can
be return minus the number of operations ready to be returned
(nb_ops - processed_jobs), minus 1 (for the new operation).

The problem comes when (nb_ops - processed_jobs) is 1 (last operation to
dequeue). In that case, flush_mb_mgr is called with maximum number of
operations equal to 0, which is wrong, causing a potential overrun in the
"ops" array.
Besides, the operation dequeued from the ring will be leaked, as no more
operations can be returned.

The solution is to first check if there are jobs available in the manager.
If there are not, flush operation gets called, and if enough operations
are returned from the manager, then no more outstanding operations get
dequeued from the ring, avoiding both the memory leak and the array
overrun.
If there are enough jobs, PMD tries to dequeue an operation from the ring.
If there are no operations in the ring, the new job pointer is not used,
and it will be used in the next get_next_job call, so no memory leak
happens.

Fixes: 0f548b50a1 ("crypto/aesni_mb: process crypto op on dequeue")
Cc: stable@dpdk.org

Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
2018-09-25 17:57:25 +02:00
Radu Nicolau
7486331308 net/bonding: stop and deactivate slaves on stop
When a bonding port is stopped also stop and deactivate all slaves.
Otherwise slaves will be still listed as active.

Fixes: 2efb58cbab ("bond: new link bonding library")
Cc: stable@dpdk.org

Signed-off-by: Radu Nicolau <radu.nicolau@intel.com>
Acked-by: Declan Doherty <declan.doherty@intel.com>
2018-09-28 13:59:05 +02:00
Damjan Marion
3c4c76cf17 net/i40e: fix 25G AOC and ACC cable detection on XXV710
Fixes: 75d133dd32 ("net/i40e: enable 25G device")
Cc: stable@dpdk.org

Signed-off-by: Damjan Marion <damarion@cisco.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
2018-09-28 01:41:03 +02:00
Beilei Xing
fa6475b606 net/i40e: remove keeping CRC configuration for VF
Remove keeping CRC configuration since it's not
supported by i40e VF.

Signed-off-by: Beilei Xing <beilei.xing@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
2018-09-28 01:41:03 +02:00
Tiwei Bie
66908eff12 net/virtio: add missing supported features
The virtio features VIRTIO_NET_F_CSUM, VIRTIO_NET_F_HOST_TSO4
and VIRTIO_NET_F_HOST_TSO6 are supported by the virtio PMD.
But they are missing in the supported feature set. And since
below commit:

commit 4174a7b59d ("net/virtio: improve Tx offload features negotiation")

Virtio PMD will announce the Tx offloading capabilities based
on the features read from the device. And virtio-user won't
report the features which are not in virtio-PMD's supported
feature set. So since that commit, virtio-user won't announce
the DEV_TX_OFFLOAD_UDP_CKSUM, DEV_TX_OFFLOAD_TCP_CKSUM and
DEV_TX_OFFLOAD_TCP_TSO offloading capabilities even if the
vhost backend supports them.

This patch adds these missing features, and virtio-user will
report them if the backend supports them.

Fixes: 142678d429 ("net/virtio-user: fix wrongly get/set features")
Cc: stable@dpdk.org

Signed-off-by: Tiwei Bie <tiwei.bie@intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
2018-09-28 01:41:03 +02:00
Tiwei Bie
21b90f790a net/virtio-user: fix multiple queue for vhost-kernel
The multiple queue support in vhost-kernel is broken because
the dev->vhostfd is only available for vhost-user. We should
always try to enable queue pairs when it's not in server mode.

Fixes: 201a416517 ("net/virtio-user: fix multiple queues fail in server mode")
Cc: stable@dpdk.org

Signed-off-by: Tiwei Bie <tiwei.bie@intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
2018-09-28 01:41:03 +02:00
Beilei Xing
98ff88b3c4 net/avf: remove keeping CRC configuration
Remove keeping CRC configuration as it's not supported by AVF.

Fixes: 5ce4c2be1a ("net/avf: fix offload capabilities")
Cc: stable@dpdk.org

Signed-off-by: Beilei Xing <beilei.xing@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
2018-09-28 01:41:03 +02:00
Zyta Szpak
9e79d81091 net/mvpp2: support Tx scatter/gather
The patch introduces scatter/gather support on transmit path.
A separate Tx callback is added and set if the application
requests multisegment Tx offload. Multiple descriptors are
sent per one packet.

Signed-off-by: Zyta Szpak <zyta.szpak@semihalf.com>
Signed-off-by: Natalie Samsonov <nsamsono@marvell.com>
Reviewed-by: Yelena Krivosheev <yelena@marvell.com>
2018-09-28 01:41:03 +02:00
Tomasz Duszynski
e04ec42af0 net/mvpp2: align with MUSDK 18.09
This patch introduces necessary changes required by MUSDK 18.09 library.

* As of MUSDK 18.09, pp2_cookie_t is no longer available. Now
  RX descriptor cookie is defined as plain u64 so existing cast
  is no longer valid.

* MUSDK 18.09 increased number of available bpools (buffer hw pools) by
  introducing dma regions support. Update mvpp2 driver accordingly.

* replace MV_NET_IP4_F_TOS with MV_NET_IP4_F_DSCP

  Before this patch, API allowed to configure a classification rule
  according to IPv4 TOS, which was not supported in classifier. This patch
  fixes this by using proper field.

* use 48 bit address mask

  We cannot get pointers exceeding 48 bits thus using 48 bit
  mask for extracting higher IOVA address bits is enough.

Signed-off-by: Natalie Samsonov <nsamsono@marvell.com>
Signed-off-by: Yuval Caduri <cyuval@marvell.com>
Signed-off-by: Tomasz Duszynski <tdu@semihalf.com>
Reviewed-by: Shlomi Gridish <sgridish@marvell.com>
Reviewed-by: Alan Winkowski <walan@marvell.com>
Reviewed-by: Liron Himi <lironh@marvell.com>
2018-09-28 01:41:03 +02:00
Natalie Samsonov
79ec62028b net/mvpp2: update MTU and MRU related calculations
This commit updates MTU and MRU related calculations.

Signed-off-by: Natalie Samsonov <nsamsono@marvell.com>
Reviewed-by: Yelena Krivosheev <yelena@marvell.com>
Reviewed-by: Dmitri Epshtein <dima@marvell.com>
2018-09-28 01:41:03 +02:00
Yuval Caduri
406aeb1524 net/mvpp2: detach Tx QoS from Rx cls/QoS config
Functional change:
Open receive cls/qos related features, only if the
config file contains an rx_related configuration entry.
This allows to configure tx_related entries, w/o unintentionally
opening rx cls/qos.

Code:
'use_global_defaults' is by default set to '1'.
Only if an rx_related entry was configured, it is updated to '0'.
rx cls/qos is performed only if 'use_global_defaults' is '0'.
Default TC configuration is now only mandatory when
'use_global_defaults' is '0'.

Signed-off-by: Yuval Caduri <cyuval@marvell.com>
Reviewed-by: Natalie Samsonov <nsamsono@marvell.com>
Tested-by: Natalie Samsonov <nsamsono@marvell.com>
2018-09-28 01:41:03 +02:00
Tomasz Duszynski
429c394417 net/mvpp2: support traffic manager
Add traffic manager support.

Signed-off-by: Tomasz Duszynski <tdu@semihalf.com>
Signed-off-by: Natalie Samsonov <nsamsono@marvell.com>
Reviewed-by: Liron Himi <lironh@marvell.com>
2018-09-28 01:41:03 +02:00
Tomasz Duszynski
a1f83becf9 net/mvpp2: add init and deinit to flow
Add init and deinit functionality to flow implementation.

Init puts structures used by flow in a sane sate.
Deinit deallocates all resources used by flow.

Signed-off-by: Tomasz Duszynski <tdu@semihalf.com>
Signed-off-by: Natalie Samsonov <nsamsono@marvell.com>
Reviewed-by: Liron Himi <lironh@marvell.com>
Reviewed-by: Shlomi Gridish <sgridish@marvell.com>
2018-09-28 01:41:03 +02:00
Tomasz Duszynski
e97d88740a net/mvpp2: change default policer configuration
Change QoS configuration file syntax for port's default policer
setup.

Since default policer configuration is performed before
any other policer configuration we can pick a default id.

This simplifies default policer configuration since user
no longer has to choose ids from range [0, PP2_CLS_PLCR_NUM].

Explicitly document values for rate_limit_enable field.

Signed-off-by: Tomasz Duszynski <tdu@semihalf.com>
Signed-off-by: Natalie Samsonov <nsamsono@marvell.com>
Reviewed-by: Liron Himi <lironh@marvell.com>
2018-09-28 01:41:03 +02:00
Tomasz Duszynski
cdb53f8da6 net/mvpp2: support metering
Add support for configuring plcr via DPDK generic metering API.

Signed-off-by: Tomasz Duszynski <tdu@semihalf.com>
Signed-off-by: Natalie Samsonov <nsamsono@marvell.com>
Reviewed-by: Liron Himi <lironh@marvell.com>
2018-09-28 01:41:03 +02:00
Tomasz Duszynski
fad0cfe030 net/mvpp2: move common code
Cleanup sources by moving common code to the pmd
header file.

Signed-off-by: Tomasz Duszynski <tdu@semihalf.com>
Signed-off-by: Natalie Samsonov <nsamsono@marvell.com>
Reviewed-by: Liron Himi <lironh@marvell.com>
2018-09-28 01:41:03 +02:00
Natalie Samsonov
5997b0a827 net/mvpp2: initialize ppio only once
This changes stop/start/configure behavior due to issue in MUSDK
library itself.  From now on, ppio can be reconfigured only after interface
is closed.

Signed-off-by: Natalie Samsonov <nsamsono@marvell.com>
Reviewed-by: Yuval Caduri <cyuval@marvell.com>
2018-09-28 01:41:03 +02:00
Ivan Malov
7a0665940f net/bonding: inherit descriptor limits from slaves
Descriptor limits are used by applications to take
optimal decisions on queue sizing.

Signed-off-by: Ivan Malov <ivan.malov@oktetlabs.ru>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Acked-by: Chas Williams <chas3@att.com>
2018-09-28 01:41:03 +02:00
Ivan Malov
f5f93e106e net/bonding: provide default Rx/Tx configuration
Default Rx/Tx configuration has become a helpful
resource for applications relying on the optimal
values to make rte_eth_rxconf and rte_eth_txconf
structures. These structures can then be tweaked.

Default configuration is also used internally by
rte_eth_rx_queue_setup or rte_eth_tx_queue_setup
API calls when NULL pointer is passed by callers
with the argument for custom queue configuration.

The use cases of bonding driver may also benefit
from exercising default settings in the same way.

Restructure the code to collect various settings
from slave ports and make it possible to combine
default Rx/Tx configuration of these devices and
report it to the callers of rte_eth_dev_info_get.

Signed-off-by: Ivan Malov <ivan.malov@oktetlabs.ru>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Acked-by: Chas Williams <chas3@att.com>
2018-09-28 01:41:03 +02:00
Rahul Lakkireddy
0f3ff2445d net/cxgbe: announce Rx scatter offload
Scatter Rx is already supported by CXGBE PMD. So, add the missing
DEV_RX_OFFLOAD_SCATTER flag to the list of supported Rx offload
features.

Also, move the macros for supported list of offload features to
header file.

Fixes: 436125e641 ("net/cxgbe: update to Rx/Tx offload API")
Cc: stable@dpdk.org

Reported-by: Martin Weiser <martin.weiser@allegro-packets.com>
Signed-off-by: Rahul Lakkireddy <rahul.lakkireddy@chelsio.com>
2018-09-28 01:41:03 +02:00
Richard Houldsworth
c4084fb3d0 net/sfc/base: use transceiver ID when reading info
In efx_mcdi_phy_module_get_info() probe the
transceiver identification byte rather than assume
the module matches the fixed port type.  This
supports scenarios such as a SFP mounted in a QSFP
port via a QSA module.

Signed-off-by: Richard Houldsworth <rhouldsworth@solarflare.com>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
2018-09-28 01:41:03 +02:00
Richard Houldsworth
f8683231c9 net/sfc/base: add accessor to whole link status
Add a function which makes an MCDI GET_LINK request and
packages up the results. Currently, the get-link function
is triggered from several entry points which then pass
on or store selected parts of the data. When the driver
needs to obtain the current link state, it is more
efficient to do this in a single call.

Signed-off-by: Richard Houldsworth <rhouldsworth@solarflare.com>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
2018-09-28 01:41:03 +02:00
Tom Millington
161c9ab395 net/sfc/base: guard Rx scale code with corresponding option
Previously only some of the code was guarded by this which caused
a build error when EFSYS_OPT_RX_SCALE is 0 (e.g. in manftest).

Signed-off-by: Tom Millington <tmillington@solarflare.com>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
2018-09-28 01:41:03 +02:00
Richard Houldsworth
0c9c1d9ec9 net/sfc/base: infer port mode bandwidth from max link speed
Limit the port mode bandwidth calculations by the maximum
reported link speed. This system detects 25G vs 10G cards,
and 100G port modes vs 40G.

Signed-off-by: Richard Houldsworth <rhouldsworth@solarflare.com>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
2018-09-28 01:41:03 +02:00
Richard Houldsworth
ac664071e7 net/sfc/base: support improvements to bandwidth calculations
Change the interface to ef10_nic_get_port_mode_bandwidth()
so more NIC information can be used to infer bandwidth
requirements. Huntington calculations separated out
completely.

Signed-off-by: Richard Houldsworth <rhouldsworth@solarflare.com>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
2018-09-28 01:41:03 +02:00
Richard Houldsworth
cd7dc6c812 net/sfc/base: add X2 port modes to bandwidth calculator
Add cases for the new port modes supported by X2 NICs.
Lane bandwidth is calculated for pre-X2 cards so is an
underestimate for X2 in 25G/100G modes.

Signed-off-by: Richard Houldsworth <rhouldsworth@solarflare.com>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
2018-09-28 01:41:03 +02:00
Richard Houldsworth
a77a72cdd7 net/sfc/base: update to current port mode terminology
>From Medford onwards, the newer constants enumerating
port modes should be used.

Signed-off-by: Richard Houldsworth <rhouldsworth@solarflare.com>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
2018-09-28 01:41:03 +02:00
Richard Houldsworth
dad744f763 net/sfc/base: adjust PHY module info interface
Adjust data types in interface to permit the complete
module information buffer to be obtained in a single
call.

Signed-off-by: Richard Houldsworth <rhouldsworth@solarflare.com>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
2018-09-28 01:41:03 +02:00
Richard Houldsworth
c0516b777e net/sfc/base: expose PHY module device address constants
Rearrange so the valid addresses are visible to the caller.

Signed-off-by: Richard Houldsworth <rhouldsworth@solarflare.com>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
2018-09-28 01:41:02 +02:00
Richard Houldsworth
7624c9442d net/sfc/base: make last byte of module information available
Adjust bounds so the interface supports reading
the last available byte of data.

Fixes: 19b64c6ac3 ("net/sfc/base: import libefx base")
Cc: stable@dpdk.org

Signed-off-by: Richard Houldsworth <rhouldsworth@solarflare.com>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
2018-09-28 01:41:02 +02:00
Evgeny Im
901efc0da9 net/failsafe: support multicast address list set
Signed-off-by: Evgeny Im <evgeny.im@oktetlabs.com>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Acked-by: Gaetan Rivet <gaetan.rivet@6wind.com>
2018-09-28 01:41:02 +02:00
Hemant Agrawal
ec4569c1f9 mempool/dpaa: change debug log level to DP
When the system goes out of buffers temporarily, the logs
further slow down the system. There is no need for this
continuos logs.

Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
2018-09-28 01:41:02 +02:00
Hemant Agrawal
539c80ca06 bus/dpaa: add check for re-definition in compat
Few fields in compat are giving re-defination error
with new drivers such as caam_jr.
Checks have been added.

Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
2018-09-28 01:41:02 +02:00
Hemant Agrawal
1ee09e39b5 net/dpaa: tune prefetch in Rx path
As part of performance optimization excercise, tuning
the prefetch placement.

Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
2018-09-28 01:41:02 +02:00
Hemant Agrawal
19b4aba204 net/dpaa: separate Rx function for LS1046
This is to avoid the checks in datapath and help in performance.
LS1046 has different data stash settings.

Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
2018-09-28 01:41:02 +02:00
Sunil Kumar Kori
9afce5aa86 net/dpaa: rearrange atomic queue support
This is to align the code with dpaa2 to ease out maintenance
of both driver code bases.

Signed-off-by: Sunil Kumar Kori <sunil.kori@nxp.com>
2018-09-28 01:41:02 +02:00
Nipun Gupta
fa362cea28 bus/dpaa: avoid big endian conversions for contextb
minor optimization in packet handling path

Signed-off-by: Nipun Gupta <nipun.gupta@nxp.com>
2018-09-28 01:41:02 +02:00
Nipun Gupta
b6ee63a763 bus/dpaa: avoid tag set for eqcr in Tx path
Minor optimization for TX path.

Signed-off-by: Nipun Gupta <nipun.gupta@nxp.com>
2018-09-28 01:41:02 +02:00
Hemant Agrawal
8e253882cd bus/dpaa: support interrupt portal based fd
This patch add supports in bus driver for qbman to support
and configure portal based FDs, which can be used for interrupt
based processing.

Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
2018-09-28 01:41:02 +02:00
Hemant Agrawal
079a67c251 net/dpaa: minor debug log enhancements
Improving the debug message for event mode and
reducing the log level for less important log

Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
2018-09-28 01:41:02 +02:00
Sachin Saxena
c1752a36b0 net/dpaa: fix link speed based on MAC type
The link speed shall be on the basis of mac type.

Fixes: 799db4568c ("net/dpaa: support device info and speed capability")
Cc: shreyansh.jain@nxp.com
Cc: stable@dpdk.org

Signed-off-by: Sachin Saxena <sachin.saxena@nxp.com>
2018-09-28 01:41:02 +02:00
Hemant Agrawal
55576ac26e net/dpaa: support scatter offload
This patch implement the sg support, which can be
enabled/disabled w.r.t configuration.

Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
2018-09-28 01:41:02 +02:00
Hemant Agrawal
deeec8ef57 net/dpaa: fix jumbo buffer config
Set the missing dev data mtu for the correct size.
Set the max supported size in hw, if user is asking for more.

Fixes: 9658ac3a4e ("net/dpaa: set the correct frame size in device MTU")
Cc: stable@dpdk.org

Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
2018-09-28 01:41:02 +02:00
Hemant Agrawal
f04e713924 net/dpaa: configure frame queue on MAC ID basis
The current code has the hardcoded seq for fq allocation.
It require multiple changes, when some of the interfaces
are assigned to kernel stack. Changing it on the mac
id basis provide the flexibility to assign any interface
to kernel.

Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
2018-09-28 01:41:02 +02:00
Chas Williams
e1110e9776 net/bonding: fix Rx slave fairness
Some PMDs, especially ones with vector receives, require a minimum number
of receive buffers in order to receive any packets.  If the first slave
read leaves less than this number available, a read from the next slave
may return 0 implying that the slave doesn't have any packets which
results in skipping over that slave as the next active slave.

To fix this, implement round robin for the slaves during receive that
is only advanced to the next slave at the end of each receive burst.
This is also done to provide some additional fairness in processing in
other bonding RX burst routines as well.

Fixes: 2efb58cbab ("bond: new link bonding library")
Cc: stable@dpdk.org

Signed-off-by: Chas Williams <chas3@att.com>
Acked-by: Luca Boccassi <bluca@debian.org>
Acked-by: Matan Azrad <matan@mellanox.com>
2018-09-28 01:41:02 +02:00
Luca Boccassi
bfabd06000 net/avf: support meson build
Signed-off-by: Luca Boccassi <bluca@debian.org>
Reviewed-by: Bruce Richardson <bruce.richardson@intel.com>
2018-09-28 01:41:02 +02:00
Bruce Richardson
bfd38e4d70 net/avf: fix missing compiler error flags
The AVF driver was missing $(WERROR_FLAGS) in it's cflags, which means
that a number of compilation errors were getting missed. This patch adds
in the flag and fixes most of the errors, just disabling the
strict-aliasing ones.

Fixes: 22b123a36d ("net/avf: initialize PMD")
Fixes: 69dd4c3d08 ("net/avf: enable queue and device")
Fixes: a2b29a7733 ("net/avf: enable basic Rx Tx")
Fixes: 319c421f38 ("net/avf: enable SSE Rx Tx")

CC: stable@dpdk.org

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
2018-09-28 01:41:02 +02:00
Bruce Richardson
584798f8e8 net/avf: fix unused variables and label
Compiling with all warnings turned on causes errors about unused variables
and an unused label. Remove these to allow building without having to
disable those warnings.

Fixes: 69dd4c3d08 ("net/avf: enable queue and device")
Fixes: 3fd7a3719c ("net/avf: enable ops for MTU setting")
Fixes: d6bde6b5ea ("net/avf: enable Rx interrupt")
Fixes: 22b123a36d ("net/avf: initialize PMD")
Fixes: 319c421f38 ("net/avf: enable SSE Rx Tx")
Fixes: a2b29a7733 ("net/avf: enable basic Rx Tx")
Fixes: 1060591ead ("net/avf: enable bulk allocate Rx")

CC: stable@dpdk.org

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Luca Boccassi <bluca@debian.org>
2018-09-28 01:41:02 +02:00
Gaetan Rivet
be665ba55e net/igb: support dev reset
Add support for passive device reset on IGB ports.

Signed-off-by: Gaetan Rivet <gaetan.rivet@6wind.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
2018-09-28 01:41:02 +02:00
Julien Meunier
2750b60fd6 net/fm10k: add imissed stats
Add support of imissed and q_errors statistics, reported by PCIE_QPRDC
register (see datasheet, section 11.27.2.60), which exposes the number
of receive packets dropped for a queue.

Signed-off-by: Julien Meunier <julien.meunier@nokia.com>
Acked-by: Xiao Wang <xiao.w.wang@intel.com>
2018-09-28 01:41:02 +02:00
Didier Pallard
e8c220aa97 net/ixgbe: fix missing Tx multi-segs capability
In former API, ETH_TXQ_FLAGS_NOMULTSEGS was merely a hint indicating
that application will never send multisegmented packets, allowing
pmd to choose different tx methods accordingly.
In new API, DEV_TX_OFFLOAD_MULTI_SEGS became an offload capability
that is advertised by pmds, some of them do not advertise it and
expect to never receive fragmented packets (octeontx, axgbe)
So an ethdev that supports multisegmented packets should properly
advertise it.

Problem was spotted and tested on e1000, should be also present in
ixgbe_vf representor.

Fixes: cf80ba6e20 ("net/ixgbe: add support for representor ports")
Cc: stable@dpdk.org

Signed-off-by: Didier Pallard <didier.pallard@6wind.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
2018-09-28 01:41:02 +02:00
Didier Pallard
c8dc2d66c5 net/i40e: fix missing Tx multi-segs capability
In former API, ETH_TXQ_FLAGS_NOMULTSEGS was merely a hint indicating
that application will never send multisegmented packets, allowing
pmd to choose different tx methods accordingly.
In new API, DEV_TX_OFFLOAD_MULTI_SEGS became an offload capability
that is advertised by pmds, some of them do not advertise it and
expect to never receive fragmented packets (octeontx, axgbe)
So an ethdev that supports multisegmented packets should properly
advertise it.

Problem was spotted and tested on e1000, should be also present in
i40e_vf representor.

Fixes: e0cb96204b ("net/i40e: add support for representor ports")
Cc: stable@dpdk.org

Signed-off-by: Didier Pallard <didier.pallard@6wind.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
2018-09-28 01:41:02 +02:00
Didier Pallard
310e479b5f net/fm10k: fix missing Tx multi-segs capability
In former API, ETH_TXQ_FLAGS_NOMULTSEGS was merely a hint indicating
that application will never send multisegmented packets, allowing
pmd to choose different tx methods accordingly.
In new API, DEV_TX_OFFLOAD_MULTI_SEGS became an offload capability
that is advertised by pmds, some of them do not advertise it and
expect to never receive fragmented packets (octeontx, axgbe)
So an ethdev that supports multisegmented packets should properly
advertise it.

Problem was spotted and tested on e1000, should be also present in
fm10k.

Fixes: 30f3ce999e ("net/fm10k: convert to new Tx offloads API")
Cc: stable@dpdk.org

Signed-off-by: Didier Pallard <didier.pallard@6wind.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
2018-09-28 01:41:02 +02:00
Didier Pallard
a6607ae14c net/e1000: fix missing Tx multi-segs capability
In former API, ETH_TXQ_FLAGS_NOMULTSEGS was merely a hint indicating
that application will never send multisegmented packets, allowing
pmd to choose different tx methods accordingly.
In new API, DEV_TX_OFFLOAD_MULTI_SEGS became an offload capability
that is advertised by pmds, some of them do not advertise it and
expect to never receive fragmented packets (octeontx, axgbe)
So an ethdev that supports multisegmented packets should properly
advertise it.

Fixes: e5c05e6590 ("net/e1000: convert to new Tx offloads API")
Cc: stable@dpdk.org

Signed-off-by: Didier Pallard <didier.pallard@6wind.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
2018-09-28 01:41:02 +02:00
Beilei Xing
dc6a4514fb net/i40e: update Rx offload
HW supports Rx scatter offload, this patch updates
Rx scatter offload for PF.

Signed-off-by: Beilei Xing <beilei.xing@intel.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
2018-09-28 01:41:02 +02:00
Igor Romanov
5d138ef92d net/sfc: fix a Tx queue double release possibility
There are two function that call sfc_tx_qfini():
sfc_tx_fini_queues() and sfc_tx_queue_release(). But only
sfc_tx_queue_release() sets tx_queues pointer of the device data to NULL.
It may lead to the scenario in which a queue is destroyed by
sfc_tx_fini_queues() and after the queue is attempted to be destroyed again
by sfc_tx_queue_release().

Move NULL assignment to sfc_tx_qfini().

Fixes: b1b7ad933b ("net/sfc: set up and release Tx queues")
Cc: stable@dpdk.org

Signed-off-by: Igor Romanov <igor.romanov@oktetlabs.ru>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
2018-09-28 01:41:02 +02:00
Igor Romanov
7eb7588c99 net/sfc: fix an Rx queue double release possibility
There are two function that call sfc_rx_qfini():
sfc_rx_fini_queues() and sfc_rx_queue_release(). But only
sfc_rx_queue_release() sets rx_queues pointer of the device data to NULL.
It may lead to the scenario in which a queue is destroyed by
sfc_rx_fini_queues() and after the queue is attempted to be destroyed again
by sfc_rx_queue_release().

Move NULL assignment to sfc_rx_qfini().

Fixes: ce35b05c63 ("net/sfc: implement Rx queue setup release operations")
Cc: stable@dpdk.org

Signed-off-by: Igor Romanov <igor.romanov@oktetlabs.ru>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
2018-09-28 01:41:02 +02:00
Vijay Srivastava
e3ea742e85 net/sfc/base: add helper API to make Geneve filter spec
Signed-off-by: Vijay Srivastava <vijays@solarflare.com>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
2018-09-28 01:41:02 +02:00
Andy Moreton
42f235911a net/sfc/base: fix MAC Tx stats for less or equal to 64 bytes
This statistic should include 64byte and smaller frames.
Fix EF10 calculation to match Siena code.

Fixes: 8c7c723dfe ("net/sfc/base: import MAC statistics")
Cc: stable@dpdk.org

Signed-off-by: Andy Moreton <amoreton@solarflare.com>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
2018-09-28 01:41:02 +02:00
Richard Houldsworth
95ea95ec41 net/sfc/base: modify phy caps to indicate FEC request
The capability bits to request FEC modes are implicitly valid
when the corresponding FEC mode is a supported capability.
Drivers expect that it is only valid to advertise those
capabilities explicitly marked as supported. The capabilities
reported by firmware is modified with the implicit capabilities
to present the explicit model to drivers.

Signed-off-by: Richard Houldsworth <rhouldsworth@solarflare.com>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
2018-09-28 01:41:02 +02:00
Ivan Malov
bb53d84843 net/sfc/base: improve handling of legacy RSS hash flags
Client drivers may use either legacy flags, for example,
EFX_RX_HASH_TCPIPV4, or generalised flags, for example,
EFX_RX_HASH(IPV4_TCP, 4TUPLE), to configure RSS hash.
The libefx is able to recognise what scheme is used.

Legacy flags may be consumed directly by a chip-specific handler to
configure the NIC, that is, on EF10, these flags can be used to fill
in legacy RSS mode field in MCDI request. Generalised flags can also
be directly used in EF10-specific handler as they are fully compatible
with additional fields of the same MCDI request.

Legacy flags undergo conversion to generalised flags before they
are consumed by a chip-specific handler. This conversion is used to
make sure that chip-specific handlers expect only generalised flags
in the input for the sake of clarity of the code.

Depending on firmware capabilities, a chip-specififc handler either
supplies the input to the NIC directly, for example,
EFX_RX_HASH(IPV4_TCP, 4TUPLE) flag will enable 4 bits in
RSS_CONTEXT_SET_FLAGS_IN_TCP_IPV4_RSS_MODE field on EF10, or takes
the opportunity to translate the input to enable bits which don't map
to the generic flag, like setting
RSS_CONTEXT_SET_FLAGS_IN_TOEPLITZ_TCPV4_EN on EF10 when the firmware
claims no support for additional modes.

However, this approach has introduced a severe problem which can be
reproduced with ultra-low-latency firmware variant. In order to enable
IP hash, EF10-specific handler requires the user to request 2-tuple
hash for IP-other, TCP and UDP traffic classes, unconditionally.
In example, IPv4 hash can be enabled using the following input:
EFX_RX_HASH(IPV4_TCP, 2TUPLE) | EFX_RX_HASH(IPV4_UDP, 2TUPLE) |
EFX_RX_HASH(IPV4, 2TUPLE).
At the same time, on ultra-low-latency firmware, the common code will
never report support for any UDP tuple to the client driver. That is,
in the same example, the driver will use EFX_RX_HASH(IPV4_TCP, 2TUPLE) |
EFX_RX_HASH(IPV4, 2TUPLE). This input will not be recognised by
EF10-specific handler, and RSS_CONTEXT_SET_FLAGS_IN_TOEPLITZ_IPV4_EN
bit will not be set in the MCDI request.

In order to solve the problem, the patch removes conversion code
from chip-specific handlers and adds appropriate code to convert
EFX_RX_HASH() flags to their legacy counterparts to the common scale
mode set function. If the firmware does not support additional modes,
the function will convert generalised flags to legacy flags correctly
without any demand for UDP flags and pass the result to a chip-specific
handler.

Signed-off-by: Ivan Malov <ivan.malov@oktetlabs.ru>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
2018-09-28 01:41:02 +02:00
Ivan Malov
86dbbc5dbb net/sfc/base: simplify the code to parse RSS hash type
RSS mode bits can be accessed a lot easier in the hash
type value provided that the variable type is uint32_t.
The macro helper can be removed to enhance readability.

Signed-off-by: Ivan Malov <ivan.malov@oktetlabs.ru>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
2018-09-28 01:41:02 +02:00
Ivan Malov
c4ea98c42d net/sfc/base: check buffer size for hash flags
The efx_rx_scale_hash_flags_get interface is unsafe, as it does not
have an argument for the size of the output buffer used to return
the flags. While the only caller currently supplies a sufficiently
large buffer, this should be checked at runtime to avoid writing
past the end of the buffer.

Signed-off-by: Ivan Malov <ivan.malov@oktetlabs.ru>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
2018-09-28 01:41:02 +02:00
Ivan Malov
b65eb10c4d net/sfc/base: use simpler code to check hash algorithm type
The API which is used to list supported hash flags verifies
hash algorithm choice before writing the output. This check
is based on a switch() statement which has only two options
and no distinctive actions to be conducted for each of them.
Use simpler code instead of switch() to improve readability.

Signed-off-by: Ivan Malov <ivan.malov@oktetlabs.ru>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
2018-09-28 01:41:02 +02:00
Vijay Srivastava
7ec0fca2c0 net/sfc/base: add support to get active FEC type
Signed-off-by: Vijay Srivastava <vijays@solarflare.com>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
2018-09-28 01:41:02 +02:00
Ivan Malov
9673e044a1 net/sfc/base: fix a typo in unicast filter insertion comment
Fixes: e7cd430c86 ("net/sfc/base: import SFN7xxx family support")
Cc: stable@dpdk.org

Signed-off-by: Ivan Malov <ivan.malov@oktetlabs.ru>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
2018-09-28 01:41:02 +02:00
Ivan Malov
e7feaba71c net/sfc/base: fix name of the argument to store RSS flags
The function used to retrieve supported RSS flags has an
argument which should be named properly to indicate
that it's a pointer.

Fixes: 613cbe75ae ("net/sfc/base: add a new means to control RSS hash")
Cc: stable@dpdk.org

Signed-off-by: Ivan Malov <ivan.malov@oktetlabs.ru>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
2018-09-28 01:41:02 +02:00
Mark Spender
f78fb0a8e1 net/sfc/base: prevent access to the NIC config before probe
NIC config is initialized during NIC probe.

Fixes: 19b64c6ac3 ("net/sfc/base: import libefx base")
Cc: stable@dpdk.org

Signed-off-by: Mark Spender <mspender@solarflare.com>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
2018-09-28 01:41:02 +02:00
Andy Moreton
416aa7f1c9 net/sfc/base: fix ID retrieval in v3 licensing
Fixes: 05fce2ce84 ("net/sfc/base: import libefx licensing")
Fixes: f67e471914 ("net/sfc/base: fix coding style")
Cc: stable@dpdk.org

Signed-off-by: Andy Moreton <amoreton@solarflare.com>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
2018-09-28 01:41:02 +02:00
Andy Moreton
efb15738c7 net/sfc/base: add API to inform libefx of hardware removal
The efx_nic_hw_unavailable() checks ensure that if the NIC hardware
has failed or has been physically removed then libefx will stop
further attempts to access the hardware.

Add an interface for libefx clients to force unavailability, so the
hardware is treated as dead or removed even if still physically present.

Signed-off-by: Andy Moreton <amoreton@solarflare.com>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
2018-09-28 01:41:02 +02:00
Andy Moreton
2cfbf25105 net/sfc/base: add routine to check for hardware presence
Add efx_nic_hw_unavailable() routine to check for hardware presence
before continuing with NIC operations.

Signed-off-by: Andy Moreton <amoreton@solarflare.com>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
2018-09-28 01:41:02 +02:00
Gautam Dawar
ed42d18458 net/sfc/base: fix out of bounds read when dereferencing sdup
Introduce and use macro to make sure that MCDI buffers allocated
on stack are rounded up properly.

Fixes: 6f619653b9 ("net/sfc/base: import MCDI implementation")
Fixes: f7dc06bf35 ("net/sfc/base: import 5xxx/6xxx family support")
Fixes: e7cd430c86 ("net/sfc/base: import SFN7xxx family support")
Fixes: 1dae25112a ("net/sfc/base: import built-in selftest")
Fixes: 0a78643491 ("net/sfc/base: import PHY statistics")
Fixes: 8c7c723dfe ("net/sfc/base: import MAC statistics")
Fixes: 5935cd8c47 ("net/sfc/base: import RSS support")
Fixes: 9ee64bd404 ("net/sfc/base: import loopback control")
Fixes: dfb3b1ce15 ("net/sfc/base: import monitors access via MCDI")
Fixes: d96a34d165 ("net/sfc/base: import NVRAM support")
Fixes: 05fce2ce84 ("net/sfc/base: import libefx licensing")
Fixes: ba6afee9a8 ("net/sfc/base: add advanced function to extract FW version")
Fixes: c7815c1d1f ("net/sfc/base: use proper MCDI command for encap filters")
Fixes: 17551f6dff ("net/sfc/base: add API to control UDP tunnel ports")
Fixes: eff9b666ea ("net/sfc/base: move RxDP config get to EF10 NIC code")
Fixes: 4aab7f07a6 ("net/sfc/base: refactor EF10 get datapath capabilities")
Fixes: 480a13044b ("net/sfc/base: support FW subvariant choice")
Fixes: 6f60cc4a78 ("net/sfc/base: support equal stride super-buffer Rx mode")
Fixes: 9a733758c0 ("net/sfc/base: support MARK and FLAG actions in filters")
Cc: stable@dpdk.org

Signed-off-by: Gautam Dawar <gdawar@solarflare.com>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
2018-09-28 01:41:02 +02:00
Mark Spender
b2fe569359 net/sfc/base: add information if TSO workaround is required
In SF bug 61297 it's been confirmed that the hardware does not always
calculate the TCP checksum correctly with TSO sends.

The value of the Total Length field (IPv4) or Payload Length field
(IPv6) is the critical factor. We're sufficiently confident that if
these fields are zero then the checksum will be calculated correctly.

The information may be used by the drivers to check if the workaround is
required when FATSOv2 is implemented.

Signed-off-by: Mark Spender <mspender@solarflare.com>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
2018-09-28 01:41:02 +02:00
Martin Harvey
da8692388e net/sfc/base: avoid usage of too big arrays on stack
Found by PreFAST static analysis.

Fixes: 1dae25112a ("net/sfc/base: import built-in selftest")
Fixes: d96a34d165 ("net/sfc/base: import NVRAM support")
Cc: stable@dpdk.org

Signed-off-by: Martin Harvey <mharvey@solarflare.com>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
2018-09-28 01:41:02 +02:00
Richard Houldsworth
bb5c3b1691 net/sfc/base: generalise EF10 NVRAM buffer interface
The SFN driver's PartitionControl WMI object requires an API to parse
and filter partition data in TLV format, particularly for the Dynamic
Config partition. The ef10_nvram_buffer functions provide this
functionality but are tied to use with license partition only.
Modify functions so they are applicable to all TLV partitions and add
functions to support in-place tag modification.

Signed-off-by: Richard Houldsworth <rhouldsworth@solarflare.com>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
2018-09-28 01:41:02 +02:00
Richard Houldsworth
7e63a9a1a5 net/sfc/base: add accessor for default port mode
Extend efx_mcdi_get_port_modes() to optionally pass on the default
port mode field. This provides a more direct way of handling the case
where the dynamic config does not specify the port mode than the
alternative of a lookup table indexed by MCFW subtype.

Signed-off-by: Richard Houldsworth <rhouldsworth@solarflare.com>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
2018-09-28 01:41:02 +02:00
Richard Houldsworth
45cc346bc9 net/sfc/base: add buffer editing functions to boot config
Functions to process the DHCP option list format used by the expansion
ROM config buffers, to support extracting and updating of individual
options.
The initial use case is the driver presenting the global and per-PF
options as separate items, with the driver implementing the
synchronization of global options across the configuration buffers
for all PFs.

Signed-off-by: Richard Houldsworth <rhouldsworth@solarflare.com>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
2018-09-28 01:41:02 +02:00
Martin Harvey
dded2ffdf9 net/sfc/base: add API to retrieve sensor limits
Signed-off-by: Martin Harvey <mharvey@solarflare.com>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
2018-09-28 01:41:02 +02:00
Martin Harvey
252faf84f4 net/sfc/base: check size of memory to read sensors data to
Size of provided memory should be consistent with specified size.

Fixes: dfb3b1ce15 ("net/sfc/base: import monitors access via MCDI")
Cc: stable@dpdk.org

Signed-off-by: Martin Harvey <mharvey@solarflare.com>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
2018-09-28 01:41:02 +02:00
Martin Harvey
0c52235b43 net/sfc/base: add generated description of sensors
Description of sensors is generated from firmware sources.

Signed-off-by: Martin Harvey <mharvey@solarflare.com>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
2018-09-28 01:41:02 +02:00
Mark Spender
05039b815c net/sfc/base: remove probes when a Tx queue is too full
No need for probe messages when a TxQ is too full for a post to be done.

Existing drivers check if there is room in the queue before posting
descriptors, even though efx_tx_qdesc_post() does the check itself.

The new SFN Windows driver doesn't perform the check before calling
efx_tx_qdesc_post(), but that means these probes can get frequently
printed out. It's normal driver behaviour so there's no need to print
an error.

Signed-off-by: Mark Spender <mspender@solarflare.com>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
2018-09-28 01:41:02 +02:00
Martin Harvey
aa0bac03e9 net/sfc/base: refactor monitors support
Remove obsolete monitor types since Falcon SFN4000 series adapters
no longer supported by libefx.
Rename MCDI monitors to be consistent with YML.
The code may be simplified and generalized since only MCDI monitors
remain.

Signed-off-by: Martin Harvey <mharvey@solarflare.com>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
2018-09-28 01:41:02 +02:00
Vijay Srivastava
f933b46a0a net/sfc/base: add check for TUNNEL module in NIC reset API
Fixes: 17551f6dff ("net/sfc/base: add API to control UDP tunnel ports")
Cc: stable@dpdk.org

Signed-off-by: Vijay Srivastava <vijays@solarflare.com>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
2018-09-28 01:41:02 +02:00
Martin Harvey
aa9f2e6bc9 net/sfc/base: move empty efsys definitions to EFX headers
Move empty definitions for platform-specific annotations from efsys.h
to EFX headers.

Signed-off-by: Martin Harvey <mharvey@solarflare.com>
Signed-off-by: Andrew Lee <alee@solarflare.com>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
2018-09-28 01:41:02 +02:00
Vijay Srivastava
b5f238171d net/sfc/base: fix outer IPID field in TSO option descriptors
Fixes: 912e603706 ("net/sfc/base: add outer IP ID parameter to TSOv2 descriptor")
Cc: stable@dpdk.org

Signed-off-by: Vijay Srivastava <vijays@solarflare.com>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
2018-09-28 01:41:02 +02:00
Paul Fox
a5ecbaa7c9 net/sfc/base: add more definitions of partitions
Add definitions of dynamic config and expansion ROM backup
partitions.

Signed-off-by: Paul Fox <pfox@solarflare.com>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
2018-09-28 01:41:02 +02:00
Andrew Rybchenko
5d23ac47e9 net/sfc/base: fix build because of no declaration
Functions declared in mcdi_mon.h are implemented in mcdi_mon.c.
The build fails if compiler options require declaration before definition.

Fixes: dfb3b1ce15 ("net/sfc/base: import monitors access via MCDI")
Cc: stable@dpdk.org

Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
2018-09-28 01:41:02 +02:00
Andy Moreton
f64f2a47f0 net/sfc/base: add space after sizeof
Required by GLD cstyle.

Fixes: d4f4b8f9d2 ("net/sfc/base: make RxQ type data an union")
Cc: stable@dpdk.org

Signed-off-by: Andy Moreton <amoreton@solarflare.com>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
2018-09-28 01:41:02 +02:00
Andy Moreton
9d42b13e8c net/sfc/base: properly align on line continuation
Fixes: 19b64c6ac3 ("net/sfc/base: import libefx base")
Cc: stable@dpdk.org

Signed-off-by: Andy Moreton <amoreton@solarflare.com>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
2018-09-28 01:41:02 +02:00
Martin Harvey
d0e22de5bd net/sfc/base: fix SAL annotation for input buffers
Fixes: d96a34d165 ("net/sfc/base: import NVRAM support")
Cc: stable@dpdk.org

Signed-off-by: Martin Harvey <mharvey@solarflare.com>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
2018-09-28 01:41:02 +02:00
Andrew Jackson
58b1393e75 net/sfc/base: highlight that image layout header generated
EF10 signed image layout header is generated from firmware sources.

Signed-off-by: Andrew Jackson <ajackson@solarflare.com>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
2018-09-28 01:41:02 +02:00