dpdk.git
7 years agonet/sfc: initialize port data on attach
Andrew Rybchenko [Fri, 31 Mar 2017 10:22:18 +0000 (11:22 +0100)]
net/sfc: initialize port data on attach

Port configuration should be initialized on attach to avoid reset to
defaults on device reconfigure.

Fixes: 03ed21195d9e ("net/sfc: minimum port control sufficient to receive traffic")
Cc: stable@dpdk.org
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Reviewed-by: Andy Moreton <amoreton@solarflare.com>
7 years agonet/sfc: move event support init to attach stage
Andrew Rybchenko [Fri, 31 Mar 2017 10:22:17 +0000 (11:22 +0100)]
net/sfc: move event support init to attach stage

Prepare to fix device reconfigure.
Device arguments should be parsed once on attach.
Management event queue should be initialized once on attach.

Fixes: 58294ee65afb ("net/sfc: support event queue")
Fixes: c22d3c508e0c ("net/sfc: support parameter to choose performance profile")
Cc: stable@dpdk.org
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Reviewed-by: Andy Moreton <amoreton@solarflare.com>
7 years agonet/sfc: remove EvQ info array to simplify reconfigure
Andrew Rybchenko [Fri, 31 Mar 2017 10:22:16 +0000 (11:22 +0100)]
net/sfc: remove EvQ info array to simplify reconfigure

EvQ info array keeps information about EvQ centralized, however
EvQ pointers are available in TxQ and RxQ structures. Single
array for all EvQs complicates device reconfigure handling, so
simply git rid of it.

It removes notion of EvQ software index since there is no EvQ
array in software any more.

Fixes: 58294ee65afb ("net/sfc: support event queue")
Fixes: 9a75f75cb1f2 ("net/sfc: maintain management event queue")
Fixes: ce35b05c635e ("net/sfc: implement Rx queue setup release operations")
Fixes: 28944ac098aa ("net/sfc: implement Rx queue start and stop operations")
Fixes: b1b7ad933b39 ("net/sfc: set up and release Tx queues")
Fixes: fed9aeb46c19 ("net/sfc: implement transmit path start / stop")
Fixes: 3b809c27b1fe ("net/sfc: support link status change interrupt")
Cc: stable@dpdk.org
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Reviewed-by: Andy Moreton <amoreton@solarflare.com>
7 years agonet/sfc: remove flags from EvQ info
Andrew Rybchenko [Fri, 31 Mar 2017 10:22:15 +0000 (11:22 +0100)]
net/sfc: remove flags from EvQ info

Next step to get rid of EvQ info at all.

Fixes: c22d3c508e0c ("net/sfc: support parameter to choose performance profile")
Fixes: 3b809c27b1fe ("net/sfc: support link status change interrupt")
Cc: stable@dpdk.org
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Reviewed-by: Andy Moreton <amoreton@solarflare.com>
7 years agonet/sfc: move EvQ entries to the EvQ control structure
Andrew Rybchenko [Fri, 31 Mar 2017 10:22:14 +0000 (11:22 +0100)]
net/sfc: move EvQ entries to the EvQ control structure

EvQ info array is a problem on device reconfigure when number of
Rx and Tx queues may change. It is a step to get rid of it.

Fixes: 58294ee65afb ("net/sfc: support event queue")
Cc: stable@dpdk.org
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Reviewed-by: Andy Moreton <amoreton@solarflare.com>
7 years agonet/sfc: remove unused max entries from EvQ info
Andrew Rybchenko [Fri, 31 Mar 2017 10:22:13 +0000 (11:22 +0100)]
net/sfc: remove unused max entries from EvQ info

Fixes: 58294ee65afb ("net/sfc: support event queue")
Cc: stable@dpdk.org
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Reviewed-by: Andy Moreton <amoreton@solarflare.com>
7 years agonet/sfc: bind EvQ DMA space to EvQ type and type-local index
Andrew Rybchenko [Fri, 31 Mar 2017 10:22:12 +0000 (11:22 +0100)]
net/sfc: bind EvQ DMA space to EvQ type and type-local index

The index of an event queue index is computed from the index of the
corresponding transmit or receive queue, and depends on the total
number of receive queues. As a consequence, the index of an event
queue bound to a transmit queue changes if the total number of
receive queues is changed.

Fixes: 58294ee65afb ("net/sfc: support event queue")
Cc: stable@dpdk.org
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Reviewed-by: Andy Moreton <amoreton@solarflare.com>
7 years agonet/sfc: clarify interrupts support function names
Andrew Rybchenko [Fri, 31 Mar 2017 10:22:11 +0000 (11:22 +0100)]
net/sfc: clarify interrupts support function names

Make it clear that corresponding functions should be called on device
configure and close operations. No functional change.

Fixes: 06bc197796e2 ("net/sfc: interrupts support sufficient for event queue init")
Cc: stable@dpdk.org
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
7 years agonet/sfc: do not drop TSO on device configure
Andrew Rybchenko [Wed, 29 Mar 2017 16:59:19 +0000 (17:59 +0100)]
net/sfc: do not drop TSO on device configure

