Commit Graph

467 Commits

Author SHA1 Message Date
Shahed Shaikh
3985ea528a net/qede: fix Tx offload mask
Following commit updated the Tx offload mask
commit 1037ed842c ("mbuf: fix Tx offload mask").

So, not having PKT_TX_IPV6 and PKT_TX_IPV4 in qede PMDs supported
Tx offload mask breaks TSO support since application will fail in transmit
prepare function.

Fixes: 1037ed842c ("mbuf: fix Tx offload mask")
Cc: stable@dpdk.org

Signed-off-by: Shahed Shaikh <shahed.shaikh@cavium.com>
2018-11-22 10:31:25 +01:00
Shahed Shaikh
49d3978d57 net/qede: fix Tx tunnel offload support mask
Tunneling offloads are represented by multi-bit values. So, feature
wise tunneling offload can only be entirely supported/unsupported
using PKT_TX_TUNNEL_MASK. Its upon PMDs to further isolate which of
the tunneling offload types are supported by respective PMD.
Using subset of bits from PKT_TX_TUNNEL_MASK to indicate supported vs
unsupported offloads can lead to undesired result.

Use PKT_TX_TUNNEL_MASK in QEDE_TX_OFFLOAD_MASK and use independent
value of supported PKT_TX_TUNNEL_* in .tx_pkt_prepare() to mark
supported tunnel offloads.

Fixes: 44346c24b7 ("net/qede: fix VXLAN tunnel Tx offload flag setting")
Cc: stable@dpdk.org

Suggested-by: Ferruh Yigit <ferruh.yigit@intel.com>
Signed-off-by: Shahed Shaikh <shahed.shaikh@cavium.com>
Reviewed-by: Rasesh Mody <rasesh.mody@cavium.com>
2018-11-14 00:35:53 +01:00
Timothy Redaelli
69d3e963e4 net/qede: fix crash when configure fails
Currently, if configuration fails (for example if a 100G card is used
with an odd number of RX/TX queues) QEDE crashes due to a null pointer
dereference.

This commit fixes it by checking that the pointer is not NULL before
using it.

Fixes: 7105b24f4b ("net/qede: fix memory alloc for multiple port reconfig")
Cc: stable@dpdk.org

Signed-off-by: Timothy Redaelli <tredaelli@redhat.com>
Acked-by: Rasesh Mody <rasesh.mody@cavium.com>
2018-11-14 00:35:53 +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
Thomas Monjalon
e16adf08e5 ethdev: free all common data when releasing port
This is a clean-up of common ethdev data freeing.
All data freeing are moved to rte_eth_dev_release_port()
and done only in case of primary process.

It is probably fixing some memory leaks for PMDs which were
not freeing all data.

Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Acked-by: Andrew Rybchenko <arybchenko@solarflare.com>
2018-10-26 22:14:05 +02:00
Stephen Hemminger
dcf3d57fa4 net/qede: remove invalid config option checks
Now that logging of initialization is controlled by dynamic debug
level, remove the #ifdef for RTE_LIBRTE_QEDE_DEBUG_INIT since that
config option does not exist in common_base and is not documented.

Fixes: 69b6573980 ("net/qede: implement dynamic logging")
Cc: stable@dpdk.org

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
2018-10-18 10:24:39 +02:00
Rasesh Mody
1954863e50 net/qede: bump PMD version to 2.10.0.1
Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
2018-10-11 18:53:48 +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
Rasesh Mody
3c36168618 net/qede/base: upgrade to FW 8.37.7.0
This patch adds changes to base driver for upgrading to 8.37.3.0 FW.

Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
2018-10-11 18:53:48 +02:00
Shahed Shaikh
ad4d092be7 net/qede: support device reset
Implement eth_dev_ops->dev_reset callback.

Signed-off-by: Shahed Shaikh <shahed.shaikh@cavium.com>
2018-09-28 01:41:01 +02:00
Shahed Shaikh
797ce8eec7 net/qede/base: fix MFW FLR flow
Management firmware does not properly clean IGU block in PF FLR flow
which may result in undelivered attentions for link events from
default status block.
Add a workaround in PMD to execute extra IGU cleanup right after PF FLR
is done.

Fixes: 9e2f08a4ad ("net/qede/base: add request for PF FLR before load request")
Cc: stable@dpdk.org

