Nélio Laranjeiro [Thu, 23 Nov 2017 09:22:34 +0000 (10:22 +0100)]
net/mlx5: remove 32-bit support
naddr variable was introduced in
commit 9a7fa9f76d9e ("net/mlx5: use vector types to speed up processing")
to avoid compilation errors on 32bits compilation, as x86_32 is no more
supported by rdma-core nor by MLNX_OFED, this variable becomes useless and
can be safely removed.
Nélio Laranjeiro [Thu, 23 Nov 2017 09:22:33 +0000 (10:22 +0100)]
net/mlx5: fix secondary process verification
Since the secondary process has its own devops, function which cannot be
called by the secondary don't need anymore to verify which process is
calling it.
Shijith Thotton [Mon, 20 Nov 2017 11:59:51 +0000 (17:29 +0530)]
net/liquidio: support queue re-configuration
Support for re-configuration of number of queues per port and descriptor
size. Renamed variable representing number of descriptors as nb_desc
from max_count.
Falcon support has been withdrawn from libefx, however, there is still
an obsolete Falcon-specific assertion that efx_mac_stats_upload()
and efx_port_poll() aren't concurrent. To be consistent with an overall
Falcon support revocation it's desirable to remove it.
Fix debug build invalid assertion failure.
Fixes: 19b64c6ac35f ("net/sfc/base: import libefx base") Fixes: 8c7c723dfe7c ("net/sfc/base: import MAC statistics") Cc: stable@dpdk.org Signed-off-by: Ivan Malov <ivan.malov@oktetlabs.ru> Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com> Reviewed-by: Andy Moreton <amoreton@solarflare.com>
Fix warning
"C6001: Using uninitialized memory '*sensor_maskp'"
which could occur when the npages argument to efx_mcdi_sensor_info()
is less than or equal to zero.
Fixes: dfb3b1ce15f6 ("net/sfc/base: import monitors access via MCDI") Cc: stable@dpdk.org Signed-off-by: Andrew Lee <alee@solarflare.com> Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Andrew Lee [Thu, 16 Nov 2017 08:04:37 +0000 (08:04 +0000)]
net/sfc/base: fix warnings from VS2015 C compiler (C4214)
Fix multiple level 4 warnings
"C4214: nonstandard extension used: bit field types other than int";
no functional changes.
Fixes: f9565517ff4f ("net/sfc/base: import filters support") Fixes: 457beb2c4d3e ("net/sfc/base: support filters for encapsulated packets") Cc: stable@dpdk.org Signed-off-by: Andrew Lee <alee@solarflare.com> Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Andrew Lee [Thu, 16 Nov 2017 08:04:36 +0000 (08:04 +0000)]
net/sfc/base: fix warnings from VS2015 C compiler (C4057)
Fix two level 4 warnings
"C4057: 'function': 'const uint8_t *' differs in indirection to
slightly different base types from 'caddr_t'"; no functional changes.
Fixes: 354df7eadf66 ("net/sfc/base: import bootrom configuration") Cc: stable@dpdk.org Signed-off-by: Andrew Lee <alee@solarflare.com> Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Andrew Lee [Thu, 16 Nov 2017 08:04:33 +0000 (08:04 +0000)]
net/sfc/base: fix warnings from VS2015 C compiler (C4245)
Fix level 4 warning
"C4245: 'initializing': conversion from 'int' to 'uint32_t',
signed/unsigned mismatch" warning; no functional changes.
Fixes: f9565517ff4f ("net/sfc/base: import filters support") Fixes: daa007afd04b ("net/sfc/base: split local MAC I/G back into separate flags") Fixes: 23c6d0dbac80 ("net/sfc/base: improve API to get supported filter matches") Fixes: 457beb2c4d3e ("net/sfc/base: support filters for encapsulated packets") Cc: stable@dpdk.org Signed-off-by: Andrew Lee <alee@solarflare.com> Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Mark Spender [Thu, 16 Nov 2017 08:04:29 +0000 (08:04 +0000)]
net/sfc/base: fix diagnostics support build without Siena
The compilation failed because __efx_sram_pattern_fns was used in
efx_nic.c, but defined in efx_sram.c which is only needed when
supporting Siena.
To fix it move all the code using __efx_sram_pattern_fns into
Siena-specific files (except for the definition in efx_sram.c itself,
as that file only needs to be included in Siena-supporting builds
anyway).
The functions to test registers and tables are unlikely to apply to any
new hardware and so can be moved into Siena files. Since Huntington
such tests have been implemented in firmware.
Fixes: 7571c3168798 ("net/sfc/base: import diagnostics support") Cc: stable@dpdk.org Signed-off-by: Mark Spender <mspender@solarflare.com> Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Mark Spender [Thu, 16 Nov 2017 08:04:17 +0000 (08:04 +0000)]
net/sfc/base: request info about outer frame in Rx events
For encapsulated packets, the firmware gives info about the inner frame
fields by default. When not using encapsulation offload, ask for info
about the outer frame instead.
On SFN8xxx with firmware version before v6.4.2.1007 driver reload is
needed after switching from full-feature to low-latency firmware
variant since the driver still thinks that firmware supports
encapsulation, but firmware does not tolerate request to provide info
about outer frame in Rx events.
Signed-off-by: Mark Spender <mspender@solarflare.com> Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Mark Spender [Thu, 16 Nov 2017 08:04:16 +0000 (08:04 +0000)]
net/sfc/base: ignore error in completion event on MCDIv2 HW
With MCDIv2, the reponse length can be to big to fit into the
CMDDONE_DATALEN field in the MCDI completion event. But rather that
the length being truncated, it can overflow into the CMDDONE_ERRNO
field (this is a longstanding firmware bug). Hence the CMDDONE_ERRNO
field may not be valid.
It isn't necessary to use the value in the CMDDONE_ERRNO field though,
so it can be ignored. The actual error code is already read from the
response header on MCDIv2 capable hardware and stored in emr_rc, so
that can be used instead.
Signed-off-by: Mark Spender <mspender@solarflare.com> Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
In the case of packed stream real size of the buffer does not fit in
Rx descriptor byte count. Real size is specified on Rx queue setup.
Non-zero fake should be used to bypass hardware checks.
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Andrew Rybchenko [Thu, 16 Nov 2017 08:04:10 +0000 (08:04 +0000)]
net/sfc/base: provide simple access to RxQ state in EvQ
Packed stream Rx datapath requires access to packed stream state
stored in event queue. Number of credits is upstead in event handler
on a new buffer, packets parsing on 64k boundary crossing and
Rx doorbell push to give credits back.
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Andrew Rybchenko [Thu, 16 Nov 2017 08:04:09 +0000 (08:04 +0000)]
net/sfc/base: optimize credits overflow check
Apply check against firmware maximum just before pushing.
However, it does not save from overflow inside firmware,
if firmware still have some credits.
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Andrew Rybchenko [Thu, 16 Nov 2017 08:04:08 +0000 (08:04 +0000)]
net/sfc/base: clarify meaning of Rx desc lbits in PS mode
There is no point to add mask plus one before mask applying since it
still does not help to avoid overflow on subtract. Modulo mask
arithmetic works perfectly for unsigned integers of the same type.
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Andy Moreton [Thu, 16 Nov 2017 08:04:00 +0000 (08:04 +0000)]
net/sfc/base: precheck and verify flash writes
Read existing flash content before writing, so the flash write can be
avoided if the existing partition content matches the new image. This
avoids unnecessary write cycles for the flash device, and may also be
faster. If the flash does need to be updated, verify the content after
writing.
Note that reading the flash content after writing but before calling
efx_nvram-rw_finish() avoids firmware bug68170, which can lead to
signed image updates failing on Medford.
Signed-off-by: Andy Moreton <amoreton@solarflare.com> Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Andy Moreton [Thu, 16 Nov 2017 08:03:57 +0000 (08:03 +0000)]
net/sfc/base: check NVRAM locking by partition ID
Tracking which partition is locked avoids being overly conservative
when EFX_NVRAM_xxx maps to more than one partition (depnding on the
current port number).
Signed-off-by: Andy Moreton <amoreton@solarflare.com> Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
The return value of rte_lcore_has_role is misinterpreted in the timer
reset function. The return values of rte_lcore_has_role will be changed
in a future DPDK release, but this commit fixes this call site until
that happens.
Fixes: 351f463456f8 ("timer: allow reset on service cores") Cc: stable@dpdk.org Signed-off-by: Erik Gabriel Carrillo <erik.g.carrillo@intel.com> Acked-by: Pavan Nikhilesh <pbhagavatula@caviumnetworks.com>
Nikhil Agarwal [Tue, 12 Dec 2017 10:08:23 +0000 (15:38 +0530)]
examples/l3fwd-power: fix Rx without interrupt
This existing code cause the platform to start receiving packet
immediately irrespective of interrupts available or not.
If the platform does not support Rx interrupt, it shall not start
receiving packets immediately. It shall let the timer management work.
Fixes: aee3bc79cc34 ("examples/l3fwd-power: enable one-shot Rx interrupt and polling switch") Cc: stable@dpdk.org Signed-off-by: Nikhil Agarwal <nikhil.agarwal@linaro.org> Acked-by: David Hunt <david.hunt@intel.com>
The l3fwd program became chatty, and the code looks cluttered in
recent versions. DPDK programs should try for Unix (not VMS) style
and not print messages for the options user selected. Also, errors should
be printed on stderr. To make it easier to find code matching error
messages; error strings should be placed in situ rather than saved
as string vaiables.
Fixes: 268888b5b020 ("examples/l3fwd: modularize") Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Shahaf Shuler [Wed, 10 Jan 2018 09:09:18 +0000 (11:09 +0200)]
app/testpmd: adjust on the fly VLAN configuration
On ethdev there is an API to configure VLAN offloads after the port
was started and without reconfiguration of the port or queues.
In the current design of the application, when the Rx offloads are
changed (through "port config all" CLI command) the port configuration
is overwritten, therefore the configuration made for the VLAN is lost.
This patch is to address the issue by a configuration of each port Rx
offloads separately instead of using the global Rx config. Such
adjustment is required due to the conversion of the application to the
new offloads API.
Signed-off-by: Shahaf Shuler <shahafs@mellanox.com> Acked-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
Shahaf Shuler [Wed, 10 Jan 2018 09:09:16 +0000 (11:09 +0200)]
app/testpmd: remove txqflags option
Since testpmd is now using the new Ethdev offloads API and there is
a way configure each of the tx offloads from CLI or command line,
there is no need for the txqflags configuration anymore.
Shahaf Shuler [Wed, 10 Jan 2018 09:09:14 +0000 (11:09 +0200)]
app/testpmd: cleanup internal Tx offloads flags field
The tx_ol_flags field was used in order to control the different
Tx offloads set. After the conversion to the new Ethdev Tx offloads API
it is not needed anymore as the offloads configuration is stored in
ethdev structs.
Signed-off-by: Shahaf Shuler <shahafs@mellanox.com> Acked-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
This patch mandates the port to be stopped when configure the Tx
offloads. This is because the PMD must be aware to the offloads changes
on the device and queue configuration.
Signed-off-by: Shahaf Shuler <shahafs@mellanox.com> Acked-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
Hemant Agrawal [Mon, 18 Dec 2017 07:56:49 +0000 (13:26 +0530)]
net/ixgbe: fix ARM big endian build
fixes the following compilation error on compiling with ARM BE compiler
ixgbe_common.c: In function ‘ixgbe_host_interface_command’:
ixgbe_common.c:4610:22: error: passing argument 1 of
‘__builtin_bswap32’ makes integer from pointer without a cast
[-Werror=int-conversion]
IXGBE_LE32_TO_CPUS(&buffer[bi]);
^ Fixes: aa4fc14d2cee ("ixgbe: update base driver") Cc: stable@dpdk.org Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com> Acked-by: Bruce Richardson <bruce.richardson@intel.com>
Hemant Agrawal [Mon, 18 Dec 2017 07:56:48 +0000 (13:26 +0530)]
net/i40e: fix ARM big endian build
This patch fixes the following error observed when
compiling with ARM BE compiler.
i40e_ethdev.c: In function ‘i40e_dev_tunnel_filter_set’:
i40e_ethdev.c:6988:5: error: lvalue required as unary ‘&’ operand
&rte_cpu_to_le_32(ipv4_addr),
Hemant Agrawal [Mon, 18 Dec 2017 07:56:46 +0000 (13:26 +0530)]
lpm: fix ARM big endian build
Compiling on ARM BE using Linaro toolchain caused following
error/warnings.
rte_lpm.c: In function ‘add_depth_big_v20’:
rte_lpm.c:911:4: error: braces around scalar initializer [-Werror]
{ .group_idx = (uint8_t)tbl8_group_index, },
^
rte_lpm.c:911:4: note: (near initialization for
‘new_tbl24_entry.depth’)
rte_lpm.c:911:6:error: field name not in record or union initializer
{ .group_idx = (uint8_t)tbl8_group_index, },
^
rte_lpm.c:911:6: note: (near initialization for
‘new_tbl24_entry.depth’)
rte_lpm.c:914:13: error: initialized field overwritten
[-Werror=override-init]
.depth = 0,
Fixes: dc81ebbacaeb ("lpm: extend IPv4 next hop field") Cc: stable@dpdk.org Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com> Acked-by: Bruce Richardson <bruce.richardson@intel.com>
Anatoly Burakov [Fri, 22 Dec 2017 10:30:36 +0000 (10:30 +0000)]
vfio: fix enabled check on error
rte_eal_check_module() might return -1, which would have been a
"not false" condition for mod_available. Fix that to only report
vfio being enabled if rte_eal_check_module() returns 1.
Fixes: 221f7c220d6b ("vfio: move global config out of PCI files") Cc: stable@dpdk.org Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
Anatoly Burakov [Thu, 21 Dec 2017 16:54:24 +0000 (16:54 +0000)]
malloc: fix end for bounded elements
In cases when alignment is bigger than boundary, we may incorrectly
calculate end of a bounded malloc element.
Consider this: suppose we are allocating a bounded malloc element
that should be of 128 bytes in size, bounded to 128 bytes and
aligned on a 256-byte boundary. Suppose our malloc element ends
at 0x140 - that is, 256 plus one cacheline.
So, right at the start, we are aligning our new_data_start to
include the required element size, and to be aligned on a specified
boundary - so new_data_start becomes 0. This fails the following
bounds check, because our element cannot go above 128 bytes from
the start, and we are at 320. So, we enter the bounds handling
branch.
While we're in there, we are aligning end_pt to our boundedness
requirement of 128 byte, and end up with 0x100 (since 256 is
128-byte aligned). We recalculate new_data_size and it stays at
0, however our end is at 0x100, which is beyond the 128 byte
boundary, and we report inability to reserve a bounded element
when we could have.
This patch adds an end_pt recalculation after new_data_start
adjustment - we already know that size <= bound, so we can do it
safely - and we then correctly report that we can, in fact, try
using this element for bounded malloc allocation.
Fixes: fafcc11985a2 ("mem: rework memzone to be allocated by malloc") Cc: stable@dpdk.org Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
Anatoly Burakov [Thu, 21 Dec 2017 17:32:04 +0000 (17:32 +0000)]
malloc: protect stats with lock
When we're gathering statistics, we are traversing the freelist,
which may change under our feet in multithreaded scenario. This
is verified by occasional segfaults when running malloc autotest
on a machine with big amount of cores.
This patch protects malloc heap stats call with a lock. It changes
its definition in the process due to locking invalidating the
const-ness, but this isn't a public API, so that's OK.
Anatoly Burakov [Thu, 21 Dec 2017 18:07:07 +0000 (18:07 +0000)]
memzone: fix leak on allocation error
We check if there's space in config after we allocated the memzone,
but if there isn't, we never free it back. This patch adds memzone
free if there's no room in memzone config.
Harry van Haaren [Fri, 12 Jan 2018 10:27:18 +0000 (10:27 +0000)]
service: add attribute for number of invocations
This commit adds a new attribute to the service cores attributes
API, which allows the application to retrieve the number of times
that a service-core called the service to perform its action.
Signed-off-by: Harry van Haaren <harry.van.haaren@intel.com>
Harry van Haaren [Fri, 12 Jan 2018 10:27:17 +0000 (10:27 +0000)]
service: add reset all attributes for service
This commit introduces a new API, allowing the application to
reset attributes of a service like the cycle count. Given this
functionality is now exposed to the user, remove the resetting
of stats during a dump() call.
Signed-off-by: Harry van Haaren <harry.van.haaren@intel.com>
Harry van Haaren [Fri, 12 Jan 2018 10:27:16 +0000 (10:27 +0000)]
service: add attribute get function
This commit adds a new function to the service API to allow
the application to retrieve items about each individual service
in the system. A unit test checks the return values of a variety
of invalid and valid calls.
Signed-off-by: Harry van Haaren <harry.van.haaren@intel.com>
Nipun Gupta [Wed, 3 Jan 2018 15:39:04 +0000 (21:09 +0530)]
bus/fslmc: change EQCR stashing threshold to 1
Changing the EQCR stashing threshold boosts the performance
of l3fwd application on LS2088 by more than 20% as it helps
in burst packet processing at the Tx side. CPU is immediately
informed about the empty EQCR entries once consumed by the
hardware.
Zhiyong Yang [Wed, 10 Jan 2018 02:32:26 +0000 (10:32 +0800)]
bus/pci: fix interrupt handler type
For virtio legacy device, testpmd startup fails when using uio_pci_generic.
The issue is caused by invoking the function pci_ioport_map. The correct
value of intr_handle.type is already set before calling it, we should avoid
overwriting the default value "RTE_INTR_HANDLE_UNKNOWN" in this function.
Besides, the removal has no harm to other cases because it is set to 0 by a
memset on the whole struct during allocation in the function pci_scan_one.
Such assignments are removed in the meanwhile in pci_uio_map_resource(),
pci_vfio_map_resource_primary() and pci_vfio_map_resource_secondary() in
order to keep consistencies and avoid future questions.
Fixes: 756ce64b1ecd ("eal: introduce PCI ioport API") Cc: stable@dpdk.org Signed-off-by: Zhiyong Yang <zhiyong.yang@intel.com> Reviewed-by: Thomas Monjalon <thomas@monjalon.net>