If Tx datapath does not support TSO, TSO was dropped on device configure.
It is incorrect to change advertised offloads.

Fixes: 7a4d44a639c9 ("net/sfc: make TSO a datapath-dependent feature")

Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
7 years agonet/sfc: choose datapaths after probe and before attach
Andrew Rybchenko [Wed, 29 Mar 2017 16:59:18 +0000 (17:59 +0100)]
net/sfc: choose datapaths after probe and before attach

Datapath choice requires NIC capabilities knowledge and, therefore,
should be done after probe. Whereas NIC resources estimation needs
to know chosen datapath (e.g. if Tx datapath is going to use TSO).

Fixes: df1bfde4ff0d ("net/sfc: factor out libefx-based Rx datapath")

Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
7 years agonet/sfc: use correct function to free scattered packet on Rx
Andrew Rybchenko [Thu, 30 Mar 2017 15:16:15 +0000 (16:16 +0100)]
net/sfc: use correct function to free scattered packet on Rx

Put to mempool does not free chained segments.

Fixes: e0b063941e03 ("net/sfc: support scattered Rx DMA")
Cc: stable@dpdk.org
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
7 years agonet/ixgbe: ping VF when PF status changes
Alex Zelezniak [Thu, 30 Mar 2017 21:05:54 +0000 (16:05 -0500)]
net/ixgbe: ping VF when PF status changes

Signed-off-by: Alex Zelezniak <alexz@att.com>
Acked-by: Wei Dai <wei.dai@intel.com>
Acked-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
7 years agonet/i40e: enable tunnel filter for MPLS
Beilei Xing [Thu, 30 Mar 2017 08:29:54 +0000 (16:29 +0800)]
net/i40e: enable tunnel filter for MPLS

MPLSoUDP & MPLSoGRE is not supported by tunnel
filter due to limited resource of HW, this patch
enables MPLS tunnel filter by replacing inner_mac
filter.

This configuration will be set when adding MPLSoUDP
and MPLSoGRE filter rules, and it will be invalid
only by NIC core reset.

Signed-off-by: Beilei Xing <beilei.xing@intel.com>
Acked-by: Jingjing Wu <jingjing.wu@intel.com>
7 years agonet/i40e: add flow API MPLS parsing function
Beilei Xing [Thu, 30 Mar 2017 08:29:53 +0000 (16:29 +0800)]
net/i40e: add flow API MPLS parsing function

This patch add MPLS parsing function to support MPLS filtering.

Signed-off-by: Beilei Xing <beilei.xing@intel.com>
Acked-by: Jingjing Wu <jingjing.wu@intel.com>
7 years agoapp/testpmd: add MPLS and GRE fields to flow command
Beilei Xing [Thu, 30 Mar 2017 08:29:52 +0000 (16:29 +0800)]
app/testpmd: add MPLS and GRE fields to flow command

This patch exposes the following item fields through the flow command:

- MPLS label
- GRE protocol

Signed-off-by: Beilei Xing <beilei.xing@intel.com>
Acked-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
7 years agoethdev: add MPLS and GRE flow API items
Beilei Xing [Thu, 30 Mar 2017 08:29:51 +0000 (16:29 +0800)]
ethdev: add MPLS and GRE flow API items

This patch adds MPLS and GRE items to generic rte flow.

Signed-off-by: Beilei Xing <beilei.xing@intel.com>
Acked-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
7 years agonet/sfc: fix leak if EvQ DMA space allocation fails
Andrew Rybchenko [Wed, 29 Mar 2017 08:28:25 +0000 (09:28 +0100)]
net/sfc: fix leak if EvQ DMA space allocation fails

Fixes: 58294ee65afb ("net/sfc: support event queue")
Cc: stable@dpdk.org
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
7 years agonet/sfc: destroy event queue when Tx queue is released
Andrew Rybchenko [Wed, 29 Mar 2017 08:25:41 +0000 (09:25 +0100)]
net/sfc: destroy event queue when Tx queue is released

Fixes: b1b7ad933b39 ("net/sfc: set up and release Tx queues")
Cc: stable@dpdk.org
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
7 years agonet/sfc: destroy event queue when Rx queue is released
Andrew Rybchenko [Wed, 29 Mar 2017 08:25:40 +0000 (09:25 +0100)]
net/sfc: destroy event queue when Rx queue is released

Fixes: ce35b05c635e ("net/sfc: implement Rx queue setup release operations")
Cc: stable@dpdk.org
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
7 years agonet/mlx5: fix Tx when first segment size is too short
Nélio Laranjeiro [Wed, 29 Mar 2017 07:51:39 +0000 (09:51 +0200)]
net/mlx5: fix Tx when first segment size is too short

First segment size must be at least 18 bytes, packets not respecting this
are silently not sent by the NIC but counted as sent by the PMD.  The only
way to figure out is compiling the PMD in debug mode.

