Commit Graph

319 Commits

Author SHA1 Message Date
Manish Chopra
5700d0f0b4 net/qede: support VF FLR
This patch adds required bit to handle VF FLR
indication from Management FW (MFW) of the device

With that VFs were able to load in VM (VF attached as PCI
passthrough to the guest VM) followed by FLR successfully

Updated the docs/guides with the feature support

Signed-off-by: Manish Chopra <manishc@marvell.com>
Signed-off-by: Igor Russkikh <irusskikh@marvell.com>
Signed-off-by: Rasesh Mody <rmody@marvell.com>
2020-09-30 19:19:11 +02:00
Manish Chopra
d459b04329 net/qede: add infrastructure support for VF load
This patch adds necessary infrastructure support (required to handle
messages from VF and sending ramrod on behalf of VF's configuration
request from alarm handler context) to start/load the VF-PMD driver
instance on top of PF-PMD driver instance.

Signed-off-by: Manish Chopra <manishc@marvell.com>
Signed-off-by: Igor Russkikh <irusskikh@marvell.com>
Signed-off-by: Rasesh Mody <rmody@marvell.com>
2020-09-30 19:19:11 +02:00
Manish Chopra
92c6786e85 net/qede: define PCI config space specific osals
This patch defines various PCI config space access APIs
in order to read and find IOV specific PCI capabilities.

With these definitions implemented, it enables the base
driver to do SR-IOV specific initialization and HW specific
configuration required from PF-PMD driver instance.

Signed-off-by: Manish Chopra <manishc@marvell.com>
Signed-off-by: Igor Russkikh <irusskikh@marvell.com>
Signed-off-by: Rasesh Mody <rmody@marvell.com>
2020-09-30 19:19:11 +02:00
Devendra Singh Rawat
9197943008 net/qede: fix milliseconds sleep macro
The macro defined for milliseconds sleep was not putting the thread
to sleep and was simply calling a delay routine. This fix redefines
the macro to call the correct rte sleep API.

Fixes: ec94dbc573 ("qede: add base driver")
Cc: stable@dpdk.org

Signed-off-by: Devendra Singh Rawat <dsinghrawat@marvell.com>
Signed-off-by: Igor Russkikh <irusskikh@marvell.com>
Signed-off-by: Rasesh Mody <rmody@marvell.com>
2020-09-30 19:19:09 +02:00
Ferruh Yigit
35b527441f net/qede/base: add missing licence
Adding BSD-3 SPDX license tag.

Fixes: 519438f7c1 ("net/qede/base: re-arrange few structures for DDC")
Cc: stable@dpdk.org

Reported-by: Stephen Hemminger <stephen@networkplumber.org>
Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
Acked-by: Igor Russkikh <irusskikh@marvell.com>
2020-09-30 19:19:09 +02:00
Rasesh Mody
a50d7cbbda net/qede: support registers dump
Add support for .get_reg eth_dev ops which will be used to collect the
firmware debug data.

PMD on detecting on some HW errors will collect the FW/HW Dump to a
buffer and then it will save it to a file implemented in
qede_save_fw_dump().

Dump file location and name:
Location: <RTE_SDK> or DPDK root
Name: qede_pmd_dump_mm-dd-yy_hh-mm-ss.bin

DPDK applications can initiate a debug data collection by invoking DPDK
library’s rte_eth_dev_get_reg_info() API. This API invokes .get_reg()
interface in the PMD.

PMD implementation of .get_reg() collects the FW/HW Dump, saves it to
data field of rte_dev_reg_info and passes it to the application. It’s
the responsibility of the application to save the FW/HW Dump to a file.
We recommendation using the file name format used by qede_save_fw_dump().

Signed-off-by: Rasesh Mody <rmody@marvell.com>
Signed-off-by: Igor Russkikh <irusskikh@marvell.com>
2020-07-11 06:18:53 +02:00
Rasesh Mody
ec55c11879 net/qede: add infrastructure for debug data collection
The patch adds QEDE PMD ops and APIs to calculate the size and collect
the debug dump for various firmware components. The patch adds new files
qede_debug.[ch] that has all the firmware debug data collection
infrastructure changes.

