dpdk.git
6 years agobus/dpaa: introduce NXP DPAA bus driver skeleton
Shreyansh Jain [Thu, 28 Sep 2017 12:29:22 +0000 (17:59 +0530)]
bus/dpaa: introduce NXP DPAA bus driver skeleton

Signed-off-by: Shreyansh Jain <shreyansh.jain@nxp.com>
Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
6 years agoconfig: add NXP DPAA SoC build configuration
Shreyansh Jain [Thu, 28 Sep 2017 12:29:21 +0000 (17:59 +0530)]
config: add NXP DPAA SoC build configuration

This patch adds skeleton build configuration for DPAA platform.

Signed-off-by: Shreyansh Jain <shreyansh.jain@nxp.com>
6 years agonet/vmxnet3: fix dereference before null check
Michal Jastrzebski [Fri, 29 Sep 2017 13:04:02 +0000 (15:04 +0200)]
net/vmxnet3: fix dereference before null check

Coverity reports check_after_deref:
Null-checking rq suggests that it may be null, but it
has already been dereferenced on all paths leading to
the check.
This patch removes NULL checking of "rq" from function
vmxnet3_dev_rx_queue_reset as it is already checked against NULL
one level up the callstack (function vmxnet3_dev_clear_queues).

Coverity issue: 143468
Fixes: 5aecdc17a97d ("vmxnet3: fix stop/restart")
Cc: stable@dpdk.org
Signed-off-by: Tomasz Kulasek <tomaszx.kulasek@intel.com>
Signed-off-by: Michal Jastrzebski <michalx.k.jastrzebski@intel.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
6 years agomk: add silvermont to replace atom as a target
Xiaoyun Li [Fri, 8 Sep 2017 03:28:52 +0000 (11:28 +0800)]
mk: add silvermont to replace atom as a target

The -march=atom flag is for older atom CPUs and don't support SSE4 which
is the minimum requirement for DPDK. And in fact, the current atom CPUs
support SSE4. So this patch removes atom as a target for DPDK builds and
adds a silvermont replacement instead.

Signed-off-by: Xiaoyun Li <xiaoyun.li@intel.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
6 years agonet/bnxt: support enable/disable interrupt
Somnath Kotur [Thu, 28 Sep 2017 21:43:45 +0000 (16:43 -0500)]
net/bnxt: support enable/disable interrupt

Implement Rx Queue interrupt enable/disable functions

Signed-off-by: Somnath Kotur <somnath.kotur@broadcom.com>
Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
6 years agonet/bnxt: support get/set EEPROM
Somnath Kotur [Thu, 28 Sep 2017 21:43:44 +0000 (16:43 -0500)]
net/bnxt: support get/set EEPROM

Add support for get/set_eeprom, get_eeprom_length dev_ops.
Defined the structures required to get/set the eeprom length/data
in hsi_struct_defs hdr file along with implementation.

Signed-off-by: Somnath Kotur <somnath.kotur@broadcom.com>
Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
6 years agonet/bnxt: support getting ptypes
Ajit Khaparde [Thu, 28 Sep 2017 21:43:43 +0000 (16:43 -0500)]
net/bnxt: support getting ptypes

This patch adds support for dev_supported_ptypes_get

Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
6 years agonet/bnxt: fix interrupt handler
Ajit Khaparde [Thu, 28 Sep 2017 21:43:42 +0000 (16:43 -0500)]
net/bnxt: fix interrupt handler

In some cases the interrupt handler is accessing cpr, which has
already been freed causing segfaults. This patch avoids such accesses.

Fixes: 7bc8e9a227cc ("net/bnxt: support async link notification")
Cc: stable@dpdk.org
Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
6 years agonet/bnxt: fix per queue stats display in xstats
Ajit Khaparde [Thu, 28 Sep 2017 21:43:41 +0000 (16:43 -0500)]
net/bnxt: fix per queue stats display in xstats

While gathering per queue stats, we are overwriting some of the
stats. This causes some of the counters in xstats to be incorrect.

Fixes: 577d3dced0dc ("net/bnxt: refactor the query stats")
Cc: stable@dpdk.org
Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
6 years agodoc: update release notes for bnxt
Ajit Khaparde [Thu, 28 Sep 2017 21:43:40 +0000 (16:43 -0500)]
doc: update release notes for bnxt

Update release doc briefly describing updates to bnxt PMD.

Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
6 years agonet/bnxt: support flow filter ops
Ajit Khaparde [Thu, 28 Sep 2017 21:43:39 +0000 (16:43 -0500)]
net/bnxt: support flow filter ops

This patch adds support for flow validate/create/destroy/flush,
ethertype add/del ops

Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
6 years agonet/bnxt: add new HWRM structs to support flow filtering
Ajit Khaparde [Thu, 28 Sep 2017 21:43:38 +0000 (16:43 -0500)]
net/bnxt: add new HWRM structs to support flow filtering

HWRM structs added:
hwrm_cfa_ntuple_filter_alloc, hwrm_cfa_ntuple_filter_free,
hwrm_cfa_ntuple_filter_cfg, hwrm_cfa_em_flow_alloc,
hwrm_cfa_em_flow_free, hwrm_cfa_em_flow_cfg

Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
6 years agonet/bnxt: support Tx descriptor status
Ajit Khaparde [Thu, 28 Sep 2017 21:43:37 +0000 (16:43 -0500)]
net/bnxt: support Tx descriptor status

Add support for tx_descriptor_status dev_op

Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
6 years agonet/bnxt: support Rx descriptor status
Ajit Khaparde [Thu, 28 Sep 2017 21:43:36 +0000 (16:43 -0500)]
net/bnxt: support Rx descriptor status

Add support for rx_descriptor_status dev_op

Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
6 years agonet/bnxt: support Rx queue count
Ajit Khaparde [Thu, 28 Sep 2017 21:43:35 +0000 (16:43 -0500)]
net/bnxt: support Rx queue count

