132 Commits

Author SHA1 Message Date
Matthew Smith
19d4ecddeb backport mlx patch for DPDK >= 18.05
Memory allocation changed in DPDK 18.05. The mlx4 and mlx5
PMDs did not support using externally allocated memory.

The patch for mlx5 was generated by Mellanox. That patch was
modified to apply to the mlx4 PMD and tested on Microsoft
Azure.

Patches were originally tested and used with VPP master
(prerelease 18.10). Then backported to VPP stable/1807.

Change-Id: I883e0d796e59702731bec06c96210f0b134188db
Signed-off-by: Matthew Smith <mgsmith@netgate.com>
2018-08-29 13:30:37 -05:00
Matthew Smith
7b13e0df70 ixgbe link update patch for DPDK 18.05
Add patch for DPDK 18.05 that was previously applied
to DPDK 18.02.1. Issue with ixgbe on x550 SFP+ still
exists.

Bug report submitted to DPDK:

https://bugs.dpdk.org/show_bug.cgi?id=69

Change-Id: I9b005709ddf2a72192b1288ba8b4bac85bf12685
Signed-off-by: Matthew Smith <mgsmith@netgate.com>
2018-07-08 11:21:45 +00:00
Damjan Marion
b0e0894c9f dpdk: bump default DPDK version to 18.05
Change-Id: I739d3e6c25efe8d32b2f4a60557c644edfe958e0
Signed-off-by: Damjan Marion <damarion@cisco.com>
2018-07-02 15:03:31 +00:00
Marco Varlese
6c78436370 Update to latest stable DPDK release (18.02.2)
Change-Id: I00b0e4d7f7b597760a898c895b1a80bfac3a47fb
Signed-off-by: Marco Varlese <marco.varlese@suse.com>
2018-06-26 17:30:13 +00:00
Matthew Smith
76440d9033 ixgbe patch for link status updates
An x550 with SFP+ interfaces attached to some switches can
have problems bringing the port up.

After configuring the link, there is a wait for 500 ms for
the link to come up. Some switches don't bring their ports up
that quickly. So the link is never observed to come up and is
reconfigured again the next time dpdk_update_link_state() is
called. Subsequent attempts time out also indefinitely.

Instead of waiting through 5 iterations of a 100 ms delay, wait
through 10 iterations. The i40e PMD does this when updating
link status.

This issue & patch will be reported to Intel so this or
some better solution can be applied upstream in the future.

Change-Id: I16d706a2790e51d695edc43c0ca17f1eff1dcf5e
Signed-off-by: Matthew Smith <mgsmith@netgate.com>
2018-06-17 12:32:54 +00:00
Damjan Marion
0e969ac843 Add support for DPDK 18.05
Change-Id: I205932bc727c990011bbbe1dc6c0cf5349d19806
Signed-off-by: Damjan Marion <damarion@cisco.com>
2018-06-07 05:48:49 +00:00
Dave Barach
473f46135c Configure or deduce CLIB_LOG2_CACHE_LINE_BYTES (VPP-1064)
Added configure argument "--with-log2-cache-line-bytes=5|6|7|auto"
AKA 32, 64, or 128 bytes, or use the inferred value from the build host.

produces build-xxx/vpp/vppinfra/config.h, which .../src/vppinfra/cache.h

Kernels which implement the following pseudo-file (aka x86_64) are
easy: /sys/devices/system/cpu/cpu0/cache/index0/coherency_line_size

Otherwise, extract the cpuid from /proc/cpuinfo and map it to the
cache line size.

Change-Id: I7ff861e042faf82c3901fa1db98864fbdea95b74
Signed-off-by: Dave Barach <dave@barachs.net>
Signed-off-by: Nitin Saxena <nitin.saxena@cavium.com>
2018-06-04 22:24:48 +00:00
Sirshak Das
6495c4b8a1 Fix clang compilation on aarch64: replace -pie with -fPIE for dpdk compilation.
Fixes clang error: argument unused during compilation: '-pie'
by replacing it with -fPIE

