dpdk.git
7 years agonet/mlx5: optimize copy of Ethernet header
Nélio Laranjeiro [Thu, 24 Nov 2016 16:03:35 +0000 (17:03 +0100)]
net/mlx5: optimize copy of Ethernet header

Use fewer instructions to copy the first two bytes of Ethernet headers to
work queue elements.

Signed-off-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
Acked-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
7 years agonet/mlx5: move static prototype
Nélio Laranjeiro [Thu, 24 Nov 2016 16:03:34 +0000 (17:03 +0100)]
net/mlx5: move static prototype

Gather function prototypes at the beginning of the file.

Signed-off-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
Acked-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
7 years agonet/mlx5: fix missing inline attributes
Nélio Laranjeiro [Thu, 24 Nov 2016 16:03:33 +0000 (17:03 +0100)]
net/mlx5: fix missing inline attributes

These functions must be forced inline for better performance.

Fixes: 99c12dcca65d ("net/mlx5: handle Rx CQE compression")
Fixes: 1d88ba171942 ("net/mlx5: refactor Tx data path")
Fixes: 67fa62bc672d ("mlx5: support checksum offload")

CC: stable@dpdk.org
Signed-off-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
Acked-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
7 years agonet/mlx5: use vector types to speed up processing
Nélio Laranjeiro [Thu, 24 Nov 2016 16:03:32 +0000 (17:03 +0100)]
net/mlx5: use vector types to speed up processing

Let compiler automatically use the vector capabilities of the target
machine to optimize instructions.

Signed-off-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
Acked-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
7 years agonet/mlx5: use work queue buffer as a raw buffer
Nélio Laranjeiro [Thu, 24 Nov 2016 16:03:31 +0000 (17:03 +0100)]
net/mlx5: use work queue buffer as a raw buffer

Define a single work queue element type that encompasses them all.  It
includes control, Ethernet segment and raw data all grouped in a single
place.

Signed-off-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
Acked-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
7 years agonet/mlx5: prepare Tx vectorization
Nélio Laranjeiro [Thu, 24 Nov 2016 16:03:30 +0000 (17:03 +0100)]
net/mlx5: prepare Tx vectorization

Prepare the code to write the Work Queue Element with vectorized
instructions.

Signed-off-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
Signed-off-by: Elad Persiko <eladpe@mellanox.com>
Acked-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
7 years agonet/qede: update PMD version to 2.0.0.1
Rasesh Mody [Thu, 5 Jan 2017 07:04:08 +0000 (23:04 -0800)]
net/qede: update PMD version to 2.0.0.1

Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
7 years agonet/qede/base: dcbx changes for base driver
Rasesh Mody [Thu, 5 Jan 2017 07:04:07 +0000 (23:04 -0800)]
net/qede/base: dcbx changes for base driver

This patch includes changes for DCBX like:
 - Return empty parameters for oper-params query when negotiation is not
   complete
 - Use the ieee specific mask value for reading the ethtype value in the
   ieee dcbx mode
 - Endian-ness conversion is not needed for priority<->TC field, as the
   data is already being read/written by ecore in the bigendian way
 - While writing the ets config, base driver incorrectly merges the input
   values with the operational values. The values should be either set
   or unset
 - CEE selection field must be set regardless CEE/IEEE mode
 - Fail the dcbx query for VF interfaces
 - Semantic changes

Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
7 years agonet/qede/base: refactor some code bits
Rasesh Mody [Thu, 5 Jan 2017 07:04:06 +0000 (23:04 -0800)]
net/qede/base: refactor some code bits

Bits of code refactoring in ecore_hw_bar_size(), ecore_get_hw_info()
and ecore_init_cmd_*.

Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
7 years agonet/qede/base: semantic/formatting changes
Rasesh Mody [Thu, 5 Jan 2017 07:04:05 +0000 (23:04 -0800)]
net/qede/base: semantic/formatting changes

This patch consists of semantic/formatting changes. It also includes
comment additions.

Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
7 years agonet/qede/base: add support for new firmware
Rasesh Mody [Thu, 5 Jan 2017 07:04:04 +0000 (23:04 -0800)]
net/qede/base: add support for new firmware

Add support for 8.14.x.x firmware.

The new firmware adds support for external PHY BCM8485x; configures
fixed link speed with transceiver/cable not supporting negotiation;
supports engine swap; supports overriding PCIe preset equalization
value; checks pause too long for ports and reads die temperature
every second for shutdown threshold.
It includes change in FLR flow when there is a SW initiated FLR.

Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
7 years agonet/qede: add 50G device PCI id
Rasesh Mody [Thu, 5 Jan 2017 07:04:03 +0000 (23:04 -0800)]
net/qede: add 50G device PCI id

Add 50G device support for 57980 series

Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
7 years agonet/qede: add PCI ids for new chip variant
Rasesh Mody [Thu, 5 Jan 2017 07:04:02 +0000 (23:04 -0800)]
net/qede: add PCI ids for new chip variant

Add PCI IDs for new asic type (defined as CHIP_NUM_AH_xxx).
It supports 50G, 40G, 25G and 10G speeds.

Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
7 years agonet/qede/base: add support for 2x10G mode
Rasesh Mody [Thu, 5 Jan 2017 07:04:01 +0000 (23:04 -0800)]
net/qede/base: add support for 2x10G mode