add support for rx_queue_count dev_op

Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
6 years agonet/bnxt: set the hash key size
Ajit Khaparde [Thu, 28 Sep 2017 21:43:34 +0000 (16:43 -0500)]
net/bnxt: set the hash key size

We were not setting the dev_info.hash_key_size. Setting it now.

Fixes: 0a6d2a720078 ("net/bnxt: get device infos")
Cc: stable@dpdk.org
Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
6 years agonet/bnxt: fix config RSS update
Ajit Khaparde [Thu, 28 Sep 2017 21:43:33 +0000 (16:43 -0500)]
net/bnxt: fix config RSS update

We are not configuring the RSS settings updated by rss_hash_update().
Fixing it.

Fixes: fcc0aa1edc10 ("net/bnxt: add RSS hash configuration")
Cc: stable@dpdk.org
Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
6 years agonet/bnxt: support xstats get by id
Ajit Khaparde [Thu, 28 Sep 2017 21:43:32 +0000 (16:43 -0500)]
net/bnxt: support xstats get by id

This patch adds support for xstats_get_by_id/xstats_get_names_by_id.

Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
6 years agonet/bnxt: update status of Rx IP/L4 CKSUM
Ajit Khaparde [Thu, 28 Sep 2017 21:43:31 +0000 (16:43 -0500)]
net/bnxt: update status of Rx IP/L4 CKSUM

update ol_flags with the appropriate status of IP/L4 cksum in Rx path.

Fixes: 2eb53b134aae ("net/bnxt: add initial Rx code")
Cc: stable@dpdk.org
Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
6 years agonet/bnxt: set checksum offload flags correctly
Ajit Khaparde [Thu, 28 Sep 2017 21:43:30 +0000 (16:43 -0500)]
net/bnxt: set checksum offload flags correctly

We are not correctly setting hw checksum offload for all the
offload flags. This patch fixes that.

Fixes: 6eb3cc2294fd ("net/bnxt: add initial Tx code")
Cc: stable@dpdk.org
Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
6 years agonet/bnxt: fix usage of VMDq flags
Ajit Khaparde [Thu, 28 Sep 2017 21:43:29 +0000 (16:43 -0500)]
net/bnxt: fix usage of VMDq flags

Map ETH_VMDQ_ACCEPT_HASH_UC to the promiscuous bit.
Also, set ALLMULTI and MCAST when MCAST is set to ensure multicast traffic
is received regardless of the VF driver list.

Fixes: 4cfe399f6550 ("net/bnxt: support to set VF rxmode")
Cc: stable@dpdk.org
Signed-off-by: Stephen Hurd <stephen.hurd@broadcom.com>
Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
6 years agonet/bnxt: fix an issue with broadcast traffic
Ajit Khaparde [Thu, 28 Sep 2017 21:43:28 +0000 (16:43 -0500)]
net/bnxt: fix an issue with broadcast traffic

In bnxt_hwrm_cfa_l2_set_rx_mask, we are ignoring the previous
setting of HWRM_CFA_L2_SET_RX_MASK_INPUT_MASK_BCAST and
setting it again, thereby wrongly enabling Broadcast.

Fixes: 244bc98b0da7 ("net/bnxt: set L2 Rx mask")
Cc: stable@dpdk.org
Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
6 years agonet/bnxt: fix Rx handling and buffer allocation logic
Ajit Khaparde [Thu, 28 Sep 2017 21:43:27 +0000 (16:43 -0500)]
net/bnxt: fix Rx handling and buffer allocation logic

Even when rx buffer allocation fails, we are wrongly updating
the producer index. This patch fixes that.
Also in case of a buffer allocation failure, reattempt buffer
allocation before the rx handler exits.

Fixes: 2eb53b134aae ("net/bnxt: add initial Rx code")
Cc: stable@dpdk.org
Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
6 years agonet/bnxt: handle multi queue mode properly
Ajit Khaparde [Thu, 28 Sep 2017 21:43:26 +0000 (16:43 -0500)]
net/bnxt: handle multi queue mode properly

We are currently not handling multi queue RX/RSS modes correctly.
If RSS is not requested, create one VNIC per RXQ.

Fixes: 6133f207970c ("net/bnxt: add Rx queue create/destroy")
Cc: stable@dpdk.org
Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
6 years agonet/bnxt: fix calculation of number of pools
Ajit Khaparde [Thu, 28 Sep 2017 21:43:25 +0000 (16:43 -0500)]
net/bnxt: fix calculation of number of pools

The calculation for number of pools is wrong.
We are wrongly overwriting the calculated value with ETH_64_POOLS.
Accordingly fix the size of ff_pools array.
Fix the log message as well.

Fixes: 4cfe399f6550 ("net/bnxt: support to set VF rxmode")
Cc: stable@dpdk.org
Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
6 years agonet/bnxt: fix an issue with group id calculation
Ajit Khaparde [Thu, 28 Sep 2017 21:43:24 +0000 (16:43 -0500)]
net/bnxt: fix an issue with group id calculation

start_grp_id is incremented wrongly. Fixing it.

Fixes: daef48efe5e5 ("net/bnxt: support set MTU")
Cc: stable@dpdk.org
Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
6 years agonet/bnxt: use 64-bits of address for VLAN table
Ajit Khaparde [Thu, 28 Sep 2017 21:43:23 +0000 (16:43 -0500)]
net/bnxt: use 64-bits of address for VLAN table

We are wrongly using just 16 bits of address from rte_mem_virt2phy
while filling the vlan table address instead of 64-bytes.
Most likely a copy-paste error.

Fixes: 36735a932ca7 ("net/bnxt: support set VF QOS and MAC anti spoof")
Cc: stable@dpdk.org
Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
6 years agonet/bnxt: fix HWRM macros and locking
Ajit Khaparde [Thu, 28 Sep 2017 21:43:22 +0000 (16:43 -0500)]
net/bnxt: fix HWRM macros and locking