Change-Id: Ic89a5e325e019d4d794d35556a07ebcf0b718dd3
Signed-off-by: Sirshak Das <sirshak.das@arm.com>
Reviewed-by: Brian Brooks <brian.brooks@arm.com>
Reviewed-by: Honnappa Nagarahalli <honnappa.nagarahalli@arm.com>
2018-05-30 08:23:07 +00:00
Bin Huang
096e6be4bd Fix VPP DPDK build failure with Mellanox NIC on aarch64
This compile issue was first reported by Sirshak Das in following thread:
https://lists.fd.io/g/vpp-dev/message/8384

The issue was caused by auto-config shell script auto-config-h.sh regard
quotation mark "" as $CROSS prefix for $CC when CROSS is empty.

Change-Id: Ied535c6d18c4dffacbddabc3ad2087dffe19438d
Signed-off-by: Bin Huang <huangbin.mails@gmail.com>
2018-05-25 11:45:21 +00:00
Rui Cai
60bd302827 dpdk: Add build related keywords for failsafe PMD
Added build related keywords for TAP, FAILSAFE PMD
and also added some missing keywords for mlx4 PMD

This is part of initial effort to enable vpp running over
dpdk on failsafe PMD in Microsoft Azure (1/4).

Change-Id: I2aebf209fbc6db030185f41971b51a593a003a3a
Signed-off-by: Rui Cai <rucai@microsoft.com>
2018-05-12 07:13:46 +00:00
Damjan Marion
b66be270c7 dpdk: fix building debs from stable dpdk tarballs (VPP-1259)
Change-Id: I9585603e9fa1904658d84d226bd50370f1dbc889
Signed-off-by: Damjan Marion <damarion@cisco.com>
2018-04-26 18:05:00 +00:00
Marco Varlese
4fcfbeaf02 DPDK: CVE-2018-1059
For further details, please see
https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2018-1059

Change-Id: Icd207f129e5fdcc3d9d8ad56ba5a368926f2804d
Signed-off-by: Marco Varlese <marco.varlese@suse.com>
2018-04-24 11:23:37 +00:00
Lee Roberts
fde0929d93 Assign correct NUMA node for DPDK crypto devices
DPDK rte_cryptodev_socket_id() is returning zero for QAT devices.
Apply DPDK patch where correct NUMA node can be obtained with pci_dev->device.numa_node.

Change-Id: I1c7a77bb13e2db8615189e97b67d68d043127787
Signed-off-by: Lee Roberts <lee.roberts@hpe.com>
2018-03-10 11:12:45 +00:00
Amir Zeidner
0e7fe4fddb Set DPDK_MLX4_PMD and DPDK_MLX5_PMD compile with default dlopen links
dlopen linkage allow more transparent use for Mellanox nics.
Mellanox shared library librte_pmd_mlx5/4_glue.so* placed in LD_LIBRARY_PATH
At run time Mellanox code will be loaded only when Mellanox nics explicty used.
i.e if VPP is used with other vendor Mellanox code is not loaded.

Change-Id: Ib05bdbfc4cbb6e447c67186c98361f9c5b447140
Signed-off-by: Amir Zeidner <amirzei@mellanox.com>
2018-03-05 18:40:41 +00:00
Damjan Marion
3473e49387 dpdk: Add option to specify cache line size for dpdk build
Change-Id: Ib3361eded05babfc17ead28af7d252e7503ce141
Signed-off-by: Damjan Marion <damarion@cisco.com>
2018-02-24 19:21:19 +01:00
Marco Varlese
1355fcd36f DPDK: disabling DPAA since broken for 18.02
Change-Id: I1e0cea8e7ea6d8a777ca38abb61f4c093f29c722
Signed-off-by: Marco Varlese <marco.varlese@suse.com>
2018-02-23 14:03:18 +00:00
Damjan Marion
66e0ce8dab dpdk: fix building dpdk debug images with dpdk 18.02
Looks like bug in ipsec-mb library when DEBUG=yes is passed
so simply we stop doing that.