Add support for 2x10G mode

Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
7 years agonet/qede/base: add support for external PHY
Rasesh Mody [Thu, 5 Jan 2017 07:04:00 +0000 (23:04 -0800)]
net/qede/base: add support for external PHY

Add support for external PHY BCM8485x.

Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
7 years agonet/qede/base: retrieve FW crash dump info
Rasesh Mody [Thu, 5 Jan 2017 07:03:59 +0000 (23:03 -0800)]
net/qede/base: retrieve FW crash dump info

As part of device probe, check if management FW crash dump logs are
available. If available, then log an warning message and update the
epoch value too. A new struct ecore_mdump_info is added to populate
dump info including the new "reason" field by reading shared memory
region.

Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
7 years agonet/qede/base: add check for get NVM info return code
Rasesh Mody [Thu, 5 Jan 2017 07:03:58 +0000 (23:03 -0800)]
net/qede/base: add check for get NVM info return code

Fail ecore_get_hw_info() in case ecore_hw_get_nvm_info() fails.

Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
7 years agonet/qede: add new host ring type option
Rasesh Mody [Thu, 5 Jan 2017 07:03:57 +0000 (23:03 -0800)]
net/qede: add new host ring type option

Add new option called external PBL (page base list) to ecore_chain_alloc
for future use. Mark chain as external if external PBL is provided.

Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
7 years agonet/qede/base: add macros for converting pointer
Rasesh Mody [Thu, 5 Jan 2017 07:03:56 +0000 (23:03 -0800)]
net/qede/base: add macros for converting pointer

Add macros PTR_LO and PTR_HI (for converting pointer to HI and LOW bits for
passing to FW hsi handles).

Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
7 years agonet/qede/base: add new status code
Rasesh Mody [Thu, 5 Jan 2017 07:03:55 +0000 (23:03 -0800)]
net/qede/base: add new status code

Add ECORE_CONN_RESET to enum ecore_status.

Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
7 years agonet/qede/base: enhance resource info set printouts
Rasesh Mody [Thu, 5 Jan 2017 07:03:54 +0000 (23:03 -0800)]
net/qede/base: enhance resource info set printouts

Add the resources names in the ecore_hw_set_resc_info() printouts.

Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
7 years agonet/qede: remove unused struct member
Rasesh Mody [Thu, 5 Jan 2017 07:03:53 +0000 (23:03 -0800)]
net/qede: remove unused struct member

Remove b_hw_channel from struct ecore_dev.

Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
7 years agonet/qede/base: semantic change
Rasesh Mody [Thu, 5 Jan 2017 07:03:52 +0000 (23:03 -0800)]
net/qede/base: semantic change

Semantic change: No reason to have p_ prefix to non-pointers

Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
7 years agonet/qede/base: improve Tx-switching performance
Rasesh Mody [Thu, 5 Jan 2017 07:03:51 +0000 (23:03 -0800)]
net/qede/base: improve Tx-switching performance

In order to improve Tx switching performance an additional HSI parameter
called same-as-last-id is introduced. This resource allows FW caching the
txqs packet properties. Driver needs to set same-as-last-id to be equal to
the qzone.

Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
7 years agonet/qede/base: fix updating VF queue zone id
Rasesh Mody [Thu, 5 Jan 2017 07:03:50 +0000 (23:03 -0800)]
net/qede/base: fix updating VF queue zone id

Pass the absolute qzone_id when creating queues.

Fixes: 5cdd769a26ec ("qede: add L2 support")

Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
7 years agonet/qede/base: add check to validate Tx queue
Rasesh Mody [Thu, 5 Jan 2017 07:03:49 +0000 (23:03 -0800)]
net/qede/base: add check to validate Tx queue

Make sure VF tx_qid and the status block index is in the allocated range,
else fail the request.

Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
7 years agonet/qede/base: rename macro
Rasesh Mody [Thu, 5 Jan 2017 07:03:48 +0000 (23:03 -0800)]
net/qede/base: rename macro

Rename OOO_LB_TC to PKT_LB_TC to give better meaning.

Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
7 years agonet/qede/base: make API non-static
Rasesh Mody [Thu, 5 Jan 2017 07:03:47 +0000 (23:03 -0800)]
net/qede/base: make API non-static

Move ecore_set_fw_mac_addr from ecore_l2.c to ecore_dev.c to
facilitate future code reuse.

Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
7 years agonet/qede/base: change return codes in SR-IOV
Rasesh Mody [Thu, 5 Jan 2017 07:03:46 +0000 (23:03 -0800)]
net/qede/base: change return codes in SR-IOV

Change return codes in VF/SR-IOV base driver from int to
enum _ecore_status_t.

Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
7 years agonet/qede/base: add handling of malicious VF
Rasesh Mody [Thu, 5 Jan 2017 07:03:45 +0000 (23:03 -0800)]
net/qede/base: add handling of malicious VF

Receive indication that VFs are malicious and pass it to the
caller/clients and stop serving those VF's additional resource requests.

Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
7 years agonet/qede/base: improve set field macro
Rasesh Mody [Thu, 5 Jan 2017 07:03:44 +0000 (23:03 -0800)]
net/qede/base: improve set field macro