Obtain the spinlock in HWRM_PREP()
Eliminate two unnecessary arguments in HWRM_PREP().
Unlock the spinlock before returning in HWRM_ERROR_CHECK()
Add new HWRM_UNLOCK() macro
Update usage of the thre macros.

Fixes: 804e746c7b73 ("net/bnxt: add hardware resource manager init code")
Cc: stable@dpdk.org
Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
6 years agonet/i40e: fix mirror rule reset when port is closed
Wei Dai [Mon, 25 Sep 2017 06:36:53 +0000 (14:36 +0800)]
net/i40e: fix mirror rule reset when port is closed

When an i40e PF port is stopped, all mirror rules should be reserved.
But when an i40e PF port is closed, all mirror rules should be removed.
When a mirror rule is removed, its associated hardware and software
resource should also be removed.

Fixes: a4def5edf0fc ("i40e: enable port mirroring")
Cc: stable@dpdk.org
Signed-off-by: Wei Dai <wei.dai@intel.com>
Tested-by: Lijuan Tu <lijuanx.a.tu@intel.com>
Acked-by: Jingjing Wu <jingjing.wu@intel.com>
6 years agonet/mlx5: support upstream rdma-core
Shachar Beiser [Tue, 26 Sep 2017 15:38:24 +0000 (17:38 +0200)]
net/mlx5: support upstream rdma-core

This removes the dependency on specific Mellanox OFED libraries by
using the upstream rdma-core and linux upstream community code.
Both rdma-core upstream and Mellanox OFED are Linux user-space packages:
  1. Rdma-core is Linux upstream user-space package.(Generic)
  2. Mellanox OFED is Mellanox's Linux user-space package.(Proprietary)
The difference between the two are the APIs towards the kernel.

Support for x86-32 is removed due to issues in rdma-core library.
ICC compilation will be supported as soon as the following patch is
integrated in rdma-core:
https://marc.info/?l=linux-rdma&m=150643474705690&w=2

Signed-off-by: Shachar Beiser <shacharbe@mellanox.com>
Signed-off-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
6 years agonet/ark: add null pointer check
Yong Wang [Thu, 14 Sep 2017 12:03:56 +0000 (08:03 -0400)]
net/ark: add null pointer check

In function ark_config_device(), there are several malloc without null
point check. Fix it by adding null point check.

Signed-off-by: Yong Wang <wang.yong19@zte.com.cn>
Acked-by: Ed Czeck <ed.czeck@atomicrules.com>
6 years agonet/i40e: fix assignment of enum values
Tomasz Kulasek [Fri, 22 Sep 2017 12:36:25 +0000 (14:36 +0200)]
net/i40e: fix assignment of enum values

mixed_enums: Mixing enum types enum i40e_vsi_type and enum
             virtchnl_vsi_type for type

Coverity issue 158651
Fixes: a58860f68929 ("net/i40e/base: use new virtchnl header file")
Cc: stable@dpdk.org
Signed-off-by: Tomasz Kulasek <tomaszx.kulasek@intel.com>
Acked-by: Jingjing Wu <jingjing.wu@intel.com>
6 years agodoc: add Linux flower support check in TAP guide
Thomas Monjalon [Wed, 20 Sep 2017 13:03:13 +0000 (15:03 +0200)]
doc: add Linux flower support check in TAP guide

The flow API is supported in TAP PMD if flower is supported in Linux.
Some commands are combined to suggest a convenient check of its support
by the running kernel.

Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Acked-by: Pascal Mazon <pascal.mazon@6wind.com>
Acked-by: John McNamara <john.mcnamara@intel.com>
6 years agonet/af_packet: make qdisc bypass configurable
Chas Williams [Thu, 21 Sep 2017 09:57:58 +0000 (05:57 -0400)]
net/af_packet: make qdisc bypass configurable

In certain situations, low speed interfaces, it may be desirable to
have the flow control provided by the kernel queuing disciplines.

Signed-off-by: Chas Williams <chas3@att.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
6 years agonet/i40e: refactor some stats related functions
Wei Zhao [Thu, 21 Sep 2017 06:32:25 +0000 (14:32 +0800)]
net/i40e: refactor some stats related functions

Merge i40evf_dev_stats_get and i40evf_get_statistics to be one function.

Rename i40evf_update_stats to i40evf_query_stats,
and chang i40evf_update_vsi_stats to i40evf_update_stats.

Signed-off-by: Wei Zhao <wei.zhao1@intel.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
6 years agonet/i40e: support reset stats in VF
Wei Zhao [Thu, 21 Sep 2017 06:32:24 +0000 (14:32 +0800)]
net/i40e: support reset stats in VF

Add stats reset support to VF.

Signed-off-by: Wei Zhao <wei.zhao1@intel.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
6 years agoapp/testpmd: fix packet throughput after stats reset
Wei Zhao [Thu, 21 Sep 2017 06:32:23 +0000 (14:32 +0800)]
app/testpmd: fix packet throughput after stats reset

Testpmd calculates packet throughput by getting a diff of previous stats
value and current one.

If a stats clear called after previous sample taken, the diff will be
negative and throughput calculation will be wrong.

If current stats value is smaller than previous one, set throughput to
zero.

Fixes: 0e106980301d ("app/testpmd: show throughput in port stats")
Cc: stable@dpdk.org
Signed-off-by: Wei Zhao <wei.zhao1@intel.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
6 years agonet/i40e: fix clear xstats bug in VF
Wei Zhao [Thu, 21 Sep 2017 06:32:22 +0000 (14:32 +0800)]
net/i40e: fix clear xstats bug in VF

Clearing VSI stats done by setting an offset value to latest stats
and further stats values are subtracted from that offset.

This setting offset and baselining logic exists in PF driver, but for VF
there is no way to update its VSI offset in the PF.

So same baselining logic added into VF, also setting VSI offset in VF
fixed to support VF stats clear.