Change-Id: Ifedd6d8a2aecf5af902ab4fa80ef197aebd5f829
Signed-off-by: Damjan Marion <damarion@cisco.com>
2018-02-21 19:22:51 +00:00
Damjan Marion
1d3ab72941 dpdk: bump to 18.02
Change-Id: I3764f57a4b8df96d6bd20753b86fc0119d833bd9
Signed-off-by: Damjan Marion <damarion@cisco.com>
2018-02-19 13:21:09 +00:00
Damjan Marion
07510dd1a8 dpdk: add support for DPDK 18.02, deprecate 17.08
17.11 is still default.

Change-Id: I524d232579db8a59c717c5d760398b6b7f811d03
Signed-off-by: Damjan Marion <damarion@cisco.com>
2018-02-15 12:38:16 +00:00
Matthew Smith
a5fb2cf8be Patch ENA PMD to skip setting tx flags in rx path
On rx, the ENA PMD sets tx offload flags based on the
received packet's l4 protocol. This means you need
to turn off those offloads for every packet if you
encapsulate packets arriving on an interface using
that PMD. Disable this behavior.

Change-Id: Icae9f32e3d292d767da440ae5c1280902bdaa083
Signed-off-by: Matthew Smith <mgsmith@netgate.com>
2018-01-09 20:22:14 +00:00
Ed Warnicke
798150b195 Provide useful output when installed vpp-dpdk version is incorrect
Change-Id: Icb931de82cb5969fa4976611629e2f882c720a99
Signed-off-by: Ed Warnicke <eaw@cisco.com>
2017-12-18 14:19:15 +00:00
Sergio Gonzalez Monroy
99214ce0ae dpdk/ipsec: multiple fixes
- fix ESP transport mode
- safely free crypto sessions
- use rte_mempool_virt2phy/rte_mempool_virt2iova
- align DPDK QAT capabilities for IPsec usage (DPDK 17.08)
- reserve 16B for aad (reference cryptodev doc)

Change-Id: I3822a7456fb5a255c767f5a44a429f91a140fe64
Signed-off-by: Sergio Gonzalez Monroy <sergio.gonzalez.monroy@intel.com>
2017-12-05 18:18:58 +00:00
Damjan Marion
7f0d1d3471 dpdk: bump to 17.11
Change-Id: I84fafa369c6f16295e1c24d9712de2229bf78a91
Signed-off-by: Damjan Marion <damarion@cisco.com>
2017-11-30 12:19:36 +00:00
Damjan Marion
de3ff7a7f4 Revert "Dpdk: 17.08 tarball updated 11/27"
DPDK tarball was changed by mistake and now it is reverted back.

This reverts commit 3d786efcb087533320e89f80077127fc507cfd99.

Change-Id: I1a07b96fbc3f4fe13bb4a5c401036cae4ac5d346
Signed-off-by: Damjan Marion <damarion@cisco.com>
2017-11-29 11:30:39 +00:00
Ed Kern
3d786efcb0 Dpdk: 17.08 tarball updated 11/27
The dpdk package posted on static.dpdk.org for 17.08
was updated 11/27. This updates the checksum thats
statically included in makefile. Looks like they
also changed the dir structure to add -stable.
fast.dpdk.org has issues with its mirrors being in
sync...changing to static.dpdk.org for now

Change-Id: Id81e328b07873700ae3f76e1ca819f94f26f38c8
Signed-off-by: Ed Kern <ejk@cisco.com>
2017-11-29 09:56:28 +00:00
Damjan Marion
45b485099d dpdk: add support for DPDK 17.11
Also remove DPDK 17.05 support.

Change-Id: I4f96cb3f002cd90b12d800d6904f2364d7c4e270
Signed-off-by: Damjan Marion <damarion@cisco.com>
2017-11-20 11:41:22 +00:00
Damjan Marion
9324284af8 Reduce number of parallel builds
With recent introduction of C++ code required memory for each compiler
instance has significantly increased causing build issues.