Improve robustness of the SET_FIELD macro by using a mask.

Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
7 years agonet/qede/base: add request for PF FLR before load request
Rasesh Mody [Thu, 5 Jan 2017 07:03:43 +0000 (23:03 -0800)]
net/qede/base: add request for PF FLR before load request

Add a request for PF Function Level Reset (FLR) before a load request

Fix the location of the PF FLR initiation to be after ecore_get_hw_info()
(which invokes ecore_hw_info_port_num())

Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
7 years agonet/mlx5: extend IPv4 flow item
Nélio Laranjeiro [Thu, 29 Dec 2016 15:15:22 +0000 (16:15 +0100)]
net/mlx5: extend IPv4 flow item

This commits adds:
- Type of service
- Next protocol ID

Signed-off-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
Acked-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
7 years agonet/mlx5: support mark flow action
Nélio Laranjeiro [Thu, 29 Dec 2016 15:15:21 +0000 (16:15 +0100)]
net/mlx5: support mark flow action

Signed-off-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
Acked-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
7 years agonet/mlx5: support VXLAN flow item
Nélio Laranjeiro [Thu, 29 Dec 2016 15:15:20 +0000 (16:15 +0100)]
net/mlx5: support VXLAN flow item

Signed-off-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
Acked-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
7 years agonet/mlx5: support VLAN flow item
Nélio Laranjeiro [Thu, 29 Dec 2016 15:15:19 +0000 (16:15 +0100)]
net/mlx5: support VLAN flow item

Signed-off-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
Acked-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
7 years agonet/mlx5: support basic flow items and actions
Nélio Laranjeiro [Thu, 29 Dec 2016 15:15:18 +0000 (16:15 +0100)]
net/mlx5: support basic flow items and actions

Introduce initial software for rte_flow rules.

VLAN, VXLAN are still not supported.

Signed-off-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
Acked-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
7 years agonet/mlx5: add preliminary flow API support
Nélio Laranjeiro [Thu, 29 Dec 2016 15:15:17 +0000 (16:15 +0100)]
net/mlx5: add preliminary flow API support

Signed-off-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
Acked-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
7 years agonet/ena: use correct field for Rx offload features
Jakub Palider [Wed, 4 Jan 2017 13:58:54 +0000 (14:58 +0100)]
net/ena: use correct field for Rx offload features

Previously the capability bitmap for Rx offloads was mistakenly taken
from Tx capability bitmap field. This patch fixes the problem.

Signed-off-by: Jakub Palider <jpa@semihalf.com>
7 years agonet/nfp: add TSO support
Alejandro Lucero [Tue, 20 Dec 2016 10:18:19 +0000 (10:18 +0000)]
net/nfp: add TSO support

This patch implements NFP PMD support for TSO but it also requires
a firmware advertising the capability.

Signed-off-by: Alejandro Lucero <alejandro.lucero@netronome.com>
7 years agonet/i40e: fix wrong return value when handling PF message
Wenzhuo Lu [Wed, 21 Dec 2016 08:29:40 +0000 (16:29 +0800)]
net/i40e: fix wrong return value when handling PF message

When VF receives a message from PF, it should check the return
value. But in i40evf_execute_vf_cmd the value is ignored and not
returned to the caller.

Fixes: 95cd21f45d1b ("i40evf: allocate virtchnl commands buffer per VF")

Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
7 years agonet/mlx5: fix RSS hash result for flows
Nélio Laranjeiro [Wed, 28 Dec 2016 09:58:31 +0000 (10:58 +0100)]
net/mlx5: fix RSS hash result for flows

Flows redirected to a specific queue do not have a valid RSS hash result
and the related mbuf flag must not be set.

Fixes: ecf60761fc2a ("net/mlx5: return RSS hash result in mbuf")

Signed-off-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
Acked-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
7 years agonet/ixgbe: remove unused global variable
Jerin Jacob [Tue, 27 Dec 2016 10:09:57 +0000 (15:39 +0530)]
net/ixgbe: remove unused global variable

Removed unused "reg_info" global variable from ixgbe driver.

cat build/app/testpmd.map | grep "Allocating common symbols" -A 15
Allocating common symbols
Common symbol   size    file
reg_info        0x18    build/lib/librte_pmd_ixgbe.a(ixgbe_ethdev.o)

Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>
7 years agonet/nfp: add Rx interrupts
Alejandro Lucero [Mon, 19 Dec 2016 18:05:58 +0000 (18:05 +0000)]
net/nfp: add Rx interrupts

This is supported with UIO and VFIO modules. With UIO, LSC interrupt
is disabled.

Signed-off-by: Alejandro Lucero <alejandro.lucero@netronome.com>
7 years agonet/nfp: avoid modulo operations for handling ring wrapping
Alejandro Lucero [Mon, 19 Dec 2016 16:13:03 +0000 (16:13 +0000)]
net/nfp: avoid modulo operations for handling ring wrapping

Having those modulo operations implies costly instructions execution,
what can be avoided with conditionals and unlikely clauses.

This change makes the software ring read and write indexes to be now
always within the ring size which has to be handled properly. The main
problem is when write pointer wraps and being less than the read pointer.
This happened before, but just with indexes type size (uint32_t) wrapping,
and in that case the processor does the right thing no requiring special
handling by software.

This work has also led to discovering redundant pointers in the driver,
which have been removed.