Fixes: 6579c27c11a5 ("net/mlx5: remove gather loop on segments")
Cc: stable@dpdk.org
Signed-off-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
Acked-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
Acked-by: Yongseok Koh <yskoh@mellanox.com>
7 years agonet/qede: prevent crash while changing MTU dynamically
Harish Patil [Fri, 24 Mar 2017 07:40:59 +0000 (00:40 -0700)]
net/qede: prevent crash while changing MTU dynamically

The driver can handle dynamic MTU change without needing the port to be
stopped explicitly by the application. However, there is currently no
check to prevent I/Os from happening on a different thread while the
port is going thru' reset internally. This patch fixes this issue by
assigning RX/TX burst functions to a dummy function and also reconfigure
RX bufsize for each rx queue based on the new MTU value.

Fixes: 200645ac7909 ("net/qede: set MTU")
Cc: stable@dpdk.org
Signed-off-by: Harish Patil <harish.patil@qlogic.com>
7 years agonet/qede: fix VF RSS configuration
Harish Patil [Fri, 24 Mar 2017 07:40:58 +0000 (00:40 -0700)]
net/qede: fix VF RSS configuration

The newer SR-IOV PF drivers expects RX/TX queues to be created before
applying RSS configuration. This patch addresses this requirement by
deferring RSS configuration till the queues are created. Even though
this issue is only seen in SR-IOV context, the changes will be made
applicable to PF also to keep the behavior consistent between VF/PF.

Fixes: 7ab35bf6b97b ("net/qede: fix RSS")
Cc: stable@dpdk.org
Signed-off-by: Harish Patil <harish.patil@qlogic.com>
7 years agonet/qede: fix missing UDP protocol in RSS offload types
Harish Patil [Fri, 24 Mar 2017 07:40:57 +0000 (00:40 -0700)]
net/qede: fix missing UDP protocol in RSS offload types

Both UDP and TCP based RSS offload types are supported by the device.
This patch adds UDP protocol which got missed out in the original patch.

Fixes: 4c98f2768eef ("net/qede: support RSS hash configuration")
Cc: stable@dpdk.org
Signed-off-by: Harish Patil <harish.patil@qlogic.com>
7 years agodoc: add dynamic i40e device personalization
Beilei Xing [Thu, 30 Mar 2017 02:51:51 +0000 (10:51 +0800)]
doc: add dynamic i40e device personalization

Signed-off-by: Beilei Xing <beilei.xing@intel.com>
Acked-by: Jingjing Wu <jingjing.wu@intel.com>
7 years agoapp/testpmd: add command for getting loaded DDP profiles
Beilei Xing [Thu, 30 Mar 2017 02:51:50 +0000 (10:51 +0800)]
app/testpmd: add command for getting loaded DDP profiles

This patch is to add testpmd CLI for getting all loaded DDP profiles.

Signed-off-by: Beilei Xing <beilei.xing@intel.com>
Acked-by: Jingjing Wu <jingjing.wu@intel.com>
7 years agonet/i40e: support getting all loaded DDP profiles
Beilei Xing [Thu, 30 Mar 2017 02:51:49 +0000 (10:51 +0800)]
net/i40e: support getting all loaded DDP profiles

Signed-off-by: Beilei Xing <beilei.xing@intel.com>
Acked-by: Jingjing Wu <jingjing.wu@intel.com>
7 years agoapp/testpmd: add command for loading DDP
Beilei Xing [Thu, 30 Mar 2017 02:51:48 +0000 (10:51 +0800)]
app/testpmd: add command for loading DDP

This patch is to add testpmd CLI for loading dynamic
device personalization (DDP).

Signed-off-by: Beilei Xing <beilei.xing@intel.com>
Acked-by: Jingjing Wu <jingjing.wu@intel.com>
7 years agonet/i40e: add dynamic device personalization processing
Beilei Xing [Thu, 30 Mar 2017 02:51:47 +0000 (10:51 +0800)]
net/i40e: add dynamic device personalization processing

Add support for loading a dynamic device personalization profile (DDP).

Signed-off-by: Beilei Xing <beilei.xing@intel.com>
Acked-by: Jingjing Wu <jingjing.wu@intel.com>
7 years agonet/i40e: refine consistent tunnel filter
Beilei Xing [Tue, 28 Mar 2017 09:28:44 +0000 (17:28 +0800)]
net/i40e: refine consistent tunnel filter

Add i40e_tunnel_type enumeration type to refine consistent
tunnel filter, it will be esay to add new tunnel type for
i40e.

Signed-off-by: Beilei Xing <beilei.xing@intel.com>
Acked-by: Jingjing Wu <jingjing.wu@intel.com>
7 years agonet/i40e: support tunnel filter to VF
Beilei Xing [Tue, 28 Mar 2017 09:28:43 +0000 (17:28 +0800)]
net/i40e: support tunnel filter to VF