Fixes: da61cd0849766 ("i40evf: add extended stats")
Cc: stable@dpdk.org
Signed-off-by: Wei Zhao <wei.zhao1@intel.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
6 years agonet/enic: fix multi-process operation
John Daley [Mon, 11 Sep 2017 18:58:33 +0000 (11:58 -0700)]
net/enic: fix multi-process operation

- Use rte_malloc() instead of malloc() for the per device 'vdev' structure
  so that it can be shared across processes.
- Only initialize the device if the process type is RTE_PROC_PRIMARY
- Only allow the primary process to do queue setup, start/stop, promisc
  allmulticast, mac add/del, mtu.

Fixes: fefed3d1e62c ("enic: new driver")
Cc: stable@dpdk.org
Signed-off-by: John Daley <johndale@cisco.com>
Reviewed-by: Aaron Conole <aconole@redhat.com>
6 years agonet/vmxnet3: fix unintentional integer overflow
Sebastian Basierski [Tue, 19 Sep 2017 11:47:58 +0000 (13:47 +0200)]
net/vmxnet3: fix unintentional integer overflow

Fixed overflow by casting txq->cmd_ring.next2fill to uint64_t type.

Coverity issue: 143457

Fixes: 01fef6e3c181 ("net/vmxnet3: allow variable length Tx data ring")
Cc: stable@dpdk.org
Signed-off-by: Sebastian Basierski <sebastianx.basierski@intel.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
6 years agonet/tap: fix unregistering callback with invalid fd
Vipin Varghese [Mon, 18 Sep 2017 18:47:35 +0000 (19:47 +0100)]
net/tap: fix unregistering callback with invalid fd

tap_intr_handle_set() called by tap_dev_start(), and if LSC is disabled
(dev_conf.intr_conf.lsc == 0), it tries to unregister interrupt
callback without checking the interrupt file descriptor.

Fixes: c0bddd3a057f ("net/tap: add link status notification")
Cc: stable@dpdk.org
Signed-off-by: Vipin Varghese <vipin.varghese@intel.com>
Acked-by: Pascal Mazon <pascal.mazon@6wind.com>
6 years agonet/bonding: rename map file to standard name
Bruce Richardson [Thu, 14 Sep 2017 15:57:56 +0000 (16:57 +0100)]
net/bonding: rename map file to standard name

Naming convention for net drivers is "rte_pmd_<name>_version.map"

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
6 years agonet/qede/base: update PMD version to 2.6.0.1
Rasesh Mody [Tue, 19 Sep 2017 01:51:43 +0000 (18:51 -0700)]
net/qede/base: update PMD version to 2.6.0.1

Update QEDE PMD version to 2.6.0.1

Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
6 years agonet/qede/base: remove unused input parameter
Rasesh Mody [Tue, 19 Sep 2017 01:51:42 +0000 (18:51 -0700)]
net/qede/base: remove unused input parameter

Remove unused input parameter from ecore_dcbx_info_free().

Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
6 years agonet/qede/base: support WoL writes
Rasesh Mody [Tue, 19 Sep 2017 01:51:41 +0000 (18:51 -0700)]
net/qede/base: support WoL writes

Add support programing of WoL Bitmap paterns via management FW mailbox.

Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
6 years agonet/qede/base: disable aRFS for NPAR and 100G
Rasesh Mody [Tue, 19 Sep 2017 01:51:40 +0000 (18:51 -0700)]
net/qede/base: disable aRFS for NPAR and 100G

Disable accelerated RFS for NPAR and 100G using ECORE_MF_DISABLE_ARFS
multi function mode bit.

Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
6 years agonet/qede/base: retain dcbx config till actually applied
Rasesh Mody [Tue, 19 Sep 2017 01:51:39 +0000 (18:51 -0700)]
net/qede/base: retain dcbx config till actually applied

Retain user dcbx configurations till the config is applied to the adapter
i.e. till the negotiation completes. If base driver receives a config
update before negotiation completes, then base driver merges the new config
with the cached config and sends it to management FW.

Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
6 years agonet/qede/base: catch an init command write failure
Rasesh Mody [Tue, 19 Sep 2017 01:51:38 +0000 (18:51 -0700)]
net/qede/base: catch an init command write failure

In case ecore_init_rt() fails for some reason, catch the failure and
fail the initialization.

Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
6 years agonet/qede/base: add feature support for per-PF virtual link
Rasesh Mody [Tue, 19 Sep 2017 01:51:37 +0000 (18:51 -0700)]
net/qede/base: add feature support for per-PF virtual link

Add per-PF virtual link support.
This feature adds a logical layer over the physical link to reflect the
control of OEM management protocols either thru' sideband or a switch.
For example, a switch could send a link-down tlv for a PF and this will
put down logical link and virtual link in shared mem (SHMEM) for that PF
inspite of physical link being up for that port.

Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
6 years agonet/qede/base: dcbx dscp related extensions
Rasesh Mody [Tue, 19 Sep 2017 01:51:36 +0000 (18:51 -0700)]
net/qede/base: dcbx dscp related extensions

- Add an internal API ecore_dcbx_get_dscp_value() for getting the
dscp value for a given priority.

- Initialize dscp parameters in the dcbx-config cache to be used by
the clients for configuring dcbx parameters.

- Reset NIG_REG_DSCP_TO_TC_MAP_ENABLE register when user disables the dscp.

- Fix to always send "dscp + dcbx" update to FW.

Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
6 years agonet/qede/base: move define to header file
Rasesh Mody [Tue, 19 Sep 2017 01:51:35 +0000 (18:51 -0700)]
net/qede/base: move define to header file

Move FW_MB_PARAM_LOAD_DONE_DID_EFUSE_ERROR to header file

Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
6 years agonet/qede/base: support driver attribute repository
Rasesh Mody [Tue, 19 Sep 2017 01:51:34 +0000 (18:51 -0700)]
net/qede/base: support driver attribute repository