Signed-off-by: Alejandro Lucero <alejandro.lucero@netronome.com>
7 years agonet/qede/base: fix VF over legacy PF
Rasesh Mody [Fri, 23 Dec 2016 00:50:04 +0000 (16:50 -0800)]
net/qede/base: fix VF over legacy PF

Apparently VF over Legacy PF doesn't work, as VF would fail after
getting the initial rejection message [instead of sending an additional
one where it asks for a FW override and see if it works].

Fixes: 22d07d939c3c ("net/qede/base: update")

Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
7 years agonet/qede/base: fix to handle acquire request from VF
Rasesh Mody [Fri, 23 Dec 2016 00:50:03 +0000 (16:50 -0800)]
net/qede/base: fix to handle acquire request from VF

Add a check and fail the VF's probe request if VF is already in
VF_ACQUIRED state.

Fixes: 22d07d939c3c ("net/qede/base: update")

Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
7 years agonet/qede/base: fix Rx queue access by malicious VFs
Rasesh Mody [Fri, 23 Dec 2016 00:50:02 +0000 (16:50 -0800)]
net/qede/base: fix Rx queue access by malicious VFs

Rx queue access is still done prior to the index being validated by PF.
Hence move Rx queue and status block validation check before accessing
Rx queue to prevent malicious VFs from using out-of-bound queue indices.

Fixes: 98bc693e1938 ("net/qede/base: change queue start")

Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
7 years agonet/qede/base: fix mutex in freeing context manager
Rasesh Mody [Fri, 23 Dec 2016 00:50:01 +0000 (16:50 -0800)]
net/qede/base: fix mutex in freeing context manager

Fix OSAL_MUTEX_DEALLOC() in freeing the context manager.

Fixes: 22d07d939c3c ("net/qede/base: update")

Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
7 years agonet/qede/base: fix error code in resc allocation
Rasesh Mody [Fri, 23 Dec 2016 00:50:00 +0000 (16:50 -0800)]
net/qede/base: fix error code in resc allocation

Fix to return error code ECORE_INVAL instead of 0 when EQ elements
is too large as done elsewhere in this function.

Fixes: 22d07d939c3c ("net/qede/base: update")

Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
7 years agonet/qede/base: fix multiple acquisition requests by VF
Rasesh Mody [Fri, 23 Dec 2016 00:49:59 +0000 (16:49 -0800)]
net/qede/base: fix multiple acquisition requests by VF

There are certain conditions under which VF would infinitely send
ACQUIRE messages, as it will fail to understand that PF has rejected
the ACQUIRE request. Fix to reject multiple acquisition requests by VF.

Fixes: 22d07d939c3c ("net/qede/base: update")

Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
7 years agonet/qede/base: fix SRIOV printouts
Rasesh Mody [Fri, 23 Dec 2016 00:49:58 +0000 (16:49 -0800)]
net/qede/base: fix SRIOV printouts

Remove unmeaningful function ID value in print.

Don't print the number of Multicast filters as part of Acquire response,
as this is an obsolete field which isn't enforced by PF.

Fixes: 86a2265e59d7 ("qede: add SRIOV support")

Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
7 years agonet/qede: add vendor/device id info
Rasesh Mody [Fri, 23 Dec 2016 00:49:57 +0000 (16:49 -0800)]
net/qede: add vendor/device id info

The vendor_id and device_id are used to determine device type. If you
don't have them, then check for determining device type fails and is
always set to default device type.

Fixes: ec94dbc57362 ("qede: add base driver")

Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
7 years agonet/qede: restrict maximum queues for PF/VF
Harish Patil [Fri, 23 Dec 2016 00:48:11 +0000 (16:48 -0800)]
net/qede: restrict maximum queues for PF/VF

HW can support up to 128 queues based on the NIC config/personality.
But most of the testing is done with 32 queues for PF and 16 for VF
device across different qede devices, so change here is to advertise
only those many instead of returning max queues supported by HW.

Fixes: 2ea6f76aff40 ("qede: add core driver")

Signed-off-by: Harish Patil <harish.patil@qlogic.com>
7 years agonet/qede: fix reporting PF driver as disabled
Harish Patil [Fri, 23 Dec 2016 00:48:10 +0000 (16:48 -0800)]
net/qede: fix reporting PF driver as disabled

qede PMD does not support SR-IOV PF driver functionality, so
max_vfs is set to 0 to imply the same.

Fixes: 2ea6f76aff40 ("qede: add core driver")

Signed-off-by: Harish Patil <harish.patil@qlogic.com>
7 years agonet/qede: fix RSS
Harish Patil [Fri, 23 Dec 2016 00:48:09 +0000 (16:48 -0800)]
net/qede: fix RSS

This patch includes the following:

- Fix missing hash_key_size advertisement
- Fix RSS hash query function
- Update RSS offload flag
- Accept user provided RSS configuration params via rx_adv_conf
  in dev_configure()
- Decouple RSS configuration from common qed_update_vport() and
  instead make use of existing RSS APIs for default RSS configuration

Fixes: 6d9e26c42c0d ("net/qede: get RSS hash configuration")
Fixes: 9c5d0a669f9b ("net/qede: fix RSS")