Previously, only tunnel filter to PF is supported.
This patch adds i40e_dev_consistent_tunnel_filter_set
function for consistent filter API to support tunnel
filter to VF.

Signed-off-by: Yong Liu <yong.liu@intel.com>
Signed-off-by: Bernard Iremonger <bernard.iremonger@intel.com>
Signed-off-by: Beilei Xing <beilei.xing@intel.com>
Acked-by: Jingjing Wu <jingjing.wu@intel.com>
7 years agonet/i40e: rename tunnel filter function
Beilei Xing [Tue, 28 Mar 2017 09:28:42 +0000 (17:28 +0800)]
net/i40e: rename tunnel filter function

Change tunnel filter function name to VXLAN filter
function, prepare for other tunnel filter function.

Signed-off-by: Beilei Xing <beilei.xing@intel.com>
Acked-by: Jingjing Wu <jingjing.wu@intel.com>
7 years agonet/i40e: rework tunnel filter functions
Beilei Xing [Tue, 28 Mar 2017 09:28:41 +0000 (17:28 +0800)]
net/i40e: rework tunnel filter functions

Rework tunnel filter functions to align with the
new command buffer for add/remove cloud filter.

Signed-off-by: Beilei Xing <beilei.xing@intel.com>
Acked-by: Jingjing Wu <jingjing.wu@intel.com>
7 years agodoc: update Tx burst behavior
Zhiyong Yang [Wed, 29 Mar 2017 15:56:48 +0000 (16:56 +0100)]
doc: update Tx burst behavior

Signed-off-by: Zhiyong Yang <zhiyong.yang@intel.com>
7 years agonet/vhost: remove limit of vhost Rx burst size
Zhiyong Yang [Wed, 29 Mar 2017 07:16:16 +0000 (15:16 +0800)]
net/vhost: remove limit of vhost Rx burst size

vhost removes limit of Rx burst size(32 pkts) and supports to make
an best effort to receive pkts.

Cc: yuanhan.liu@linux.intel.com
Cc: maxime.coquelin@redhat.com
Signed-off-by: Zhiyong Yang <zhiyong.yang@intel.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
7 years agonet/vhost: remove limit of vhost Tx burst size
Zhiyong Yang [Wed, 29 Mar 2017 07:16:15 +0000 (15:16 +0800)]
net/vhost: remove limit of vhost Tx burst size

vhost removes limit of Tx burst size(32 pkts) and supports to make
an best effort to transmit pkts.

Cc: yuanhan.liu@linux.intel.com
Cc: maxime.coquelin@redhat.com
Signed-off-by: Zhiyong Yang <zhiyong.yang@intel.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
7 years agonet/ixgbe: remove limit of Tx burst size
Zhiyong Yang [Wed, 29 Mar 2017 07:16:14 +0000 (15:16 +0800)]
net/ixgbe: remove limit of Tx burst size

To add a wrapper function to remove the limit of tx burst size and
implement the "make an best effort to transmit the pkts" policy.
The patch makes ixgbe vec function work in a consistent behavior
like ixgbe_xmit_pkts_simple and ixgbe_xmit_pkts do that.

Cc: Helin Zhang <helin.zhang@intel.com>
Cc: Konstantin Ananyev <konstantin.ananyev@intel.com>
Signed-off-by: Zhiyong Yang <zhiyong.yang@intel.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
7 years agonet/i40e: remove limit of Tx burst size
Zhiyong Yang [Wed, 29 Mar 2017 07:16:13 +0000 (15:16 +0800)]
net/i40e: remove limit of Tx burst size

To add a wrapper function to remove the limit of tx burst size. The patch
makes i40e vec function an best effort to transmit the pkts in the
consistent behavior like i40e_xmit_pkts_simple and i40e_xmit_pkts do that.

Cc: Helin Zhang <helin.zhang@intel.com>
Cc: Jingjing Wu <jingjing.wu@intel.com>
Signed-off-by: Zhiyong Yang <zhiyong.yang@intel.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
7 years agonet/fm10k: remove limit of Tx burst size
Zhiyong Yang [Wed, 29 Mar 2017 07:16:12 +0000 (15:16 +0800)]
net/fm10k: remove limit of Tx burst size

To add a wrapper function to remove the limit of tx burst size.
The patch makes fm10k vec function an best effort to transmit
pkts in the consistent behavior like fm10k_xmit_pkts does that.

Cc: Jing Chen <jing.d.chen@intel.com>
Signed-off-by: Zhiyong Yang <zhiyong.yang@intel.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
7 years agonet/qede: update PMD version to 2.4.0.1
Rasesh Mody [Wed, 29 Mar 2017 20:37:02 +0000 (13:37 -0700)]
net/qede: update PMD version to 2.4.0.1

Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
7 years agonet/qede: support LRO/TSO offloads
Harish Patil [Wed, 29 Mar 2017 20:37:01 +0000 (13:37 -0700)]
net/qede: support LRO/TSO offloads