Currently build system spins 2 compiler instances per logical CPU core.

As CPU can hardly execute more than one thread at a time, it should be
pretty safe to change that formula so it doesn't multiply number of cpu
cores by 2 and such change will signifucantly reduce amount of memory
needed.

Change-Id: Ic829fff6e45f4caf98a6d9c1c98c53ed003039ef
Signed-off-by: Damjan Marion <damarion@cisco.com>
2017-11-13 20:09:23 +01:00
Sergio Gonzalez Monroy
6184db357d dpdk: build nasm from source
As not all distros have the minimum required nasm version (2.12.01)
available, build nasm from sources when building Intel IPsec MB library.

Change-Id: Iaa9da87f612c0f84da5704162c3bf430b3351076
Signed-off-by: Sergio Gonzalez Monroy <sergio.gonzalez.monroy@intel.com>
2017-11-05 11:35:12 +00:00
Steve Shin
268e64e312 dpdk: patch to support bonded interface for MLX NIC
At present, creating bonding devices using --vdev is broken for PMD like
mlx5 as it is neither UIO nor VFIO based and hence PMD driver is unknown
to find_port_id_by_pci_addr().

This DPDK patch fixes parsing PCI ID from bonding device params by verifying
it in RTE PCI bus, rather than checking dev->kdrv.

Change-Id: If575f63ef31733102566610d769ddd212d74736a
Signed-off-by: Steve Shin <jonshin@cisco.com>
2017-10-10 16:35:35 +00:00
Sergio Gonzalez Monroy
db93cd9713 dpdk/ipsec: rework plus improved cli commands
This patch reworks the DPDK ipsec implementation including the cryptodev
management as well as replacing new cli commands for better usability.

For the data path:
 - The dpdk-esp-encrypt-post node is not necessary anymore.
 - IPv4 packets in the decrypt path are sent to ip4-input-no-checksum instead
 of ip4-input.

The DPDK cryptodev cli commands are replaced by the following new commands:
 - show dpdk crypto devices
 - show dpdk crypto placement [verbose]
 - set dpdk crypto placement (<device> <thread> | auto)
 - clear dpdk crypto placement <device> [<thread>]
 - show dpdk crypto pools

Change-Id: I47324517ede82d3e6e0e9f9c71c1a3433714b27b
Signed-off-by: Sergio Gonzalez Monroy <sergio.gonzalez.monroy@intel.com>
2017-10-05 09:54:34 +00:00
Thomas F Herbert
4b0ac82a73 Add option to build without multi-buffer crypto.
JIRA VPP-498

This patch also allows RPMs to be built without multi-
buffer crypto for some RPM based downstream distros that
don't have sufficiently new nasm or don't have an USA
export license for multi-buffer crypto.

The default is to build WITH multi-buffer crypto
for x86-64. This patch allows optional building without
multi-buffer crypto.

To build without multi-buffer crypto, set the AESNI
environment variable to n.
To build rpm packages without multi-buffer crypto,
build the rpms with the option turned off.

make build AESNI=n

or..

make pkg-rpm --without aesni

---How to test this patch on a Centos build.---

Build as above and verify that nasm isn't executed during
the build process.
vpp may be installed and the dpdk plugin may be inspected to
verify that the multi-buffer code isn't present.

Change-Id: I8c5cfd4cdd9eb2b96772a687eaa54560806e001b
Signed-off-by: Thomas F Herbert <therbert@redhat.com>
2017-09-12 18:42:32 +00:00
Brian Brooks
a7191840be Improved arm64 chip detection
Use ARMv8 Main ID Register (exposed thru /proc/cpuinfo) to identify
the CPU implementor and part number. For further details, see the
ARMv8 ARM D7.2.66.