Signed-off-by: Harish Patil <harish.patil@qlogic.com>
7 years agonet/qede: add fastpath support for VXLAN tunneling
Harish Patil [Fri, 23 Dec 2016 00:48:08 +0000 (16:48 -0800)]
net/qede: add fastpath support for VXLAN tunneling

- Support HW checksum and RSS offload for VXLAN traffic
- Identify inner/outer packet_types using lookup table
- Update documentation

Signed-off-by: Harish Patil <harish.patil@qlogic.com>
7 years agonet/qede: add slowpath support for VXLAN tunneling
Harish Patil [Fri, 23 Dec 2016 00:48:07 +0000 (16:48 -0800)]
net/qede: add slowpath support for VXLAN tunneling

- Enable/disable VXLAN tunneling
- Add/remove VXLAN classification rules
- Destination UDP port configuration

Signed-off-by: Harish Patil <harish.patil@qlogic.com>
7 years agonet/qede: fix filtering code
Harish Patil [Fri, 23 Dec 2016 00:48:06 +0000 (16:48 -0800)]
net/qede: fix filtering code

In qede_mac_addr_add() a check is added to differentiate between
unicast/multicast mac to prevent a multicast mac from being wrongly added
to unicast filter table. Secondly, two separate lists will be used to keep
track of unicast/multicast mac filters to prevent duplicate filter
programming. The other change is to remove filter_config from struct
qed_eth_ops_pass and invoke the base APIs directly. This avoids the need
to have multiple structs and function calls.

Fixes: 2ea6f76aff40 ("qede: add core driver")

Signed-off-by: Harish Patil <harish.patil@qlogic.com>
7 years agonet/qede: reduce noise in debug logs
Harish Patil [Fri, 23 Dec 2016 00:48:05 +0000 (16:48 -0800)]
net/qede: reduce noise in debug logs

Move DP_NOTICE msg under CONFIG_RTE_LIBRTE_QEDE_DEBUG_INFO.

Signed-off-by: Harish Patil <harish.patil@qlogic.com>
7 years agonet/sfc: advertise kmod dependencies in pmdinfo
Andrew Rybchenko [Thu, 22 Dec 2016 11:32:40 +0000 (11:32 +0000)]
net/sfc: advertise kmod dependencies in pmdinfo

Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
7 years agonet/ixgbe/base: update shared code version to 2016.11.21
Wei Dai [Wed, 21 Dec 2016 09:48:14 +0000 (17:48 +0800)]
net/ixgbe/base: update shared code version to 2016.11.21

Update the version of shared codes to cid-ixgbe.2016.11.21.tar.gz,

All files in net/ixgbe/base are developed by another team and
DPDK PMD uses them accordingly.

Signed-off-by: Wei Dai <wei.dai@intel.com>
7 years agonet/ixgbe/base: report physical layer for SGMII PHY type
Wei Dai [Wed, 21 Dec 2016 09:48:13 +0000 (17:48 +0800)]
net/ixgbe/base: report physical layer for SGMII PHY type

For the PHY type SGMII, report the physical layer.

Signed-off-by: Wei Dai <wei.dai@intel.com>
7 years agonet/ixgbe/base: add write flush required by Inphi PHY
Wei Dai [Wed, 21 Dec 2016 09:48:12 +0000 (17:48 +0800)]
net/ixgbe/base: add write flush required by Inphi PHY

This patch updates the configuration of PHY from Inphi (www.inphi.com)
to flush the register write with a reg read.
The Inphi PHY is configured in ixgbe_setup_mac_link_sfp_x550a.
The Inphi PHY setup flow has been updated to read configuration reg,
write only linear/non-linear, and then read (write flush).

Signed-off-by: Wei Dai <wei.dai@intel.com>
7 years agonet/ixgbe/base: remove unused EEE code
Wei Dai [Wed, 21 Dec 2016 09:48:11 +0000 (17:48 +0800)]
net/ixgbe/base: remove unused EEE code

Remove unused old Energy Efficient Ethernet (EEE) code.

Signed-off-by: Wei Dai <wei.dai@intel.com>
7 years agonet/ixgbe/base: fix IXGBE LSWFW register
Wei Dai [Wed, 21 Dec 2016 09:48:10 +0000 (17:48 +0800)]
net/ixgbe/base: fix IXGBE LSWFW register

This register was incorrect when compared to the data sheet.
Even though the driver doesn't currently use this register,
it is better to fix it upstream.

Fixes: af75078fece3 ("first public release")

Signed-off-by: Wei Dai <wei.dai@intel.com>
7 years agonet/ixgbe/base: remove unused enum type
Wei Dai [Wed, 21 Dec 2016 09:48:09 +0000 (17:48 +0800)]
net/ixgbe/base: remove unused enum type

remove unused enum type for master/slave control in ixbge_type.h

Signed-off-by: Wei Dai <wei.dai@intel.com>
7 years agonet/ixgbe/base: add EEE support for some PHYs
Wei Dai [Wed, 21 Dec 2016 09:48:08 +0000 (17:48 +0800)]
net/ixgbe/base: add EEE support for some PHYs

This patch adds Energy Efficient Ethernet (EEE) support for
some Marvell PHYs on some future platforms.
Because EEE capability or status was not indicated previously,
this patch simply assumes that it is supported.

As soon as there is a PHY that does not support EEE, there will
be defects in this area because the driver will not report the
EEE status correctly.