Signed-off-by: Rasesh Mody <rmody@marvell.com>
Signed-off-by: Igor Russkikh <irusskikh@marvell.com>
2020-07-11 06:18:53 +02:00
Rasesh Mody
2352f348c9 net/qede/base: add changes for debug data collection
This patch adds base driver APIs required for debug data collection.
It adds support for dumping internal lookup tables(ilt), reading nvram
image, register definitions.

Signed-off-by: Rasesh Mody <rmody@marvell.com>
Signed-off-by: Igor Russkikh <irusskikh@marvell.com>
2020-07-11 06:18:53 +02:00
Rasesh Mody
519438f7c1 net/qede/base: re-arrange few structures for DDC
This patch rearranges some of the base driver structures which will be
also used by debug data collection (DDC) implementation. It adds a new
file ecore_hsi_func_common.h with Physical, Virtual memory descriptors.

Signed-off-by: Rasesh Mody <rmody@marvell.com>
Signed-off-by: Igor Russkikh <irusskikh@marvell.com>
2020-07-11 06:18:53 +02:00
Joyce Kong
5018f1fc5f net/qede: use common bit operations API
Remove its own bit operation APIs and use the common one,
this can reduce the code duplication largely.

Signed-off-by: Joyce Kong <joyce.kong@arm.com>
Reviewed-by: Gavin Hu <gavin.hu@arm.com>
2020-06-16 14:34:42 +02:00
Rasesh Mody
f97b56f9f1 net/qede: support FW version query
Add support for get firmware version operation.

Get and dump multi boot image (MBI) version as part of get
firmware version string along with Management firmware (MFW) version.
Use qede_fw_version_get() for PMD info logs.

Signed-off-by: Yash Sharma <ysharma@marvell.com>
Signed-off-by: Rasesh Mody <rmody@marvell.com>
Signed-off-by: Igor Russkikh <irusskikh@marvell.com>
2020-05-05 15:54:26 +02:00
Thomas Monjalon
f2fc83b40f replace unused attributes
There is a common macro __rte_unused, avoiding warnings,
which is now used where appropriate for consistency.

Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
2020-04-16 18:30:58 +02:00
Pavan Nikhilesh
acec04c4b2 build: disable experimental API check internally
Remove setting ALLOW_EXPERIMENTAL_API individually for each Makefile and
meson.build. Instead, enable ALLOW_EXPERIMENTAL_API flag across app, lib
and drivers.
This changes reduces the clutter across the project while still
maintaining the functionality of ALLOW_EXPERIMENTAL_API i.e. warning
external applications about experimental API usage.

Signed-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com>
Signed-off-by: David Marchand <david.marchand@redhat.com>
2020-04-14 16:22:34 +02:00
Manish Chopra
f44ca48c81 net/qede: fix VF reload
On ungraceful termination of DPDK application, PMD VF driver
fails to re-load due to PF seeing the VF in unexpected state
during VF acquisition handshake.

This patch fixes it by allowing VF to request the PF for soft
FLR during the load in such cases so that it can get cleanly
re-loaded.

Fixes: 2ea6f76aff ("qede: add core driver")
Cc: stable@dpdk.org

Signed-off-by: Manish Chopra <manishc@marvell.com>
Signed-off-by: Shahed Shaikh <shshaikh@marvell.com>
Signed-off-by: Rasesh Mody <rmody@marvell.com>
Acked-by: Rasesh Mody <rmody@marvell.com>
2020-02-19 13:51:06 +01:00
Rasesh Mody
117e4a77ba net/qede/base: fix number of ports per engine
Fix the way in which the number of ports per engine of an adapter is
determined by reading port mode register. Set default value to 1.

Fixes: 3b307c55f2 ("net/qede/base: update FW to 8.40.25.0")
Cc: stable@dpdk.org

Signed-off-by: Rasesh Mody <rmody@marvell.com>
2020-01-17 19:46:26 +01:00
Dharmik Thakkar
d0ef40a1b2 net/qede: remove local bool type
Replace 'typedef int bool' with 'stdbool.h' to avoid possible
multiple definitions of 'bool'.

(Not sure if the previous code is checking for true/false condition.
Recommend careful review on this patch.)

Signed-off-by: Dharmik Thakkar <dharmik.thakkar@arm.com>
Reviewed-by: Phil Yang <phil.yang@arm.com>
Reviewed-by: Ruifeng Wang <ruifeng.wang@arm.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
2020-01-17 19:46:02 +01:00
Rasesh Mody
58bb1ee4a5 net/qede/base: update FW to 8.40.33.0
In our testing we have identified a critical FW bug. Performance
is degraded significantly for certain packet sizes with 8.40.25.0 FW.

