Fix null pointer dereferences in qede_vxlan_enable() and
qede_conf_udp_dst_port()
Coverity issue: 195010, 195012, 198439
Fixes: e0947ed912 ("net/qede: add support for VXLAN UDP port config over VF")
Fixes: 739a5b2f2b ("net/qede/base: use passed ptt handler")
Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
Fix division by zero in calculating the regpair elements per page
Remove unused API ecore_cxt_free_proto_ilt()
Coverity issue: 1379423, 1379428
Fixes: 22d07d939c ("net/qede/base: update")
Cc: stable@dpdk.org
Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
Appropriately release the ptt[PF translation table] handler that is
acquired in error case
Fixes: e0947ed912 ("net/qede: add support for VXLAN UDP port config over VF")
Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
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>
If tunneled bit is set in the HW descriptor, the l4_hdr_type bits
describe the inner packet.
Fixes: ea16068c00 ("net/mlx5: fix L4 packet type support")
Cc: stable@dpdk.org
Reported-by: Xueming Li <xuemingl@mellanox.com>
Signed-off-by: Yongseok Koh <yskoh@mellanox.com>
Acked-by: Shahaf Shuler <shahafs@mellanox.com>
Removing a flow director rule with a drop action ends by not removing it
due to a missing verbs drop specification in the conversion process between
the flow director and generic flow API.
Fixes: 4c3e9bcdd5 ("net/mlx5: support flow director")
Signed-off-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
More error reported for device reset in release() [1],
when device pass-through to the guest, host kernel crash on guest exit.
Removing the reset completely.
This is close to reverting commit b58eedfc7d [2], taking into account
previous fix to remove reset in open as well [3], but not exactly same.
With latest code, interrupts are enabled in uio open() callback and
disabled in uio release() callback, so when a DPDK application exit
device interrupts are disabled. Previously interrupts were only enabled
once in igb_uio module insert and disabled in module removal.
Also with latest code device set as bus master in open() and master
cleared in release(), clearing bus master should prevent further DMA
which was one of the target of the initial patch.
The initial intention was also to reset the device to be sure it has
been left in proper state, but currently that part is missing because of
reported problem(s).
Still igb_uio should be safer comparing to the pre b58eedfc7d state.
[1]
http://dpdk.org/ml/archives/dev/2017-November/081459.html
[2]
b58eedfc7d ("igb_uio: issue FLR during open and release of device file")
[3]
f73b38e924 ("igb_uio: remove device reset in open")
Fixes: e3a64deae2 ("igb_uio: prevent reset for bnx2x devices")
Fixes: b58eedfc7d ("igb_uio: issue FLR during open and release of device file")
Cc: stable@dpdk.org
Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
This is a wrapper to Linux kernel get_maintainer.pl file and only
supports parsing MAINTAINERS file (no git fallback etc..)
Requires DPDK_GETMAINTAINER_PATH devel config option set, please check
devtools/load-devel-config.
DPDK_GETMAINTAINER_PATH should be full path to the get_maintainer.pl
script, like:
DPDK_GETMAINTAINER_PATH=~/linux/scripts/get_maintainer.pl
Can be used individually:
./devtools/get-maintainer.sh <my.patch>
Or via git send-email, to add maintainers automatically:
git send-email --to-cmd ./devtools/get-maintainer.sh \
--cc dev@dpdk.org HEAD -4
Currently there is an ugly workaround to be able to use Linux script out
of the kernel tree, later better method can replace it.
Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
The initial version of the script had some limitations:
- cannot work on a non-clean workspace
- environment variables are not documented
- no compilation log in case of failure
- return success even it abi is incompatible
This patch addresses these issues and rework the code.
Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
Acked-by: Neil Horman <nhorman@tuxdriver.com>
The Mellanox drivers were requiring MOFED at compilation time.
It is now possible to use the upstream rdma-core package.
So the dependency option is renamed in the build tool.
Fixes: 43e9d9794c ("net/mlx5: support upstream rdma-core")
Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Acked-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
When using Python 3, dpdk-devbind.py fails to detect modules other than
igb_uio.
Fixes: bb9f408550 ("tools: support binding to built-in kernel modules")
Signed-off-by: Omri Mor <omrimor2@illinois.edu>
In func locate_pmd_entries(), pointer 'new' returned from call to func
'calloc' may be NULL. It is dereferenced without null point check.
Signed-off-by: Yong Wang <wang.yong19@zte.com.cn>
The eventdev API was introduced in DPDK 17.05 release.
Since then it
- has been reviewed and iterated for 17.08, 17.11 releases
- three drivers were implemented using the API.
- introduced another subsystem like service core and ethdev-eventdev Rx
adapter APIs to abstract the difference between HW and SW
eventdev implementations in a transparent way.
- had extensive use by the app/test-eventdev/ and
examples/eventdev_pipeline_sw_pmd/
I believe the API is now stable and the EXPERIMENTAL label
should be removed.
Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Acked-by: Gage Eads <gage.eads@intel.com>
Acked-by: Thomas Monjalon <thomas@monjalon.net>
Add programmer's guide doc to explain the use of the
Event Ethernet Rx Adapter library.
Signed-off-by: Nikhil Rao <nikhil.rao@intel.com>
Acked-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
The Flow Classify Library Programmers Guide documents
librte_flow_classify.
The Flow Classify Sample Application Guide documents the
flow_classify sample application which is used to
demonstrate the use of the Flow Classify Library,
librte_flow_classify.
Signed-off-by: Bernard Iremonger <bernard.iremonger@intel.com>
Acked-by: John McNamara <john.mcnamara@intel.com>
As the rte_flow is a new complex module in the DPDK.
In order to ease developers in to using this feature
it was suggested to supply a simple howto doc.
Signed-off-by: Ori Kam <orika@mellanox.com>
Acked-by: John McNamara <john.mcnamara@intel.com>
This application shows a simple usage of the
rte_flow API for hardware filtering offloading.
In this demo we are filtering specific IP to
specific target queue, while sending all the
rest of the packets to other queue.
Signed-off-by: Ori Kam <orika@mellanox.com>
All PCI functionality should be hidden from apps via the PCI bus driver,
the EAL and individual device drivers. Therefore remove the inclusion of
rte_pci.h from sample apps.
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
When defining two failsafe devices in testpmd the port numbers of the
failsafe devices may not be consecutive.
For example: if failsafe device includes a PCI device and a TAP device
then failsafe port numbers would be 0 and 3.
Port 0 - failsafe #1 device
Port 1 - PCI #1 device
Port 2 - TAP #1 device
Port 3 - failsafe #2 device
Port 4 - PCI #2 device
Port 5 - TAP #2 device
If forwarding is defined between the failsafe devices including a peer
address the forwarding should be between peer addresses of ports 0
and 3. Instead testpmd establishes forwarding between peer addresses
of consecutive ports 0 and 1. This commit fixes this bug.
Fixes: af75078fec ("first public release")
Cc: stable@dpdk.org
Signed-off-by: Ophir Munk <ophirmu@mellanox.com>
Signed-off-by: Raslan Darawsheh <rasland@mellanox.com>
Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
The printed time values presented in TSC is not straight forward
showing the performance difference. And if the high resolution
counter is not enabled, time value is too small to show the actual
performance (e.g. "1 - 1" seems the same but in fact the perfomance
diffs by 50% or more).
With the performance difference ratio caculated and printed, it'll be
easier for people to read and compare the performance between
rte_memcpy() and memcpy().
Since the TSC values' units may diff a lot on different platforms,
the total execution time of aligned/unaligned memcpy test are
provided to allow comparation between platforms.
Signed-off-by: Herbert Guan <herbert.guan@arm.com>
Acked-by: Jianbo Liu <jianbo.liu@arm.com>
Error can be reproduce if we run pmd_perf_autotest with more then
one device in such way:
RTE>>set_rxtx_sc poll_before_xmit
RTE>>pmd_perf_autotest
if first burst was value less than MAX_PKT_BURST in the end we overwrite
pkts_burst table for rx which was supposed for another interface.
Fixes: 002ade70e9 ("app/test: measure cycles per packet in Rx/Tx")
Cc: stable@dpdk.org
Signed-off-by: Daniel Mrzyglod <danielx.t.mrzyglod@intel.com>
Acked-by: Michal Jastrzebski <michalx.k.jastrzebski@intel.com>
This fixes the use of an never defined PPC64 define in
ret_pci_get_iommu_class.
Fixes: b48e0e2d9c ("bus/pci: fix IOMMU class for sPAPR")
Signed-off-by: Jonas Pfefferle <jpf@zurich.ibm.com>
Use specialized dynamic log type for vdev bus logging.
Suggested-by: Gaetan Rivet <gaetan.rivet@6wind.com>
Suggested-by: Shreyansh Jain <shreyansh.jain@nxp.com>
Signed-off-by: Jianfeng Tan <jianfeng.tan@intel.com>
Move the vdev bus from lib/librte_eal to drivers/bus.
As the crypto vdev helper function refers to data structure
in rte_vdev.h, so we move those helper function into drivers/bus
too.
Signed-off-by: Jianfeng Tan <jianfeng.tan@intel.com>
Remove rte_cryptodev_create_vdev() for duplication.
Signed-off-by: Jianfeng Tan <jianfeng.tan@intel.com>
Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Introduce a new iommu-support parameter to Vhost PMD that
passes the RTE_VHOST_USER_IOMMU_SUPPORT flag at vhost
device register time.
Default value is 0, meaning that IOMMU support is disabled
if not specified explicitly.
Example to enable IOMMU support for a given device:
--vdev 'net_vhost0,iface=/tmp/vhost-user2,iommu-support=1'
Signed-off-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Acked-by: Yuanhan Liu <yliu@fridaylinux.org>
Tested-by: Mark Kavanagh <mark.b.kavanagh@intel.com>
Acked-by: Mark Kavanagh <mark.b.kavanagh@intel.com>
Qemu versions from v2.7.0 to v2.9.0 have their reply-ack protocol
feature implementation broken with multiqueue. The reply-ack
protocol feature is optional except for IOMMU feature.
This patch introduce a new RTE_VHOST_USER_IOMMU_SUPPORT flag to
enable VIRTIO_F_IOMMU_PLATFORM virtio feature.
By default, the IOMMU support is now disabled.
Signed-off-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Acked-by: Yuanhan Liu <yliu@fridaylinux.org>
Tested-by: Mark Kavanagh <mark.b.kavanagh@intel.com>
Acked-by: Mark Kavanagh <mark.b.kavanagh@intel.com>
If the application has disabled VIRTIO_F_IOMMU_PLATFORM, disable
VHOST_USER_PROTOCOL_F_REPLY_ACK protocol feature that is only
mandatory with IOMMU for now.
This is done to provide a way for the application to support
multiqueue with old Qemu versions (v2.7.0 to v2.9.0) that have
reply-ack feature broken.
Signed-off-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Acked-by: Yuanhan Liu <yliu@fridaylinux.org>
Tested-by: Mark Kavanagh <mark.b.kavanagh@intel.com>
Acked-by: Mark Kavanagh <mark.b.kavanagh@intel.com>
This patch enhances the Rx packet type offload to also report the L4
protocol information in the hw ptype filled by the PMD for each received
packet.
Signed-off-by: Moti Haimovsky <motih@mellanox.com>
Acked-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
In open_single_tx_pcap there is a call to pcap_open_dead which calls
malloc to create and return a pcap_t. That object is never freed in
this case. Other places it is freed by passing it back similar to the
way the pcap_dumper_t is in this case.
The pcap_t is only used to create the pcap_dumper_t and is never used
again so freeing it here is safe and much simpler than trying to pass
it back to be freed in eth_dev_stop along with the other
pcap_t/pcap_dumper_t objects.
Fixes: 4c173302c3 ("pcap: add new driver")
Cc: stable@dpdk.org
Signed-off-by: Stefan Baranoff <sbaranoff@gmail.com>
Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>
This patch removes the forward declaration of eth_kni_drv
in rte_eth_kni.c; this forward declaration was made unnecessary
by commit 050fe6e9ff
("drivers/net: use ethdev allocation helper for vdev"), which
removes the usage of eth_kni_drv in the eth_kni_create() method.
Fixes: 050fe6e9ff ("drivers/net: use ethdev allocation helper for vdev")
Cc: stable@dpdk.org
Signed-off-by: Rami Rosen <rami.rosen@intel.com>
Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>
While the PMD avoids from creating hash RXQ with no hash fields and
array of queues after the port was already started, it lacks such
protection when re-creating the flows after the port restarts.
This may lead to inconsistent behavior for flows depending if they were
created before or after the port start.
Fixes: 8086cf08b2 ("net/mlx5: handle RSS hash configuration in RSS flow")
Signed-off-by: Shahaf Shuler <shahafs@mellanox.com>
Acked-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
When using VFIO and MSIX interrupt mode, cannot get Rx interrupts. Because
when enabling the interrupt vectors, the offset is computed in a way which
only supports IGB_UIO. But the offset should be different when using VFIO.
This patch fixes this issue.
Fixes: c3cd3de0ab ("igb: enable Rx queue interrupts for PF")
Cc: stable@dpdk.org
Signed-off-by: Xiaoyun Li <xiaoyun.li@intel.com>
Acked-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
Check return value of fseek and exit if non zero.
Coverity issue: 143435
Fixes: bab16ddaf2 ("examples/flow_classify: add sample application")
Signed-off-by: Bernard Iremonger <bernard.iremonger@intel.com>
Acked-by: Jasvinder Singh <jasvinder.singh@intel.com>
With -f-strict-aliasing enabled by default from -O2, gcc > 5.x gives
undefined behavior in port_groupx4 in ARM. 'pn' and 'pnum' are
two different pointers pointing to same chunk of memory and
with -f-strict-aliasing the pointers are assumed to be pointing to
different memory and compiler reorders instructions that depend on
pnum and pn. This breaks port grouping algorithm.
This patch eliminates the above problem by introducing a compiler
barrier between the instructions that depend on pnum, pn and lp.
Fixes: 569b290cdb ("examples/l3fwd: add NEON implementation")
Cc: stable@dpdk.org
Signed-off-by: Guduri Prathyusha <gprathyusha@caviumnetworks.com>
Acked-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Acked-by: Jianbo Liu <jianbo.liu@arm.com>
To group consecutive packets with same destination port in bursts of 4
neon intrinsic data types dp1 and dp2 are calculated such that if
dst_port[]={a,b,c,d,e,f,g,h,i...} dp1 should contain: <a,b,c,d> and
dp2 should contain: <b,c,d,e> in the first iteration. dp1 should
be <e,f,g,h> and dp2 should be <f,g,h,i> in the next iteration.
Whereas the existing code incorrectly calculates dp1 as <d,e,f,g> from
second iteration.
This patch fixes the incorrect ARM NEON instructions on dp1.
Fixes: 569b290cdb ("examples/l3fwd: add NEON implementation")
Cc: stable@dpdk.org
Signed-off-by: Guduri Prathyusha <gprathyusha@caviumnetworks.com>
Acked-by: Jianbo Liu <jianbo.liu@arm.com>
Acked-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Implement the same hash functions with crc32 on arm platform.
Signed-off-by: Jianbo Liu <jianbo.liu@linaro.org>
Acked-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
Hash table function will check if the input bucket size is power of 2,
so the parameter should be rounded up before sending to the creating
function.
Signed-off-by: Jianbo Liu <jianbo.liu@arm.com>
Acked-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>