This also deletes some now-unused definitions from an earlier
Marvell PHY implementation and combines a device ID check into a
switch statement.

Signed-off-by: Wei Dai <wei.dai@intel.com>
7 years agonet/ixgbe/base: update FW PHY flow control
Wei Dai [Wed, 21 Dec 2016 09:48:07 +0000 (17:48 +0800)]
net/ixgbe/base: update FW PHY flow control

This patch removes the flow control conversion from Rx and Tx to pause
and asymmetric pause, as that is handled by the ixgbe_negotiate_fc().

Performing the conversion prior to ixgbe_negotiate_fc() results in
an incorrect fc mode if Rx only pause is selected when the link partner
is advertising Tx.

Signed-off-by: Wei Dai <wei.dai@intel.com>
7 years agonet/ixgbe/base: remove unused PHY ID
Wei Dai [Wed, 21 Dec 2016 09:48:06 +0000 (17:48 +0800)]
net/ixgbe/base: remove unused PHY ID

The first PHY ID for X550 was only used on original HW and
never released. So remove these unused PHY ID.

Signed-off-by: Wei Dai <wei.dai@intel.com>
7 years agonet/ixgbe/base: remove unneeded MAC type check
Wei Dai [Wed, 21 Dec 2016 09:48:05 +0000 (17:48 +0800)]
net/ixgbe/base: remove unneeded MAC type check

ixgbe_read_i2c_combined_generic_int() is only used by devices >= X550.
Set the initial value accordingly and remove the MAC type check.

Signed-off-by: Wei Dai <wei.dai@intel.com>
7 years agonet/ixgbe/base: add physical layer options for FW PHY type
Wei Dai [Wed, 21 Dec 2016 09:48:04 +0000 (17:48 +0800)]
net/ixgbe/base: add physical layer options for FW PHY type

The "FW" PHY type now supports speeds 10M, 100M, and 1G.
Previously, only the 1G speed was reported for this PHY type.
Add reporting 10M and 100M speed options.

Signed-off-by: Wei Dai <wei.dai@intel.com>
7 years agonet/ixgbe/base: limit 5Gb support to X550 devices
Wei Dai [Wed, 21 Dec 2016 09:48:03 +0000 (17:48 +0800)]
net/ixgbe/base: limit 5Gb support to X550 devices

Only X550 devices support 5Gb. MAC type checks for 5Gb should
be done only for X550 devices.

Signed-off-by: Wei Dai <wei.dai@intel.com>
7 years agonet/ixgbe/base: include new speeds in VFLINK interpretation
Wei Dai [Wed, 21 Dec 2016 09:48:02 +0000 (17:48 +0800)]
net/ixgbe/base: include new speeds in VFLINK interpretation

This patch moves some of the extended speeds that come with X552
(5G, 2.5G, 10M) into the link check functions.
It also now returns speed_unknown for speeds that are not known
how to interpret.

Signed-off-by: Wei Dai <wei.dai@intel.com>
7 years agonet/ixgbe/base: support busy SGMII register reads
Wei Dai [Wed, 21 Dec 2016 09:48:01 +0000 (17:48 +0800)]
net/ixgbe/base: support busy SGMII register reads

Read and store NW_MNG_IF_SEL register because register fields are
used to determine SGMII link for busy SGMII register reads.

Signed-off-by: Wei Dai <wei.dai@intel.com>
7 years agonet/ixgbe/base: use FW commands to control some PHYs
Wei Dai [Wed, 21 Dec 2016 09:48:00 +0000 (17:48 +0800)]
net/ixgbe/base: use FW commands to control some PHYs

Use the new firmware interface to access and control some PHYs.

Signed-off-by: Wei Dai <wei.dai@intel.com>
7 years agonet/ixgbe/base: support FW commands to control some PHYs
Wei Dai [Wed, 21 Dec 2016 09:47:59 +0000 (17:47 +0800)]
net/ixgbe/base: support FW commands to control some PHYs

Implement support for new firmware commands to be used to access
and control some PHYs.

Signed-off-by: Wei Dai <wei.dai@intel.com>
7 years agonet/ixgbe/base: fix setting unsupported autoneg speeds
Wei Dai [Wed, 21 Dec 2016 09:47:58 +0000 (17:47 +0800)]
net/ixgbe/base: fix setting unsupported autoneg speeds

Update ixgbe_setup_phy_link_generic that set/unset auto-negotiation.
Ensure that unsupported auto-negotiation speeds are unset.

This is necessary since the PHY NVM may advertise unsupported speeds.

Fixes: af75078fece3 ("first public release")

Signed-off-by: Wei Dai <wei.dai@intel.com>
7 years agonet/ixgbe/base: cleanup dead EEE code
Wei Dai [Wed, 21 Dec 2016 09:47:57 +0000 (17:47 +0800)]
net/ixgbe/base: cleanup dead EEE code

Remove some specific code for enabling/disabling Energy Efficient
Ethernet (EEE).

Signed-off-by: Wei Dai <wei.dai@intel.com>
7 years agonet/ixgbe/base: fix SGMII link setup for M88 PHYs
Wei Dai [Wed, 21 Dec 2016 09:47:56 +0000 (17:47 +0800)]
net/ixgbe/base: fix SGMII link setup for M88 PHYs