This patch includes slowpath configuration and fastpath changes
to support LRO and TSO. A bit of revamping is needed in order
to make use of existing packet classification schemes in Rx fastpath
and for SG element processing in Tx.

Signed-off-by: Harish Patil <harish.patil@qlogic.com>
7 years agonet/qede: support ntuple and flow director filter
Harish Patil [Wed, 29 Mar 2017 20:37:00 +0000 (13:37 -0700)]
net/qede: support ntuple and flow director filter

Add limited support for ntuple filter and flow director configuration.
The filtering is based on 4-tuples viz src-ip, dst-ip, src-port,
dst-port. The mask fields, tcp_flags, flex masks, priority fields,
Rx queue drop etc are not supported.

Signed-off-by: Harish Patil <harish.patil@qlogic.com>
7 years agonet/qede/base: support ARFS mode
Harish Patil [Wed, 29 Mar 2017 20:36:59 +0000 (13:36 -0700)]
net/qede/base: support ARFS mode

Add base driver APIs to enable accelerated RFS[aRFS] mode and ramrod
to configure rfs and ntuple filter.

Signed-off-by: Harish Patil <harish.patil@qlogic.com>
7 years agonet/qede/base: semantic changes
Rasesh Mody [Wed, 29 Mar 2017 20:36:58 +0000 (13:36 -0700)]
net/qede/base: semantic changes

Make APIs static and other semantic changes.
A step toward cleaning 'make C=1' with GCC 4.8.3.

Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
7 years agonet/qede/base: prevent race condition during unload
Rasesh Mody [Wed, 29 Mar 2017 20:36:57 +0000 (13:36 -0700)]
net/qede/base: prevent race condition during unload

Merge hw_stop and hw_reset into one function.
Prevent race condition between MFW attentions and pf stop command during
unload flow that causes an ASSERT.

Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
7 years agonet/qede/base: multi-Txq support on same queue-zone for VFs
Rasesh Mody [Wed, 29 Mar 2017 20:36:56 +0000 (13:36 -0700)]
net/qede/base: multi-Txq support on same queue-zone for VFs

A step toward having multi-Txq support on same queue-zone for VFs.

This change takes care of:

 - VFs assume a single CID per-queue, where queue X receives CID X.
   Switch to a model similar to that of PF - I.e., Use different CIDs
   for Rx/Tx, and use mapping to acquire/release those. Each VF
   currently will have 32 CIDs available for it [for its possible 16
   Rx & 16 Tx queues].

 - To retain the same interface for PFs/VFs when initializing queues,
   the base driver would have to retain a unique number per-each queue
   that would be communicated in some extended TLV [current TLV
   interface allows the PF to send only the queue-id]. The new TLV isn't
   part of the current change but base driver would now start adding
   such unique keys internally to queue_cids. This would also force
   us to start having alloc/setup/free for L2 [we've refrained from
   doing so until now]
   The limit would be no-more than 64 queues per qzone [This could be
   changed if needed, but hopefully no one needs so many queues]

 - In IOV, Add infrastructure for up to 64 qids per-qzone, although
   at the moment hard-code '0' for Rx and '1' for Tx [Since VF still
   isn't communicating via new TLV which index to associate with a
   given queue in its queue-zone].

Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
7 years agonet/qede/base: prevent DMAE transactions during recovery
Rasesh Mody [Wed, 29 Mar 2017 20:36:55 +0000 (13:36 -0700)]
net/qede/base: prevent DMAE transactions during recovery

Prevent DMA engine transactions during recovery phase.

Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
7 years agonet/qede/base: add UDP ports in bulletin board message
Rasesh Mody [Wed, 29 Mar 2017 20:36:54 +0000 (13:36 -0700)]
net/qede/base: add UDP ports in bulletin board message

Add UDP ports in bulletin board message.

Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
7 years agonet/qede/base: allow PMD to control vport and RSS engine ids
Rasesh Mody [Wed, 29 Mar 2017 20:36:53 +0000 (13:36 -0700)]
net/qede/base: allow PMD to control vport and RSS engine ids

Let PMD have control over the vport-id and rss-eng-id of a given VF
during initialization.

Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
7 years agonet/qede/base: add PF parameter
Rasesh Mody [Wed, 29 Mar 2017 20:36:52 +0000 (13:36 -0700)]
net/qede/base: add PF parameter

Add a common enum to pf_params for RDMA.

Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
7 years agonet/qede/base: move code bits
Rasesh Mody [Wed, 29 Mar 2017 20:36:51 +0000 (13:36 -0700)]
net/qede/base: move code bits

Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
7 years agonet/qede/base: zero out MFW mailbox data
Rasesh Mody [Wed, 29 Mar 2017 20:36:50 +0000 (13:36 -0700)]
net/qede/base: zero out MFW mailbox data

Zero the whole union data of the Management FW mailbox before copying
the actual union member

Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
7 years agonet/qede/base: add return code check
Rasesh Mody [Wed, 29 Mar 2017 20:36:49 +0000 (13:36 -0700)]
net/qede/base: add return code check

