Commit Graph

212 Commits

Author SHA1 Message Date
Harish Patil
49d8b54e86 net/qede: fix default MAC address handling
- In qede_mac_addr_set(), in order to configure default MAC address we
first delete the existing MAC address before trying to add new one. During
init time, there is no MAC filter to begin with, so trying to remove a
non-existing MAC address causes a firmware exception. This can be prevented
by internally calling qede_mac_addr_add() which has the checks in place to
delete a MAC address only if it was added before.

- Remove setting of the default MAC address from within
qede_dev_configure() since rte_eth_dev_start() calls mac_addr_set() anyway.

Fixes: 2ea6f76aff ("qede: add core driver")
Cc: stable@dpdk.org

Signed-off-by: Harish Patil <harish.patil@cavium.com>
2017-04-28 14:46:17 +02:00
Jan Blunck
fdf91e0f2f drivers/net: do not use ethdev driver
Signed-off-by: Jan Blunck <jblunck@infradead.org>
Signed-off-by: Gaetan Rivet <gaetan.rivet@6wind.com>
Acked-by: Stephen Hemminger <stephen@networkplumber.org>
2017-04-18 19:05:46 +02:00
Qi Zhang
c23a1a3000 eal: clean up interrupt handle
The patch change the prototype of callback function
(rte_intr_callback_fn) by removing the unnecessary parameter.

Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
2017-04-06 21:15:55 +02:00
Harish Patil
1ef4c3a5c1 net/qede: prevent crash while changing MTU dynamically
The driver can handle dynamic MTU change without needing the port to be
stopped explicitly by the application. However, there is currently no
check to prevent I/Os from happening on a different thread while the
port is going thru' reset internally. This patch fixes this issue by
assigning RX/TX burst functions to a dummy function and also reconfigure
RX bufsize for each rx queue based on the new MTU value.

Fixes: 200645ac79 ("net/qede: set MTU")
Cc: stable@dpdk.org

Signed-off-by: Harish Patil <harish.patil@qlogic.com>
2017-04-04 19:02:57 +02:00
Harish Patil
8130abb3ec net/qede: fix VF RSS configuration
The newer SR-IOV PF drivers expects RX/TX queues to be created before
applying RSS configuration. This patch addresses this requirement by
deferring RSS configuration till the queues are created. Even though
this issue is only seen in SR-IOV context, the changes will be made
applicable to PF also to keep the behavior consistent between VF/PF.

Fixes: 7ab35bf6b9 ("net/qede: fix RSS")
Cc: stable@dpdk.org

Signed-off-by: Harish Patil <harish.patil@qlogic.com>
2017-04-04 19:02:57 +02:00
Harish Patil
82bd0987bd net/qede: fix missing UDP protocol in RSS offload types
Both UDP and TCP based RSS offload types are supported by the device.
This patch adds UDP protocol which got missed out in the original patch.

Fixes: 4c98f2768e ("net/qede: support RSS hash configuration")
Cc: stable@dpdk.org

Signed-off-by: Harish Patil <harish.patil@qlogic.com>
2017-04-04 19:02:57 +02:00
Rasesh Mody
755e3fa70d net/qede: update PMD version to 2.4.0.1
Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
2017-04-04 19:02:55 +02:00
Harish Patil
29540be7ef net/qede: support LRO/TSO offloads
This patch includes slowpath configuration and fastpath changes
to support LRO and TSO. A bit of revamping is needed in order
to make use of existing packet classification schemes in Rx fastpath
and for SG element processing in Tx.

Signed-off-by: Harish Patil <harish.patil@qlogic.com>
2017-04-04 19:02:55 +02:00
Harish Patil
622075356e net/qede: support ntuple and flow director filter
Add limited support for ntuple filter and flow director configuration.
The filtering is based on 4-tuples viz src-ip, dst-ip, src-port,
dst-port. The mask fields, tcp_flags, flex masks, priority fields,
Rx queue drop etc are not supported.

Signed-off-by: Harish Patil <harish.patil@qlogic.com>
2017-04-04 19:02:55 +02:00
Harish Patil
5343700290 net/qede/base: support ARFS mode
Add base driver APIs to enable accelerated RFS[aRFS] mode and ramrod
to configure rfs and ntuple filter.