Fix ixgbe_setup_sgmii_m88 to set lane speed to autoneg instead of 1G
to prevent problems with link between PHYs

Fixes: d4b4c6845487 ("net/ixgbe/base: add X550em_a FW ALEF support")

Signed-off-by: Wei Dai <wei.dai@intel.com>
7 years agonet/ixgbe/base: fix getting PHY type for some x550 devices
Wei Dai [Wed, 21 Dec 2016 09:47:55 +0000 (17:47 +0800)]
net/ixgbe/base: fix getting PHY type for some x550 devices

Return correct physical layer for some x550 devices.

Fixes: 76d5b807ff74 ("ixgbe/base: new X557 phy")
Fixes: d2e72774e58c ("ixgbe/base: support X550")

Signed-off-by: Wei Dai <wei.dai@intel.com>
7 years agonet/ixgbe/base: limit iXFI setup to X552 devices
Wei Dai [Wed, 21 Dec 2016 09:47:54 +0000 (17:47 +0800)]
net/ixgbe/base: limit iXFI setup to X552 devices

The MAC register NW_MNG_IF_SEL fields have been redefined for X553.
These changes impact the iXFI driver code flow. Since iXFI is only
supported in X552, this patch adds X552 MAC check for iXFI flows.

Signed-off-by: Wei Dai <wei.dai@intel.com>
7 years agonet/ixgbe/base: enable LASI only for X552 devices
Wei Dai [Wed, 21 Dec 2016 09:47:53 +0000 (17:47 +0800)]
net/ixgbe/base: enable LASI only for X552 devices

Enable the Link Alarm Status Interrupt (LASI) only for X552 devices
to receive notifications of the link configurations of the external
PHY and correspondingly support the configuration of the internal
iXFI link, since iXFI does not support auto-negotiation.

This is not required for X553 devices having KR support, which
performs auto-negotiations and which is used as the internal
link to the external PHY.

Signed-off-by: Wei Dai <wei.dai@intel.com>
7 years agonet/ixgbe/base: cleanup X540 checksum calculation
Wei Dai [Wed, 21 Dec 2016 09:47:52 +0000 (17:47 +0800)]
net/ixgbe/base: cleanup X540 checksum calculation

The variable checksum_last_word is used only for bounds check.
So remove this variable and use IXGBE_EEPROM_CHECKSUM directly.

Signed-off-by: Wei Dai <wei.dai@intel.com>
7 years agonet/ixgbe/base: store link active LED
Wei Dai [Wed, 21 Dec 2016 09:47:51 +0000 (17:47 +0800)]
net/ixgbe/base: store link active LED

Add support to get the link active LED index via the LEDCTL register.
If the LEDCTL register does not have link active LED set then
use MAC default LED index.
Link active LED is used for adapter identify/blink support.

Signed-off-by: Wei Dai <wei.dai@intel.com>
7 years agonet/ixgbe/base: add driver version to firmware
Wei Dai [Wed, 21 Dec 2016 09:47:50 +0000 (17:47 +0800)]
net/ixgbe/base: add driver version to firmware

Send the driver version string to firmware through
the host interface command on x550 devices.

Signed-off-by: Wei Dai <wei.dai@intel.com>
7 years agonet/ixgbe/base: clean up X557 link status check
Wei Dai [Wed, 21 Dec 2016 09:47:49 +0000 (17:47 +0800)]
net/ixgbe/base: clean up X557 link status check

This patch cleans up the code and clarifies the comment around
the X557 PHY link status check in ixgbe_check_link_t_x550em().

Signed-off-by: Wei Dai <wei.dai@intel.com>
7 years agonet/ixgbe/base: fix PHY identification for x550a
Wei Dai [Wed, 21 Dec 2016 09:47:48 +0000 (17:47 +0800)]
net/ixgbe/base: fix PHY identification for x550a

Method to identify the CS4223/CS4227 is incorrect and unreliable.
Provide a new register to differentiate between these PHY SKUs.

Fixes: fc0559bdb5e3 ("net/ixgbe/base: add link MAC setup for X550a SFP+")

Signed-off-by: Wei Dai <wei.dai@intel.com>
7 years agonet/ixgbe/base: use fast MDIO for non-10G devices
Wei Dai [Wed, 21 Dec 2016 09:47:47 +0000 (17:47 +0800)]
net/ixgbe/base: use fast MDIO for non-10G devices

Devices that cannot go 10G speeds can safely select a faster
Management Data Input/Output (MDIO) speed.
Select fast MDIO clock speed for for those devices.

Signed-off-by: Wei Dai <wei.dai@intel.com>
7 years agonet/ixgbe/base: fix clearing SAN MAC address
Wei Dai [Wed, 21 Dec 2016 09:47:46 +0000 (17:47 +0800)]
net/ixgbe/base: fix clearing SAN MAC address

Receive Address Register (RAR) entries, including SAN MAC address,
are cleared when VMDq pool bits are cleared.
Prevent SAN MAC address to be cleared.

Fixes: af75078fece3 ("first public release")

Signed-off-by: Wei Dai <wei.dai@intel.com>
7 years agonet/ixgbe/base: fix PHY reset check for x550em-ext
Wei Dai [Wed, 21 Dec 2016 09:47:45 +0000 (17:47 +0800)]
net/ixgbe/base: fix PHY reset check for x550em-ext