Add support for driver attributes repository in MFW and base driver.

Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
6 years agonet/qede/base: support mapped doorbell BARs for VF
Rasesh Mody [Tue, 19 Sep 2017 01:51:33 +0000 (18:51 -0700)]
net/qede/base: support mapped doorbell BARs for VF

Determines whether VF utilizes doorbells via limited register bar or via
the doorbell bar and return the size of the HW doorbell bar via acquire
response. By doing that limit the VF CIDs to an amount that would make sure
doorbells for all CIDs fall within the bar.

Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
6 years agonet/qede/base: add UFP support
Rasesh Mody [Tue, 19 Sep 2017 01:51:32 +0000 (18:51 -0700)]
net/qede/base: add UFP support

Add support for UFP (Unified Fabric Port) multi-function mode.
It includes new APIs for reading UFP configuration, handling
UFP events, retriving UFP status and UFP ramrod update etc.

Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
6 years agonet/qede/base: update firmware to 8.30.12.0
Rasesh Mody [Tue, 19 Sep 2017 01:51:31 +0000 (18:51 -0700)]
net/qede/base: update firmware to 8.30.12.0

Upgrade QEDE PMD FW to version 8.30.12.0.

The firmware upgrade change details are as:
 - Add support for steering by IP and UDP destination port.
 - Add source QP field for GSI offload.
 - Add UFP support.
 - Add support for outer IPv4 TX CSO with unknown tunnel type (in addition
   to inner header CSO).
 - Support flow ID in accelerated RFS flow.
 - Allow Doorbell on empty SPQ and LL2 TX queue (for doorbell recovery).
 - Enable PCI Relaxed Ordering for L2 RX data placement.
 - Additional enhancements and bug fixes

Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
6 years agonet/qede/base: fix number of app table entries
Rasesh Mody [Tue, 19 Sep 2017 01:51:30 +0000 (18:51 -0700)]
net/qede/base: fix number of app table entries

Configure only the available/requested number of app entries rather
than max entries (DCBX_MAX_APP_PROTOCOL) in ecore_dcbx_get_app_data().
Also, fixed a minor issue where incorrect size value is being passed for
memcpy().

Fixes: 26ae839d06e9 ("qede: add DCBX support")
Cc: stable@dpdk.org
Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
6 years agonet/qede/base: change verbosity
Rasesh Mody [Tue, 19 Sep 2017 01:51:29 +0000 (18:51 -0700)]
net/qede/base: change verbosity

Change verbosity of events related to malicious VFs to DP_NOTICE
from DP_INFO. They are not just informational events.

Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
6 years agonet/qede/base: add new macro for CMT mode
Rasesh Mody [Tue, 19 Sep 2017 01:51:28 +0000 (18:51 -0700)]
net/qede/base: add new macro for CMT mode

- Add ECORE_IS_CMT macro (CMT: couple mode teaming) and use that in all the
places where there are checks for number of HW functions per device > 1.

Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
6 years agonet/qede/base: handle the error condition properly
Rasesh Mody [Tue, 19 Sep 2017 01:51:27 +0000 (18:51 -0700)]
net/qede/base: handle the error condition properly

If for some reason the send message from VF to PF times out, don't bail out
right away without taking proper cleanup action. The goto statement calls
ecore_vf_pf_req_end() which will unlock the mutex previously held.

Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
6 years agonet/qede/base: semantic changes
Rasesh Mody [Tue, 19 Sep 2017 01:51:26 +0000 (18:51 -0700)]
net/qede/base: semantic changes

- Make ecore_dcbx_set_local_params(), ecore_cm_init_pf()  as static
- Remove src_proto()
- remove reference to PROTOCOLID_TOE when determining whether a a protocol
  requires SRC ILT memory
- Add auxiliary variables in various places
- All other changes are simple semantic corrections

Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
6 years agonet/qede/base: fix API return types
Rasesh Mody [Tue, 19 Sep 2017 01:51:25 +0000 (18:51 -0700)]
net/qede/base: fix API return types

- Turn ecore_ptt_get_hw_addr() into static
- Convert ecore_dcbx_get_operational_params() to void since we don't
  care about the return value

Fixes: 26ae839d06e9 ("qede: add DCBX support")
Cc: stable@dpdk.org
Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
6 years agonet/qede/base: use function pointers for spq async callback
Rasesh Mody [Tue, 19 Sep 2017 01:51:24 +0000 (18:51 -0700)]
net/qede/base: use function pointers for spq async callback

Change spq async callback to use function pointers instead of switch case
on protocolid.

Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
6 years agonet/qede/base: use available macro
Rasesh Mody [Tue, 19 Sep 2017 01:51:23 +0000 (18:51 -0700)]
net/qede/base: use available macro

- Use OSAL_PAGE_SIZE instead of assuming it to be 4096.
 - While at it make sure the minimum number of doorbells that can be issued
   is 4.

Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
6 years agonet/qede/base: use proper units for rate limiting
Rasesh Mody [Tue, 19 Sep 2017 01:51:22 +0000 (18:51 -0700)]
net/qede/base: use proper units for rate limiting

Change module parameter semantics to standard units (Rate limiting is used
for DCQCN feature).

Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
6 years agonet/qede/base: refactor device's number of ports logic
Rasesh Mody [Tue, 19 Sep 2017 01:51:21 +0000 (18:51 -0700)]
net/qede/base: refactor device's number of ports logic

- Avoid having num_of_ports as 0 [to prevent a division by 0 via
   MFW_PORT()]. Also fix the MFW_PORT() macro for CMT.
 - Read the device's number of ports from shmem.
 - Rename num_ports_in_engines to num_ports_in_engine.

Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
6 years agonet/qede/base: read per queue coalescing from HW
Rasesh Mody [Tue, 19 Sep 2017 01:51:20 +0000 (18:51 -0700)]
net/qede/base: read per queue coalescing from HW