Signed-off-by: Harish Patil <harish.patil@qlogic.com>
2017-04-04 19:02:55 +02:00
Rasesh Mody
7a5dfdc1f3 net/qede/base: semantic changes
Make APIs static and other semantic changes.
A step toward cleaning 'make C=1' with GCC 4.8.3.

Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
2017-04-04 19:02:54 +02:00
Rasesh Mody
39f0eb3bbb net/qede/base: prevent race condition during unload
Merge hw_stop and hw_reset into one function.
Prevent race condition between MFW attentions and pf stop command during
unload flow that causes an ASSERT.

Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
2017-04-04 19:02:54 +02:00
Rasesh Mody
eb8e81ad0d net/qede/base: multi-Txq support on same queue-zone for VFs
A step toward having multi-Txq support on same queue-zone for VFs.

This change takes care of:

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

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

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

Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
2017-04-04 19:02:54 +02:00
Rasesh Mody
eb6088c168 net/qede/base: prevent DMAE transactions during recovery
Prevent DMA engine transactions during recovery phase.

Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
2017-04-04 19:02:54 +02:00
Rasesh Mody
4727343d27 net/qede/base: add UDP ports in bulletin board message
Add UDP ports in bulletin board message.

Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
2017-04-04 19:02:54 +02:00
Rasesh Mody
35da959606 net/qede/base: allow PMD to control vport and RSS engine ids
Let PMD have control over the vport-id and rss-eng-id of a given VF
during initialization.

Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
2017-04-04 19:02:54 +02:00
Rasesh Mody
615438cba3 net/qede/base: add PF parameter
Add a common enum to pf_params for RDMA.

Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
2017-04-04 19:02:54 +02:00
Rasesh Mody
0863dbe396 net/qede/base: move code bits
Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
2017-04-04 19:02:54 +02:00
Rasesh Mody
e32dc0f722 net/qede/base: zero out MFW mailbox data
Zero the whole union data of the Management FW mailbox before copying
the actual union member

Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
2017-04-04 19:02:54 +02:00
Rasesh Mody
2c3945f6b8 net/qede/base: add return code check
Add a check of the return code of ecore_mcp_cmd_and_union() in
ecore_mcp_send_protocol_stats()

Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
2017-04-04 19:02:54 +02:00
Rasesh Mody
49ca6a7bcb net/qede/base: set max values for soft resources
Add support for the new interface with the Management FW for setting
max values of "soft" resources.

Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
2017-04-04 19:02:53 +02:00
Rasesh Mody
6da551eeac net/qede/base: add macro for unsupported command
Add a macro for unsupported management FW command

Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
2017-04-04 19:02:53 +02:00
Rasesh Mody
619618b938 net/qede/base: add mailbox for resource allocation
Add the Management FW mailbox for getting non-l2 resource allocation
information.

Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
2017-04-04 19:02:53 +02:00
Rasesh Mody
4cf46f140c net/qede/base: add macro got resource value message
Add macro got resource value message

Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
2017-04-04 19:02:53 +02:00
Rasesh Mody
6b8962e0ef net/qede/base: support coalescing for VF
Add coalescing support for VFs.

Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
2017-04-04 19:02:53 +02:00
Rasesh Mody
6ccecc10ba net/qede/base: update bulletin board during VF init
Updated bulletin board with link state during VF initialization.

Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
2017-04-04 19:02:53 +02:00
Rasesh Mody
2e2680e0d2 net/qede/base: support non-L2 dcbx tlv application
Add non-l2 dcbx tlv application support.

Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
2017-04-04 19:02:53 +02:00
Rasesh Mody
0b6bf70d7e net/qede/base: support previous driver unload
New driver/management fw load request sequence for handling previous
driver unload.

Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
2017-04-04 19:02:53 +02:00
Rasesh Mody
a261b214b2 net/qede/base: change valloc to vzalloc
Change OSAL_VALLOC() into OSAL_VZALLOC() which would also zero memory.

Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
2017-04-04 19:02:53 +02:00
Rasesh Mody
69d7ba88f1 net/qede/base: use L2-handles for RSS configuration
Move RSS configuration into using L2-handles instead of queue-ids.

Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
2017-04-04 19:02:53 +02:00
Rasesh Mody
d9c2569c78 net/qede/base: add new image types
Add new image types - RECOVERY and PK (Public Key) towards
the second phase of NVRAM security support.

Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
2017-04-04 19:02:52 +02:00
Rasesh Mody
a5e7b7a2ee net/qede/base: remove clock slowdown option
Remove clock slowdown NVM config option as this is not supported
for current chipsets.

Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
2017-04-04 19:02:52 +02:00
Rasesh Mody
8a20e270f3 net/qede/base: add API for using MFW resource lock
Add base driver API for using the Management FW resource lock

Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
2017-04-04 19:02:52 +02:00
Rasesh Mody
70ab4d3d46 net/qede/base: add mask/shift defines for resource command
Add several mask/shift defines for the resource command

Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
2017-04-04 19:02:52 +02:00
Rasesh Mody
0e9c6de362 net/qede/base: prevent transmitter stuck condition
Change OOO TC properly to prevent transmitter stuck condition
due to credit underruns.

Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
2017-04-04 19:02:52 +02:00
Rasesh Mody
45cf58a14f net/qede/base: formatting changes
Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
2017-04-04 19:02:52 +02:00
Rasesh Mody
0b090fd364 net/qede/base: support tunnelling for VF
Add new tunnelling support for VFs.

Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
2017-04-04 19:02:52 +02:00
Rasesh Mody
adce1f86f8 net/qede/base: revise tunnel APIs/structs
Revise tunnel APIs/structs.
 - Unite tunnel start and update params in single struct
   "ecore_tunnel_info"
 - Remove A0 chip tunnelling support.
 - Added per tunnel info - removed bitmasks.

Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
2017-04-04 19:02:52 +02:00
Rasesh Mody
a7f3cac315 net/qede/base: change infrastructure for VF tunnelling
Infrastructure changes for VF tunnelling.

Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
2017-04-04 19:02:52 +02:00
Rasesh Mody
6a0f9f5c62 net/qede/base: optimize cache-line access
Optimize cache-line access in ecore_chain -
re-arrange fields so that fields that are needed for fastpath
[mostly produce/consume and their derivatives] are in the first cache
line, and the rest are in the second.

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

Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
2017-04-04 19:02:52 +02:00
Rasesh Mody
43ef668c18 net/qede/base: support handling TLV request from MFW
Add support for handling the TLV request from Management FW.

Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
2017-04-04 19:02:51 +02:00
Rasesh Mody
a55e422e4e net/qede/base: make L2 queues handle based
L2 handler changes:

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