Add a check of the return code of ecore_mcp_cmd_and_union() in
ecore_mcp_send_protocol_stats()

Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
7 years agonet/qede/base: set max values for soft resources
Rasesh Mody [Wed, 29 Mar 2017 20:36:48 +0000 (13:36 -0700)]
net/qede/base: set max values for soft resources

Add support for the new interface with the Management FW for setting
max values of "soft" resources.

Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
7 years agonet/qede/base: add macro for unsupported command
Rasesh Mody [Wed, 29 Mar 2017 20:36:47 +0000 (13:36 -0700)]
net/qede/base: add macro for unsupported command

Add a macro for unsupported management FW command

Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
7 years agonet/qede/base: add mailbox for resource allocation
Rasesh Mody [Wed, 29 Mar 2017 20:36:46 +0000 (13:36 -0700)]
net/qede/base: add mailbox for resource allocation

Add the Management FW mailbox for getting non-l2 resource allocation
information.

Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
7 years agonet/qede/base: add macro got resource value message
Rasesh Mody [Wed, 29 Mar 2017 20:36:45 +0000 (13:36 -0700)]
net/qede/base: add macro got resource value message

Add macro got resource value message

Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
7 years agonet/qede/base: support coalescing for VF
Rasesh Mody [Wed, 29 Mar 2017 20:36:44 +0000 (13:36 -0700)]
net/qede/base: support coalescing for VF

Add coalescing support for VFs.

Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
7 years agonet/qede/base: update bulletin board during VF init
Rasesh Mody [Wed, 29 Mar 2017 20:36:43 +0000 (13:36 -0700)]
net/qede/base: update bulletin board during VF init

Updated bulletin board with link state during VF initialization.

Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
7 years agonet/qede/base: support non-L2 dcbx tlv application
Rasesh Mody [Wed, 29 Mar 2017 20:36:42 +0000 (13:36 -0700)]
net/qede/base: support non-L2 dcbx tlv application

Add non-l2 dcbx tlv application support.

Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
7 years agonet/qede/base: support previous driver unload
Rasesh Mody [Wed, 29 Mar 2017 20:36:41 +0000 (13:36 -0700)]
net/qede/base: support previous driver unload

New driver/management fw load request sequence for handling previous
driver unload.

Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
7 years agonet/qede/base: change valloc to vzalloc
Rasesh Mody [Wed, 29 Mar 2017 20:36:40 +0000 (13:36 -0700)]
net/qede/base: change valloc to vzalloc

Change OSAL_VALLOC() into OSAL_VZALLOC() which would also zero memory.

Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
7 years agonet/qede/base: use L2-handles for RSS configuration
Rasesh Mody [Wed, 29 Mar 2017 20:36:39 +0000 (13:36 -0700)]
net/qede/base: use L2-handles for RSS configuration

Move RSS configuration into using L2-handles instead of queue-ids.

Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
7 years agonet/qede/base: add new image types
Rasesh Mody [Wed, 29 Mar 2017 20:36:38 +0000 (13:36 -0700)]
net/qede/base: add new image types

Add new image types - RECOVERY and PK (Public Key) towards
the second phase of NVRAM security support.

Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
7 years agonet/qede/base: remove clock slowdown option
Rasesh Mody [Wed, 29 Mar 2017 20:36:37 +0000 (13:36 -0700)]
net/qede/base: remove clock slowdown option

Remove clock slowdown NVM config option as this is not supported
for current chipsets.

Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
7 years agonet/qede/base: add API for using MFW resource lock
Rasesh Mody [Wed, 29 Mar 2017 20:36:36 +0000 (13:36 -0700)]
net/qede/base: add API for using MFW resource lock

Add base driver API for using the Management FW resource lock

Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
7 years agonet/qede/base: add mask/shift defines for resource command
Rasesh Mody [Wed, 29 Mar 2017 20:36:35 +0000 (13:36 -0700)]
net/qede/base: add mask/shift defines for resource command

Add several mask/shift defines for the resource command

Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
7 years agonet/qede/base: prevent transmitter stuck condition
Rasesh Mody [Wed, 29 Mar 2017 20:36:34 +0000 (13:36 -0700)]
net/qede/base: prevent transmitter stuck condition

Change OOO TC properly to prevent transmitter stuck condition
due to credit underruns.

Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
7 years agonet/qede/base: formatting changes
Rasesh Mody [Wed, 29 Mar 2017 20:36:33 +0000 (13:36 -0700)]
net/qede/base: formatting changes

Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
7 years agonet/qede/base: support tunnelling for VF
Rasesh Mody [Wed, 29 Mar 2017 20:36:32 +0000 (13:36 -0700)]
net/qede/base: support tunnelling for VF

Add new tunnelling support for VFs.

Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
7 years agonet/qede/base: revise tunnel APIs/structs
Rasesh Mody [Wed, 29 Mar 2017 20:36:31 +0000 (13:36 -0700)]
net/qede/base: revise tunnel APIs/structs