Add base driver API to read per queue coalescing from hardware.
Move ecore_set_rxq|txq_coalesce() declarations to ecore_l2.h.

Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
6 years agonet/qede/base: fix macros to check chip revision/metal
Rasesh Mody [Tue, 19 Sep 2017 01:30:09 +0000 (18:30 -0700)]
net/qede/base: fix macros to check chip revision/metal

Fix the ECORE_IS_[AB]0() macros to check both the chip revision and the
chip metal. Realign defines in the struct ecore_dev.

Fixes: ec94dbc57362 ("qede: add base driver")
Cc: stable@dpdk.org
Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
6 years agonet/qede/base: remove unused parameters
Rasesh Mody [Tue, 19 Sep 2017 01:30:08 +0000 (18:30 -0700)]
net/qede/base: remove unused parameters

This is an attempt to clean up many unused API parameters across the base
code. Most of the changes are related to removing unused p_hwfn or p_ptt
handlers. The warnings are generated using 'unused-parameter' cflags.

Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
6 years agonet/qede/base: prevent stop vport assert by malicious VF
Rasesh Mody [Tue, 19 Sep 2017 01:30:07 +0000 (18:30 -0700)]
net/qede/base: prevent stop vport assert by malicious VF

PF checks upon stop-vport from VF whether it's legal, but if it's not it
would STILL send the request to FW, which might cause it to assert.

Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
6 years agonet/qede/base: block mbox command to unresponsive MFW
Rasesh Mody [Tue, 19 Sep 2017 01:30:06 +0000 (18:30 -0700)]
net/qede/base: block mbox command to unresponsive MFW

Block sending of mailbox command to the management FW if it is not
responsive. Use MCP_REG_CPU_STATE_SOFT_HALTED register to verify the MCP
is actually halted after sending the halt command and before proceeding
further.

Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
6 years agonet/qede/base: support doorbell overflow recovery
Rasesh Mody [Tue, 19 Sep 2017 01:30:05 +0000 (18:30 -0700)]
net/qede/base: support doorbell overflow recovery

Add support for doorbell overflow recovery mechanism:
The doorbell recovery mechanism consists of a list of entries which
represent doorbelling entities (l2 queues, roce sq/rq/cqs, the slowpath
spq, etc). Each entity needs to register with the mechanism and provide
the parameters describing it's doorbell, including a location where last
used doorbell data can be found. The doorbell execute function will
traverse the list and doorbell all of the registered entries.

Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
6 years agonet/qede/base: add API to send STAG config update to FW
Rasesh Mody [Tue, 19 Sep 2017 01:30:04 +0000 (18:30 -0700)]
net/qede/base: add API to send STAG config update to FW

Send updated STAG configuration to the Firmware.

Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
6 years agonet/qede/base: allow clients to override VF MSI-X table size
Rasesh Mody [Tue, 19 Sep 2017 01:30:03 +0000 (18:30 -0700)]
net/qede/base: allow clients to override VF MSI-X table size

For chip variant CHIP_NUM_AH_xxx, MSI-x configuration for VFs is controlled
per-PF [for all of its child VFs] instead of on a per-VF basis. A flag
called "dont_override_vf_msix" is added that allows the caller/client to
specify the mode they want to operate. If dont_override_vf_msix is false as
in the case of VF of CHIP_NUM_AH_xxx, first a check is made as to what is
currently configured number. Management FW will be asked to configure the
requested number only if its bigger than the currently configured value.

Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
6 years agonet/qede/base: rename MFW get/set field defines
Rasesh Mody [Tue, 19 Sep 2017 01:30:02 +0000 (18:30 -0700)]
net/qede/base: rename MFW get/set field defines

Changes for management FW, change of _SHIFT defines to _OFFSET.
Accordingly, rename and fix the ECORE_MFW_GET_FIELD() and
ECORE_MFW_SET_FIELD() macros and update wherever used.

Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
6 years agonet/qede/base: initialize resc lock/unlock params
Rasesh Mody [Tue, 19 Sep 2017 01:30:01 +0000 (18:30 -0700)]
net/qede/base: initialize resc lock/unlock params

Add a function that provides default initialization to resc lock/unlock
parameters. Change acquire flow that use resources into using this
function.

Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
6 years agonet/qede/base: remove helper functions/structures
Rasesh Mody [Tue, 19 Sep 2017 01:30:00 +0000 (18:30 -0700)]
net/qede/base: remove helper functions/structures

- Remove an additional wrapper function ecore_mcp_nvm_command and
   instead
   use ecore_mcp_nvm_wr_cmd, ecore_mcp_nvm_rd_cmd or ecore_mcp_cmd APIs
   directly as appropriate.
 - Remove struct ecore_mcp_nvm_params
 - Add new NVM command ECORE_EXT_PHY_FW_UPGRADE and fix the expected
   management FW responses in ecore_mcp_nvm_write()
 - Fail the NVM write process on any failing partial write

Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
6 years agonet/qede/base: revise management FW mbox access scheme
Rasesh Mody [Tue, 19 Sep 2017 01:29:59 +0000 (18:29 -0700)]
net/qede/base: revise management FW mbox access scheme

Revise the manamgement FW mbox access locking scheme for the access to the
MFW mailbox:
 - add a new linked list called cmd_list to ecore_mcp_info that tracks all
   the mailbox commands sent to management FW and ones waiting for
   response.
 - add a mutex lock called cmd_lock to ecore_mcp_info, a spinlock used to
   serialize the access to this cmd_list and makes sure that the mbox is
   not a pending one before sending a new mbox request. It protects the
   access to the mailbox commands list and sending of the commands.
 - add ecore_mcp_cmd_add|del|get_elem() APIs for new access scheme
 - remove ecore_mcp_mb_lock() and ecore_mcp_mb_unlock()
 - add a mutex lock called link_lock to ecore_mcp_info, a spinlock used for
   syncing SW link-changes and link-changes originating from attention
   context. This locking scheme prevents possible race conditions that may
   occur, such as during link status reporting.
 - Surround OSAL_{MUTEX,SPIN_LOCK}_{ALLOC,DEALLOC} with
   '#ifdef CONFIG_ECORE_LOCK_ALLOC'. In case memory has to be allocated for
   lock primitives, then compile driver with CONFIG_ECORE_LOCK_ALLOC flag.

Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
6 years agonet/qede/base: avoid possible race condition
Rasesh Mody [Tue, 19 Sep 2017 01:29:58 +0000 (18:29 -0700)]
net/qede/base: avoid possible race condition