This patch updates the FW to version 8.40.33.0. The updated FW has a
fix to performance issue.

The patch also adds initialization for FW overlay RAM as part of
hardware initialization which is required by the new FW.

Fixes: 3b307c55f2 ("net/qede/base: update FW to 8.40.25.0")
Cc: stable@dpdk.org

Signed-off-by: Rasesh Mody <rmody@marvell.com>
2019-11-08 23:15:04 +01:00
Andrzej Ostruszka
db8af647da net/qede: clean LTO warnings
During LTO build compiler reports some 'false positive' warnings about
variables being possibly used uninitialized.  This patch silences these
warnings.

Exemplary compiler warning to suppress (with LTO enabled):
error: ‘transceiver_type’ may be used uninitialized in this function
[-Werror=maybe-uninitialized]
  switch (transceiver_type) {

Signed-off-by: Andrzej Ostruszka <aostruszka@marvell.com>
2019-11-08 15:23:41 +01:00
Rasesh Mody
3b307c55f2 net/qede/base: update FW to 8.40.25.0
This patch updates the FW to 8.40.25.0 and corresponding base driver
changes. It also updates the PMD version to 2.11.0.1. The FW updates
consists of enhancements and fixes as described below.

 - VF RX queue start ramrod can get stuck due to completion error.
   Return EQ completion with error, when fail to load VF data. Use VF
   FID in RX queue start ramrod
 - Fix big receive buffer initialization for 100G to address failure
   leading to BRB hardware assertion
 - GRE tunnel traffic doesn't run when non-L2 ethernet protocol is
   enabled, fix FW to not forward tunneled SYN packets to LL2.
 - Fix the FW assert that is caused during vport_update when
   tx-switching is enabled
 - Add initial FW support for VF Representors
 - Add ecore_get_hsi_def_val() API to get default HSI values
 - Move following from .c to .h files:
   TSTORM_QZONE_START and MSTORM_QZONE_START
   enum ilt_clients
   renamed struct ecore_dma_mem to phys_mem_desc and moved
 - Add ecore_cxt_set_cli() and ecore_cxt_set_blk() APIs to set client
   config and block details
 - Use SET_FIELD() macro where appropriate
 - Address spell check and code alignment issues

Signed-off-by: Rasesh Mody <rmody@marvell.com>
2019-10-23 16:43:09 +02:00
Rasesh Mody
7ed1cd53db net/qede/base: update HSI
Update hardware software common base driver code in preparation to
update the firmware to version 8.40.25.0.

Signed-off-by: Rasesh Mody <rmody@marvell.com>
2019-10-23 16:43:09 +02:00
Rasesh Mody
ea85629fc9 net/qede/base: move DMAE to HSI
Move DMA engine (DMAE) structures from base driver to HSI module.
Use DMAE_PARAMS_* in place of ECORE_DMAE_FLAG_*.
Enforce SET_FIELD() macro where appropriate.

Signed-off-by: Rasesh Mody <rmody@marvell.com>
2019-10-23 16:43:08 +02:00
Rasesh Mody
7172847eaf net/qede/base: update RT defs NVM cfg and MCP
Update and add runtime array offsets (rt defs), non-volatile memory
configuration options (nvm cfg) and management co-processor (mcp)
shared code in preparation to update the firmware to version 8.40.25.0.

Signed-off-by: Rasesh Mody <rmody@marvell.com>
2019-10-23 16:43:08 +02:00
Rasesh Mody
52fa735c22 net/qede/base: rename HSI datatypes and functions
This patch changes code with E4/E5/e4/e5/BB_K2 prefixes and suffixes.
 - HSI datatypes renaming - removed all e5 datatypes and renamed
   all e4 datatypes to be prefix less/suffix less.
   (s/_E4//; s/_e4//; s/E4_//).
 - HSI functions - removed e4/e5 prefixes/suffixes.

Signed-off-by: Rasesh Mody <rmody@marvell.com>
2019-10-23 16:43:08 +02:00
Rasesh Mody
8e950a8691 net/qede/base: lock entire QM reconfiguration flow
Multiple flows can issue QM reconfiguration, hence hold the lock longer
to account for entire duration of reconfiguration flow.

Signed-off-by: Rasesh Mody <rmody@marvell.com>
2019-10-23 16:43:08 +02:00
Rasesh Mody
6fa4035553 net/qede/base: change MFW mailbox command log verbosity
Change management FW mailboxes DP_VERBOSE module to ECORE_MSG_HW

Signed-off-by: Rasesh Mody <rmody@marvell.com>
2019-10-23 16:43:08 +02:00
Rasesh Mody
766d68ac2d net/qede/base: fix page index for PBL chains
ecore_chain_set_prod/cons() sets the wrong page index in chains with
non-power of 2 page count. Fix ecore_chain_set_prod/cons() for PBL
chains with non power of 2 page count.
Calculate the right page index according to current indexes.

Fixes: ec94dbc573 ("qede: add base driver")
Cc: stable@dpdk.org

Signed-off-by: Rasesh Mody <rmody@marvell.com>
2019-10-23 16:43:08 +02:00
Shahed Shaikh
2c0784eb88 net/qede: implement flow drop action
Add support to configure drop action in rte_flow
infrastructure and add counter for dropped
packets due to this filter action "rx_gft_filter_drop".

Also, update supported flows and actions in qede guide.

Signed-off-by: Shahed Shaikh <shshaikh@marvell.com>
2019-09-20 10:19:41 +02:00
Michael Santana
f4be6a9a29 fix off-by-one errors in snprintf
snprintf guarantees to always correctly place a null terminator
in the buffer string. So manually placing a null terminator
in a buffer right after a call to snprintf is redundant code.

Additionally, there is no need to use 'sizeof(buffer) - 1' in snprintf as this
means we are not using the last character in the buffer. 'sizeof(buffer)' is
enough.

Cc: stable@dpdk.org

Signed-off-by: Michael Santana <msantana@redhat.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Anatoly Burakov <anatoly.burakov@intel.com>
2019-05-29 13:02:53 +02:00
Olivier Matz
35b2d13fd6 net: add rte prefix to ether defines
Add 'RTE_' prefix to defines:
- rename ETHER_ADDR_LEN as RTE_ETHER_ADDR_LEN.
- rename ETHER_TYPE_LEN as RTE_ETHER_TYPE_LEN.
- rename ETHER_CRC_LEN as RTE_ETHER_CRC_LEN.
- rename ETHER_HDR_LEN as RTE_ETHER_HDR_LEN.
- rename ETHER_MIN_LEN as RTE_ETHER_MIN_LEN.
- rename ETHER_MAX_LEN as RTE_ETHER_MAX_LEN.
- rename ETHER_MTU as RTE_ETHER_MTU.
- rename ETHER_MAX_VLAN_FRAME_LEN as RTE_ETHER_MAX_VLAN_FRAME_LEN.
- rename ETHER_MAX_VLAN_ID as RTE_ETHER_MAX_VLAN_ID.
- rename ETHER_MAX_JUMBO_FRAME_LEN as RTE_ETHER_MAX_JUMBO_FRAME_LEN.
- rename ETHER_MIN_MTU as RTE_ETHER_MIN_MTU.
- rename ETHER_LOCAL_ADMIN_ADDR as RTE_ETHER_LOCAL_ADMIN_ADDR.
- rename ETHER_GROUP_ADDR as RTE_ETHER_GROUP_ADDR.
- rename ETHER_TYPE_IPv4 as RTE_ETHER_TYPE_IPv4.
- rename ETHER_TYPE_IPv6 as RTE_ETHER_TYPE_IPv6.
- rename ETHER_TYPE_ARP as RTE_ETHER_TYPE_ARP.
- rename ETHER_TYPE_VLAN as RTE_ETHER_TYPE_VLAN.
- rename ETHER_TYPE_RARP as RTE_ETHER_TYPE_RARP.
- rename ETHER_TYPE_QINQ as RTE_ETHER_TYPE_QINQ.
- rename ETHER_TYPE_ETAG as RTE_ETHER_TYPE_ETAG.
- rename ETHER_TYPE_1588 as RTE_ETHER_TYPE_1588.
- rename ETHER_TYPE_SLOW as RTE_ETHER_TYPE_SLOW.
- rename ETHER_TYPE_TEB as RTE_ETHER_TYPE_TEB.
- rename ETHER_TYPE_LLDP as RTE_ETHER_TYPE_LLDP.
- rename ETHER_TYPE_MPLS as RTE_ETHER_TYPE_MPLS.
- rename ETHER_TYPE_MPLSM as RTE_ETHER_TYPE_MPLSM.
- rename ETHER_VXLAN_HLEN as RTE_ETHER_VXLAN_HLEN.
- rename ETHER_ADDR_FMT_SIZE as RTE_ETHER_ADDR_FMT_SIZE.
- rename VXLAN_GPE_TYPE_IPV4 as RTE_VXLAN_GPE_TYPE_IPV4.
- rename VXLAN_GPE_TYPE_IPV6 as RTE_VXLAN_GPE_TYPE_IPV6.
- rename VXLAN_GPE_TYPE_ETH as RTE_VXLAN_GPE_TYPE_ETH.
- rename VXLAN_GPE_TYPE_NSH as RTE_VXLAN_GPE_TYPE_NSH.
- rename VXLAN_GPE_TYPE_MPLS as RTE_VXLAN_GPE_TYPE_MPLS.
- rename VXLAN_GPE_TYPE_GBP as RTE_VXLAN_GPE_TYPE_GBP.
- rename VXLAN_GPE_TYPE_VBNG as RTE_VXLAN_GPE_TYPE_VBNG.
- rename ETHER_VXLAN_GPE_HLEN as RTE_ETHER_VXLAN_GPE_HLEN.

Do not update the command line library to avoid adding a dependency to
librte_net.

Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
Reviewed-by: Stephen Hemminger <stephen@networkplumber.org>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
2019-05-24 13:34:45 +02:00
Andrius Sirvys
902f389f9b drivers/net: fix shifting 32-bit signed variable 31 times
Shifting signed 32-bit values by 31-bits has the potential for
unexpected  outcomes as compiler can overwrite a bit.
Specified that values are unsigned.

Errors are observed from running cppcheck.

Bugzilla ID: 58
Fixes: 69e209be54 ("net/axgbe: add register map and related macros")
Fixes: b5bf771922 ("bnx2x: driver support routines")
Fixes: ed2ced6fe9 ("net/bnxt: check initialization before accessing stats")
Fixes: 6fda3f0ddd ("net/cxgbe: add API to program hardware MPS table")
Fixes: bdb244b969 ("e1000: whitespace changes")
Fixes: 5a32a257f9 ("e1000: more NICs in base driver")
Fixes: 2fe669f4bc ("net/nfp: support MAC address change")
Fixes: defb9a5dd1 ("nfp: introduce driver initialization")
Fixes: ec94dbc573 ("qede: add base driver")
Fixes: d2e7d931d0 ("net/qede/base: formatting changes")
Fixes: cdc07e83bb ("net/tap: add eBPF program file")
Cc: stable@dpdk.org

Signed-off-by: Andrius Sirvys <andrius.sirvys@intel.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
2019-03-01 18:17:36 +01:00
Rasesh Mody
66c4904f92 net/qede/base: fix to initialize HW for LLH filters
During initialization of leading PF, we need to initialize HW for LLH
filters. Set HW init parameter to set the engine affinity for
multiple engine adapters.

Fixes: 3eed444a96 ("net/qede/base: changes for 100G")

Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
2018-11-05 15:01:25 +01:00
Ferruh Yigit
520dd9923b drivers: prefix global variables with module name
Some global variables are defined with generic names, add component name
as prefix to variables to prevent collusion with application variables.

Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Acked-by: Shreyansh Jain <shreyansh.jain@nxp.com>
Acked-by: Tianfei Zhang <tianfei.zhang@intel.com>
2018-10-29 02:34:21 +01:00
Ferruh Yigit
b74fd6b842 add missing static keyword to globals
Some global variables can indeed be static, add static keyword to them.

Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
Acked-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Acked-by: Shreyansh Jain <shreyansh.jain@nxp.com>
2018-10-29 02:01:08 +01:00
Ilya Maximets
b9788afec5 net/*/base: allow experimental APIs
This functionality was missed while adding new drivers to
the meson build.

Fixes: bfabd06000 ("net/avf: support meson build")
Fixes: 30d3d01683 ("net/qede: add in meson build")

Signed-off-by: Ilya Maximets <i.maximets@samsung.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
2018-10-26 22:14:06 +02:00
Rasesh Mody
9ed26bc7bb net/qede/base: semantic changes
This patch consists of semantic/formatting changes.

Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
2018-10-11 18:53:48 +02:00
Rasesh Mody
9aea0e7daf net/qede/base: add APIs for dscp priority map configuration
Add APIs for dscp priority map configuration. APIs added are
ecore_dcbx_get_dscp_priority(), ecore_dcbx_set_dscp_priority().
These base driver APIs can be used for dscp-map query/config.

Configure the doorbell queue (DORQ) to use vlan-id/priority.

Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
2018-10-11 18:53:48 +02:00
Rasesh Mody
e290ccf8c6 net/qede/base: add RL update params
Add 'rl_bc_stage_th','rl_timer_stage_th' and 'dcqcn_reset_alpha_on_idle'
to RL update param as well as logs.

Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
2018-10-11 18:53:48 +02:00
Rasesh Mody
3eed444a96 net/qede/base: changes for 100G
Change details:

 - Get engine affinity from the management FW and configure accordingly
 - Add an LLH filter with the primary MAC address in QPAR/NPAR
 - Move some of the LLH APIs around
 - Add PPFID APIs
 - Update all allocated ppfids with the same value for the
   following PORT_PF registers:
   NIG_REG_DSCP_TO_TC_MAP_ENABLE
 - Add port_id, src_pfid and dst_pfid to DMA engine params

Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
2018-10-11 18:53:48 +02:00
Rasesh Mody
ab67e837be net/qede/base: enable control frame filtering
Enable control frame filtering for non-trusted VFs.

Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
2018-10-11 18:53:48 +02:00
Rasesh Mody
54f74d6a6a net/qede/base: get pre-negotiated OEM values
Request management FW for OEM values, which are negotiated prior to
the driver load by sending the GET_OEM_UPDATES command after both
engines are initialized.

Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
2018-10-11 18:53:48 +02:00
Rasesh Mody
15dfc1ecb3 net/qede/base: support periodic Doorbell Recovery
Add support for periodic Doorbell Recovery.

Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
2018-10-11 18:53:48 +02:00
Rasesh Mody
cf84de8657 net/qede/base: support VF min rate
Add support for SRIOV vf min rate configuration.
Fix return code for ecore_iov_get_vf_min_rate().

Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
2018-10-11 18:53:48 +02:00
Rasesh Mody
9585053b10 net/qede/base: add pretend function for port/PF
Add a pretend function for port/PF, pretend to another port and another
function when accessing the ptt window

Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
2018-10-11 18:53:48 +02:00
Rasesh Mody
7b49adea80 net/qede/base: adjust queue manager idx greater than max
Modified queue manager getter APIs to cycle through their range if
index is higher than max. This prevents accessing index out of bounds.

Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
2018-10-11 18:53:48 +02:00
Rasesh Mody
4eae6b014c net/qede/base: add error handling for mutex allocation
Add error handling for mutex allocation failure

Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
2018-10-11 18:53:48 +02:00
Rasesh Mody
bf03492a08 net/qede/base: add mf-bit/API for FIP special mode
Add mf-bit/API for FIP special mode.

Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
2018-10-11 18:53:48 +02:00
Rasesh Mody
0b855a345e net/qede/base: add API to update FW RSS indirection table
Added ecore_update_eth_rss_ind_table_entry() api to update FW RSS
indirection table entry according to new interface of FW 8.37.x.x.

Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
2018-10-11 18:53:48 +02:00
Rasesh Mody
23c5600a88 net/qede/base: workaround to indicate SHMEM data ready
The driver can notify that there was an MCP reset and read the SHMEM
values before the management FW has completed initializing them.
As a temporary solution, the "sup_msgs" field is used as a SHMEM data
ready indication. This should be replaced with an actual indication
when it is provided by the management FW.

Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
2018-10-11 18:53:48 +02:00
Rasesh Mody
cbc2359676 net/qede/base: add DPC sync after PF stop
Add DPC sync after stopping the physical funciton to allow clean up of
asyncronous events. Post this the driver don't expect the FW to send
async events.

Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
2018-10-11 18:53:48 +02:00
Rasesh Mody
f32557f955 net/qede/base: check for EDPM enabled in DB recovery
Add a check for EDPM enabled before flushing doorbell recovery queue.

Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
2018-10-11 18:53:48 +02:00