Revise tunnel APIs/structs.
 - Unite tunnel start and update params in single struct
   "ecore_tunnel_info"
 - Remove A0 chip tunnelling support.
 - Added per tunnel info - removed bitmasks.

Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
7 years agonet/qede/base: change infrastructure for VF tunnelling
Rasesh Mody [Wed, 29 Mar 2017 20:36:30 +0000 (13:36 -0700)]
net/qede/base: change infrastructure for VF tunnelling

Infrastructure changes for VF tunnelling.

Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
7 years agonet/qede/base: optimize cache-line access
Rasesh Mody [Wed, 29 Mar 2017 20:36:29 +0000 (13:36 -0700)]
net/qede/base: optimize cache-line access

Optimize cache-line access in ecore_chain -
re-arrange fields so that fields that are needed for fastpath
[mostly produce/consume and their derivatives] are in the first cache
line, and the rest are in the second.

This is true for both PBL and NEXT_PTR kind of chains.
Advancing a page in a SINGLE_PAGE chain would still require the 2nd
cacheline as well, but afaik only SPQ uses it and so it isn't
considered as 'fastpath'.

Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
7 years agonet/qede/base: support handling TLV request from MFW
Rasesh Mody [Wed, 29 Mar 2017 20:36:28 +0000 (13:36 -0700)]
net/qede/base: support handling TLV request from MFW

Add support for handling the TLV request from Management FW.

Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
7 years agonet/qede/base: make L2 queues handle based
Rasesh Mody [Wed, 29 Mar 2017 20:36:27 +0000 (13:36 -0700)]
net/qede/base: make L2 queues handle based

L2 handler changes:

This is change to remove the queue-id/qzone difference for Tx queues.

It does that by mainly doing:

a. VFs queues are no longer determined by the SBs they're using.
Instead, the ecore-client needs to maintain those and choose the values
to be used by VF when initializing it.

b. Eliminate the HW-cid array in the hw-function.
To do that, have all the rx/tx functionality turn into 'handle' base -
when queue would be started the caller would get a (void*) handle,
which it would later use with ecore for configuring various
queue-related stop [update, close].

Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
7 years agonet/qede/base: refactor code of SP queues
Rasesh Mody [Wed, 29 Mar 2017 20:36:26 +0000 (13:36 -0700)]
net/qede/base: refactor code of SP queues

Maintain slowpath event queue and consumer queue within HW function
structure, update corresponding alloc and free APIs accordingly.
Cleanup unused code under CONFIG_ECORE_LL2 ifdef.

Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
7 years agonet/qede/base: add interfaces for MFW TLV request processing
Rasesh Mody [Wed, 29 Mar 2017 20:36:25 +0000 (13:36 -0700)]
net/qede/base: add interfaces for MFW TLV request processing

Add new base driver interfaces for Management FW TLV request processing.

Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
7 years agonet/qede/base: prevent driver load with invalid resources
Rasesh Mody [Wed, 29 Mar 2017 20:36:24 +0000 (13:36 -0700)]
net/qede/base: prevent driver load with invalid resources

Prevent storage drivers from attempting to load with invalid resources.

Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
7 years agonet/qede/base: set driver type before sending load request
Rasesh Mody [Wed, 29 Mar 2017 20:36:23 +0000 (13:36 -0700)]
net/qede/base: set driver type before sending load request

Set the drv_type before sending LOAD_REQ and remove the
ver_str which is not used by the MFW

Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
7 years agonet/qede/base: check active VF queues before stopping
Rasesh Mody [Wed, 29 Mar 2017 20:36:22 +0000 (13:36 -0700)]
net/qede/base: check active VF queues before stopping

Make sure VF queue are closed before stopping vport.

Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
7 years agonet/qede/base: print firmware MFW and MBI versions
Rasesh Mody [Wed, 29 Mar 2017 20:36:21 +0000 (13:36 -0700)]
net/qede/base: print firmware MFW and MBI versions

Add a printout of the FW, Management FW and MBI versions.

Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
7 years agonet/qede/base: revamp qm initialization
Rasesh Mody [Wed, 29 Mar 2017 20:36:20 +0000 (13:36 -0700)]
net/qede/base: revamp qm initialization

This patch revamps queue initialization.

Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
7 years agonet/qede/base: allow only trusted VFs to be promisc
Rasesh Mody [Wed, 29 Mar 2017 20:36:19 +0000 (13:36 -0700)]
net/qede/base: allow only trusted VFs to be promisc

Allow only trusted VFs to be promisc/multi-promisc. The reasonable
thing is to use the 'trusted' node instead of simply allowing VFs to
become promiscuous.

Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
7 years agonet/qede/base: remove unneeded step in HW init
Rasesh Mody [Wed, 29 Mar 2017 20:36:18 +0000 (13:36 -0700)]
net/qede/base: remove unneeded step in HW init

There is no need to close the OUT_EN NIG registers, so remove that.

Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
7 years agonet/qede/base: allow probe to succeed with minor HW-issues
Rasesh Mody [Wed, 29 Mar 2017 20:36:17 +0000 (13:36 -0700)]
net/qede/base: allow probe to succeed with minor HW-issues

