dpdk.git
6 years agonet/mlx5: enable inlining data from multiple segments
Yongseok Koh [Wed, 27 Dec 2017 03:55:43 +0000 (19:55 -0800)]
net/mlx5: enable inlining data from multiple segments

mlx5_tx_burst() doesn't inline data from the 2nd segment. If there's still
enough room in the descriptor after inlining the 1st segment, further
inlining from the 2nd segment would be beneficial to save PCIe bandwidth.

Signed-off-by: Yongseok Koh <yskoh@mellanox.com>
6 years agonet/mlx5: fix overflow of Memory Region cache
Yongseok Koh [Fri, 15 Dec 2017 01:59:18 +0000 (17:59 -0800)]
net/mlx5: fix overflow of Memory Region cache

If there're more MR(Memroy Region)'s than the size of per-queue cache, the
cache can be overflowed and corrupt the following data structure in
mlx5_txq_data.

Fixes: 6e78005a9b30 ("net/mlx5: add reference counter on DPDK Tx queues")
Cc: stable@dpdk.org
Signed-off-by: Yongseok Koh <yskoh@mellanox.com>
Acked-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
6 years agonet/mlx5: fix Memory Region registration
Yongseok Koh [Fri, 15 Dec 2017 01:59:17 +0000 (17:59 -0800)]
net/mlx5: fix Memory Region registration

Although granularity of chunks in a mempool is a cacheline, addresses are
extended to align to page boundary for performance reason in device when
registering a MR (Memory Region). This could make some regions overlap,
then can cause Tx completion error due to incorrect LKEY search. If the
error occurs, the Tx queue will get stuck. To avoid it, end address of a
packet segment is used in LKEY search.

Fixes: b0b093845793 ("net/mlx5: use buffer address for LKEY search")
Cc: stable@dpdk.org
Reported-by: Hanoch Haim <hhaim@cisco.com>
Signed-off-by: Yongseok Koh <yskoh@mellanox.com>
Acked-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
6 years agonet/mlx5: fix VLAN configuration after port stop
Shahaf Shuler [Wed, 13 Dec 2017 14:03:10 +0000 (16:03 +0200)]
net/mlx5: fix VLAN configuration after port stop

Ethdev layer has an API to configure vlan setting on the flight, i.e.
when the port state is start.

Calling such API when the port is stopped may cause segmentation fault
as the related Verbs contexts has not been created yet.

Fixes: 09cb5b581762 ("net/mlx5: separate DPDK from verbs Rx queue objects")
Cc: stable@dpdk.org
Signed-off-by: Shahaf Shuler <shahafs@mellanox.com>
Acked-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
6 years agonet/sfc: fix main MAC address handling
Ivan Malov [Wed, 20 Dec 2017 09:52:14 +0000 (09:52 +0000)]
net/sfc: fix main MAC address handling

There is a school of thought that rte_eth_dev_default_mac_addr_set()
must call the PMD callback first and then save the new MAC address
in dev->data->mac_addrs[0]. If this concept gets approved, it will
break the current approach used in sfc driver as the latter relies
on the assumption that the new MAC address is already contained in
dev->data->mac_addrs[0], and, if adapter restart is needed to make
the HW apply the new address, the outdated value will be retrieved
from dev->data. In order to preclude any possible bugs, this patch
adds device private storage for the up-to-date copy of the address.

Fixes: c100fd464bb7 ("net/sfc: support main MAC address change")
Cc: stable@dpdk.org
Signed-off-by: Ivan Malov <ivan.malov@oktetlabs.ru>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
6 years agoethdev: fix typo in functions comment
Pablo de Lara [Tue, 19 Dec 2017 11:31:50 +0000 (11:31 +0000)]
ethdev: fix typo in functions comment

Fixes: fbde27f19ab8 ("ethdev: get default Rx/Tx configuration from dev info")
Cc: stable@dpdk.org
Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>
6 years agomaintainers: update for bnxt
Ajit Khaparde [Thu, 14 Dec 2017 17:53:33 +0000 (09:53 -0800)]
maintainers: update for bnxt

Remove Stephen Hurd and add Somnath Kotur to maintain bnxt PMD.

Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
6 years agoethdev: fix missing imissed counter in xstats
Olivier Matz [Thu, 14 Dec 2017 14:23:00 +0000 (15:23 +0100)]
ethdev: fix missing imissed counter in xstats

imissed counter has been set as deprecated in commit 49f386542af4
("ethdev: remove driver specific stats") and removed from the
rte_eth_xstats_name_off structure.

The imissed counter has been restored few commits later but has not been
restored in the rte_eth_stats structure. Add it back.

Fixes: 4eadb8ba11b7 ("ethdev: do not deprecate imissed counter")
Cc: stable@dpdk.org
Signed-off-by: Thibaut Collet <thibaut.collet@6wind.com>
Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
6 years agonet/sfc: fix DMA memory leak after kvarg processing failure
Andrew Rybchenko [Wed, 13 Dec 2017 07:12:18 +0000 (07:12 +0000)]
net/sfc: fix DMA memory leak after kvarg processing failure

Fixes: e56fa9c23e7a ("net/sfc: add kvarg control for MAC statistics update period")
Cc: stable@dpdk.org
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Reviewed-by: Ivan Malov <ivan.malov@oktetlabs.ru>
6 years agonet/sfc: fix multicast address list copy memory leak
Andrew Rybchenko [Wed, 13 Dec 2017 07:12:17 +0000 (07:12 +0000)]
net/sfc: fix multicast address list copy memory leak

Fixes: 295f647a38a2 ("net/sfc: set multicast address list in started state only")
Cc: stable@dpdk.org
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Reviewed-by: Ivan Malov <ivan.malov@oktetlabs.ru>
6 years agonet/sfc: stop periodic DMA if MAC stats upload fails
Andrew Rybchenko [Wed, 13 Dec 2017 07:12:16 +0000 (07:12 +0000)]
net/sfc: stop periodic DMA if MAC stats upload fails