Change-Id: I2b0d0b165cda4ab9fc57c645af90e9e354b73f44
Signed-off-by: Brian Brooks <brian.brooks@arm.com>
Signed-off-by: Jeremy Linton <jeremy.linton@arm.com>
Signed-off-by: Ola Liljedahl <ola.liljedahl@arm.com>
Reviewed-by: Song Zhu <song.zhu@arm.com>
2017-09-11 10:13:42 +00:00
Brian Brooks
9746552e98 Native arm64 build: dpdk/Makefile change
With this change, the status of `make build':

  Huawei D02, Linux 4.4.0, gcc 5.4.1 - success
  AMD Seattle, Linux 4.4.6, gcc 5.3.1 - compiler ICEs
  Cavium ThunderX, Linux 4.4.49, gcc 5.4.0 - success

Before:

  Huawei D02, Linux 4.4.0, gcc 5.4.1 - fail
  AMD Seattle, Linux 4.4.6, gcc 5.3.1 - fail
  Cavium ThunderX, Linux 4.4.49, gcc 5.4.0 - success

Change-Id: I49db34a33f9ca0725c7511d4f796706892b5b2da
Signed-off-by: Brian Brooks <brian.brooks@arm.com>
2017-08-31 10:46:07 +00:00
Damjan Marion
206b2d4342 dpdk: bump to dpdk 17.08, remove support for dpdk 17.02
Change-Id: I674fb1212e48693939045523df085326a4dd1809
Signed-off-by: Damjan Marion <damarion@cisco.com>
2017-08-25 20:27:38 +00:00
Sergio Gonzalez Monroy
acdc306093 dpdk: required changes for 17.08
DPDK 17.08 breaks ethdev and cryptodev APIs.

Address those changes while keeping backwards compatibility for
DPDK 17.02 and 17.05.

Change-Id: Idd6ac264d0d047fe586c41d4c4ca74e8fc778a54
Signed-off-by: Sergio Gonzalez Monroy <sergio.gonzalez.monroy@intel.com>
2017-08-25 14:24:53 +00:00
Damjan Marion
5f22f4ddde dpdk: define MACHINE before it is used
This fixes build on non-x86 platforms like arm64.

Change-Id: I7ff5df92f89e34c27889d82f35924dc28cde8c39
Signed-off-by: Damjan Marion <damarion@cisco.com>
2017-08-22 00:42:18 +00:00
Damjan Marion
844e0eba77 dpdk: disable tun/tap PMD
Beside the fact that we don't need it, it fails to build on ARM64.

Change-Id: Iefae8bf234b588d8005df5e053b9152b6611929c
Signed-off-by: Damjan Marion <damarion@cisco.com>
2017-08-21 22:27:08 +02:00
Marco Varlese
8ddd518f9a Previous version was still downloading, unpacking and building IPSEC / AES
libraries.

This patch addresses the misbehaviour.

Change-Id: I41f1ece3ca21c5a8f2c95533ed3d77a535233ea6
Signed-off-by: Marco Varlese <marco.varlese@suse.com>
2017-08-15 11:00:53 +00:00
Sergio Gonzalez Monroy
4aef5b78e7 dpdk: force libdir for isa-l crypto library
Depending on the OS, the default libdir might change.

RHEL/Ubuntu:
libdir={exec_prefix}/lib

OpenSUSE:
libdir={exec_prefix}/lib64

Change-Id: I5f1672e5815ad821e6ac5fff95de5232ab735b67
Signed-off-by: Sergio Gonzalez Monroy <sergio.gonzalez.monroy@intel.com>
2017-08-14 14:31:16 +00:00
Marco Varlese
3a079ce282 Added MD5SUM for DPDK 17.08 tarball as a first step towards migration
Change-Id: Ic73b857c4e3d5a3f695e93924de5a5bed0af5019
Signed-off-by: Marco Varlese <marco.varlese@suse.com>
2017-08-14 14:30:10 +00:00
Sergio Gonzalez Monroy
618f7b003e dpdk: only build SW crypto for x86_64 platforms
Change-Id: If559747ad59c82c81d15734f27e15548eca0962b
Signed-off-by: Sergio Gonzalez Monroy <sergio.gonzalez.monroy@intel.com>
2017-08-09 20:47:35 +00:00
Sergio Gonzalez Monroy
3b12cdc59c dpdk: update build
Current optional DPDK PMDs are:
- AESNI MB PMD (SW crypto)
- AESNI GCM PMD (SW crypto)
- MLX4 PMD
- MLX5 PMD

This change will always build DPDK SW crypto PMDs and required SW crypto
libraries, while MLX PMDs are still optional and the user has to build
required libraries.

Now the configure script detects if any of the optional DPDK PMDs were
built and link against their required libraries/dependencies.

Change-Id: I1560bebd71035d6486483f22da90042ec2ce40a1
Signed-off-by: Sergio Gonzalez Monroy <sergio.gonzalez.monroy@intel.com>
2017-07-14 13:04:44 +00:00
Chris Luke
b2861e8fb6 make: Fix parallel building with some container platforms (VPP-880)
With some Linux container platforms /proc/cpuinfo reads as an empty
file. (Aside: stat on /proc/cpuinfo always indicates a length of
zero bytes, regardless of its content).

This has the effect that the make '-j' parameter being passed the
unhelpful value of '0' both in build-root/Makefile and dpdk/Makefile.
Make complains with the error:

  make: the '-j' option requires a positive integer argument

This patch checks for '0' and replaces it with '2' as a reasonable
number of jobs to run in parallel when the CPU count isn't known
(and assumed to be one). It also makes the value determination
consistent between VPP and DPDK (2*ncpu).

Change-Id: I78b89420114a825fab4d339e4f9291d486b7b9c8
Signed-off-by: Chris Luke <chrisy@flirble.org>
2017-06-24 14:02:37 +00:00
Peter Mikus
ad625f55db Revert "dpdk: build sw cryptodev support with make verify"
This reverts commit 0e2e10b77d63196bfb93ae5be1251bbc1a1b561a.

Change-Id: I3c1737f391b6ed127f92416f06449216e79859bb
Signed-off-by: Peter Mikus <pmikus@cisco.com>
2017-05-31 15:45:25 +00:00
Sergio Gonzalez Monroy
0e2e10b77d dpdk: build sw cryptodev support with make verify
Change-Id: Ica95b5d3d44563c93c89b2a3233171c3aa1f048d
Signed-off-by: Sergio Gonzalez Monroy <sergio.gonzalez.monroy@intel.com>
2017-05-30 09:31:29 +00:00
Damjan Marion
9ec92d38bb dpdk: disable 16-bit descriptors for X710/XL710
This fixes issue with rx packet drops on VF.

Change-Id: I8c1a35213013f8856b71e7204496f463319cbe28
Signed-off-by: Damjan Marion <damarion@cisco.com>
2017-05-17 19:09:41 +00:00
Damjan Marion
572825df79 dpdk: revert dpdk 17.05 change which causes virtio issues
This patch is causing DPDK to provide bad MAC address
for legacy virtio interfaces.

Change-Id: I526cd35a38164ede80a8ab6decb9e0d1ebfad723
Signed-off-by: Damjan Marion <damarion@cisco.com>
2017-05-15 12:32:15 +02:00
Damjan Marion
6a5be214b9 dpdk: bump to dpdk 17.05
Change-Id: I19744387859129c6b8dc104041af158bf5f1d988
Signed-off-by: Damjan Marion <damarion@cisco.com>
2017-05-11 14:28:05 +00:00
Damjan Marion
1664f9ba4a Add support for 32-bit x86 compilation in Makefiles
Change-Id: Ida73678b47b685abef4e81b5cad9fc13eb330850
Signed-off-by: Damjan Marion <damarion@cisco.com>
2017-04-25 07:38:49 +00:00
Damjan Marion
0f60ff8af3 dpdk: add support for Mellanox ConnectX-5 devices
Change-Id: I3ed2834a326eac50a7cb4faa592f42fd06325d5a
Signed-off-by: Damjan Marion <damarion@cisco.com>
2017-03-31 12:22:28 +00:00