This patch provides a fix for PCI function level reset after an
ungraceful exit from an application. The fix is to enable internal
target read as part of device attach before getting device information
from device config space, device itself and shared memory. In addition
to that, add a 200ms delay for the recovery flow to complete.
Fixes: 540a211084 ("bnx2x: driver core")
Cc: stable@dpdk.org
Signed-off-by: Rasesh Mody <rasesh.mody@qlogic.com>
Jacek will no longer be maintaining mvpp2 net PMD.
Special thanks to him for his development and support.
Signed-off-by: Tomasz Duszynski <tdu@semihalf.com>
The rss_conf field is defined as a pointer to struct rte_eth_rss_conf.
Even assuming it is permanently allocated and a pointer copy is safe,
pointed data may change and not reflect an applied flow rule anymore.
This patch aligns with testpmd by making a deep copy instead.
Fixes: 18da437b5f ("ethdev: add flow rule copy function")
Cc: stable@dpdk.org
Signed-off-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
Acked-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>
Original implementation lacks the on/off toggle.
This patch shows up as a fix because it has been a popular request ever
since the first DPDK release with the original implementation but was never
addressed.
Fixes: abc3d81aca ("app/testpmd: add item raw to flow command")
Cc: stable@dpdk.org
Signed-off-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
Acked-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>
Users cannot override the default RSS settings when entering a RSS action,
only a list of queues can be provided.
This patch enables them to set a RSS hash key and types for a flow rule.
Fixes: 05d34c6e9d ("app/testpmd: add queue actions to flow command")
Cc: stable@dpdk.org
Signed-off-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
Acked-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>
Except for a list of queues, RSS configuration (hash key and fields) cannot
be specified from the flow command line and testpmd does not provide safe
defaults either.
In order to validate their implementation with testpmd, PMDs had to
interpret its NULL RSS configuration parameters somehow, however this has
never been valid to begin with.
This patch makes testpmd always provide default values.
The list of RSS types to use is exclusively taken from the global "rss_hf"
variable, itself configured through the "port config all rss" command or
--rss-ip/--rss-udp command-line options.
Fixes: 05d34c6e9d ("app/testpmd: add queue actions to flow command")
Cc: stable@dpdk.org
Signed-off-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
Acked-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>
Configuration structure is not optional with flow rule actions that expect
one; this pointer is not supposed to be NULL and PMDs should not have to
verify it.
Like pattern item spec/last/mask fields, it is currently set when at least
one configuration parameter is provided on the command line. This patch
sets it as soon as an action is created instead.
Fixes: 7a91969ad3 ("app/testpmd: add various actions to flow command")
Cc: stable@dpdk.org
Signed-off-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
Acked-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>
The lack of a working completion for RSS queues was overlooked during
development; until now only "end" was displayed as a valid token.
Fixes: 05d34c6e9d ("app/testpmd: add queue actions to flow command")
Cc: stable@dpdk.org
Signed-off-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>
Some values are interpreted without endian conversion and/or without
taking the proper mask into account.
Fixes: 5ef3b79fdf ("net/bnxt: support flow filter ops")
Cc: stable@dpdk.org
Signed-off-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>
The number of queues provided by the application is not checked against
parser's supported maximum.
Fixes: 3d821d6fea ("net/mlx5: support RSS action flow rule")
Cc: stable@dpdk.org
Signed-off-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
Acked-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>
When an unsupported hash type is part of a RSS configuration structure, it
is silently ignored instead of triggering an error. This may lead
applications to assume that such types are accepted, while they are in fact
not part of the resulting flow rules.
Fixes: 078b8b452e ("net/mlx4: add RSS flow rule action support")
Cc: stable@dpdk.org
Signed-off-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
Acked-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>
IXGBE vector PMD was re-enabled for 32 bits, but only for gcc.
This commit enables it for icc too.
Fixes: e6672d2f0f ("net/ixgbe: enable ixgbe vector PMD for i686")
Cc: stable@dpdk.org
Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Due to missing ____cacheline_aligned definition compiler treats it as a
global variable replace it with proper cache alignment macro.
Fixes: 9e89010326 ("net/axgbe: add Rx/Tx setup")
Signed-off-by: Pavan Nikhilesh <pbhagavatula@caviumnetworks.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
A local variable was used without initialization and triggered a
coverity issue.
Is is fixed here, but there is no ill effect of not initializing
the variable in this case. 'rxq_interrupt_offset' is irrelevant
if 'rxq_interrupt_enable' is not set (the condition caught by
coverity).
Coverity issue: 268314
Fixes: fc2c8c0668 ("net/enic: use Tx completion index instead of messages")
Cc: stable@dpdk.org
Signed-off-by: John Daley <johndale@cisco.com>
Reviewed-by: Hyong Youb Kim <hyonkim@cisco.com>
thunderx pmd driver passes dev_info.max_rx_pktlen as
9200 (via rte_eth_dev_info_get()) to application.
But, when application tries to set MTU as
(9200 - sizeof(ethernet_header_t)) the operation fails
because of missing CRC and VLAN additions.
This patch fixes the following for thunderx pmd driver:
- Sets NIC_HW_MAX_FRS to 9216 (instead of 9200)
- Sets NIC_HW_MAX_MTU to 9190 (NIC_HW_MAX_FRS - ETH_HLEN
- ETHER_CRC_LEN - 2*VLAN_HLEN)
- Sets dev_info->max_rx_pkt_len to NIC_HW_MAX_MTU +
ETH_HLEN (instead of 9200)
- Allows rte_eth_dev_set_mtu() to pass if application
(like VPP) calls rte_eth_dev_set_mtu() before
rte_eth_dev_start() by putting appropriate check for
dev->data->dev_started
Fixes: 65d9804edc ("net/thunderx: support MTU configuration")
Cc: stable@dpdk.org
Signed-off-by: Nitin Saxena <nitin.saxena@caviumnetworks.com>
Acked-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
This patch fixes a segment fault in ixgbevf_vlan_offload_set( )
when a Rx queue with index < max_rx_queues is not setup.
For such queue, rxq = dev->data->rx_queues[i] is null pointer.
Fixes: 860a94d3c6 ("net/ixgbe: support VLAN strip per queue offloading in VF")
Signed-off-by: Wei Dai <wei.dai@intel.com>
Tested-by: Xueqin Lin <xueqin.lin@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
This patch adds missing supported Tx multi-segs offloading.
Fixes: 51215925a3 ("net/ixgbe: convert to new Tx offloads API")
Cc: stable@dpdk.org
Signed-off-by: Wei Dai <wei.dai@intel.com>
Tested-by: Lei Yao <lei.a.yao@intel.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
Add ixgbe MDIO lock/unlock and access APIs to read and write registers
using specific device address. This provides MDIO access to any devices
that are not associated with the autoprobed PHY.Export these APIs via
the map file
Signed-off-by: Shweta Choudaha <shweta.choudaha@att.com>
Reviewed-by: Chas Williams <chas3@att.com>
Reviewed-by: Luca Boccassi <bluca@debian.org>
Acked-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
Since we are storing the mem_zone address for each ring created,
we are freeing the same address multiple times.
For example the memory zone created for Rx is being freed during
Rx ring cleanup, AGG ring cleanup and CQ cleanup.
Avoid this by storing the memory zone address in RXQ instead and
free it as a part of queue_release dev_op.
In the same way do the same for TX queues as well.
Fixes: 51c87ebafc ("net/bnxt: add Tx queue create/destroy")
Cc: stable@dpdk.org
Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Memory allocated to hold VF filter info is not being freed currently.
This can cause potential memory leak.
Fixes: 7a5b087444 ("net/bnxt: support to add a VF MAC address")
Cc: stable@dpdk.org
Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
The fw_l2_filter_id for a ntuple filter is needed only for the lifetime
of the ntuple filter. Once the filter is free, reset the field.
The associated l2_filter will be freed as a part of its own cleanup.
Fixes: 5ef3b79fdf ("net/bnxt: support flow filter ops")
Cc: stable@dpdk.org
Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
The hwrm_queue_qportcfg command has been extended to determine
the COS queue that a Tx ring needs to use. This patch adds code
to determine the information from the FW and use it while
creating the Tx rings.
Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
bnxt_hwrm_clear_l2_filter needs to be called only if the filter type
is L2 and not otherwise.
Also check for the return value of bnxt_hwrm_clear_l2_filter().
Fixes: 5ef3b79fdf ("net/bnxt: support flow filter ops")
Cc: stable@dpdk.org
Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
We are wrongly freeing up a filter in the driver while it is still
configured in the HW. This can cause incorrect L2 filter id to be
used for filters created subsequently.
This filter will be cleared on cleanup anyway.
Fixes: 5ef3b79fdf ("net/bnxt: support flow filter ops")
Cc: stable@dpdk.org
Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Fix Rx checksum status for tunnel frames as seen by hardware.
Current code does not handle cases for tunnel frames correctly.
Fixes: 7ec39d8c52 ("net/bnxt: update status of Rx IP/L4 CKSUM")
Cc: stable@dpdk.org
Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
We are wrongly setting the Rx path flag while creating the ntuple filter.
It needs to be set for L2 or Exact Match filters only.
Fixes: 5ef3b79fdf ("net/bnxt: support flow filter ops")
Cc: stable@dpdk.org
Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Recent NIC models support overlay offload. The overlay offload
feature enables the following on the NIC.
- Rx/Tx checksum offloads for both inner and outer packets.
- Rx inner packet type classification.
- TSO.
- Inner RSS.
TX descriptors do not require any changes, except the header length
for TSO. The NIC parses outer/inner packets and performs offloads on
them as necessary. The header length for tunneled TSO includes both
inner and outer headers.
The NIC actually parses and performs the above for NVGRE as well. DPDK
currently has no offload flags for NVGRE, and the hardware has no
controls to individually enable tunnel types either. So do nothing for
now.
The driver enables overlay offload by default. Add a devargs
'disable-overlay=<0|1>' to allow the app to disable it.
Also update the enic guide doc.
Signed-off-by: Hyong Youb Kim <hyonkim@cisco.com>
Reviewed-by: John Daley <johndale@cisco.com>
When non IP packets are sent on TUN interface, the logic put Ipv6 as
protocol field in header. With the current patch, the check is modified
for ipv4, ipv6 and non ip.
Fixes: 204d026a39 ("net/tap: support tun")
Suggested-by: Ophir Munk <ophirmu@mellanox.com>
Signed-off-by: Vipin Varghese <vipin.varghese@intel.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
Fixes: 4ec1fc3ba8 ("net/sfc: add basic stubs for RSS support on driver attach")
Cc: stable@dpdk.org
Signed-off-by: Ivan Malov <ivan.malov@oktetlabs.ru>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Modified enic_del_mac_address() to get a return value from the vnic layer.
Reused the .mac_addr_add and .mac_addr_del callbacks code to implement
primary mac address handler.
Signed-off-by: David Marchand <david.marchand@6wind.com>
Acked-by: Hyong Youb Kim <hyonkim@cisco.com>
This patch allows to use another MAC address than the one coming
with the NIC by default.
The change requires to tell the vNIC after writing into the port
BAR space. The change will fail if the port is enabled and the
vNIC does not support a live address change.
Signed-off-by: Alejandro Lucero <alejandro.lucero@netronome.com>
According to
commit 315ee8374e ("doc: reduce initial offload API rework scope
to drivers")
All PMDs should have moved to the new offloads API. Therefore it is safe
to remove the new->old convert helps.
The old->new helpers will remain to support application which still use
the old API.
Signed-off-by: Shahaf Shuler <shahafs@mellanox.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
Acked-by: Thomas Monjalon <thomas@monjalon.net>
The IFCVF vDPA (vhost data path acceleration) driver provides support for
the Intel FPGA 100G VF (IFCVF). IFCVF's datapath is virtio ring compatible,
it works as a HW vhost backend which can send/receive packets to/from
virtio directly by DMA.
Different VF devices serve different virtio frontends which are in
different VMs, so each VF needs to have its own DMA address translation
service. During the driver probe a new container is created, with this
container vDPA driver can program DMA remapping table with the VM's memory
region information.
Key vDPA driver ops implemented:
- ifcvf_dev_config:
Enable VF data path with virtio information provided by vhost lib,
including IOMMU programming to enable VF DMA to VM's memory, VFIO
interrupt setup to route HW interrupt to virtio driver, create notify
relay thread to translate virtio driver's kick to a MMIO write onto HW,
HW queues configuration.
- ifcvf_dev_close:
Revoke all the setup in ifcvf_dev_config.
Live migration feature is supported by IFCVF and this driver enables
it. For the dirty page logging, VF helps to log for packet buffer write,
driver helps to make the used ring as dirty when device stops.
Because vDPA driver needs to set up MSI-X vector to interrupt the
guest, only vfio-pci is supported currently.
Signed-off-by: Xiao Wang <xiao.w.wang@intel.com>
Signed-off-by: Rosen Xu <rosen.xu@intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
If we want a virtio device to work in vDPA (vhost data path acceleration)
mode, we could add a "vdpa=1" devarg for this device to specify the mode.
This patch let virtio pmd skip device probe when detecting this parameter.
Signed-off-by: Xiao Wang <xiao.w.wang@intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
This patch adds APIs to support container create/destroy and device
bind/unbind with a container. It also provides API for IOMMU programing
on a specified container.
A driver could use "rte_vfio_container_create" helper to create a new
container from eal, use "rte_vfio_container_group_bind" to bind a device
to the newly created container. During rte_vfio_setup_device the container
bound with the device will be used for IOMMU setup.
Signed-off-by: Junjie Chen <junjie.j.chen@intel.com>
Signed-off-by: Xiao Wang <xiao.w.wang@intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
Acked-by: Anatoly Burakov <anatoly.burakov@intel.com>
Currently eal vfio framework binds vfio group fd to the default
container fd during rte_vfio_setup_device, while in some cases,
e.g. vDPA (vhost data path acceleration), we want to put vfio group
to a separate container and program IOMMU via this container.
This patch extends the vfio_config structure to contain per-container
user_mem_maps and defines an array of vfio_config. The next patch will
base on this to add container API.
Signed-off-by: Junjie Chen <junjie.j.chen@intel.com>
Signed-off-by: Xiao Wang <xiao.w.wang@intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
Acked-by: Anatoly Burakov <anatoly.burakov@intel.com>
Duplicated includes are found with devtools/check-dup-includes.sh
Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
If start is set and a device before it matches the data,
this device is returned.
This induces potentially infinite loops.
Fixes: c7fe1eea8a ("bus: simplify finding starting point")
Cc: stable@dpdk.org
Signed-off-by: Gaetan Rivet <gaetan.rivet@6wind.com>
If start is set, and a device before it matches the data
passed for comparison, then this first device is returned.
This induces potentially infinite loops.
Fixes: c7fe1eea8a ("bus: simplify finding starting point")
Cc: stable@dpdk.org
Signed-off-by: Gaetan Rivet <gaetan.rivet@6wind.com>