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>
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>
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: 3d4bb44116 ("net/qede: add fastpath support for VXLAN tunneling")
Cc: stable@dpdk.org
Signed-off-by: Harish Patil <harish.patil@cavium.com>
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>
The refactoring is mainly for two reasons:
- To remove an additional layer of internal callbacks for all vport
related operations from the struct qed_eth_ops_pass. Instead, we
can invoke base APIs directly.
- Splitting a single large vport-update configuration into multiple and
independent vport-update operations. Each configuration would touch
only the required config bits that needs an update.
Signed-off-by: Harish Patil <harish.patil@cavium.com>
Instead of many PMD define their own macro, define a generic one in
ethdev and use that in PMDs.
Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
Acked-by: Allain Legacy <allain.legacy@windriver.com>
Acked-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
Acked-by: Andrew Rybchenko <arybchenko@solarflare.com>
remove __rte_unused instances that are not required.
Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
Acked-by: Allain Legacy <allain.legacy@windriver.com>
Acked-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
vfio is the kernel framework used by the vfio-pci kernel driver.
DPDK drivers do not rely solely on vfio, but rather on vfio-pci to gain
access to pci resources.
Fixes: 0880c40113 ("drivers: advertise kmod dependencies in pmdinfo")
Cc: stable@dpdk.org
Signed-off-by: David Marchand <david.marchand@6wind.com>
Acked-by: Olivier Matz <olivier.matz@6wind.com>
With the change in base APIs the logic for 100G handling needs to be
adjusted to pass cid values instead for queue ids. The current API
works assuming its queue id.
Fixes: 69d7ba88f1 ("net/qede/base: use L2-handles for RSS configuration")
Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
For base code in drivers shared with other projects, disable the new
warnings from gcc 7 about unlabelled fall-through in switch statements.
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Some customers find adding MAC addr to VF sometimes can fail,
but it is still stored in dev->data->mac_addrs[ ]. So this
can lead to some errors that assumes the non-zero entry in
dev->data->mac_addrs[ ] is valid.
Following acknowledgements are from specific NIC PMD
maintainer for their managing part.
This patch changes the ethdev internal API, it should not be
backported to a stable/LTS release so far.
Fixes: af75078fec ("first public release")
Signed-off-by: Wei Dai <wei.dai@intel.com>
Acked-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
Acked-by: Yuanhan Liu <yuanhan.liu@linux.intel.com>
Acked-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
Changes included in this fix
- limit CFLAGS to base files
- fix to remove/mark unused members
- add checks for debug config option
- make qede_set_mtu() and qede_udp_dst_port_del() static and others
non-static as appropriate
- move local APIs qede_vlan_offload_set() and qede_rx_cqe_to_pkt_type()
- initialize variables as required
Fixes: ec94dbc573 ("qede: add base driver")
Cc: stable@dpdk.org
Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
In SRIOV testing, print adapter info shows firmware version used by PF,
this patch provides fix to populate correct firmware version used by VF.
Fixes: 86a2265e59 ("qede: add SRIOV support")
Cc: stable@dpdk.org
Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
Firmware supports ntuple configuration which is always based on 4-tuples.
So remove RTE_ETH_FLOW_FRAG_IPV4 and RTE_ETH_FLOW_FRAG_IPV6 as valid flows.
Also merge the two switch statements into one.
Fixes: 622075356e ("net/qede: support ntuple and flow director filter")
Signed-off-by: Harish Patil <harish.patil@cavium.com>
Use new mbuf flags PKT_RX_VLAN_STRIPPED and PKT_RX_QINQ_STRIPPED
introduced by the patch:
commit b37b528d95 ("mbuf: add new Rx flags for stripped VLAN")
Signed-off-by: Harish Patil <harish.patil@cavium.com>
This defect is a functional issue where the RX CQE pointer remains
uninitialized in the LRO code path which can cause null pointer exception
while accessing VLAN or RSS hash value from CQE.
Coverity issue: 143474
Fixes: 29540be7ef ("net/qede: support LRO/TSO offloads")
Signed-off-by: Harish Patil <harish.patil@cavium.com>
- Add a common routine to handle ETH_RX_CQE_TYPE_TPA_CONT and
ETH_RX_CQE_TYPE_TPA_END.
- Remove enum qede_agg_state since there is no need to maintain
aggregation state.
- Modify the segment chaining logic by tracking head and tail
TPA segments of each aggregation.
- Add more debug and comments.
- Mark the packet as PKT_RX_LRO.
Fixes: 29540be7ef ("net/qede: support LRO/TSO offloads")
Signed-off-by: Harish Patil <harish.patil@cavium.com>
Perform reset of the fastpath RX/TX rings after stopping device port and
not while starting the ports.
Fixes: cfe28a9885 ("net/qede: support unequal number of Rx/Tx queues")
Cc: stable@dpdk.org
Signed-off-by: Harish Patil <harish.patil@cavium.com>
- 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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>