Fixes: 3b257f7e6c0f ("net/sfc: request MAC stats upload immediately on port start")
Cc: stable@dpdk.org
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Reviewed-by: Ivan Malov <ivan.malov@oktetlabs.ru>
6 years agonet/qede: add support for GENEVE tunneling offload
Shahed Shaikh [Thu, 14 Dec 2017 06:36:03 +0000 (22:36 -0800)]
net/qede: add support for GENEVE tunneling offload

This patch refactors existing VXLAN tunneling offload code and enables
following features for GENEVE:
 - destination UDP port configuration
 - checksum offloads
 - filter configuration

Signed-off-by: Shahed Shaikh <shahed.shaikh@cavium.com>
Acked-by: Rasesh Mody <rasesh.mody@cavium.com>
6 years agonet/qede: fix to reject config with no Rx queue
Harish Patil [Thu, 14 Dec 2017 06:36:02 +0000 (22:36 -0800)]
net/qede: fix to reject config with no Rx queue

The qede firmware expects minimum one RX queue to be created, otherwise
it results in firmware exception. So a check is added to prevent that.

Fixes: ec94dbc57362 ("qede: add base driver")
Cc: stable@dpdk.org
Signed-off-by: Harish Patil <harish.patil@cavium.com>
6 years agonet/qede: fix to enable LRO over tunnels
Harish Patil [Thu, 14 Dec 2017 06:36:01 +0000 (22:36 -0800)]
net/qede: fix to enable LRO over tunnels

Enable LRO feature to work with tunnel encapsulation protocols.

Fixes: 29540be7efce ("net/qede: support LRO/TSO offloads")
Cc: stable@dpdk.org
Signed-off-by: Harish Patil <harish.patil@cavium.com>
6 years agonet/bonding: fix activated slave in 8023ad mode
Jerry Lilijun [Mon, 20 Nov 2017 07:15:41 +0000 (07:15 +0000)]
net/bonding: fix activated slave in 8023ad mode

In the function bond_mode_8023ad_enable(), the var i is used as slave
port id to the function bond_mode_8023ad_activate_slave().

This variable is only a index for array internals->active_slaves.
So its need to be fixed and change i to internals->active_slaves[i].

Fixes: 46fb43683679 ("bond: add mode 4")
Cc: stable@dpdk.org
Signed-off-by: Jerry Lilijun <jerry.lilijun@huawei.com>
Tested-by: Kyle Larose <klarose@sandvine.com>
Acked-by: Declan Doherty <declan.doherty@intel.com>
6 years agonet/mlx4: remove Tx completion elements counter
Matan Azrad [Wed, 6 Dec 2017 17:57:56 +0000 (17:57 +0000)]
net/mlx4: remove Tx completion elements counter

This counter saved the descriptor elements which are waiting to be
completed and was used to know if completion function should be
called.

This completion check can be done by other elements management
variables and we can prevent this counter management.

Remove this counter and replace the completion check easily by other
elements management variables.

Signed-off-by: Matan Azrad <matan@mellanox.com>
Acked-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
6 years agonet/mlx4: align Tx descriptors number
Matan Azrad [Wed, 6 Dec 2017 17:57:55 +0000 (17:57 +0000)]
net/mlx4: align Tx descriptors number

Using power of 2 descriptors number makes the ring management easier
and allows to use mask operation instead of wraparound conditions.

Adjust Tx descriptor number to be power of 2 and change calculation to
use mask accordingly.

Signed-off-by: Matan Azrad <matan@mellanox.com>
Acked-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
6 years agonet/mlx4: mitigate Tx send entry size calculations
Matan Azrad [Wed, 6 Dec 2017 17:57:54 +0000 (17:57 +0000)]
net/mlx4: mitigate Tx send entry size calculations

The previuse code took a send queue entry size for stamping from the
send queue entry pointed by completion queue entry; This 2 reads were
done per packet in completion stage.

The completion burst packets number is managed by fixed size stored in
Tx queue, so we can infer that each valid completion entry actually frees
the next fixed number packets.

The descriptors ring holds the send queue entry, so we just can infer
all the completion burst packet entries size by simple calculation and
prevent calculations per packet.

Adjust completion functions to free full completion bursts packets
by one time and prevent per packet work queue entry reads and
calculations.

Save only start of completion burst or Tx burst send queue entry
pointers in the appropriate descriptor element.

Signed-off-by: Matan Azrad <matan@mellanox.com>
Acked-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
6 years agonet/mlx4: merge Tx queue rings management
Matan Azrad [Wed, 6 Dec 2017 17:57:53 +0000 (17:57 +0000)]
net/mlx4: merge Tx queue rings management

The Tx queue send ring was managed by Tx block head,tail,count and mask
management variables which were used for managing the send queue remain
space and next places of empty or completed work queue entries.

This method suffered from an actual addresses recalculation per packet,
an unnecessary Tx block based calculations and an expensive dual
management of Tx rings.

Move send queue ring calculation to be based on actual addresses while
managing it by descriptors ring indexes.

Add new work queue entry pointer to the descriptor element to hold the
appropriate entry in the send queue.

Signed-off-by: Matan Azrad <matan@mellanox.com>
Acked-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
6 years agonet/mlx4: optimize Tx multi-segment case
Matan Azrad [Wed, 6 Dec 2017 17:57:52 +0000 (17:57 +0000)]
net/mlx4: optimize Tx multi-segment case

mlx4 Tx block can handle up to 4 data segments or control segment + up
to 3 data segments. The first data segment in each not first Tx block
must validate Tx queue wraparound and must use IO memory barrier before
writing the byte count.

