Commit Graph

4023 Commits

Author SHA1 Message Date
Rasesh Mody
8335b809f7 net/qede/base: fix access to an uninitialized list
Fix an access to an uninitialized list when the management FW is not
initialized by simply doing the list initialization always, at a
previous step, before ecore_mcp_cmd_init() can stop in the middle and
return.

Fixes: 22c996968b ("net/qede/base: revise management FW mbox access scheme")
Cc: stable@dpdk.org

Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
2017-10-12 01:36:58 +01:00
Rasesh Mody
2b68b841d7 net/qede/base: change default page size of ILT clients
Change the default page size of internal lookup table (ILT) clients to
64K

Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
2017-10-12 01:36:58 +01:00
Rasesh Mody
955770f254 net/qede/base: check device personality for feature setting
- Add non-L2 personality macros and add a personality check before
  setting the HW features

Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
2017-10-12 01:36:58 +01:00
Rasesh Mody
b9ebba32cc net/qede/base: code cleanup
- Remove some dead definitions, function declarations and unused
   variables
 - Remove an obsolete workaround from ecore_int_igu_enable()
 - Remove set variables that are not used
 - Remove needless check in  ecore_init_wfq_param() when configuring
   minimum vport BW. We already check whether total for all vports is
   greater than the PF's, so no need to check independently the current
   requested configuration as well.

Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
2017-10-12 01:36:58 +01:00
Rasesh Mody
c68f27a2a4 net/qede/base: semantic changes
- Move define CRC8_TABLE_SIZE to header file
 - Move/relocate ecore_vf_start()
 - Other semantic changes

Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
2017-10-12 01:36:58 +01:00
Rasesh Mody
49f4b9dc8a net/qede/base: add/change/revise logs
Changes include:
 - adding new log to print Dcbx version
 - reformatting log in ecore_dmae_operation_wait() in case of DMA engine
   failure
 - changing verbosity of some log messages such as:
   VFs incorrect behavior should be logged on PF with DP_VERBOSE(), not
   DP_NOTICE(). In general keep IOV-related logs at low verbosity.
   Log the critical issues from VF perspective, like message to PF
   times-out or the PF rejects the VF configuration, as NOTICE than
   VERBOSE
 - Add a printout of some MCP CPU info in case of no MFW response

Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
2017-10-12 01:36:58 +01:00
Rasesh Mody
aa96bcbdae net/qede/base: add/fix comments
Fix few comments and add a new one describing SW channel implementation
limitation

Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
2017-10-12 01:36:58 +01:00
Rasesh Mody
70f1a93d7b net/qede/base: add various OS abstraction macros
- Introduce OSAL_IOV_VF_VPORT_STOP to allow VF to carry out required
   operations and prevent a potential assert before closing vport
 - Add OSAL_DIV_S64() for 64-bit division on 32-bit platforms.
 - Add OSAL for transceiver update OSAL_TRANSCEIVER_UPDATE()
 - Add OSAL for MFW command preemption OSAL_MFW_CMD_PREEMPT() within the
   spinning loops while sending a mailbox command to the MFW
 - Implement OSAL_SPIN_LOCK_IRQSAVE macro
 - Rename OSAL_NUM_ACTIVE_CPU() to OSAL_NUM_CPUS()

Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
2017-10-12 01:36:58 +01:00
Rasesh Mody
3ea74d896c net/qede/base: use the correct size value
Use the correct size value while copying chassis/port id values.

Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
2017-10-12 01:36:58 +01:00
Rasesh Mody
b21e05c9cf net/qede/base: add check for DMA engine state
Check DMA engine state to verify it is not called before it is
initialized

Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
2017-10-12 01:36:58 +01:00
Rasesh Mody
81dba2b2ff net/qede/base: add LLDP support
This patch adds base driver LLDP protocol support and handle LLDP
received TLV update events.

Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
2017-10-12 01:36:58 +01:00
Rasesh Mody
01491d291e net/qede/base: introduce HW/SW channel
Introduce 2 new API functions, one for the VF and the other for
PF [per-VF] which allows to decide whether to use HW/SW channel
for PF<->VF communication(a per-VF configuration). A HyperV might
have different VMs with different requirements.

Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
2017-10-12 01:36:58 +01:00
Rasesh Mody
abd4fa3155 net/qede/base: add NVRAM config options
Add NVRAM config options:
 - Rename caution temperature threshold
 - New field EXT_PHY_MDI_PAIR_SWAP
 - BCM54220 1GBT PHY

Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
2017-10-12 01:36:58 +01:00
Rasesh Mody
78f121f53d net/qede/base: add xcvr type and DON FW defines
Add support to firmware for:
 - New SFP type 1000BaseT
 - DON (Diag Over Network). This feature implements a server side for
   process data access commands over Ethernet.

Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
2017-10-12 01:36:58 +01:00
Jerin Jacob
da6c687471 net/octeontx: add start and stop support
add start, stop and close support.

Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Signed-off-by: Santosh Shukla <santosh.shukla@caviumnetworks.com>
2017-10-12 01:36:58 +01:00
Jerin Jacob
20186d4332 net/octeontx: add packet type parsing support
Mark packet type parsing in features.

Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Signed-off-by: Santosh Shukla <santosh.shukla@caviumnetworks.com>
2017-10-12 01:36:58 +01:00
Jerin Jacob
2d2c79184e net/octeontx: add packet receive burst function
Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Signed-off-by: Santosh Shukla <santosh.shukla@caviumnetworks.com>
2017-10-12 01:36:58 +01:00
Jerin Jacob
9e747589bd net/octeontx: add packet transmit burst function
Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Signed-off-by: Santosh Shukla <santosh.shukla@caviumnetworks.com>
2017-10-12 01:36:58 +01:00
Jerin Jacob
150cbc8403 net/octeontx: add Tx queue setup and release ops
Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Signed-off-by: Santosh Shukla <santosh.shukla@caviumnetworks.com>
2017-10-12 01:36:58 +01:00
Jerin Jacob
7fe7c98fec net/octeontx: add Tx queue start and stop
Mark "Queue start/stop" as P as its been implemented only for tx queue.

Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Signed-off-by: Santosh Shukla <santosh.shukla@caviumnetworks.com>
2017-10-12 01:36:58 +01:00
Jerin Jacob
197438ee9f net/octeontx: add Rx queue setup and release ops
Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Signed-off-by: Santosh Shukla <santosh.shukla@caviumnetworks.com>
2017-10-12 01:36:58 +01:00
Jerin Jacob
ef7308fcb4 net/octeontx: add MAC addr set op
Implement "mac_addr_set" op and mark "Unicast MAC filter" feature as "P"
as "mac_addr_add" and "mac_addr_remove" are not implemented.

Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Signed-off-by: Santosh Shukla <santosh.shukla@caviumnetworks.com>
2017-10-12 01:36:58 +01:00
Jerin Jacob
5538990924 net/octeontx: add basic stats support
Mark Basic stats support in features.

Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Signed-off-by: Santosh Shukla <santosh.shukla@caviumnetworks.com>
2017-10-12 01:36:58 +01:00
Jerin Jacob
15bce35b75 net/octeontx: add promiscuous mode ops
Mark Promiscuous mode in features.

Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Signed-off-by: Santosh Shukla <santosh.shukla@caviumnetworks.com>
2017-10-12 01:36:58 +01:00
Jerin Jacob
4fac7c0a14 net/octeontx: add link update
Mark Link status in features.

Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Signed-off-by: Santosh Shukla <santosh.shukla@caviumnetworks.com>
2017-10-12 01:36:58 +01:00
Jerin Jacob
7c0347a20a net/octeontx: add device info
Mark Speed capabilities, Lock-free Tx queue in features.

Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Signed-off-by: Santosh Shukla <santosh.shukla@caviumnetworks.com>
2017-10-12 01:36:58 +01:00
Jerin Jacob
7742c55af2 net/octeontx: add device configure
mark Jumbo frame, CRC offload support in features.

Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Signed-off-by: Santosh Shukla <santosh.shukla@caviumnetworks.com>
2017-10-12 01:36:57 +01:00
Jerin Jacob
f18b146c49 net/octeontx: create ethdev ports
Create ethdev ports by registering  withethdev subsystem based on
"nr_port" vdev argument or maximum physical ports available in the system.

Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Signed-off-by: Santosh Shukla <santosh.shukla@caviumnetworks.com>
2017-10-12 01:36:57 +01:00
Jerin Jacob
f7be70e513 net/octeontx: add net device probe and remove
An octeontx ethdev device consists of multiple PKO VF devices, a PKI
VF device and multiple SSOVF devices which shared between eventdev.
This patch adds a vdev based device called "eth_octeontx" which
will create multiple ethernet ports based on "nr_port" or maximum
physical ports are available in the system.

Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Signed-off-by: Santosh Shukla <santosh.shukla@caviumnetworks.com>
2017-10-12 01:36:57 +01:00
Jerin Jacob
3813a10af5 net/octeontx/base: add remaining PKO operations
Adding remaining PKO operations like flow control, Tx channel query,
etc.

Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Signed-off-by: Santosh Shukla <santosh.shukla@caviumnetworks.com>
2017-10-12 01:36:57 +01:00
Jerin Jacob
cad78ca238 net/octeontx/base: add base PKO operations
PKO is the packet output processing unit, which receives the packet
from the core and sends to the BGX interface. This patch adds the
basic PKO operation like open, close, start and stop. These operations
are implemented through mailbox messages and kernel PF driver being the
server to process the message with the logical port identifier.

Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Signed-off-by: Santosh Shukla <santosh.shukla@caviumnetworks.com>
2017-10-12 01:36:57 +01:00
Jerin Jacob
6d28968ed1 net/octeontx/base: add remaining PKI operations
Adding remaining PKI operations and sync up the mailbox
definitions with PF driver.

Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Signed-off-by: Santosh Shukla <santosh.shukla@caviumnetworks.com>
2017-10-12 01:36:57 +01:00
Jerin Jacob
b95c3413fa net/octeontx/base: add base PKI operations
PKI is packet input unit, which receives the packet from the
BGX interface. This patch adds the basic PKI operation like
open, close, start and stop. These operations are implemented through
mailbox messages and kernel PF driver being the server to process the
message with the logical port identifier.

Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Signed-off-by: Santosh Shukla <santosh.shukla@caviumnetworks.com>
2017-10-12 01:36:57 +01:00
Jerin Jacob
445371e8ba net/octeontx/base: probe PKI and PKO PCIe VF devices
An octeontx ethdev device consists of multiple PKO VF devices and an PKI
VF device. On Octeontx HW, each Rx queues are enumerated as SSOVF device
which is exposed as event_octeontx device, Tx queues are enumerated as
PKOVF device, and ingress packet configuration is accomplished through
PKIVF device.