Signed-off-by: Shahed Shaikh <shahed.shaikh@cavium.com>
2018-09-28 01:41:01 +02:00
Shahed Shaikh
3f373e1a0a net/qede: support Rx descriptor status
This patch implement eth_dev_ops->rx_descriptor_status
callback.
Walk through receive completion ring to calculate receive
descriptors used by firmware and then provide the status of
offset accordingly.

Signed-off-by: Shahed Shaikh <shahed.shaikh@cavium.com>
2018-09-28 01:41:01 +02:00
Shahed Shaikh
318d7da312 net/qede: fix Rx buffer size calculation
- HW does not include CRC in received frame when passed to host,
   so no need to consider CRC length while calculating Rx buffer size.
 - In scattered Rx mode, driver may allocate Rx buffer larger than
   the size of mbuf because it tries to adjust the buffer size to cache
   line size by ceiling it. Fix this by flooring the size instead of
   ceiling.
 - Consider the rule imposed by HW regarding the minimum size of Rx buffer
   in scattered Rx mode -
   (MTU + Maximum L2 Header Size + 2) / ETH_RX_MAX_BUFF_PER_PKT

Fixes: f6033f2497 ("net/qede: fix minimum buffer size and scatter Rx check")
CC: stable@dpdk.org

Signed-off-by: Shahed Shaikh <shahed.shaikh@cavium.com>
2018-09-28 01:41:01 +02:00
Shahed Shaikh
267d32de46 net/qede: support generic flow API
- Add support for rte_flow_validate(), rte_flow_create() and
  rte_flow_destroy() APIs
- This patch adds limited support for the flow items
  because of the limited filter profiles supported by HW.
- Only 4 tuples - src and dst IP (v4 or v6) addresses and
		  src and dst port IDs of TCP or UDP.
- also, only redirect to queue action is supported.

Signed-off-by: Shahed Shaikh <shahed.shaikh@cavium.com>
2018-09-28 01:41:01 +02:00
Shahed Shaikh
f5765f66f9 net/qede: refactor flow director into generic aRFS
- In order to prepare the base for RTE FLOW support,
  convert common code used for flow director support
  into common aRFS code.

Signed-off-by: Shahed Shaikh <shahed.shaikh@cavium.com>
2018-09-28 01:41:01 +02:00
Shahed Shaikh
7ffef6292b net/qede: fix flow director for IPv6 filter
- PMD does not fill vtc_flow field of IPv6 header while
  constructing a packet for IPv6 filter. Hence filter was
  not getting applied properly.
- IPv6 addresses got swapped while copying src and dst addresses.
- Same issue with UDP and TCP port ids.

Fixes: 622075356e ("net/qede: support ntuple and flow director filter")
Cc: stable@dpdk.org

Signed-off-by: Shahed Shaikh <shahed.shaikh@cavium.com>
2018-09-28 01:41:01 +02:00
Shahed Shaikh
eb54ba75c7 net/qede: reorganize filter code
- rename qede_fdir.c to qede_filter.c
 - move all filter code to qede_filter.c

Signed-off-by: Shahed Shaikh <shahed.shaikh@cavium.com>
2018-09-28 01:41:01 +02:00
Rasesh Mody
979582a1aa net/qede/base: use pointer for bytes length read
Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
2018-09-28 01:41:01 +02:00
Shahed Shaikh
2cf7a0faf4 net/qede/base: use trust mode for forced MAC limitations
When trust mode is set to ON, VF can change it's MAC address
inspite PF has set a forced MAC for that VF from HV.

Earlier similar functionality is provided by module parameter
"allow_vf_mac_change_mode" of qed.

This change makes few changes in behavior of VF shadow config -
 - Let driver track the VF mac in shadow config as long as trust
  mode is OFF.
 - Once trust mode is ON, we should not care about MACs in shadow
  config (because we never intend to fall back because of lack of restore
  implementation).
 - Delete existing shadow MAC (this helps when trust mode is turned OFF,
  and VF tries to add new MAC – it won’t fail that time since we have
  a clean slate).
 - Skip addition and deletion of MACs in shadow configs.

Signed-off-by: Shahed Shaikh <shahed.shaikh@cavium.com>
2018-09-28 01:41:01 +02:00
Rasesh Mody
6d1be6d6f8 net/qede/base: fix logic for sfp get/set
Fix logic for sfp get rx_los, tx_fault, tx_disable, and sfp set tx_disable.