The previous multi-segment code used "for" loop to iterate over all
packet segments and separated first Tx block data case by "if"
statements.

Use switch case and unconditional branches instead of "for" loop can
optimize the case and prevents the unnecessary checks for each data
segment; This hints to compiler to create optimized jump table.

Optimize this case by switch case and unconditional branches usage.

Signed-off-by: Matan Azrad <matan@mellanox.com>
Acked-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
6 years agonet/mlx4: remove restamping from Tx error path
Matan Azrad [Wed, 6 Dec 2017 17:57:51 +0000 (17:57 +0000)]
net/mlx4: remove restamping from Tx error path

At error time, the first 4 bytes of each WQE Tx block still have not
writen, so no need to stamp them because they are already stamped.

Signed-off-by: Matan Azrad <matan@mellanox.com>
Acked-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
6 years agonet/mlx4: remove unnecessary Tx wraparound checks
Matan Azrad [Wed, 6 Dec 2017 17:57:50 +0000 (17:57 +0000)]
net/mlx4: remove unnecessary Tx wraparound checks

There is no need to check Tx queue wraparound for segments which are
not at the beginning of a Tx block. Especially relevant in a single
segment case.

Remove unnecessary aforementioned checks from Tx path.

Signed-off-by: Matan Azrad <matan@mellanox.com>
Acked-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
6 years agonet/mlx4: fix Tx packet drop application report
Matan Azrad [Wed, 6 Dec 2017 17:57:49 +0000 (17:57 +0000)]
net/mlx4: fix Tx packet drop application report

When invalid lkey is sent to HW, HW sends an error notification in
completion function.

The previous code wouldn't crash but doesn't add any application report
in case of completion error, so application cannot know that packet
actually was dropped in case of invalid lkey.

Return back the lkey validation to Tx path.

Fixes: 2eee458746bc ("net/mlx4: remove error flows from Tx fast path")
Cc: stable@dpdk.org
Signed-off-by: Matan Azrad <matan@mellanox.com>
Acked-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
6 years agonet/mlx5: fix flow type for allmulti rules
Raslan Darawsheh [Tue, 5 Dec 2017 09:37:50 +0000 (11:37 +0200)]
net/mlx5: fix flow type for allmulti rules

Chnaged ibv_flow_attr type for allmulti rule to IBV_FLOW_ATTR_MC_DEFAULT
instead of IBV_FLOW_ATTR_NORMAL, in case allmulti was enabled.

Fixes: 272733b5 ("net/mlx5: use flow to enable unicast traffic")
Cc: stable@dpdk.org
Signed-off-by: Raslan Darawsheh <rasland@mellanox.com>
Acked-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
6 years agonet/mlx4: revert workaround for broken Verbs
Matan Azrad [Wed, 29 Nov 2017 09:21:26 +0000 (09:21 +0000)]
net/mlx4: revert workaround for broken Verbs

This workaround was needed to properly handle device removal with old
Mellanox OFED releases that are not supported by this PMD anymore.

Starting from rdma-core v16 this removal issue shouldn't happen when
setting MLX4_DEVICE_FATAL_CLEANUP environment variable to 1.

Set the aforementioned variable to 1.

Reverts: 5f4677c6ad5e ("net/mlx4: workaround verbs error after plug-out")
Cc: stable@dpdk.org
Signed-off-by: Matan Azrad <matan@mellanox.com>
Acked-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
6 years agonet/dpaa2: prefetch the parse results from next fd
Nipun Gupta [Fri, 8 Dec 2017 05:21:27 +0000 (10:51 +0530)]
net/dpaa2: prefetch the parse results from next fd

As there were less number of CPU cycles in between when we access
the parse results and when we prefetch them, this patch modifies
the prefetch of the next parse result.

Signed-off-by: Nipun Gupta <nipun.gupta@nxp.com>
6 years agonet/dpaa2: optimize Tx path for best case
Nipun Gupta [Fri, 8 Dec 2017 05:21:26 +0000 (10:51 +0530)]
net/dpaa2: optimize Tx path for best case

This patch handles the non-sg packets in more optimized way.

Signed-off-by: Nipun Gupta <nipun.gupta@nxp.com>
6 years agonet/dpaa2: optimize Rx path packet parsing
Nipun Gupta [Fri, 8 Dec 2017 05:21:25 +0000 (10:51 +0530)]
net/dpaa2: optimize Rx path packet parsing

Parsing the annotation has multiple if checks in the data path.
These are reduced for common cases like IPv4/IPv6 and UDP/TCP
packets to enhance performance of these generic cases.

Signed-off-by: Nipun Gupta <nipun.gupta@nxp.com>
6 years agonet/dpaa2: add parse function for LX2 device
Nipun Gupta [Fri, 8 Dec 2017 05:21:24 +0000 (10:51 +0530)]
net/dpaa2: add parse function for LX2 device

Adding support for DPDK packet parsing logic for LX2
platform to accommodate the new FRC format introduced in LX2.

Signed-off-by: Ashish Jain <ashish.jain@nxp.com>
Signed-off-by: Nipun Gupta <nipun.gupta@nxp.com>
6 years agonet/dpaa2: add VLAN insert offload
Hemant Agrawal [Fri, 8 Dec 2017 05:21:23 +0000 (10:51 +0530)]
net/dpaa2: add VLAN insert offload

Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
6 years agonet/dpaa2: align the frame size in MTU set
Ashish Jain [Fri, 8 Dec 2017 05:21:22 +0000 (10:51 +0530)]
net/dpaa2: align the frame size in MTU set

Setting correct frame size in dpaa2_dev_mtu_set
api call. Also correcting the correct max frame size
setting in hardware while dev_configure for jumbo frames