In order to expose as an single ethdev instance, On PCIe VF probe,
the driver stores the information associated with the PCIe VF device and
later with vdev infrastructure creates ethdev device with earlier
probed PCIe VF device.

Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Signed-off-by: Santosh Shukla <santosh.shukla@caviumnetworks.com>
2017-10-12 01:36:57 +01:00
Jerin Jacob
e242dd1c0a net/octeontx/base: add remaining BGX operations
Adding remaining BGX operations like, link status, statistics,
promiscuous configuration etc.

Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Signed-off-by: Santosh Shukla <santosh.shukla@caviumnetworks.com>
2017-10-12 01:36:57 +01:00
Jerin Jacob
4d02788045 net/octeontx/base: add base BGX operations
BGX is an HW MAC interface. This patch adds the basic BGX operation like
open, close, start and stop. These operations are implemented through
mailbox messages and kernel PF driver being the server to process the
message with the physical port identifier.

Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Signed-off-by: Santosh Shukla <santosh.shukla@caviumnetworks.com>
2017-10-12 01:36:57 +01:00
Jerin Jacob
aecb8e093b event/octeontx: introduce specialized mbox message copy
Some of the internal toolchain versions create unaligned
memory access fault when copying from 17-31B buffer using memcpy.

Subsequent patches in this series will be using 17-31B mbox message.
Since the mailbox message copy comes in slow path, changing memcpy to
byte-per-byte copy to workaround the issue.

Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Signed-off-by: Santosh Shukla <santosh.shukla@caviumnetworks.com>
2017-10-12 01:36:57 +01:00
Jerin Jacob
f0c7bb1bf7 net/octeontx/base: add octeontx IO operations
Adding octeontx specific io operations. Added a stub for building
against non octeontx targets.

Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Signed-off-by: Santosh Shukla <santosh.shukla@caviumnetworks.com>
2017-10-12 01:36:57 +01:00
Jerin Jacob
3c0511741c net/octeontx: add build infrastructure
Adding bare minimum PMD library and doc build infrastructure.

Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Signed-off-by: Santosh Shukla <santosh.shukla@caviumnetworks.com>
2017-10-12 01:36:57 +01:00
John Miller
22862a0213 net/ark: fix loop counter
Change loop counter that should be based on the number
of rx queues, not tx queues.  This only affects debug
output.