PHY type ixgbe_phy_x550em_ext_t requires different check
to verify reset status.

Fixes: af75078fece3 ("first public release")

Signed-off-by: Wei Dai <wei.dai@intel.com>
7 years agonet/nfp: extend speed capabilities advertised
Alejandro Lucero [Tue, 20 Dec 2016 12:52:45 +0000 (12:52 +0000)]
net/nfp: extend speed capabilities advertised

NFP supports more speeds than just 40 and 100GB, which were
what was advertised before.

Signed-off-by: Alejandro Lucero <alejandro.lucero@netronome.com>
7 years agonet/nfp: report link speed using hardware info
Alejandro Lucero [Tue, 20 Dec 2016 13:22:00 +0000 (13:22 +0000)]
net/nfp: report link speed using hardware info

Previous reported speed was hardcoded because there was not firmware
support for getting this information. This change needs also to support
old firmware versions, but instead of the previous hardcoded report, no
speed is reported to the user avoiding to give the wrong speed when link
is not configured to 40G.

Signed-off-by: Alejandro Lucero <alejandro.lucero@netronome.com>
7 years agonet/nfp: fix typo in Tx offload capabilities
Alejandro Lucero [Mon, 19 Dec 2016 12:22:39 +0000 (12:22 +0000)]
net/nfp: fix typo in Tx offload capabilities

Because macros for TCP and UDP related to offload cksums have
same values, this was not a main problem. But better to use the
right ones.

Fixes: d4a27a3b092a ("nfp: add basic features")

Signed-off-by: Alejandro Lucero <alejandro.lucero@netronome.com>
7 years agonet/nfp: remove Rx port metadata
Alejandro Lucero [Mon, 19 Dec 2016 12:14:50 +0000 (12:14 +0000)]
net/nfp: remove Rx port metadata

This was required for middlebox-like firmware which NFP does
not support anymore.

Signed-off-by: Alejandro Lucero <alejandro.lucero@netronome.com>
7 years agonet/vmxnet3: fix Rx deadlock
Stefan Puiu [Mon, 19 Dec 2016 09:40:53 +0000 (11:40 +0200)]
net/vmxnet3: fix Rx deadlock

Our use case is that we have an app that needs to keep mbufs around
for a while. We've seen cases when calling vmxnet3_post_rx_bufs() from
vmxet3_recv_pkts(), it might not succeed to add any mbufs to any RX
descriptors (where it returns -err). Since there are no mbufs that the
virtual hardware can use, no packets will be received after this; the
driver won't refill the mbuf after this so it gets stuck in this
state. I call this a deadlock for lack of a better term - the virtual
HW waits for free mbufs, while the app waits for the hardware to
notify it for data (by flipping the generation bit on the used Rx
descriptors). Note that after this, the app can't recover.

This fix is a rework of this patch by Marco Lee:
http://dpdk.org/dev/patchwork/patch/6575/. I had to forward port
it, address review comments and also reverted the allocation
failure handling to the first version of the patch
(http://dpdk.org/ml/archives/dev/2015-July/022079.html), since
that's the only approach that seems to work, and seems to be what
other drivers are doing (I checked ixgbe and em). Reusing the mbuf
that's getting passed to the application doesn't seem to make
sense, and it was causing weird issues in our app. Also, reusing
rxm without checking if it's NULL could cause the code to crash.

Fixes: 14680e3747d5 ("vmxnet3: improve Rx performance")

Signed-off-by: Stefan Puiu <stefan.puiu@gmail.com>
Acked-by: Yong Wang <yongwang@vmware.com>
7 years agonet/af_packet: guard against buffer overruns in Tx path
Michał Mirosław [Tue, 13 Dec 2016 01:28:34 +0000 (02:28 +0100)]
net/af_packet: guard against buffer overruns in Tx path

Signed-off-by: Michał Mirosław <michal.miroslaw@atendesoftware.pl>
Acked-by: John W. Linville <linville@tuxdriver.com>
7 years agonet/af_packet: guard against buffer overruns in Rx path
Michał Mirosław [Tue, 13 Dec 2016 01:28:34 +0000 (02:28 +0100)]
net/af_packet: guard against buffer overruns in Rx path

Signed-off-by: Michał Mirosław <michal.miroslaw@atendesoftware.pl>
Acked-by: John W. Linville <linville@tuxdriver.com>
7 years agonet/pcap: fix timestamps in output pcap file
Piotr Bartosiewicz [Tue, 13 Dec 2016 01:08:17 +0000 (02:08 +0100)]
net/pcap: fix timestamps in output pcap file

Fixes: 4c173302c307 ("pcap: add new driver")

Signed-off-by: Michał Mirosław <michal.miroslaw@atendesoftware.pl>
Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>
7 years agonet/sfc: support firmware-assisted TSO
Ivan Malov [Thu, 15 Dec 2016 12:51:23 +0000 (12:51 +0000)]
net/sfc: support firmware-assisted TSO

Signed-off-by: Ivan Malov <ivan.malov@oktetlabs.ru>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Reviewed-by: Andrew Lee <alee@solarflare.com>
Reviewed-by: Mark Spender <mspender@solarflare.com>
Reviewed-by: Robert Stonehouse <rstonehouse@solarflare.com>