Allow probe to succeed with various 'minor' HW-issues [if requested]

Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
7 years agonet/qede/base: read card personality via MFW commands
Rasesh Mody [Wed, 29 Mar 2017 20:36:16 +0000 (13:36 -0700)]
net/qede/base: read card personality via MFW commands

Add support to read NIC personality via management FW for non-L2
protocols.

Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
7 years agonet/qede/base: prevent device init failure
Rasesh Mody [Wed, 29 Mar 2017 20:36:15 +0000 (13:36 -0700)]
net/qede/base: prevent device init failure

Device initialization flow should not be failed because the FW interface
command is not available.

Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
7 years agonet/qede/base: update MFW when default MTU is changed
Rasesh Mody [Wed, 29 Mar 2017 20:36:14 +0000 (13:36 -0700)]
net/qede/base: update MFW when default MTU is changed

Send mailbox command to Management FW when MTU changes.

Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
7 years agonet/qede/base: change queue/sb-id from 8 bit to 16 bit
Rasesh Mody [Wed, 29 Mar 2017 20:36:13 +0000 (13:36 -0700)]
net/qede/base: change queue/sb-id from 8 bit to 16 bit

Change the queue/sb-id values from 8 bit fields to 16 bit fields.

Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
7 years agonet/qede/base: use default MTU from shared memory
Rasesh Mody [Wed, 29 Mar 2017 20:36:12 +0000 (13:36 -0700)]
net/qede/base: use default MTU from shared memory

Read and use the default MTU value from shared-memory.

Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
7 years agonet/qede/base: add comment
Rasesh Mody [Wed, 29 Mar 2017 20:36:11 +0000 (13:36 -0700)]
net/qede/base: add comment

Add a comment for the endianness manipulation in
ecore_mcp_send_drv_version().

Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
7 years agonet/qede/base: add nvram options
Rasesh Mody [Wed, 29 Mar 2017 20:36:10 +0000 (13:36 -0700)]
net/qede/base: add nvram options

Add a bunch of NVRAM options like MCOT, FEC selection, temperature
threshold, Reset On Lan, etc.

Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
7 years agonet/qede/base: remove attribute from update current config
Rasesh Mody [Wed, 29 Mar 2017 20:36:09 +0000 (13:36 -0700)]
net/qede/base: remove attribute from update current config

Remove attribute field from update_current_config() API, Management FW
need to know only the last entity who configured the device.

Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
7 years agonet/qede/base: move mask constants defining NIC type
Rasesh Mody [Wed, 29 Mar 2017 20:36:08 +0000 (13:36 -0700)]
net/qede/base: move mask constants defining NIC type

Move mask constants defining NIC type to ecore.h

Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
7 years agonet/qede/base: decrease maximum HW func per device
Rasesh Mody [Wed, 29 Mar 2017 20:36:07 +0000 (13:36 -0700)]
net/qede/base: decrease maximum HW func per device

Decrease MAX_HWFNS_PER_DEVICE from 4 to 2

Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
7 years agonet/qede: upgrade the FW to 8.18.9.0
Rasesh Mody [Wed, 29 Mar 2017 20:36:06 +0000 (13:36 -0700)]
net/qede: upgrade the FW to 8.18.9.0

This patchset adds changes to upgrade to 8.18.9.0 FW.

Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
7 years agonet/qede/base: utilize FW 8.18.9.0
Rasesh Mody [Wed, 29 Mar 2017 20:36:05 +0000 (13:36 -0700)]
net/qede/base: utilize FW 8.18.9.0

This change is in preparation to work with new FW 8.18.9.0.
Rename the defines to use E4_ and structs to use e4_. This renaming
is to add support for future chipsets.

Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
7 years agonet/qede/base: print various indication on Tx-timeouts
Rasesh Mody [Wed, 29 Mar 2017 20:36:04 +0000 (13:36 -0700)]
net/qede/base: print various indication on Tx-timeouts

Print various indication on Tx-timeouts.

Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
7 years agonet/qede/base: mask Rx buffer attention bits
Rasesh Mody [Wed, 29 Mar 2017 20:36:03 +0000 (13:36 -0700)]
net/qede/base: mask Rx buffer attention bits

Mask the BRB "RC0_EOP_OUT_SYNC_FIFO_PUSH_ERROR" attention.

Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
7 years agonet/qede/base: send FW version driver state to MFW
Rasesh Mody [Wed, 29 Mar 2017 20:36:02 +0000 (13:36 -0700)]
net/qede/base: send FW version driver state to MFW

Add support to send FW version and driver state to Management FW.

Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
7 years agonet/qede/base: return an initialized return value
Rasesh Mody [Wed, 29 Mar 2017 20:36:01 +0000 (13:36 -0700)]
net/qede/base: return an initialized return value

Make sure ecore_iov_mark_vf_flr() always returns an initialized return
value.

Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>