Signed-off-by: Ashish Jain <ashish.jain@nxp.com>
6 years agonet/dpaa2: add Rx queue count support
Hemant Agrawal [Fri, 8 Dec 2017 05:21:21 +0000 (10:51 +0530)]
net/dpaa2: add Rx queue count support

Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
6 years agobus/fslmc: add qman HW fq query count API
Hemant Agrawal [Fri, 8 Dec 2017 05:21:20 +0000 (10:51 +0530)]
bus/fslmc: add qman HW fq query count API

This patch add support for rx query debug API.

Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
6 years agobus/fslmc: add braces for pointers in macros
Nipun Gupta [Fri, 8 Dec 2017 05:21:19 +0000 (10:51 +0530)]
bus/fslmc: add braces for pointers in macros

Signed-off-by: Nipun Gupta <nipun.gupta@nxp.com>
6 years agobus/fslmc: expose platform SoC value register
Hemant Agrawal [Fri, 8 Dec 2017 05:21:18 +0000 (10:51 +0530)]
bus/fslmc: expose platform SoC value register

This patch expose the dpaa2 soc platform family type.
This is required to make some soc variant specific
decision during configuration and runtime.

Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
6 years agonet/dpaa2: advertise link status as driver flag
Hemant Agrawal [Fri, 8 Dec 2017 05:21:17 +0000 (10:51 +0530)]
net/dpaa2: advertise link status as driver flag

Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
6 years agobus/fslmc: support dynamic IOVA
Hemant Agrawal [Fri, 8 Dec 2017 05:21:16 +0000 (10:51 +0530)]
bus/fslmc: support dynamic IOVA

This patch add support for dynamic iova detection for DPAA2
devices and use of virtual address in such cases.

Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
6 years agodrivers: change the deprecated memseg physaddr to IOVA
Hemant Agrawal [Fri, 8 Dec 2017 05:21:15 +0000 (10:51 +0530)]
drivers: change the deprecated memseg physaddr to IOVA

DPAA and DPAA2 drivers were using memseg physaddr, which
has been deprecated.

Fixes: 7ba49d39f14c ("mem: rename segment address from physical to IOVA")
Cc: stable@dpdk.org
Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
Acked-by: Santosh Shukla <santosh.shukla@caviumnetworks.com>
6 years agobus/fslmc: fix the cplusplus macro closure
Hemant Agrawal [Fri, 8 Dec 2017 05:21:14 +0000 (10:51 +0530)]
bus/fslmc: fix the cplusplus macro closure

Fixes: 10f1614f36a6 ("drivers: refactor DPAA2 object definition")
Cc: stable@dpdk.org
Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
6 years agoapp/testpmd: support GENEVE pattern item in flow rules
Roman Zhukov [Fri, 1 Dec 2017 10:43:16 +0000 (10:43 +0000)]
app/testpmd: support GENEVE pattern item in flow rules

Add the ability to match VNI and protocol fields of GENEVE protocol
header.

Signed-off-by: Roman Zhukov <roman.zhukov@oktetlabs.ru>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Acked-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
6 years agoethdev: add GENEVE flow pattern item
Roman Zhukov [Fri, 1 Dec 2017 10:43:15 +0000 (10:43 +0000)]
ethdev: add GENEVE flow pattern item

Add new pattern item RTE_FLOW_ITEM_TYPE_GENEVE in flow API.
Add default mask for the item.

Signed-off-by: Roman Zhukov <roman.zhukov@oktetlabs.ru>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Acked-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
6 years agonet/vmxnet3: convert to 3-Clause BSD license
Shrikrishna Khare [Thu, 7 Dec 2017 21:59:04 +0000 (13:59 -0800)]
net/vmxnet3: convert to 3-Clause BSD license

On behalf of the DPDK Technical board, Hemant Agrawal observed that the
DPDK project's Intellectual Property Policy (http://dpdk.org/about/charter)
requires 3-Clause BSD license or an exception approval. However, two
vmxnet3 source files have 2-Clause BSD license.

This patch modifies those licenses to 3-Clause BSD license.

Reported-by: Hemant Agrawal <hemant.agrawal@nxp.com>
Acked-by: Cheryl Houser <chouser@vmware.com>
Acked-by: Bharat Mota <bmota@vmware.com>
Signed-off-by: Shrikrishna Khare <skhare@vmware.com>
6 years agonet/bnxt: support timesync
Somnath Kotur [Tue, 5 Dec 2017 07:26:56 +0000 (12:56 +0530)]
net/bnxt: support timesync

Implemented the 'time_sync' related APIs for supporting the PTP
protocol.

Signed-off-by: Somnath Kotur <somnath.kotur@broadcom.com>
Acked-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
6 years agonet/szedata2: fix check of mmap return value
Matej Vido [Thu, 7 Dec 2017 14:54:42 +0000 (15:54 +0100)]
net/szedata2: fix check of mmap return value

Fixes: 9eddbdb4b094 ("szedata2: support link state operations")
Cc: stable@dpdk.org
Signed-off-by: Matej Vido <vido@cesnet.cz>
6 years agonet/bonding: do not drop LACPDUs on slaves Tx failure
Declan Doherty [Thu, 30 Nov 2017 23:25:35 +0000 (23:25 +0000)]
net/bonding: do not drop LACPDUs on slaves Tx failure