Fixes: 727b3fe292 ("net/ark: integrate PMD")
Cc: stable@dpdk.org

Signed-off-by: John Miller <john.miller@atomicrules.com>
2017-10-12 01:36:57 +01:00
Declan Doherty
5840f42712 net/bonding: fix LACP slave deactivate behavioral
During a link down event of a port participating in a LACP 802.3ad
bond the current behavior can cause all ports to be deselected
and temporarily stop all traffic on the bond, causing unexpected
traffic loss across all ports and not just the port which was
affected by the link down event.

Fixes: 46fb436836 ("bond: add mode 4")
Cc: stable@dpdk.org

Signed-off-by: Declan Doherty <declan.doherty@intel.com>
2017-10-12 01:36:57 +01:00
Olivier Matz
3976f19e13 net/virtio: fix compilation with -Og
The compilation with gcc-6.3.0 and EXTRA_CFLAGS=-Og gives the following
error:

  CC virtio_rxtx.o
  virtio_rxtx.c: In function ‘virtio_rx_offload’:
  virtio_rxtx.c:680:10: error: ‘csum’ may be used uninitialized in
                        this function [-Werror=maybe-uninitialized]
       csum = ~csum;
       ~~~~~^~~~~~~

The function rte_raw_cksum_mbuf() may indeed return an error, and
in this case, csum won't be initialized. Fix it by initializing csum
to 0.

