Following commit updated the Tx offload mask
commit 1037ed842c ("mbuf: fix Tx offload mask").
So, not having PKT_TX_IPV6 and PKT_TX_IPV4 in qede PMDs supported
Tx offload mask breaks TSO support since application will fail in transmit
prepare function.
Fixes: 1037ed842c ("mbuf: fix Tx offload mask")
Cc: stable@dpdk.org
Signed-off-by: Shahed Shaikh <shahed.shaikh@cavium.com>
Tunneling offloads are represented by multi-bit values. So, feature
wise tunneling offload can only be entirely supported/unsupported
using PKT_TX_TUNNEL_MASK. Its upon PMDs to further isolate which of
the tunneling offload types are supported by respective PMD.
Using subset of bits from PKT_TX_TUNNEL_MASK to indicate supported vs
unsupported offloads can lead to undesired result.
Use PKT_TX_TUNNEL_MASK in QEDE_TX_OFFLOAD_MASK and use independent
value of supported PKT_TX_TUNNEL_* in .tx_pkt_prepare() to mark
supported tunnel offloads.
Fixes: 44346c24b7 ("net/qede: fix VXLAN tunnel Tx offload flag setting")
Cc: stable@dpdk.org
Suggested-by: Ferruh Yigit <ferruh.yigit@intel.com>
Signed-off-by: Shahed Shaikh <shahed.shaikh@cavium.com>
Reviewed-by: Rasesh Mody <rasesh.mody@cavium.com>
Currently, if configuration fails (for example if a 100G card is used
with an odd number of RX/TX queues) QEDE crashes due to a null pointer
dereference.
This commit fixes it by checking that the pointer is not NULL before
using it.
Fixes: 7105b24f4b ("net/qede: fix memory alloc for multiple port reconfig")
Cc: stable@dpdk.org
Signed-off-by: Timothy Redaelli <tredaelli@redhat.com>
Acked-by: Rasesh Mody <rasesh.mody@cavium.com>
During initialization of leading PF, we need to initialize HW for LLH
filters. Set HW init parameter to set the engine affinity for
multiple engine adapters.
Fixes: 3eed444a96 ("net/qede/base: changes for 100G")
Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
Some global variables are defined with generic names, add component name
as prefix to variables to prevent collusion with application variables.
Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Acked-by: Shreyansh Jain <shreyansh.jain@nxp.com>
Acked-by: Tianfei Zhang <tianfei.zhang@intel.com>
Some global variables can indeed be static, add static keyword to them.
Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
Acked-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Acked-by: Shreyansh Jain <shreyansh.jain@nxp.com>
This functionality was missed while adding new drivers to
the meson build.
Fixes: bfabd06000 ("net/avf: support meson build")
Fixes: 30d3d01683 ("net/qede: add in meson build")
Signed-off-by: Ilya Maximets <i.maximets@samsung.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
This is a clean-up of common ethdev data freeing.
All data freeing are moved to rte_eth_dev_release_port()
and done only in case of primary process.
It is probably fixing some memory leaks for PMDs which were
not freeing all data.
Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Acked-by: Andrew Rybchenko <arybchenko@solarflare.com>
Now that logging of initialization is controlled by dynamic debug
level, remove the #ifdef for RTE_LIBRTE_QEDE_DEBUG_INIT since that
config option does not exist in common_base and is not documented.
Fixes: 69b6573980 ("net/qede: implement dynamic logging")
Cc: stable@dpdk.org
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
Add APIs for dscp priority map configuration. APIs added are
ecore_dcbx_get_dscp_priority(), ecore_dcbx_set_dscp_priority().
These base driver APIs can be used for dscp-map query/config.
Configure the doorbell queue (DORQ) to use vlan-id/priority.
Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
Add 'rl_bc_stage_th','rl_timer_stage_th' and 'dcqcn_reset_alpha_on_idle'
to RL update param as well as logs.
Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
Change details:
- Get engine affinity from the management FW and configure accordingly
- Add an LLH filter with the primary MAC address in QPAR/NPAR
- Move some of the LLH APIs around
- Add PPFID APIs
- Update all allocated ppfids with the same value for the
following PORT_PF registers:
NIG_REG_DSCP_TO_TC_MAP_ENABLE
- Add port_id, src_pfid and dst_pfid to DMA engine params
Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
Request management FW for OEM values, which are negotiated prior to
the driver load by sending the GET_OEM_UPDATES command after both
engines are initialized.
Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
Add a pretend function for port/PF, pretend to another port and another
function when accessing the ptt window
Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
Modified queue manager getter APIs to cycle through their range if
index is higher than max. This prevents accessing index out of bounds.
Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
Added ecore_update_eth_rss_ind_table_entry() api to update FW RSS
indirection table entry according to new interface of FW 8.37.x.x.
Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
The driver can notify that there was an MCP reset and read the SHMEM
values before the management FW has completed initializing them.
As a temporary solution, the "sup_msgs" field is used as a SHMEM data
ready indication. This should be replaced with an actual indication
when it is provided by the management FW.
Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
Add DPC sync after stopping the physical funciton to allow clean up of
asyncronous events. Post this the driver don't expect the FW to send
async events.
Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
Management firmware does not properly clean IGU block in PF FLR flow
which may result in undelivered attentions for link events from
default status block.
Add a workaround in PMD to execute extra IGU cleanup right after PF FLR
is done.
Fixes: 9e2f08a4ad ("net/qede/base: add request for PF FLR before load request")
Cc: stable@dpdk.org
Signed-off-by: Shahed Shaikh <shahed.shaikh@cavium.com>
This patch implement eth_dev_ops->rx_descriptor_status
callback.
Walk through receive completion ring to calculate receive
descriptors used by firmware and then provide the status of
offset accordingly.
Signed-off-by: Shahed Shaikh <shahed.shaikh@cavium.com>
- HW does not include CRC in received frame when passed to host,
so no need to consider CRC length while calculating Rx buffer size.
- In scattered Rx mode, driver may allocate Rx buffer larger than
the size of mbuf because it tries to adjust the buffer size to cache
line size by ceiling it. Fix this by flooring the size instead of
ceiling.
- Consider the rule imposed by HW regarding the minimum size of Rx buffer
in scattered Rx mode -
(MTU + Maximum L2 Header Size + 2) / ETH_RX_MAX_BUFF_PER_PKT
Fixes: f6033f2497 ("net/qede: fix minimum buffer size and scatter Rx check")
CC: stable@dpdk.org
Signed-off-by: Shahed Shaikh <shahed.shaikh@cavium.com>
- Add support for rte_flow_validate(), rte_flow_create() and
rte_flow_destroy() APIs
- This patch adds limited support for the flow items
because of the limited filter profiles supported by HW.
- Only 4 tuples - src and dst IP (v4 or v6) addresses and
src and dst port IDs of TCP or UDP.
- also, only redirect to queue action is supported.
Signed-off-by: Shahed Shaikh <shahed.shaikh@cavium.com>
- In order to prepare the base for RTE FLOW support,
convert common code used for flow director support
into common aRFS code.
Signed-off-by: Shahed Shaikh <shahed.shaikh@cavium.com>
- PMD does not fill vtc_flow field of IPv6 header while
constructing a packet for IPv6 filter. Hence filter was
not getting applied properly.
- IPv6 addresses got swapped while copying src and dst addresses.
- Same issue with UDP and TCP port ids.
Fixes: 622075356e ("net/qede: support ntuple and flow director filter")
Cc: stable@dpdk.org
Signed-off-by: Shahed Shaikh <shahed.shaikh@cavium.com>
When trust mode is set to ON, VF can change it's MAC address
inspite PF has set a forced MAC for that VF from HV.
Earlier similar functionality is provided by module parameter
"allow_vf_mac_change_mode" of qed.
This change makes few changes in behavior of VF shadow config -
- Let driver track the VF mac in shadow config as long as trust
mode is OFF.
- Once trust mode is ON, we should not care about MACs in shadow
config (because we never intend to fall back because of lack of restore
implementation).
- Delete existing shadow MAC (this helps when trust mode is turned OFF,
and VF tries to add new MAC – it won’t fail that time since we have
a clean slate).
- Skip addition and deletion of MACs in shadow configs.
Signed-off-by: Shahed Shaikh <shahed.shaikh@cavium.com>
Fix logic for sfp get rx_los, tx_fault, tx_disable, and sfp set tx_disable.
Fixes: bdc40630a8 ("net/qede/base: add APIs for xcvr")
Cc: stable@dpdk.org
Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
Limit the number of non ethernet queues to 64, allowing a max queues to
status block ratio of 2:1 in case of storage target. Theoretically a
non-target storage PF can have 128 queues and SBs.
This change is to support 64 entries for a target iSCSI/FCoE PF and 128
for a non-target.
Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
Fix to program the HW registers with proper ether type.
Fixes: 36f45bce25 ("net/qede/base: fix to support OVLAN mode")
Cc: stable@dpdk.org
Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
Add support for the following OneView APIs:
- ecore_mcp_ov_update_mtu() - Send MTU value to the management FW.
- ecore_mcp_ov_update_mac() - Send MAC address to the management FW.
- ecore_mcp_ov_update_eswitch() - Send eswitch_mode to management FW
after the firmware load.
Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
This fix adds a ecore_mcp_update_stag() handler to handle the STAG update
events from management FW and program the STAG value.
It also clears the stag config on PF, when management FW invalidates
the stag value.
Fixes: ec94dbc573 ("qede: add base driver")
Cc: stable@dpdk.org
Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
Removed DEV_RX_OFFLOAD_CRC_STRIP offload flag.
Without any specific Rx offload flag, default behavior by PMDs is to
strip CRC.
PMDs that support keeping CRC should advertise DEV_RX_OFFLOAD_KEEP_CRC
Rx offload capability.
Applications that require keeping CRC should check PMD capability first
and if it is supported can enable this feature by setting
DEV_RX_OFFLOAD_KEEP_CRC in Rx offload flag in rte_eth_dev_configure()
Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
Acked-by: Tomasz Duszynski <tdu@semihalf.com>
Acked-by: Shahaf Shuler <shahafs@mellanox.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Acked-by: Jan Remes <remes@netcope.com>
Acked-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Acked-by: Hyong Youb Kim <hyonkim@cisco.com>
PMD did not pass down the intended queue id while
configuring the ntuple filter.
Fixes: 622075356e ("net/qede: support ntuple and flow director filter")
Cc: stable@dpdk.org
Signed-off-by: Shahed Shaikh <shahed.shaikh@cavium.com>
Treat any attention which is not for timeout event as invalid
and return status accordingly. The HW error handler logs and clears
the HW attention. Without this fix we can see flood of GRC attentions.
Fixes: e6051bd6b0 ("qede: add interrupt handling support")
Cc: stable@dpdk.org
Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>