In message (http://dpdk.org/ml/archives/dev/2017-November/081557.html)
it was noted that under congestion that the LACPDUs are dropped under
load.

This patch changes the drop logic to re-enqueue the LACPDU to the slaves
control message queue. This will allow resend attempts to be made in
subsequent tx_burst() calls on the bonded device.

Signed-off-by: Declan Doherty <declan.doherty@intel.com>
6 years agonet/mrvl: update documentation
Tomasz Duszynski [Tue, 5 Dec 2017 09:39:22 +0000 (10:39 +0100)]
net/mrvl: update documentation

Update MRVL NET PMD documentation.

Signed-off-by: Tomasz Duszynski <tdu@semihalf.com>
Acked-by: Jianbo Liu <jianbo.liu@arm.com>
6 years agodevtools: add mrvl net PMD to test-build
Tomasz Duszynski [Tue, 5 Dec 2017 09:39:21 +0000 (10:39 +0100)]
devtools: add mrvl net PMD to test-build

Add MRVL NET PMD to test build tool.

Signed-off-by: Tomasz Duszynski <tdu@semihalf.com>
Acked-by: Jianbo Liu <jianbo.liu@arm.com>
6 years agonet/mrvl: add extra error logs
Tomasz Duszynski [Tue, 5 Dec 2017 09:39:20 +0000 (10:39 +0100)]
net/mrvl: add extra error logs

Add extra error logs in a few places.

Signed-off-by: Tomasz Duszynski <tdu@semihalf.com>
Acked-by: Jianbo Liu <jianbo.liu@arm.com>
6 years agonet/mrvl: check if ppio is initialized
Tomasz Duszynski [Tue, 5 Dec 2017 09:39:19 +0000 (10:39 +0100)]
net/mrvl: check if ppio is initialized

Uninitialized ppio cannot be passed to MUSDK library routines as
application will crash.

Fix this by first checking whether ppio has been initialized.

Signed-off-by: Tomasz Duszynski <tdu@semihalf.com>
Acked-by: Jianbo Liu <jianbo.liu@arm.com>
6 years agonet/mrvl: do not enable port after setting MAC address
Tomasz Duszynski [Tue, 5 Dec 2017 09:39:18 +0000 (10:39 +0100)]
net/mrvl: do not enable port after setting MAC address

Setting enabled port's mac address caused it to stop receiving
packets. Now as that issue is fixed in library reenabling port
is no longer necessary.

Signed-off-by: Tomasz Duszynski <tdu@semihalf.com>
Acked-by: Jianbo Liu <jianbo.liu@arm.com>
6 years agonet/mrvl: query link status using library API
Tomasz Duszynski [Tue, 5 Dec 2017 09:39:17 +0000 (10:39 +0100)]
net/mrvl: query link status using library API

Up to now link status was updated unconditionally during
link_up()/link_down() calls thus one was never sure about
it's true status.

Using dedicated library API makes sure the true link status is set.

Signed-off-by: Tomasz Duszynski <tdu@semihalf.com>
Acked-by: Jianbo Liu <jianbo.liu@arm.com>
6 years agodrivers: switch mrvl to musdk-17.10
Tomasz Duszynski [Tue, 5 Dec 2017 09:39:16 +0000 (10:39 +0100)]
drivers: switch mrvl to musdk-17.10

Following changes are needed to switch to musdk-17.10:

- With a new version of the musdk library it's no longer necessary to
  explicitly define MVCONF_ARCH_DMA_ADDR_T_64BIT and
  CONF_PP2_BPOOL_COOKIE_SIZE.

  Proper defines are auto generated by ./configure script based on
  passed options and available after mv_autogen_comp_flags.h inclusion.

- API used to set promiscuous mode was renamed. Thus in order to
  compile against the latest library new API must be used.

Signed-off-by: Tomasz Duszynski <tdu@semihalf.com>
Acked-by: Jianbo Liu <jianbo.liu@arm.com>
6 years agonet/mlx4: restore inner VXLAN RSS support
Adrien Mazarguil [Thu, 23 Nov 2017 17:38:04 +0000 (18:38 +0100)]
net/mlx4: restore inner VXLAN RSS support

Inner VXLAN RSS was supported and performed by default prior to the entire
mlx4 refactoring that occurred in DPDK 17.11, however so far the new Verbs
RSS API did not provide means to enable it. This will be addressed in
Linux 4.15 and in RDMA core.

Thanks to RSS capabilities, the PMD can now probe for its support and
enable it again by default.

Signed-off-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
Acked-by: Neil Horman <nhorman@tuxdriver.com>
6 years agonet/mlx4: restore UDP RSS by probing capabilities
Adrien Mazarguil [Thu, 23 Nov 2017 17:38:02 +0000 (18:38 +0100)]
net/mlx4: restore UDP RSS by probing capabilities

Until now, UDP RSS support could not be relied on due to a problem in the
Linux kernel implementation and mlx4 RSS capabilities were not reported at
all, hence the PMD had to make assumptions.

Since both issues will be addressed simultaneously in Linux 4.15 (related
patches already upstream) and likely backported afterward, UDP RSS support
can be enabled by probing RSS capabilities.

Signed-off-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
Acked-by: Neil Horman <nhorman@tuxdriver.com>
6 years agonet/mlx4: use function to get default RSS fields
Adrien Mazarguil [Thu, 23 Nov 2017 17:38:00 +0000 (18:38 +0100)]
net/mlx4: use function to get default RSS fields

Supported RSS hash fields are listed in function mlx4_conv_rss_hf() and
duplicated in mlx4_flow_prepare(); the latter are used when RSS is
requested without specifying any parameters.

This commit standardizes on mlx4_conv_rss_hf().

Signed-off-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
Acked-by: Neil Horman <nhorman@tuxdriver.com>
6 years agonet/mlx4: fix documentation in private structure
Adrien Mazarguil [Thu, 23 Nov 2017 17:37:58 +0000 (18:37 +0100)]
net/mlx4: fix documentation in private structure

A couple of structure fields are not Doxygen-friendly.

Fixes: 5db1d364086e ("net/mlx4: restore Tx checksum offloads")
Cc: stable@dpdk.org
Signed-off-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
Acked-by: Neil Horman <nhorman@tuxdriver.com>
6 years agonet/mlx4: fix unnecessary include
Adrien Mazarguil [Thu, 23 Nov 2017 17:37:56 +0000 (18:37 +0100)]
net/mlx4: fix unnecessary include

Fixes: a2ce2121c01c ("net/mlx4: separate Tx configuration functions")
Cc: stable@dpdk.org
Signed-off-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
Acked-by: Neil Horman <nhorman@tuxdriver.com>
6 years agonet/mlx5: fix Tx checksum offloads
Nélio Laranjeiro [Mon, 20 Nov 2017 15:35:47 +0000 (16:35 +0100)]
net/mlx5: fix Tx checksum offloads

Tx checksum offloads are correctly handled in a single Tx burst function
whereas the capability is always set.
This causes VXLAN packet with checksum offloads request to be ignored when
the (E)MPS Tx functions are selected.

Fixes: f5fde5205101 ("net/mlx5: add hardware checksum offload for tunnel packets")
Cc: stable@dpdk.org
Signed-off-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
Acked-by: Yongseok Koh <yskoh@mellanox.com>
6 years agonet/thunderx: fix multi segment Tx function return
Jerin Jacob [Tue, 28 Nov 2017 13:22:38 +0000 (18:52 +0530)]
net/thunderx: fix multi segment Tx function return

multi segment version of tx burst function was not
returning the actual number of packets sent out
in PMD xmit function.

Fixes: 1c421f18e0 ("net/thunderx: add single and multi-segment Tx")
Cc: stable@dpdk.org
Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Signed-off-by: Sunil Kulkarni <sunil.kulkarni@caviumnetworks.com>
6 years agonet/nfp: configure default RSS reta table
Alejandro Lucero [Fri, 24 Nov 2017 15:31:49 +0000 (15:31 +0000)]
net/nfp: configure default RSS reta table

Some apps can enable RSS but not update the reta table nor the hash.
This patch adds a default reta table setup based on total number of
configured rx queues. The hash key is dependent on how the app
configures the rx_conf struct.

Signed-off-by: Alejandro Lucero <alejandro.lucero@netronome.com>
6 years agonet/nfp: fix CRC strip check behaviour
Alejandro Lucero [Fri, 24 Nov 2017 14:26:02 +0000 (14:26 +0000)]
net/nfp: fix CRC strip check behaviour

NFP does CRC strip by default and it is not configurable. But, even
if an app requests not to do it, that should not be a reason for PMD
configuration failure.

Fixes: defb9a5dd156 ("nfp: introduce driver initialization")
Cc: stable@dpdk.org
Signed-off-by: Alejandro Lucero <alejandro.lucero@netronome.com>
6 years agonet/nfp: fix jumbo settings
Alejandro Lucero [Fri, 24 Nov 2017 14:24:37 +0000 (14:24 +0000)]
net/nfp: fix jumbo settings

When jumbo frames is configured, the hardware mtu needs to be updated to
the specified max_rx_pkt_len. Also, changing mtu should be avoided once
the PMD port started.

Fixes: defb9a5dd156 ("nfp: introduce driver initialization")
Cc: stable@dpdk.org
Signed-off-by: Alejandro Lucero <alejandro.lucero@netronome.com>
6 years agonet/nfp: fix MTU settings
Alejandro Lucero [Fri, 24 Nov 2017 14:23:48 +0000 (14:23 +0000)]
net/nfp: fix MTU settings

The wrong mtu length was used for configuring the hardware. The
max_rx_pktlen reported was also wrong.

Fixes: defb9a5dd156 ("nfp: introduce driver initialization")
Cc: stable@dpdk.org
Signed-off-by: Alejandro Lucero <alejandro.lucero@netronome.com>
6 years agonet/bnxt: remove unused field from Rx queue struct
Ilya V. Matveychikov [Tue, 14 Nov 2017 12:42:20 +0000 (16:42 +0400)]
net/bnxt: remove unused field from Rx queue struct

Signed-off-by: Ilya V. Matveychikov <matvejchikov@gmail.com>
6 years agonet/bonding: fix bonding in 8023ad mode
Jacek Piasecki [Tue, 8 Aug 2017 12:56:43 +0000 (14:56 +0200)]
net/bonding: fix bonding in 8023ad mode

This patch blocks possibility to set master bonding by
rte_eth_bond_mode_set() in 802.3ad mode, as the API
doesn't prevent this.

Fixes: 6d72657ce379 ("net/bonding: add other aggregator modes")
Cc: stable@dpdk.org
Signed-off-by: Jacek Piasecki <jacekx.piasecki@intel.com>
Reviewed-by: Radu Nicolau <radu.nicolau@intel.com>
6 years agonet/mlx5: add physical port counters
Shahaf Shuler [Wed, 29 Nov 2017 11:29:08 +0000 (13:29 +0200)]
net/mlx5: add physical port counters

Extend the PMD extended statistics with more counters on the physical
port.

Signed-off-by: Shahaf Shuler <shahafs@mellanox.com>
Acked-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
6 years agodoc: update mlx5 statistics query
Shahaf Shuler [Wed, 29 Nov 2017 11:29:07 +0000 (13:29 +0200)]
doc: update mlx5 statistics query

Update the guide with more details on the different statistics query
possible with MLX5 PMD.

Signed-off-by: Shahaf Shuler <shahafs@mellanox.com>
Acked-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
6 years agonet/mlx4: store RSS hash result in mbufs
Raslan Darawsheh [Sun, 12 Nov 2017 14:36:22 +0000 (16:36 +0200)]
net/mlx4: store RSS hash result in mbufs

Add RSS hash result from CQE to mbuf,
Also, set PKT_RX_RSS_HASH in the ol_flags.

Signed-off-by: Raslan Darawsheh <rasland@mellanox.com>
Acked-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
6 years agonet/mlx5: remove redundant inline variable
Nélio Laranjeiro [Thu, 23 Nov 2017 09:22:36 +0000 (10:22 +0100)]
net/mlx5: remove redundant inline variable

A non max_inline 0 means an inline is requested, there is no need to
duplicate this information.

Signed-off-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
Acked-by: Yongseok Koh <yskoh@mellanox.com>
6 years agonet/mlx5: move variable declaration
Nélio Laranjeiro [Thu, 23 Nov 2017 09:22:35 +0000 (10:22 +0100)]
net/mlx5: move variable declaration

Most of the variable in mlx5_tx_burst() are defined too soon.
This commit moves them their uses C block of code.

Signed-off-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
Acked-by: Yongseok Koh <yskoh@mellanox.com>
6 years agonet/mlx5: remove 32-bit support
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.

Signed-off-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
Acked-by: Yongseok Koh <yskoh@mellanox.com>
6 years agonet/mlx5: fix secondary process verification
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.

Fixes: 87ec44ce1651 ("net/mlx5: add operations for secondary process")
Cc: stable@dpdk.org
Signed-off-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
Acked-by: Yongseok Koh <yskoh@mellanox.com>
6 years agonet/mlx5: remove get priv internal function
Nélio Laranjeiro [Thu, 23 Nov 2017 09:22:32 +0000 (10:22 +0100)]
net/mlx5: remove get priv internal function

mlx5_get_priv() is barely use across the driver.  To avoid mixing access,
this function is definitely removed.

Signed-off-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
Acked-by: Yongseok Koh <yskoh@mellanox.com>
6 years agonet/mlx5: remove parser/flow drop queue
Nélio Laranjeiro [Thu, 23 Nov 2017 09:30:21 +0000 (10:30 +0100)]
net/mlx5: remove parser/flow drop queue

This drop queue can be handled efficiently by using the drop flag in the
context.

Signed-off-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
Acked-by: Yongseok Koh <yskoh@mellanox.com>
6 years agonet/mlx5: cleanup allocation of ethtool stats
Thierry Herbelot [Fri, 17 Nov 2017 13:51:34 +0000 (14:51 +0100)]
net/mlx5: cleanup allocation of ethtool stats

Simplify the computation for the needed size:
- exact size for the structure header,
- exact size for a number of 64-bit counters.

Fixes: a4193ae3bc4f ("net/mlx5: support extended statistics")
Cc: stable@dpdk.org
Signed-off-by: Thierry Herbelot <thierry.herbelot@6wind.com>
Acked-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
6 years agonet/liquidio: support queue re-configuration
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.

Signed-off-by: Shijith Thotton <shijith.thotton@caviumnetworks.com>
6 years agonet/sfc/base: remove Falcon-specific concurrency check
Ivan Malov [Mon, 20 Nov 2017 11:01:36 +0000 (11:01 +0000)]
net/sfc/base: remove Falcon-specific concurrency check

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>
6 years agonet/sfc/base: move BIU test code into Siena-specific file
Mark Spender [Thu, 16 Nov 2017 08:04:41 +0000 (08:04 +0000)]
net/sfc/base: move BIU test code into Siena-specific file

Signed-off-by: Mark Spender <mspender@solarflare.com>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
6 years agonet/sfc/base: fix PreFAST static analysis warning (C6001)
Andrew Lee [Thu, 16 Nov 2017 08:04:40 +0000 (08:04 +0000)]
net/sfc/base: fix PreFAST static analysis warning (C6001)

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>
6 years agonet/sfc/base: expand on comment on number of queues field
Mark Spender [Thu, 16 Nov 2017 08:04:39 +0000 (08:04 +0000)]
net/sfc/base: expand on comment on number of queues field

Expand on comment on RSS_CONTEXT_ALLOC_IN_NUM_QUEUES field.

Signed-off-by: Mark Spender <mspender@solarflare.com>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
6 years agonet/sfc/base: remove obsolete check for pre-Siena hardware
Mark Spender [Thu, 16 Nov 2017 08:04:38 +0000 (08:04 +0000)]
net/sfc/base: remove obsolete check for pre-Siena hardware

The fail4 label was used twice, so it doesn't need removing.

Signed-off-by: Mark Spender <mspender@solarflare.com>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
6 years agonet/sfc/base: fix warnings from VS2015 C compiler (C4214)
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>
6 years agonet/sfc/base: fix warnings from VS2015 C compiler (C4057)
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>
6 years agonet/sfc/base: fix warnings from VS2015 C compiler (C4189)
Andrew Lee [Thu, 16 Nov 2017 08:04:35 +0000 (08:04 +0000)]
net/sfc/base: fix warnings from VS2015 C compiler (C4189)

Fix multiple level 4 warnings
"C4189: 'xxx': local variable is initialized but not referenced";
no functional changes.

Fixes: 19b64c6ac35f ("net/sfc/base: import libefx base")
Fixes: dfb3b1ce15f6 ("net/sfc/base: import monitors access via MCDI")
Fixes: e7cd430c864f ("net/sfc/base: import SFN7xxx family support")
Cc: stable@dpdk.org
Signed-off-by: Andrew Lee <alee@solarflare.com>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
6 years agonet/sfc/base: fix warnings from VS2015 C compiler (C4100)
Andrew Lee [Thu, 16 Nov 2017 08:04:34 +0000 (08:04 +0000)]
net/sfc/base: fix warnings from VS2015 C compiler (C4100)

Fix multiple level 4 warnings
"C4100: 'xxx': unreferenced formal parameter"
no functional changes.

The _NOTE(ARGUNUSED(xxx)) annotations are being exposed to the Visual
Studio 2015 C compiler with the following:

    #define _NOTE_ARGUNUSED(...) UNREFERENCED_PARAMETER((__VA_ARGS__));
    #define _NOTE(_annotation)   _NOTE_ ## _annotation

Fixes: 099c33bef343 ("net/sfc/base: import MCDI proxy authorization")
Fixes: e7cd430c864f ("net/sfc/base: import SFN7xxx family support")
Fixes: 7243cc0869f8 ("net/sfc/base: import software per-queue statistics")
Fixes: d96a34d165b1 ("net/sfc/base: import NVRAM support")
Fixes: 05fce2ce8451 ("net/sfc/base: import libefx licensing")
Cc: stable@dpdk.org
Signed-off-by: Andrew Lee <alee@solarflare.com>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
6 years agonet/sfc/base: fix warnings from VS2015 C compiler (C4245)
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>
6 years agonet/sfc/base: fix warnings from VS2015 C compiler (C4244)
Andrew Lee [Thu, 16 Nov 2017 08:04:32 +0000 (08:04 +0000)]
net/sfc/base: fix warnings from VS2015 C compiler (C4244)

Fix level 4 warning
"C4244: '+=': conversion from 'unsigned int' to 'uint16_t', possible loss
of data"; no functional changes.

Fixes: 946ba3b6941a ("net/sfc/base: import VPD support")
Cc: stable@dpdk.org
Signed-off-by: Andrew Lee <alee@solarflare.com>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
6 years agonet/sfc/base: fix warnings from VS2015 C compiler (C4310)
Andrew Lee [Thu, 16 Nov 2017 08:04:31 +0000 (08:04 +0000)]
net/sfc/base: fix warnings from VS2015 C compiler (C4310)

Fix level 4 warning
"C4310: cast truncates constant value";
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>
6 years agonet/sfc/base: fix probes in licensing support
Mark Spender [Thu, 16 Nov 2017 08:04:30 +0000 (08:04 +0000)]
net/sfc/base: fix probes in licensing support

EFSYS_PROBE1 takes one typed value (in addition to the probe name),
whereas EFSYS_PROBE has just the probe name.

Which to use is determined by the probe name – “fail1” probes are
expected to include the function result.

Fixes: 05fce2ce8451 ("net/sfc/base: import libefx licensing")
Cc: stable@dpdk.org
Signed-off-by: Mark Spender <mspender@solarflare.com>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
6 years agonet/sfc/base: fix diagnostics support build without Siena
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>
6 years agonet/sfc/base: allow to use PHY stats on Huntington/Medford
Mark Spender [Thu, 16 Nov 2017 08:04:28 +0000 (08:04 +0000)]
net/sfc/base: allow to use PHY stats on Huntington/Medford

EFSYS_OPT_PHY_STATS can be used with Huntington or Medford, not just Siena.

Signed-off-by: Mark Spender <mspender@solarflare.com>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
6 years agonet/sfc/base: fix coding style
Andy Moreton [Thu, 16 Nov 2017 08:04:27 +0000 (08:04 +0000)]
net/sfc/base: fix coding style

Signed-off-by: Andy Moreton <amoreton@solarflare.com>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
6 years agonet/sfc/base: remove unused defined for WPTR alignment
Andy Moreton [Thu, 16 Nov 2017 08:04:26 +0000 (08:04 +0000)]
net/sfc/base: remove unused defined for WPTR alignment

MEDFORD_RX_WPTR_ALIGN is not used.

Signed-off-by: Andy Moreton <amoreton@solarflare.com>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
6 years agonet/sfc/base: support new sensors
Andrew Jackson [Thu, 16 Nov 2017 08:04:25 +0000 (08:04 +0000)]
net/sfc/base: support new sensors

Signed-off-by: Andrew Jackson <ajackson@solarflare.com>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
6 years agonet/sfc/base: add new sensors
Andy Moreton [Thu, 16 Nov 2017 08:04:24 +0000 (08:04 +0000)]
net/sfc/base: add new sensors

Signed-off-by: Andy Moreton <amoreton@solarflare.com>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
6 years agonet/sfc/base: move Siena-specific defs to right header
Andy Moreton [Thu, 16 Nov 2017 08:04:23 +0000 (08:04 +0000)]
net/sfc/base: move Siena-specific defs to right header

Signed-off-by: Andy Moreton <amoreton@solarflare.com>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
6 years agonet/sfc/base: fix build issue with PHY LED control enabled
Vijay Srivastava [Thu, 16 Nov 2017 08:04:22 +0000 (08:04 +0000)]
net/sfc/base: fix build issue with PHY LED control enabled

Fixed build issue with the EFSYS_OPT_PHY_LED_CONTROL for Huntigton and
Medford.

Fixes: b1d06c75e32c ("net/sfc/base: import PHY LEDs control")
Fixes: 0a7864349106 ("net/sfc/base: import PHY statistics")
Cc: stable@dpdk.org
Signed-off-by: Vijay Srivastava <vijays@solarflare.com>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
6 years agonet/sfc/base: improve names for TXQ descriptor counts
Andy Moreton [Thu, 16 Nov 2017 08:04:21 +0000 (08:04 +0000)]
net/sfc/base: improve names for TXQ descriptor counts

Signed-off-by: Andy Moreton <amoreton@solarflare.com>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
6 years agonet/sfc/base: improve names for RXQ descriptor counts
Andy Moreton [Thu, 16 Nov 2017 08:04:20 +0000 (08:04 +0000)]
net/sfc/base: improve names for RXQ descriptor counts

Signed-off-by: Andy Moreton <amoreton@solarflare.com>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
6 years agonet/sfc/base: improve names for EVQ descriptor counts
Andy Moreton [Thu, 16 Nov 2017 08:04:19 +0000 (08:04 +0000)]
net/sfc/base: improve names for EVQ descriptor counts

Signed-off-by: Andy Moreton <amoreton@solarflare.com>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>