Fixes: bdc40630a8 ("net/qede/base: add APIs for xcvr")
Cc: stable@dpdk.org

Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
2018-09-28 01:41:01 +02:00
Rasesh Mody
657b762a87 net/qede/base: correct MCP error handler log verbosity
Correct the verbosity for slowpath message from DCB to SP.

Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
2018-09-28 01:41:01 +02:00
Rasesh Mody
3f11cf0623 net/qede/base: limit number of non ethernet queues to 64
Limit the number of non ethernet queues to 64, allowing a max queues to
status block ratio of 2:1 in case of storage target. Theoretically a
non-target storage PF can have 128 queues and SBs.

This change is to support 64 entries for a target iSCSI/FCoE PF and 128
for a non-target.

Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
2018-09-28 01:41:01 +02:00
Rasesh Mody
d5df6159dd net/qede: fix ethernet type in HW registers
Fix to program the HW registers with proper ether type.

Fixes: 36f45bce25 ("net/qede/base: fix to support OVLAN mode")
Cc: stable@dpdk.org

Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
2018-09-28 01:41:01 +02:00
Rasesh Mody
4fe58a3ecf net/qede/base: get pre-negotiated values for stag and bw
Request management FW for STAG and bandwidth values negotiated prior to
the driver load.

Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
2018-09-28 01:41:01 +02:00
Rasesh Mody
ebbc55b871 net/qede/base: add OneView APIs
Add support for the following OneView APIs:
 - ecore_mcp_ov_update_mtu() - Send MTU value to the management FW.
 - ecore_mcp_ov_update_mac() - Send MAC address to the management FW.
 - ecore_mcp_ov_update_eswitch() - Send eswitch_mode to management FW
   after the firmware load.

Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
2018-09-28 01:41:01 +02:00
Rasesh Mody
cb71992793 net/qede/base: fix to handle stag update event
This fix adds a ecore_mcp_update_stag() handler to handle the STAG update
events from management FW and program the STAG value.
It also clears the stag config on PF, when management FW invalidates
the stag value.

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

Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
2018-09-28 01:41:01 +02:00
Luca Boccassi
30d3d01683 net/qede: add in meson build
Signed-off-by: Luca Boccassi <bluca@debian.org>
Acked-by: Shahed Shaikh <shahed.shaikh@cavium.com>
2018-09-18 22:53:35 +02:00
Ferruh Yigit
323e7b667f ethdev: make default behavior CRC strip on Rx
Removed DEV_RX_OFFLOAD_CRC_STRIP offload flag.
Without any specific Rx offload flag, default behavior by PMDs is to
strip CRC.

PMDs that support keeping CRC should advertise DEV_RX_OFFLOAD_KEEP_CRC
Rx offload capability.

Applications that require keeping CRC should check PMD capability first
and if it is supported can enable this feature by setting
DEV_RX_OFFLOAD_KEEP_CRC in Rx offload flag in rte_eth_dev_configure()

Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
Acked-by: Tomasz Duszynski <tdu@semihalf.com>
Acked-by: Shahaf Shuler <shahafs@mellanox.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Acked-by: Jan Remes <remes@netcope.com>
Acked-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Acked-by: Hyong Youb Kim <hyonkim@cisco.com>
2018-09-14 20:08:41 +02:00
Rasesh Mody
69b7a14319 net/qede: bump version to 2.9.0.1
Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
2018-08-08 20:35:15 +02:00
Shahed Shaikh
10191fcd1a net/qede: fix ntuple filter configuration
PMD did not pass down the intended queue id while
configuring the ntuple filter.

Fixes: 622075356e ("net/qede: support ntuple and flow director filter")
Cc: stable@dpdk.org

Signed-off-by: Shahed Shaikh <shahed.shaikh@cavium.com>
2018-08-08 20:09:53 +02:00
Shahed Shaikh
7e3060a370 net/qede: fix MAC address removal failure message
Don't treat MAC address removal failure as a fatal error
and print in logs.

Fixes: 77fac1b54f ("net/qede: fix filtering code")
Cc: stable@dpdk.org

Signed-off-by: Shahed Shaikh <shahed.shaikh@cavium.com>
2018-08-02 21:48:19 +02:00
Rasesh Mody
538bcb378a net/qede/base: fix GRC attention callback
Treat any attention which is not for timeout event as invalid
and return status accordingly. The HW error handler logs and clears
the HW attention. Without this fix we can see flood of GRC attentions.

Fixes: e6051bd6b0 ("qede: add interrupt handling support")
Cc: stable@dpdk.org

Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
2018-08-02 21:47:57 +02:00