Fixes: 96cb671193 ("net/virtio: support Rx checksum offload")
Cc: stable@dpdk.org

Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
2017-10-12 01:36:57 +01:00
Xueming Li
87ec44ce16 net/mlx5: add operations for secondary process
Add operations that are safe for secondary processes:
* (x)stats
* device info get
* rx/tx descriptor status

Signed-off-by: Xueming Li <xuemingl@mellanox.com>
Acked-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
2017-10-12 01:36:57 +01:00
Xueming Li
1e3a39f72d net/mlx5: allocate verbs object into shared memory
PMD uses Verbs object which were not available in the shared memory.

This patch modify the location where Verbs objects are allocated (from
process memory address space to shared memory address space) and thus
allow a secondary process to use those object by mapping this shared
memory space its own memory space.

Signed-off-by: Xueming Li <xuemingl@mellanox.com>
Acked-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
2017-10-12 01:36:57 +01:00
Xueming Li
f8b9a3bad4 net/mlx5: install a socket to exchange a file descriptor
Use a unix socket to get back the communication channel with the Kernel
driver from the primary process, this is necessary to remap those pages
in the secondary process memory space and thus use the same Tx queues.

This is only supported from rdma-core (v15).

Signed-off-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
Signed-off-by: Xueming Li <xuemingl@mellanox.com>
2017-10-12 01:36:57 +01:00
Xueming Li
aee1b165db net/mlx5: change eth device reference for secondary process
rte_eth_dev created by primary process were not available in secondary
process, it was not possible to use the primary process local memory
object from a secondary process.

This patch modify the reference of primary rte_eth_dev object, use
local rte_eth_dev secondary process instead.

Signed-off-by: Xueming Li <xuemingl@mellanox.com>
Acked-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
2017-10-12 01:36:57 +01:00
Rory Sexton
a399ed9ae4 net/i40e: support converting VF MAC to VF id
Need a way to convert a VF id to a PF id on the host so as to query the
PF for relevant statistics which are used for the frequency changes in
the vm_power_manager app.

Used when profiles are passed down from the guest to the host, allowing
the host to map the VFs to PFs.

Signed-off-by: Nemanja Marjanovic <nemanja.marjanovic@intel.com>
Signed-off-by: Rory Sexton <rory.sexton@intel.com>
Signed-off-by: David Hunt <david.hunt@intel.com>
Reviewed-by: Santosh Shukla <santosh.shukla@caviumnetworks.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
2017-10-12 00:40:39 +01:00
Nikhil Rao
67255ee987 event/sw: add eth Rx adapter capabilities function
Signed-off-by: Nikhil Rao <nikhil.rao@intel.com>
Acked-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
2017-10-10 18:33:19 +02:00
Bruce Richardson
9b8e71fce5 event/sw: rename map file to standard name
Naming convention for event drivers is "rte_pmd_<name>_event_version.map"

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Harry van Haaren <harry.van.haaren@intel.com>
2017-10-10 18:31:57 +02:00
Sebastian Basierski
907d125e2c net/virtio-user: fix TAP name string termination
Fix calling strncpy with the a maximum size equal of destination
array size.

Coverity issue: 140732
Fixes: e3b434818b ("net/virtio-user: support kernel vhost")
Cc: stable@dpdk.org

Signed-off-by: Sebastian Basierski <sebastianx.basierski@intel.com>
Acked-by: Jianfeng Tan <jianfeng.tan@intel.com>
Acked-by: Yuanhan Liu <yliu@fridaylinux.org>
2017-10-10 15:54:31 +02:00