There's a possible race in multiple VF scenarios for base driver users
that use the optional APIs ecore_iov_pf_get_and_clear_pending_events,
ecore_iov_pf_add_pending_events. If the client doesn't synchronize the two
calls, it's possible for the PF to clear a VF pending message indication
without ever getting it [as 'get & clear' isn't atomic], leading to VF
timeout on the command.

The solution is to switch into a per-VF indication rather than having a
bitfield for the various VFs with pending events. As part of the solution,
the setting/clearing of the indications is done internally by base driver.
As a result, ecore_iov_pf_add_pending_events is no longer needed and
ecore_iov_pf_get_and_clear_pending_events loses the 'and_clear' from its
name as its now a proper getter.

A VF would be considered 'pending' [I.e., get_pending_events() should
have '1' for it in its bitfield] beginning with the PF's base driver
recognizing a message sent by that VF [in SP_DPC] and ending only when
that VF message is processed.

Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
6 years agonet/qede/base: prevent re-assertions of parity errors
Rasesh Mody [Tue, 19 Sep 2017 01:29:57 +0000 (18:29 -0700)]
net/qede/base: prevent re-assertions of parity errors

Prevent parity errors from being re-asserted. Mask any parity error, even
if it is not associated with a HW block.

Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
6 years agonet/qede/base: use passed ptt handler
Rasesh Mody [Tue, 19 Sep 2017 01:29:56 +0000 (18:29 -0700)]
net/qede/base: use passed ptt handler

Use the ptt[PF translation table] handler that is passed rather than using
main ptt from the HW function.
In ecore_hw_get_resc()'s error flow, release the MFW generic resource lock
only if needed.
Change the verbosity level of GRC timeout from DP_INFO() to DP_NOTICE().
Reduce verbosity of print in ecore_hw_bar_size().

Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
6 years agonet/qede/base: add EEE support
Rasesh Mody [Tue, 19 Sep 2017 01:29:55 +0000 (18:29 -0700)]
net/qede/base: add EEE support

- Base driver EEE (Energy efficient ethernet) support.
 - Provide supported-speed mask to driver though shared memory.
 - Read/use eee-supported capabilities value from the shared memory.
 - Update qed_fill_link() to advertise the EEE capabilities.

Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
6 years agonet/qede/base: add mdump sub-commands
Rasesh Mody [Tue, 19 Sep 2017 01:29:54 +0000 (18:29 -0700)]
net/qede/base: add mdump sub-commands

- Add support to retain/clear data for crash dump by introducing the mdump
   GET_RETAIN/CLR_RETAIN sub commands, new APIs
   ecore_mcp_mdump_get_retain() and ecore_mcp_mdump_clr_retain()
 - Avoid checking for mdump logs and data in case of an emulator
 - Fix "deadbeaf" returned value in case of pcie status command read
   fails (prevent false detection)

Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
6 years agonet/qede/base: alter driver's force load behavior
Rasesh Mody [Tue, 19 Sep 2017 01:29:53 +0000 (18:29 -0700)]
net/qede/base: alter driver's force load behavior

- Add an option to override the default force load behavior.
 - PMD will set the override force load parameter to
   ECORE_OVERRIDE_FORCE_LOAD_ALWAYS.
 - Modify the printout when a force load is required to include the loaded
   value
 - No need for 'default' when switching over enums and covering all the
   values.

Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
6 years agonet/qede/base: add SmartAN support
Rasesh Mody [Tue, 19 Sep 2017 01:29:52 +0000 (18:29 -0700)]
net/qede/base: add SmartAN support

Add SmartAN feature that automatically detects peer switch capabilities
which relieves users from fumbling with adapter and switch configuration
Add new cmd DRV_MSG_CODE_GET_MFW_FEATURE_SUPPORT. Add new SmartLinQ config
method using NVM cfg options 239.

Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
6 years agonet/qede/base: add a sanity check
Rasesh Mody [Tue, 19 Sep 2017 01:29:51 +0000 (18:29 -0700)]
net/qede/base: add a sanity check

Add a sanity check that the offset being used to access the runtime array
is not greater/equal than/to RUNTIME_ARRAY_SIZE

Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
6 years agonet/qede/base: fix to use a passed ptt handle
Rasesh Mody [Tue, 19 Sep 2017 01:29:50 +0000 (18:29 -0700)]
net/qede/base: fix to use a passed ptt handle

Fix ecore_configure_vp_wfq_on_link_change() to use a provided ptt[PF
translation table] handle instead of directly using p_dpc_ptt

Fixes: ec94dbc57362 ("qede: add base driver")
Cc: stable@dpdk.org
Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
6 years agonet/qede/base: restrict cache line size register padding
Rasesh Mody [Tue, 19 Sep 2017 01:29:49 +0000 (18:29 -0700)]
net/qede/base: restrict cache line size register padding

Add a restriction on the pad to cache line size register.

Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
6 years agonet/qede/base: add API to configure coalescing for VF queues
Rasesh Mody [Tue, 19 Sep 2017 01:29:48 +0000 (18:29 -0700)]
net/qede/base: add API to configure coalescing for VF queues

Add API for PF to configure coalescing for VF queues.

Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
6 years agonet/qede/base: interchangeably use SB between PF and VF
Rasesh Mody [Tue, 19 Sep 2017 01:29:47 +0000 (18:29 -0700)]
net/qede/base: interchangeably use SB between PF and VF

Status Block reallocation - allow a PF and its child VF to change SB
between them using new base driver APIs.

The changes that are inside base driver flows are:

New APIs ecore_int_igu_reset_cam() and ecore_int_igu_reset_cam_default()
added to reset IGU CAM.
 a. During hw_prepare(), driver would re-initialize the IGU CAM.
 b. During hw_stop(), driver would initialize the IGU CAM to default.

Use igu_sb_id instead of sb_idx [protocol index] to allow setting of
the timer-resolution in CAU[coalescing algorithm unit] for all SBs,
sb_idx could limit SBs 0-11 only to be able change their timer-resolution.

Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
6 years agonet/qede/base: changes for VF queue zone
Rasesh Mody [Tue, 19 Sep 2017 01:29:46 +0000 (18:29 -0700)]
net/qede/base: changes for VF queue zone

Allow opening Multiple Tx queues on a single qzone for VFs.
This is supported by Rx/Tx TLVs now having an additional extended TLV that
passes the `qid_usage_idx', a unique number per each queue-cid that was
opened for a given queue-zone.

Fix to overcome TX timeout issue due to more than 16 CIDs by adding an
additional VF legacy mode. This will detach the CIDs from the original
only-existing legacy mode suited for older releases.
Following this change, only VFs that would publish VFPF_ACQUIRE_CAP_QIDS
would have the new CIDs scheme applied. I.e., the new 'legacy' mode is
actually whether this capability is published or not.

Changed the logic to clear doorbells for legacy and non-legacy VFs, so
the PF is cleaning the doorbells for both cases.

Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
6 years agonet/qede/base: convert device type to enum
Rasesh Mody [Tue, 19 Sep 2017 01:29:45 +0000 (18:29 -0700)]
net/qede/base: convert device type to enum

Add a new enum for device type and device type details to device info.

Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
6 years agonet/qede/base: allocate VF queues before PF
Rasesh Mody [Tue, 19 Sep 2017 01:29:44 +0000 (18:29 -0700)]
net/qede/base: allocate VF queues before PF

Change the order by which we allocate the resources to align with
management FW by first allocating the VF l2 queues and only
afterwards use what's left for the PF.

Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
6 years agonet/qede/base: use crc32 OSAL macro
Rasesh Mody [Tue, 19 Sep 2017 01:29:43 +0000 (18:29 -0700)]
net/qede/base: use crc32 OSAL macro

Move ecore_crc32() macro to within base driver to qede_crc32() and use
OSAL_CRC32() where required.

Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
6 years agonet/qede/base: update management FW supported features
Rasesh Mody [Tue, 19 Sep 2017 01:29:42 +0000 (18:29 -0700)]
net/qede/base: update management FW supported features

- Add transceivers temperature monitoring/reporting feature
 - Add new mbox command DRV_MSG_CODE_FEATURE_SUPPORT to exchange info
   between drivers and management FW regarding features supported
 - Add EEE to Link Flap Avoidance check, etc.

Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
6 years agonet/qede/base: add NVM config options
Rasesh Mody [Tue, 19 Sep 2017 01:29:41 +0000 (18:29 -0700)]
net/qede/base: add NVM config options

Add new NVM configuration options like
 - enabling Preboot Debug Mode,
 - 20G ethernet backplane support,
 - add RDMA to NPAR protocol list,
 - PHY module temperature thresholds, etc.

Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
6 years agonet/i40e: fix variable assignment
Jingjing Wu [Mon, 18 Sep 2017 18:53:06 +0000 (02:53 +0800)]
net/i40e: fix variable assignment

rx/tx_queue_setup functions are shared between PF and VF
drivers. So the var 'pf' should not be assigned at the beginning.
This patch fixes the issue, and also corrects the return err code.

Fixes: b6583ee40265 ("i40e: full VMDQ pools support")
Cc: stable@dpdk.org
Signed-off-by: Jingjing Wu <jingjing.wu@intel.com>
6 years agonet/i40e/base: fix bool definition
Jingjing Wu [Mon, 18 Sep 2017 18:11:28 +0000 (02:11 +0800)]
net/i40e/base: fix bool definition

Use stdbool.h instead of defining the bool type, to make
sure the virtchnnl msg format definition is the same
between PF and VF.

Fixes: 4861cde46116 ("i40e: new poll mode driver")
Cc: stable@dpdk.org
Signed-off-by: Jingjing Wu <jingjing.wu@intel.com>
6 years agonet/mlx5: replace network to host macros
Shachar Beiser [Sun, 17 Sep 2017 10:42:02 +0000 (10:42 +0000)]
net/mlx5: replace network to host macros

Signed-off-by: Shachar Beiser <shacharbe@mellanox.com>
Acked-by: Yongseok Koh <yskoh@mellanox.com>
Acked-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
6 years agonet/igb: fix memcpy length
Yong Wang [Tue, 12 Sep 2017 12:44:00 +0000 (08:44 -0400)]
net/igb: fix memcpy length

The size of "flex_filter.filter_info.mask" and "filter->mask" are 16
bytes, but the length of memcpy--"RTE_ALIGN(filter->len, sizeof(char))
/ sizeof(char)" may reach 128 bytes which may cause array access out
of bound.

Fix it by replacing "sizeof(char)" by "CHAR_BIT".

Fixes: 231d43909a31 ("igb: migrate flex filter to new API")
Cc: stable@dpdk.org
Signed-off-by: Yong Wang <wang.yong19@zte.com.cn>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
6 years agonet/liquidio: fix uninitialized variable
Yong Wang [Fri, 15 Sep 2017 11:48:28 +0000 (07:48 -0400)]
net/liquidio: fix uninitialized variable

In func lio_dev_link_update(), "link.link_autoneg" is used in func call
lio_dev_atomic_write_link_status(), but it is uninitialized.

Fixes: 3766020513df ("net/liquidio: add APIs to start device and update link")
Cc: stable@dpdk.org
Signed-off-by: Yong Wang <wang.yong19@zte.com.cn>
Acked-by: Shijith Thotton <shijith.thotton@caviumnetworks.com>