8ea656f8c app/testpmd: request link status interrupt
requires QEDE PMD to populate the device link structure without
having to query the driver for link status change event.
This patch updates the device link structure when link status event is
received.
Remove unused param from qed_link_update()
Fixes: 86a2265e59 ("qede: add SRIOV support")
Fixes: ec94dbc573 ("qede: add base driver")
Cc: stable@dpdk.org
Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
Initialize ucast parameters before checking if filters exists.
Fixes: e0947ed912 ("net/qede: add support for VXLAN UDP port config over VF")
Signed-off-by: Harish Patil <harish.patil@cavium.com>
Provide a knob to control per-VF Tx switching feature by adding a config
option, CONFIG_RTE_LIBRTE_QEDE_VF_TX_SWITCH. By default, it will be kept
in disabled state for better performance with small sized frames.
Fixes: 2ea6f76aff ("qede: add core driver")
Cc: stable@dpdk.org
Signed-off-by: Harish Patil <harish.patil@cavium.com>
Renamed data type from phys_addr_t to rte_iova_t.
Signed-off-by: Santosh Shukla <santosh.shukla@caviumnetworks.com>
Reviewed-by: Anatoly Burakov <anatoly.burakov@intel.com>
Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
The following inline functions and macros have been renamed to be
consistent with the IOVA wording:
rte_mbuf_data_dma_addr -> rte_mbuf_data_iova
rte_mbuf_data_dma_addr_default -> rte_mbuf_data_iova_default
rte_pktmbuf_mtophys -> rte_pktmbuf_iova
rte_pktmbuf_mtophys_offset -> rte_pktmbuf_iova_offset
The deprecated functions and macros are kept to avoid breaking the API.
Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Acked-by: Olivier Matz <olivier.matz@6wind.com>
The struct rte_memzone field .phys_addr is renamed to .iova.
The deprecated name is kept in an anonymous union to avoid breaking
the API.
Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Acked-by: Santosh Shukla <santosh.shukla@caviumnetworks.com>
The PCI lib defines the types and methods allowing to use PCI elements.
The PCI bus implements a bus driver for PCI devices by constructing
rte_bus elements using the PCI lib.
Move the relevant code out of the EAL to its expected place.
Libraries, drivers, unit tests and applications are updated to use the
new rte_bus_pci.h header when necessary.
Signed-off-by: Gaetan Rivet <gaetan.rivet@6wind.com>
Some devices may not support or fail setting VLAN offload
configuration based on dynamic circumstances so the
vlan_offload_set_t vector is modified to return an int so
the caller can determine success or not.
rte_eth_dev_set_vlan_offload is updated to return the
value provided by the vector when called along with restoring
the original offload configs on failure.
Existing vlan_offload_set_t vectors are modified to return
an int. Majority of cases return 0 but a few that actually
can fail now return their failure codes.
Finally, a vlan_offload_set_t vector is added to virtio
to facilitate dynamically turning VLAN strip on or off.
Signed-off-by: David Harton <dharton@cisco.com>
Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
PKT_RX_VLAN_PKT and PKT_RX_QINQ_PKT are deprecated for a while.
As explained in [1], these flags were kept to let the applications and
PMDs move to the new flag. There is also a need to support Rx vlan
offload without vlan strip (at least for the ixgbe driver).
This patch renames the old flags for this feature, knowing that some
PMDs were using PKT_RX_VLAN_PKT and PKT_RX_QINQ_PKT to indicate that
the vlan tci has been saved in the mbuf structure.
It is likely that some PMDs do not set the proper flags when doing vlan
offload, and it would be worth making a pass on all of them.
Link: [1] http://dpdk.org/ml/archives/dev/2017-June/067712.html
Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
Move LRO configuration from dev_configure to dev_start so that
LRO configuration can be re-enabled following a port restart.
Fixes: 9a6d30ae6d ("net/qede: refactoring vport handling code")
Cc: stable@dpdk.org
Signed-off-by: Harish Patil <harish.patil@cavium.com>
- Allow VXLAN enable/disable over VF using udp_tunnel_port_add/del APIs.
Only default MAC/VLAN classification is supported.
- Enable VxLAN before UDP port configuration.
- Change VxLAN default UDP port to 4789 instead of 8472.
Signed-off-by: Harish Patil <harish.patil@cavium.com>
The list of libraries in LDLIBS was generated from the DEPDIRS-xyz
variable. This is valid when the subdirectory name match the library
name, but it's not always the case, especially for PMDs.
The patches removes this feature and explicitly adds the proper
libraries in LDLIBS.
Some DEPDIRS-xyz variables become useless, remove them.
Reported-by: Gage Eads <gage.eads@intel.com>
Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
Reviewed-by: Gage Eads <gage.eads@intel.com>
In order to achieve reproducible builds, always use the same
order when listing files for compilation.
Signed-off-by: Luca Boccassi <luca.boccassi@gmail.com>
The stats_get dev op API doesn't include return value, so PMD cannot
return an error in case of failure at stats getting process time.
Since PCI devices can be removed and there is a time between the
physical removal to the RMV interrupt, the user may get invalid stats
without any indication.
This patch changes the stats_get API return value to be int instead of
void.
All the net PMDs stats_get dev ops are adjusted by this patch.
Signed-off-by: Matan Azrad <matan@mellanox.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
This change aligns the PF behavior with that of the L2-fw, so that flows
(to remove an incorrect MAC) for PF and VF could remain the same.
Fixes: 86a2265e59 ("qede: add SRIOV support")
Cc: stable@dpdk.org
Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
IOV regression testing led to discovery of a minor issue + possibly race
in IOV flows:
a. Malicious indications in VF-database on PF-side get cleared during
FLR flows - but not when disabling SRIOV. At least in Linux if you
disable IOV while having a malicious VF you wouldn't be able to
clear the indication as driver would prevent from initializing it.
b. Possible race during PF response to VF - the channel is made ready
only after sending the rc via dmae to VF. It's possible due to
context switch at end of DMAE [when releasing Mutex] that VF would
start running and send another message prior to PF clearing the
channel, making the FW consider that VF to be malicious.
This patch fixes that by
- clearing the indication even if we're only going to disable VF
- resetting the channel to ready before PF copies the rc to the VF, PF
can then continue and send an additional message
Fixes: 47b302d646 ("net/qede/base: add handling of malicious VF")
Fixes: 86a2265e59 ("qede: add SRIOV support")
Cc: stable@dpdk.org
Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
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>
- 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>
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>
- 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>
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>
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>
Extend port_id definition from uint8_t to uint16_t in lib and drivers
data structures, specifically rte_eth_dev_data. Modify the APIs,
drivers and app using port_id at the same time.
Fix some checkpatch issues from the original code and remove some
unnecessary cast operations.
release_17_11 and deprecation docs have been updated in this patch.
Signed-off-by: Zhiyong Yang <zhiyong.yang@intel.com>
Acked-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
The compilation with gcc-6.3.0 and EXTRA_CFLAGS=-Og gives the following
error:
CC qede_rxtx.o
qede_rxtx.c: In function ‘qede_start_queues’:
qede_rxtx.c:797:9: error: ‘rc’ may be used uninitialized in this
function [-Werror=maybe-uninitialized]
return rc;
^~
If there is no Rx or Tx queue, rc will not be initialized. Fix it
by initializing rc to -1.
Fixes: 4c4bdadfa9 ("net/qede: refactoring multi-queue implementation")
Cc: stable@dpdk.org
Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
Acked-by: Harish Patil <harish.patil@cavium.com>
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>
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>
- 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>
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>
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>
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>
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: 26ae839d06 ("qede: add DCBX support")
Cc: stable@dpdk.org
Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
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>
- 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>