It does that by mainly doing:

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

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

Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
2017-04-04 19:02:51 +02:00
Rasesh Mody
d411a2b5e4 net/qede/base: refactor code of SP queues
Maintain slowpath event queue and consumer queue within HW function
structure, update corresponding alloc and free APIs accordingly.
Cleanup unused code under CONFIG_ECORE_LL2 ifdef.

Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
2017-04-04 19:02:51 +02:00
Rasesh Mody
ea7c1c6f37 net/qede/base: add interfaces for MFW TLV request processing
Add new base driver interfaces for Management FW TLV request processing.

Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
2017-04-04 19:02:51 +02:00
Rasesh Mody
978580d86c net/qede/base: prevent driver load with invalid resources
Prevent storage drivers from attempting to load with invalid resources.

Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
2017-04-04 19:02:51 +02:00
Rasesh Mody
de5588af0b net/qede/base: set driver type before sending load request
Set the drv_type before sending LOAD_REQ and remove the
ver_str which is not used by the MFW

Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
2017-04-04 19:02:51 +02:00
Rasesh Mody
bd96f72ff9 net/qede/base: check active VF queues before stopping
Make sure VF queue are closed before stopping vport.

Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
2017-04-04 19:02:51 +02:00
Rasesh Mody
4fc58baef7 net/qede/base: print firmware MFW and MBI versions
Add a printout of the FW, Management FW and MBI versions.

Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
2017-04-04 19:02:51 +02:00
Rasesh Mody
5ef4119332 net/qede/base: revamp qm initialization
This patch revamps queue initialization.

Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
2017-04-04 19:02:51 +02:00
Rasesh Mody
6b190a9873 net/qede/base: allow only trusted VFs to be promisc
Allow only trusted VFs to be promisc/multi-promisc. The reasonable
thing is to use the 'trusted' node instead of simply allowing VFs to
become promiscuous.

Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
2017-04-04 19:02:51 +02:00