summaryrefslogtreecommitdiffstats
path: root/src/plugins/dpdk
AgeCommit message (Collapse)AuthorFilesLines
2018-10-16Fix coverity issue for potentially overflowing of page sizeHaiyang Tan1-3/+3
Change-Id: I2779626d745badb63386efcf729da7a094a4f297 Signed-off-by: Haiyang Tan <haiyangtan@tencent.com>
2018-10-15dpdk: only look at PCI information on PCI devicesStephen Hemminger5-8/+26
The rte_device is use as a base type of all DPDK devices. It is not valid to use container_of to find PCI information unless the bus of the rte_device is pci. Otherwise, the pointer is looking at some other data, which may or may not be zero. This change introduces a helper function to get rte_pci_device pointer. If device is on PCI bus it returns pointer to rte_pci_device info, otherwise it returns NULL. Change-Id: Ia7446006bb93a7a54844969f3b3dd3b918890dfd Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
2018-10-12dpdk: support passing log-levelStephen Hemminger1-1/+2
Since DPDK 17.05, DPDK logging supports per subsystem dynamic logging. Allow passing this as log-level on EAL command line. dpdk { log-level pmd.net.virtio.*:debug ... } Change-Id: If9576c11aba390a5cd2740fc1c9da5768689bd74 Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
2018-10-10vppinfra: introduce clib_mem_vm_ext_free() to avoid fd leaksHaiyang Tan1-1/+1
Change-Id: I8691a10493d159a97574550c111f07722960a7cd Signed-off-by: Haiyang Tan <haiyangtan@tencent.com>
2018-10-01thread: Add show threads apiMohsin Kazmi2-2/+2
Change-Id: I3124238ab4d43bcef5590bad33a4ff0b5d8b7d15 Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
2018-09-27dpdk_plugin: fix mlx5 build and runtime issuesSirshak Das1-2/+10
There are issues with VPP finding and linking the mlx5 shared glue library which was built by default if mlx5 was enabled. Runtime Errors this patch fixes: net_mlx5: cannot load glue library: librte_pmd_mlx5_glue.so.18.05.0: cannot open shared object file: No such file or directory net_mlx5: cannot initialize PMD due to missing run-time dependency on rdma-core libraries (libibverbs, libmlx5) This patch introduces additional config parameter to disable glue library building and instead statically link ibverbs and mlx5 libraries to the PMD and dpdk_plugin. Change-Id: I0b2f67652a57854c778e991780903fb15706ace8 Signed-off-by: Sirshak Das <sirshak.das@arm.com> Reviewed-by: Lijian Zhang <Lijian.Zhang@arm.com>
2018-09-26dpdk: fix QSFP+ module infoDamjan Marion1-1/+2
Change-Id: I89c7df778e66a5d2147190dc99445405d81964e5 Signed-off-by: Damjan Marion <damarion@cisco.com>
2018-09-25dpdk: show pluggable info in 'show hardware'Damjan Marion1-0/+28
module: id SFP/SFP+/SFP28, compatibility: 40g_active_cable vendor: Amphenol, part NDCCGF-I202 revision: C, serial: APF1711202351C, date code: 170318 cable length: 2m Change-Id: Ife35607b4f078f7b56737fe066ad4cbd247a7504 Signed-off-by: Damjan Marion <damarion@cisco.com>
2018-09-24Trivial: Clean up some typos.Paul Vinciguerra8-21/+21
Change-Id: I085615fde1f966490f30ed5d32017b8b088cfd59 Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
2018-09-19dpdk: mask and warn if rx/tx offload is not availableDamjan Marion4-94/+115
Warning messsage is displayed in system log: vpp# show log 1970/ 1/ 1 01:00:01:198 warn dpdk unsupported rx offloads requested on port 0: scatter Change-Id: I40021066daf2d37ca5233e3adce55e412f0d3932 Signed-off-by: Damjan Marion <damarion@cisco.com>
2018-09-18disable scatter/gather for ENA with DPDK 18.08Matthew Smith1-1/+5
The scatter/gather rxmode flag was set for ENA when building against DPDK >= 18.08. ENA does not support this, so disable it. It looks like enabling it was a copy/paste error. Also, after offloads are adjusted based on whether "no-multi-seg" is set, those configurations are overwritten by copying port_conf_template over the port config. That should only happen for versions of DPDK older than 18.08 because 18.08 and newer make changes directly on the port config instead of making changes to the template. Make the clib_memcpy() conditional on the DPDK version being less than 18.08. After doing so, compiler errors complain about port_conf_template being declared but not used, so make it's declaration conditional. Change-Id: If81980d71c379a565b51dd700b953f8c811a8703 Signed-off-by: Matthew Smith <mgsmith@netgate.com>
2018-09-14dpdk: add detection of mellanox PMDsDamjan Marion1-0/+10
Change-Id: I523fc489f5e73ba726ab0711eab3fdde53dc35e8 Signed-off-by: Damjan Marion <damarion@cisco.com>
2018-09-12Always use 'lib' instead of 'lib64'Damjan Marion1-3/+2
It is packaging responsibility to put libs in the right place. Use of lib64 resulted in huge amount of files with hardcoded lib64. This patch simplifies things... Change-Id: Iab0dea0583e480907732c5d2379eb951a00fa9e6 Signed-off-by: Damjan Marion <damarion@cisco.com>
2018-09-12device flags will set in dpdk_update_link_state.Khers1-2/+0
Change-Id: If74acb0168bed2201d2a8b47bf3f860540d1574b Signed-off-by: Khers <s3m2e1.6star@gmail.com>
2018-09-10dpdk: clean interface link information on admin down / stopDamjan Marion1-0/+1
Change-Id: Ie68814c8afc6cd67eb75da0b95dffa7b404cb7ba Signed-off-by: Damjan Marion <damarion@cisco.com>
2018-09-10dpdk-plugin: do not request SCTP offload, some cards do not support it while ↵Andrew Yourtchenko1-2/+2
supporting TCP/UDP The DPDK plugin sets all of the offload flags, which may cause an initialization failure on the NICs that do not support SCTP offload. The VPP code does not deal with the SCTP offload at the moment at all, so after discussing with Damjan, we agreed the best approach to fix the issue is to not request the SCTP offload. The output of "show hardware" for the NIC in question before this patch: Name Idx Link Hardware GigabitEthernet1/0/0 1 down GigabitEthernet1/0/0 Ethernet address 00:e0:67:09:90:4b Intel 82540EM (e1000) carrier down flags: pmd pmd-init-fail maybe-multiseg tx-offload intel-phdr-cksum rx queues 1, rx desc 1024, tx queues 1, tx desc 1024 cpu socket 0 Errors: rte_eth_dev_configure[port:0, errno:-22]: Unknown error -22 And the excerpt from "show log": 1970/ 1/ 1 00:00:00:739 notice dpdk Ethdev port_id=0 requested Tx offloads 0x1c doesn't match Tx offloads capabilities 0xf in rte_eth_dev_configure() Change-Id: I159d65c02fc3f044441972205f1f0ac08e52050c Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
2018-09-08L2 BVI/FIB: Update L2 FIB table when BVI's MAC changesNeale Ranns1-1/+2
also some moving of l2 headers to reduce dependencies Change-Id: I7a700a411a91451ef13fd65f9c90de2432b793bb Signed-off-by: Neale Ranns <nranns@cisco.com>
2018-09-04Fixed showing negative count in stats show CLINaoyuki Mori1-2/+2
Some counters (bytes, pkts) are formatted as signed instead of unsigned in "show hardware-interfaces" and "show lb". These stats counters are declared as u64. Change-Id: Id1b588188bff4e36402beb8d07f779e9a5193956 Signed-off-by: Naoyuki Mori <naoyuki.mori@intel.com>
2018-09-03Deprecate old buffer replication schemeDamjan Marion4-137/+3
Change-Id: I1f54b994425c58776e1445c8d9fe142e7a644d3d Signed-off-by: Damjan Marion <damarion@cisco.com>
2018-08-30cmake: a bit of packaging workDamjan Marion1-0/+3
Change-Id: I40332c2348c4aab873d726532f2ac3c4abde7ec9 Signed-off-by: Damjan Marion <damarion@cisco.com>
2018-08-27cmake: Fix plugins .h includesMohsin Kazmi1-0/+5
Change-Id: I90600d000afb02e8969f3c01bcf9e4b5c10a7d39 Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
2018-08-27cmake: add missing vat pluginsDamjan Marion1-0/+3
Change-Id: Ib61f0299c17c0f021408ab0a44c5b54f55f8a8ec Signed-off-by: Damjan Marion <damarion@cisco.com>
2018-08-25cmake: improve add_vpp_plugin macroDamjan Marion1-15/+19
Change-Id: Iffd5c45ab242a919592a1f686f7f880936b68a1a Signed-off-by: Damjan Marion <damarion@cisco.com>
2018-08-21VPP-1268: Add option for memory channels DPDK usesJessica Tallon1-0/+2
This adds a `num-mem-channels` option for DPDK enabling support for choosing the number of memory channels used. Change-Id: I1663dd866ac60592b6dd02261af66d87c64acdb1 Signed-off-by: Jessica Tallon <tsyesika@igalia.com>
2018-08-18cmake: highlight warning and error messagesDamjan Marion1-3/+3
Change-Id: Id4b73368382b5e78c138987fe092429af5cb0afd Signed-off-by: Damjan Marion <damarion@cisco.com>
2018-08-18cmake: DPDK rte_config.h parsingDamjan Marion1-12/+36
Change-Id: I53cad8e7787a132a5d6bacd5fda3fe67b7d59b44 Signed-off-by: Damjan Marion <damarion@cisco.com>
2018-08-17CMake as an alternative to autotools (experimental)Damjan Marion1-0/+100
Change-Id: Ibc59323e849810531dd0963e85493efad3b86857 Signed-off-by: Damjan Marion <damarion@cisco.com>
2018-08-16dpdk: fix rss hash function handlingDamjan Marion3-6/+23
DPDK 18.08 verifies if all set bits are supported and fails if not.... Change-Id: Ia87242fcda11147dff3bebe2e2bef32f0a8891fb Signed-off-by: Damjan Marion <damarion@cisco.com>
2018-08-13Multiarch handling in different constructor macrosDamjan Marion4-18/+5
This significantly reduces need for ... in multiarch code. Simply constructor macros will jost create static unused entry if CLIB_MARCH_VARIANT is defined and that will be optimized out by compiler. Change-Id: I17d1c4ac0c903adcfadaa4a07de1b854c7ab14ac Signed-off-by: Damjan Marion <damarion@cisco.com>
2018-08-13dpdk: support for DPDK 18.08Damjan Marion5-66/+75
Change-Id: If1b93341c222160b9a08f127620c024620e55c37 Signed-off-by: Damjan Marion <damarion@cisco.com>
2018-08-11Multiversioning: Device (tx) function constructorMohsin Kazmi1-17/+3
Change-Id: I39f87ca161c891fb22462a23188982fef7c3243f Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
2018-08-06dpdk-flow:fix raw item initEyal Bari1-1/+3
dpdk raw item match string changed from flexible array member to a pointer member Change-Id: I930f05112ce04b0cdb3feb985d755e730b102084 Signed-off-by: Eyal Bari <ebari@cisco.com>
2018-07-26Clean up dpdk plugin rx/tx pcap tracingDave Barach2-32/+26
Needed a spinlock to protect the data vector. Cleaned up debug cli so the output makes sense, and so that various parameters exist in one place. Removed a nonsense memset-to-zero which led to ultra-confusing results. Change-Id: I91cd14ce7fe84fd2eceab86e016b5ee001993be4 Signed-off-by: Dave Barach <dbarach@cisco.com>
2018-07-23fix vector index range checksEyal Bari1-1/+1
Change-Id: I63c36644c9d93f2c3ec6606ca0205b407499de4e Signed-off-by: Eyal Bari <ebari@cisco.com>
2018-07-19dpdk: fix Mellanox Connect-X3 VF IDMatthew Smith1-1/+1
Fix a typo from previous patch. Change 0x104 to 0x1004. Change-Id: I82230a8a0ec01567eb1d4bc12ac02062c2a98347 Signed-off-by: Matthew Smith <mgsmith@netgate.com>
2018-07-19dpdk: set log write fd to non-blockingMatthew Smith1-7/+15
If a PMD writes too many log messages using rte_vlog(), the pipe for logging can fill and then rte_vlog() will block on fflush() while it waits for something to read from the other side of the pipe. That will never happen since the process node that would read the other side of the pipe runs in the same thread. Set the write fd to non-blocking before the call to rte_openlog_stream(). If the pipe is full, calls to write() or fflush() will fail but execution will continue. Change-Id: I0e5d710629633acda5617ff29897d6582c255d57 Signed-off-by: Matthew Smith <mgsmith@netgate.com>
2018-07-19dpdk: add device IDs for Mellanox ConnectX-3Matthew Smith1-1/+6
Recognize the PF and VF device IDs for the Mellanox adapter used on Azure. Change-Id: Ic7b36b37ac93db2b696354ffe6fa2b6d62ee3801 Signed-off-by: Matthew Smith <mgsmith@netgate.com>
2018-07-18DPDK: coverity scan warningsMarco Varlese2-7/+4
This patch addresses the coverity scan warnings reported for the DPDK plugin. Change-Id: Ie7ac7ffcf4a6c63245eae0f9910a193ab1e318a8 Signed-off-by: Marco Varlese <marco.varlese@suse.de>
2018-07-18Add config option to use dlmalloc instead of mheapDave Barach1-2/+2
Configure w/ --enable-dlmalloc, see .../build-data/platforms/vpp.mk src/vppinfra/dlmalloc.[ch] are slightly modified versions of the well-known Doug Lea malloc. Main advantage: dlmalloc mspaces have no inherent size limit. Change-Id: I19b3f43f3c65bcfb82c1a265a97922d01912446e Signed-off-by: Dave Barach <dave@barachs.net>
2018-07-13Add QEDE poll mode driver (librte_pmd_qede)Igor Mikhailov (imichail)3-4/+10
The driver implements Cavium QLogic FastLinQ QL4xxxx 10G/25G/40G/50G/100G Intelligent Ethernet Adapters (IEA) and Converged Network Adapters (CNA) (doc/guides/nics/qede.rst) Change-Id: If17e8cb572eb8c0585085be1c7cfdfa159eb6e68 Signed-off-by: Igor Mikhailov (imichail) <imichail@cisco.com>
2018-07-10Remove unused variablesIgor Mikhailov (imichail)1-4/+0
Change-Id: If4da80c7eefe55905594eaaba0946d75f0892da5 Signed-off-by: Igor Mikhailov (imichail) <imichail@cisco.com>
2018-06-26dpdk: display rx/tx burst function name in "show hardware detail"Damjan Marion1-0/+20
Change-Id: I6fa4c6bf9c4e96ba4502a06907bdecc654ace665 Signed-off-by: Damjan Marion <damarion@cisco.com>
2018-06-25dpdk: Enhancement to call crypto start api at initializationSachin Saxena1-0/+4
- Some crypto devices rely on rte_cryptodev_start() API to be called by application to enable a pre-configured H/W Crypto device. - NXP dpaa2 is one of the example. Change-Id: I2ad8ca0060604fb4e0541161e91bdebc6642f4da Signed-off-by: Sachin Saxena <sachin.saxena@nxp.com>
2018-06-21VPP-1042: Fix the DPDK no-hugetbl flagsJessica Tallon1-5/+8
Change-Id: I7c611d3fa7fabe82294fc22a61d5a3927a2da39d Signed-off-by: Jessica Tallon <tsyesika@igalia.com>
2018-06-21configurable per-dispatch-cycle sleepDave Barach3-27/+0
Workaround for lack of driver interrupt support. Also quite handy for home gateway, laptop/vagrant, other use-cases not requiring maximum vectors/second for proper operation. Change-Id: Ifc4b98112450664beef67b89ab8a6940a3bf24b5 Signed-off-by: Dave Barach <dave@barachs.net>
2018-06-21FastLinQ QL41000 Series PCI vendor and device idsIgor Mikhailov (imichail)1-0/+3
Change-Id: I23caebf602e3e6ff45fdec106a0da88f6de7a284 Signed-off-by: Igor Mikhailov (imichail) <imichail@cisco.com>
2018-06-21dpdk/ipsec: add support for UDP encap/decapRadu Nicolau2-17/+65
Change-Id: I024c1d398fcb51e5a20f9049d16a87b3b1ba0c20 Signed-off-by: Radu Nicolau <radu.nicolau@intel.com>
2018-06-19flow:free lookup entries after packets are handledeyal bari3-13/+36
Change-Id: I737dad64bf6dd0743d36500d5cfa1cb1a6594b98 Signed-off-by: Eyal Bari <ebari@cisco.com>
2018-06-13vxlan:offload RX floweyal bari1-1/+1
ip4 vxlan cli/api (using flow infra) to create flows and enable them on different hardware (currently tested with i40e) to offload a vxlan tunnel onto hw: set flow-offload vxlan hw TwentyFiveGigabitEthernet3/0/0 rx vxlan_tunnel1 to remove offload: set flow-offload vxlan hw TwentyFiveGigabitEthernet3/0/0 rx vxlan_tunnel1 del TODO:ipv6 handling Change-Id: I70e61f792ef8e3f007d03d7df70e97ea4725b101 Signed-off-by: Eyal Bari <ebari@cisco.com>
2018-06-12MTU assigning to itself (Coverity)Ole Troan1-4/+0
Change-Id: Iee8de25ab3c68ae3698c79852195dc336050914c Signed-off-by: Ole Troan <ot@cisco.com>