summaryrefslogtreecommitdiff
path: root/drivers/net/qede/qede_rxtx.c
AgeCommit message (Collapse)Author
2019-10-23net/qede/base: update FW to 8.40.25.0Rasesh Mody
This patch updates the FW to 8.40.25.0 and corresponding base driver changes. It also updates the PMD version to 2.11.0.1. The FW updates consists of enhancements and fixes as described below. - VF RX queue start ramrod can get stuck due to completion error. Return EQ completion with error, when fail to load VF data. Use VF FID in RX queue start ramrod - Fix big receive buffer initialization for 100G to address failure leading to BRB hardware assertion - GRE tunnel traffic doesn't run when non-L2 ethernet protocol is enabled, fix FW to not forward tunneled SYN packets to LL2. - Fix the FW assert that is caused during vport_update when tx-switching is enabled - Add initial FW support for VF Representors - Add ecore_get_hsi_def_val() API to get default HSI values - Move following from .c to .h files: TSTORM_QZONE_START and MSTORM_QZONE_START enum ilt_clients renamed struct ecore_dma_mem to phys_mem_desc and moved - Add ecore_cxt_set_cli() and ecore_cxt_set_blk() APIs to set client config and block details - Use SET_FIELD() macro where appropriate - Address spell check and code alignment issues Signed-off-by: Rasesh Mody <rmody@marvell.com>
2019-10-23net/qede/base: update HSIRasesh Mody
Update hardware software common base driver code in preparation to update the firmware to version 8.40.25.0. Signed-off-by: Rasesh Mody <rmody@marvell.com>
2019-10-23net/qede/base: rename HSI datatypes and functionsRasesh Mody
This patch changes code with E4/E5/e4/e5/BB_K2 prefixes and suffixes. - HSI datatypes renaming - removed all e5 datatypes and renamed all e4 datatypes to be prefix less/suffix less. (s/_E4//; s/_e4//; s/E4_//). - HSI functions - removed e4/e5 prefixes/suffixes. Signed-off-by: Rasesh Mody <rmody@marvell.com>
2019-10-08net/qede: limit Rx ring index read for debugDavid Marchand
Caught by clang, this idx value is only used for a debug message when the mbufs allocation fails. No need to use idx as a temporary storage. Fixes: 8f2312474529 ("net/qede: fix performance bottleneck in Rx path") Cc: stable@dpdk.org Signed-off-by: David Marchand <david.marchand@redhat.com> Acked-by: Rasesh Mody <rmody@marvell.com>
2019-09-20net/qede: fix odd number of queues usage in 100G modeShahed Shaikh
As per HW design of 100Gb mode, device internally uses 2 engines (eng0 and eng1), and both engines need to be configured symmetrically. Based on this requirement, driver design chose an approach to allow user to allocate only even number of queues and split those queues on both engines equally. This approach puts a limitation on number of queues to be allocated - i.e. user can't configure odd number of queues on 100Gb mode. OVS configures DPDK port with 1 rxq and 1 txq, which causes initialization of qede port to fail. Issue is fixed by changing the implementation of queue allocation and assignment to hw engines only for 100Gb devices and allowing user to configure odd number queues. New approach works as below - - Create 'struct qede_fastpath_cmt' to hold hw queue pair of both engines and provide it to rte_ethdev's Rx/Tx queues structure. - So ethdev will see only one queue for underlying queue pair created for hw engine pair. - Install separate Rx/Tx data path handlers for 100Gb mode and regular mode - Rx/Tx handlers for 100Gb mode will split packet processing across both engines by providing hw queue structures from 'struct qede_fastpath_cmt' passed by Rx/Tx callbacks to respective engines. Fixes: 2af14ca79c0a ("net/qede: support 100G") Cc: stable@dpdk.org Signed-off-by: Shahed Shaikh <shshaikh@marvell.com>
2019-09-20net/qede: refactor Rx and Tx queue setupShahed Shaikh
This patch refactors Rx and Tx queue setup flow required to allow odd number of queues to be configured in next patch. This is the first patch of the series required to fix an issue where qede port initialization in ovs-dpdk fails due to 1 Rx/Tx queue configuration. Detailed explanation is given in next patch. Fixes: 2af14ca79c0a ("net/qede: support 100G") Cc: stable@dpdk.org Signed-off-by: Shahed Shaikh <shshaikh@marvell.com>
2019-06-13net/qede: fix Tx prepare to set positive rte_errnoAndrew Rybchenko
Fixes: 29540be7efce ("net/qede: support LRO/TSO offloads") Cc: stable@dpdk.org Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com> Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
2019-06-03net: replace IPv4/v6 constants with uppercase nameDavid Marchand
Since we change these macros, we might as well avoid triggering complaints from checkpatch because of mixed case. old=RTE_IPv4 new=RTE_IPV4 git grep -lw $old | xargs sed -i -e "s/\<$old\>/$new/g" old=RTE_ETHER_TYPE_IPv4 new=RTE_ETHER_TYPE_IPV4 git grep -lw $old | xargs sed -i -e "s/\<$old\>/$new/g" old=RTE_ETHER_TYPE_IPv6 new=RTE_ETHER_TYPE_IPV6 git grep -lw $old | xargs sed -i -e "s/\<$old\>/$new/g" Signed-off-by: David Marchand <david.marchand@redhat.com> Reviewed-by: Olivier Matz <olivier.matz@6wind.com>
2019-05-24net: add rte prefix to IP structureOlivier Matz
Add 'rte_' prefix to structures: - rename struct ipv4_hdr as struct rte_ipv4_hdr. - rename struct ipv6_hdr as struct rte_ipv6_hdr. Signed-off-by: Olivier Matz <olivier.matz@6wind.com> Reviewed-by: Stephen Hemminger <stephen@networkplumber.org> Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com> Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
2019-05-24net: add rte prefix to ether definesOlivier Matz
Add 'RTE_' prefix to defines: - rename ETHER_ADDR_LEN as RTE_ETHER_ADDR_LEN. - rename ETHER_TYPE_LEN as RTE_ETHER_TYPE_LEN. - rename ETHER_CRC_LEN as RTE_ETHER_CRC_LEN. - rename ETHER_HDR_LEN as RTE_ETHER_HDR_LEN. - rename ETHER_MIN_LEN as RTE_ETHER_MIN_LEN. - rename ETHER_MAX_LEN as RTE_ETHER_MAX_LEN. - rename ETHER_MTU as RTE_ETHER_MTU. - rename ETHER_MAX_VLAN_FRAME_LEN as RTE_ETHER_MAX_VLAN_FRAME_LEN. - rename ETHER_MAX_VLAN_ID as RTE_ETHER_MAX_VLAN_ID. - rename ETHER_MAX_JUMBO_FRAME_LEN as RTE_ETHER_MAX_JUMBO_FRAME_LEN. - rename ETHER_MIN_MTU as RTE_ETHER_MIN_MTU. - rename ETHER_LOCAL_ADMIN_ADDR as RTE_ETHER_LOCAL_ADMIN_ADDR. - rename ETHER_GROUP_ADDR as RTE_ETHER_GROUP_ADDR. - rename ETHER_TYPE_IPv4 as RTE_ETHER_TYPE_IPv4. - rename ETHER_TYPE_IPv6 as RTE_ETHER_TYPE_IPv6. - rename ETHER_TYPE_ARP as RTE_ETHER_TYPE_ARP. - rename ETHER_TYPE_VLAN as RTE_ETHER_TYPE_VLAN. - rename ETHER_TYPE_RARP as RTE_ETHER_TYPE_RARP. - rename ETHER_TYPE_QINQ as RTE_ETHER_TYPE_QINQ. - rename ETHER_TYPE_ETAG as RTE_ETHER_TYPE_ETAG. - rename ETHER_TYPE_1588 as RTE_ETHER_TYPE_1588. - rename ETHER_TYPE_SLOW as RTE_ETHER_TYPE_SLOW. - rename ETHER_TYPE_TEB as RTE_ETHER_TYPE_TEB. - rename ETHER_TYPE_LLDP as RTE_ETHER_TYPE_LLDP. - rename ETHER_TYPE_MPLS as RTE_ETHER_TYPE_MPLS. - rename ETHER_TYPE_MPLSM as RTE_ETHER_TYPE_MPLSM. - rename ETHER_VXLAN_HLEN as RTE_ETHER_VXLAN_HLEN. - rename ETHER_ADDR_FMT_SIZE as RTE_ETHER_ADDR_FMT_SIZE. - rename VXLAN_GPE_TYPE_IPV4 as RTE_VXLAN_GPE_TYPE_IPV4. - rename VXLAN_GPE_TYPE_IPV6 as RTE_VXLAN_GPE_TYPE_IPV6. - rename VXLAN_GPE_TYPE_ETH as RTE_VXLAN_GPE_TYPE_ETH. - rename VXLAN_GPE_TYPE_NSH as RTE_VXLAN_GPE_TYPE_NSH. - rename VXLAN_GPE_TYPE_MPLS as RTE_VXLAN_GPE_TYPE_MPLS. - rename VXLAN_GPE_TYPE_GBP as RTE_VXLAN_GPE_TYPE_GBP. - rename VXLAN_GPE_TYPE_VBNG as RTE_VXLAN_GPE_TYPE_VBNG. - rename ETHER_VXLAN_GPE_HLEN as RTE_ETHER_VXLAN_GPE_HLEN. Do not update the command line library to avoid adding a dependency to librte_net. Signed-off-by: Olivier Matz <olivier.matz@6wind.com> Reviewed-by: Stephen Hemminger <stephen@networkplumber.org> Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com> Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
2019-05-24net: add rte prefix to ether structuresOlivier Matz
Add 'rte_' prefix to structures: - rename struct ether_addr as struct rte_ether_addr. - rename struct ether_hdr as struct rte_ether_hdr. - rename struct vlan_hdr as struct rte_vlan_hdr. - rename struct vxlan_hdr as struct rte_vxlan_hdr. - rename struct vxlan_gpe_hdr as struct rte_vxlan_gpe_hdr. Do not update the command line library to avoid adding a dependency to librte_net. Signed-off-by: Olivier Matz <olivier.matz@6wind.com> Reviewed-by: Stephen Hemminger <stephen@networkplumber.org> Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com> Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
2019-03-20net/qede: fix Rx packet dropShahed Shaikh
There is a corner case in which driver won't post receive buffers when driver has processed all received packets in single loop (i.e. hw_consumer == sw_consumer) and then HW will start dropping packets since it did not see new receive buffers posted. This corner case is seen when size of Rx ring is less than or equals Rx packet burst count for dev->rx_pkt_burst(). Fixes: 8f2312474529 ("net/qede: fix performance bottleneck in Rx path") Cc: stable@dpdk.org Signed-off-by: Shahed Shaikh <shshaikh@marvell.com> Acked-by: Rasesh Mody <rmody@marvell.com>
2019-02-20net/qede: fix Tx packet prepare for tunnel packetsShahed Shaikh
This patch fixes a regression introduced by commit 49d3978d5723 ("net/qede: fix Tx tunnel offload support mask") in which qede_xmit_prep_pkts() breaks the loop for successful check of Tunneling offload flags instead of continuing, resulting in tx_pkt_prepare return a failure. Fixes: 49d3978d5723 ("net/qede: fix Tx tunnel offload support mask") Cc: stable@dpdk.org Signed-off-by: Shahed Shaikh <shshaikh@marvell.com>
2019-01-19net/qede: remove prefetch in Tx pathShahed Shaikh
Incorrect placement of prefetch in Tx path is causing a performance drop of around ~2% on AMD platform. Fixes: 2ea6f76aff40 ("qede: add core driver") Cc: stable@dpdk.org Signed-off-by: Shahed Shaikh <shshaikh@marvell.com> Acked-by: Rasesh Mody <rmody@marvell.com>
2019-01-19net/qede: fix performance bottleneck in Rx pathShahed Shaikh
Allocating replacement buffer per received packet is expensive. Instead, process received packets first and allocate replacement buffers in bulk later. This improves performance by ~25% in terms of PPS on AMD platforms. Fixes: 2ea6f76aff40 ("qede: add core driver") Cc: stable@dpdk.org Signed-off-by: Shahed Shaikh <shshaikh@marvell.com> Acked-by: Rasesh Mody <rmody@marvell.com>
2018-11-14net/qede: fix Tx tunnel offload support maskShahed Shaikh
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: 44346c24b790 ("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>
2018-11-14net/qede: fix crash when configure failsTimothy Redaelli
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: 7105b24f4bb8 ("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>
2018-09-28net/qede: support Rx descriptor statusShahed Shaikh
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>
2018-09-28net/qede: fix Rx buffer size calculationShahed Shaikh
- 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: f6033f2497e7 ("net/qede: fix minimum buffer size and scatter Rx check") CC: stable@dpdk.org Signed-off-by: Shahed Shaikh <shahed.shaikh@cavium.com>
2018-07-23net/qede: move SPDX tags to source filesRasesh Mody
We were using LICENSE.qede_pmd to reference inclusion of SPDX licensing tag from all the source file. Remove the LICENSE.qede_pmd file and directly include SPDX tags in source files. Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com> Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com>
2018-07-03net/qede: fix Rx/Tx offload flagsShahed Shaikh
- We don't support QinQ offload, so removing it now. - Fix incorrect offload flags in default rxconf Since qede PMD does not support per queue rx offload, it should not set default_rxconf.offload flags in .dev_infos_get(). Although these offloads are enabled by default, they are per port and not per queue. Fixes: 946dfd18a4ec ("net/qede: convert to new Rx/Tx offloads API") Cc: stable@dpdk.org Signed-off-by: Shahed Shaikh <shahed.shaikh@cavium.com>
2018-06-14net/qede: fix memory alloc for multiple port reconfigRasesh Mody
Multiple port reconfigurations can lead to memory allocation failures due to hitting RTE memzone limit or no more room in config while reserving memzone. When freeing memzones, update the memzone mapping and the memzone count. Release Rx and Tx queue rings allocated during queue setup. Fixes: a39001d90dbd ("net/qede: fix DMA memory leak") Cc: stable@dpdk.org Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com> Reviewed-by: Kevin Traynor <ktraynor@redhat.com>
2018-05-25net/qede: change copyright info to CaviumRasesh Mody
Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
2018-05-23net/qede: fix missing loop index in Tx SG modeRasesh Mody
Fixes: 3d4bb4411683 ("net/qede: add fastpath support for VXLAN tunneling") Cc: stable@dpdk.org Signed-off-by: Harish Patil <harish.patil@cavium.com> Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
2018-03-30net/qede: fix to prevent overwriting packet typeHarish Patil
Fixes: 3f72dd780e10 ("net/qede: check tunnel L3 header") Cc: stable@dpdk.org Signed-off-by: Harish Patil <harish.patil@cavium.com>
2018-03-30net/qede: enable IPGRE offload supportHarish Patil
Signed-off-by: Harish Patil <harish.patil@cavium.com>
2018-03-30net/qede: convert to new Rx/Tx offloads APIHarish Patil
Ethdev RX/TX offloads API has changed since: commit ce17eddefc20 ("ethdev: introduce Rx queue offloads API") commit cba7f53b717d ("ethdev: introduce Tx queue offloads API") This patch makes use of new offload flags as suggested and fix the default RX/TX configuration. Also indent the code properly around those changes. Signed-off-by: Harish Patil <harish.patil@cavium.com> Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
2018-02-05net/qede: fix few log messagesRasesh Mody
Fixes: 9e334305178f ("net/qede: fix MTU set and max Rx length") Fixes: 22d07d939c3c ("net/qede/base: update") Cc: stable@dpdk.org Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
2018-02-05net/qede: fix VF port creation sequenceHarish Patil
Few adjustments are required to effectively handle VF vport create/delete sequence. The problem is exposed by recent ethdev TX offload changes which requires port to be in down state before applying TX offloads. - Move vport creation from dev_init() to dev_configure() - Force to stop vport if it was already started due to previous run (restart case) - Move link state enable/disable to dev_init() and dev_close() respectively. - For MTU change, recreate vport with new MTU value and restore old config. This is necessary since VF MTU value can be changed only upon vport creation. Fixes: ec94dbc57362 ("qede: add base driver") Cc: stable@dpdk.org Signed-off-by: Harish Patil <harish.patil@cavium.com>
2018-01-29net/qede: fix MTU set and max Rx lengthRasesh Mody
This patch fixes issues related to MTU set and max_rx_pkt_len usage. - Adjust MTU during device configuration when jumbo is enabled - In qede_set_mtu(): Return not supported for VF as currently we do not support it. Cache new mtu value in mtu_new for proper update. Add check for RXQ allocation before calculating RX buffer size if not allocated defer RX buffer size calculation till RXQ setup. Add check for before performing device start/stop. - Use max_rx_pkt_len appropriately - Change QEDE_ETH_OVERHEAD macro to adjust driver specifics Fixes: 4c4bdadfa9e7 ("net/qede: refactoring multi-queue implementation") Fixes: 9a6d30ae6d46 ("net/qede: refactoring vport handling code") Fixes: 1ef4c3a5c1f7 ("net/qede: prevent crash while changing MTU dynamically") Cc: stable@dpdk.org Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
2018-01-29net/qede: fix tunnel header size in Tx BD configurationHarish Patil
- Fix incorrect header size. In the tunnel case, the outer L2/L3 lengths should be included to calculate tunnel header_size. - In TSO case, skip manipulating TX BD1 and TX BD2 data buffer fields since those fields are already updated with header and payload lengths respectively. - Update TX BD debug data collection. Fixes: 3d4bb4411683 ("net/qede: add fastpath support for VXLAN tunneling") Cc: stable@dpdk.org Signed-off-by: Harish Patil <harish.patil@cavium.com>
2018-01-29net/qede: check tunnel L3 headerHarish Patil
- Add a check to verify tunnel IP header checksum is valid and mark MBUF flag as appropriate. - Bit of refactoring so that inner frame handling for tunneled packets can be made common as regular (non-tunneled) packets. - make qede_tunn_exist() as inline. - remove RTE_PTYPE_L2_ETHER as default L2 pkt_type. Fixes: 3d4bb4411683 ("net/qede: add fastpath support for VXLAN tunneling") Cc: stable@dpdk.org Signed-off-by: Harish Patil <harish.patil@cavium.com>
2018-01-16net/qede: add support for GENEVE tunneling offloadShahed Shaikh
This patch refactors existing VXLAN tunneling offload code and enables following features for GENEVE: - destination UDP port configuration - checksum offloads - filter configuration Signed-off-by: Shahed Shaikh <shahed.shaikh@cavium.com> Acked-by: Rasesh Mody <rasesh.mody@cavium.com>
2017-11-10drivers/net: fix number of segment storage typeIlya V. Matveychikov
Fixes: 97cb466d65c9 ("mbuf: use 2 bytes for port and nb segments") Cc: stable@dpdk.org Signed-off-by: Ilya V. Matveychikov <matvejchikov@gmail.com> Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
2017-11-06mbuf: rename data address helpers to IOVAThomas Monjalon
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>
2017-10-26mbuf: rename deprecated VLAN flagsOlivier Matz
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>
2017-10-26net/qede: fix supported packet typesHarish Patil
Update/fix supported ptypes to return both inner and outer headers, tunnel_type, fragmented and VLAN packet types. Fixes: 3d4bb4411683 ("net/qede: add fastpath support for VXLAN tunneling") Fixes: 2ea6f76aff40 ("qede: add core driver") Cc: stable@dpdk.org Signed-off-by: Harish Patil <harish.patil@cavium.com> Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
2017-10-06net/qede: fix compilation with -OgOlivier Matz
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: 4c4bdadfa9e7 ("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>
2017-10-06net/qede/base: update firmware to 8.30.12.0Rasesh Mody
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>
2017-10-06net/qede/base: interchangeably use SB between PF and VFRasesh Mody
Status Block reallocation - allow a PF and its child VF to change SB between them using new base driver APIs. The changes that are inside base driver flows are: New APIs ecore_int_igu_reset_cam() and ecore_int_igu_reset_cam_default() added to reset IGU CAM. a. During hw_prepare(), driver would re-initialize the IGU CAM. b. During hw_stop(), driver would initialize the IGU CAM to default. Use igu_sb_id instead of sb_idx [protocol index] to allow setting of the timer-resolution in CAU[coalescing algorithm unit] for all SBs, sb_idx could limit SBs 0-11 only to be able change their timer-resolution. Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
2017-07-31net/qede: fix inner L3/L4 checksum for tunnelsHarish Patil
Force recalculation of tunnel L4 chksum when inner L3/L4 chksum gets updated due to HW offload. Fixes: aab21617502e ("net/qede: add Tx offloads for MPLS-in-UDP packets") Signed-off-by: Harish Patil <harish.patil@cavium.com>
2017-07-31net/qede: fix incorrect queue id for 100GHarish Patil
'commit 4c4bdadfa9e7 ("net/qede: refactoring multi-queue implementation")' introduced a regression where default RSS configuration is incorrect in the case of 100G mode. Currently we are passing absolute queue ids while creating RX/TX queues. But in CMT mode we need to provide queue id relative to the engine id. So this fix takes into account num_hwfns while creating queues. Fixes: 4c4bdadfa9e7 ("net/qede: refactoring multi-queue implementation") Signed-off-by: Harish Patil <harish.patil@cavium.com> Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
2017-07-06net/qede: change debug verbosity of messagesRasesh Mody
Convert DP_NOTICE() to DP_ERR() as appropriate in PMD files. Change DP_NOTICE() macro to make use of boolean flag to log it as error message or informational message. Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
2017-07-06net/qede: add comments traces and format changesRasesh Mody
Changes include - comment modifications - adds tracing during initialization - adds/removes new lines Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
2017-07-06net/qede: fix DMA memory leakHarish Patil
Implement the macro OSAL_DMA_FREE_COHERENT to release DMA memories. Track all DMA memory allocations using an array of memzone pointers and use that to free memory resources along with other resource deallocation. With this change there is no need to alter the base code to additionally pass an unique string needed for memzone creation. Fixes: ec94dbc57362 ("qede: add base driver") Cc: stable@dpdk.org Signed-off-by: Harish Patil <harish.patil@cavium.com> Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
2017-07-06net/qede: add Tx offloads for MPLS-in-UDP packetsHarish Patil
Add support for inner/outer L3/L4 TX csum offload for MPLS-in-UDP packets. The driver checks for PKT_TX_TUNNEL_MPLSINUDP in Tx ol_flags and updates TX BD elements with appropriate offsets/length of tunnel headers. The pseudo csum calculation is removed from qede_xmit_prep_pkts() since its not needed. Signed-off-by: Harish Patil <harish.patil@cavium.com> Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
2017-06-14fix typos using codespell utilityJerin Jacob
Fixing typos across dpdk source code using codespell utility. Skipped the ethdev driver's base code fixes to keep the base code intact. Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com> Acked-by: John McNamara <john.mcnamara@intel.com>
2017-06-12net/qede: refactor Tx routineHarish Patil
Refactor TX routine such that TX BD updates can all be grouped together. Based on the TX offloads requested the TX bitfields are calculated in a temporary variable and TX BDs are updated at the end. This will minimize the if checks also. This change is done to easily accommodate newer TX offload operations in the future. Signed-off-by: Harish Patil <harish.patil@cavium.com>
2017-06-12net/qede: fix VXLAN tunnel Tx offload flag settingHarish Patil
This patch fixes missing PKT_TX_TUNNEL_VXLAN Tx offload flag from the supported Tx offloads and an incorrect tunnel TX BD bit setting. Fixes: 3d4bb4411683 ("net/qede: add fastpath support for VXLAN tunneling") Cc: stable@dpdk.org Signed-off-by: Harish Patil <harish.patil@cavium.com>
2017-06-12net/qede: refactoring multi-queue implementationHarish Patil
This patch does the following refactoring and cleanup: - As part of multi-queue support a struct member called 'type' was added in struct qede_fastpath in order to identify whether a queue is RX or TX and take actions based on that. This was unnecessary in the first place since pointers to RX and TX queues are already available in rte_eth_dev->data. So all usage of fp->type is removed. - Remove remaining additional layer of internal callbacks for RX/TX queues and fastpath related operations from the qed_eth_ops_pass. With this change the files qede_eth_if.[c,h] are no longer needed. - Add new per-queue start/stop APIs instead of clubbing it all together. - Remove multiple TXQs references (num_tc and fp->txqs) since CoS is not supported. - Enable sharing of the status block for each queue pair. - Remove enum qede_dev_state and instead make use of existing port states RTE_ETH_QUEUE_STATE_STOPPED/RTE_ETH_QUEUE_STATE_STARTED. - Move qede_dev_start() and qede_dev_stop() to qede_ethdev.c from qede_rxtc.c. Signed-off-by: Harish Patil <harish.patil@cavium.com>