summaryrefslogtreecommitdiffstats
path: root/src/plugins/dpdk/device/init.c
AgeCommit message (Collapse)AuthorFilesLines
2020-08-27dpdk: fix blacklistsVladimir Ratnikov1-1/+10
When we have both format blacklisted devices like: blacklist 1234:5678 blacklist 1234:56:78.0 unformat with fmt=%x:%x matches for both strings and the rest 78.0 substring is kept in input and it can't be parsed for init args This patch checks first if device format matches PCI address and just then if it matches Vendor and Product Type: fix Change-Id: If111762c0e0a424b052e4f6dc0f67731bf89dc2a Signed-off-by: Vladimir Ratnikov <vratnikov@netgate.com>
2020-07-09dpdk: add txq struct and fix dpdk tx lockBenoît Ganne1-7/+0
This introduces a txq structure mirroring the rxq structure. This fixes the case when #txq > #rxq, because lock must be per txq. Type: fix Fixes: dfb19cabe20ccf1cbd1aa714f493ccd322839b91 Change-Id: Ic1bce64d2b08b9a98c8242a1ba1bfcdbda322bec Signed-off-by: Benoît Ganne <bganne@cisco.com>
2020-06-04dpdk: cleanup, add rx queue structDamjan Marion1-14/+5
Type: improvement Change-Id: I3defde103ab245404de42d2be7abcb2c43d49a60 Signed-off-by: Damjan Marion <damarion@cisco.com>
2020-05-27ethernet: fix DMAC check and skip unnecessary ones (VPP-1868)John Lo1-19/+28
Fix and optimize DMAC check in ethernet-input node to utilize NIC or driver which support L3 DMAC-filtering mode so that DMAC check can be bypassed safely for interfaces/sub-interfaces in L3 mode. Checking of interface in L3-DMAC-filtering state to avoid DMAC check require the following: a) Fix interface driver init sequence for devices which supports L3 DMAC-filtering to indicate its capability and initialize interface to L3 DMAC-filtering state. b) Fix ethernet_set_flags() function and its associated callback flags_change() functions registered by various drivers in interface infra to provide proper L3 DMAC filtering status. Maintain interface/sub-interface L3 config count so DMAC checks can be bypassed if L3 forwarding is not setup on any main/sub-interfaces. Type: fix Ticket: VPP-1868 Signed-off-by: John Lo <loj@cisco.com> Change-Id: I204d90459c13e9e486cfcba4e64e3d479bc9f2ae
2020-05-19dpdk: change netvsc device port typeMatthew Smith1-1/+1
Netvsc devices have the port type determined from their link speed. The link speed between reboots of an Azure VM does not always end up at the same value, so an interface that was FortyGigabitEthernet0 earlier may be FiftyGigabitEthernet0 now. That makes it difficult to maintain a persistent store of configurations and apply those at startup. Change the port type to be VF so the name will always be generated as VirtualFunctionEthernetX. Type: improvement Change-Id: I58cab852b87c0bcd9f73afe239803f38dab5c159 Signed-off-by: Matthew Smith <mgsmith@netgate.com>
2020-05-14dpdk: fix crash with chelsio pmdBenoît Ganne1-6/+12
cxgbe PMD initializes its control channel as part of dev_configure(), and trying to get link status prior to it will lead to a crash. DPDK documentation loosely hints that we should not call any device function before dev_start(), call link_state() only for the relevant PMDs. From DPDK API documentation: The functions exported by the application Ethernet API to setup a device designated by its port identifier must be invoked in the following order: rte_eth_dev_configure() rte_eth_tx_queue_setup() rte_eth_rx_queue_setup() rte_eth_dev_start() Then, the network application can invoke, in any order, the functions exported by the Ethernet API to get the MAC address of a given device, to get the speed and the status of a device physical link, to receive/transmit [burst of] packets, and so on. Type: fix Change-Id: I12d2ab4d84e6bd72a9f695447e86f3222929c804 Signed-off-by: Benoît Ganne <bganne@cisco.com>
2020-04-30crypto: introduce async crypto infraFan Zhang1-0/+5
Type: feature Signed-off-by: Damjan Marion <damarion@cisco.com> Signed-off-by: Filip Tehlar <ftehlar@cisco.com> Signed-off-by: Fan Zhang <roy.fan.zhang@intel.com> Signed-off-by: Piotr Bronowski <piotrx.bronowski@intel.com> Signed-off-by: Dariusz Kazimierski <dariuszx.kazimierski@intel.com> Signed-off-by: Piotr Kleski <piotrx.kleski@intel.com> Change-Id: I4c3fcccf55c36842b7b48aed260fef2802b5c54b
2020-04-28flow: add RSS supportChenmin Sun1-1/+2
This patch enables the RSS configuration through vnet/flow interface With this RSS feature, users can config the RSS functions for specific flows Currently, it supports: default, toeplitz and symmetric_toeplitz rss function, and ipv4-tcp/ipv4-udp/ipv6-tcp/ipv6-ucp flow types Users can use the following options to combine with above flow types for more specific hash input set selection: l3-src-only, l3-dst-only, l4-src-only, l4-dst-only Command line: test flow add dst-ip any proto udp rss function default rss types ipv4-tcp use l3-dst-only test flow add dst-ip any proto udp rss function toeplitz rss types ipv4-udp use l4-src-only test flow add dst-ip any proto udp rss function symmetric_toeplitz rss types ipv6-udp use l3-src-only and l3-dst-only Type: feature Signed-off-by: Chenmin Sun <chenmin.sun@intel.com> Change-Id: I213efc76dc8af37f2f63605884f353e05b0f5d2a
2020-04-22misc: fix coverity warningsDave Barach1-2/+3
Type: fix Ticket: VPP-1837 Signed-off-by: Dave Barach <dave@barachs.net> Change-Id: I9ec87d2293d8f92c3e488a0f61083cf815ac496c
2020-04-22devices: Adding ConnectX-6 DX Device ID for validationAmir Zeidner1-2/+7
Type: fix Change-Id: I3c7ebbe91e7dffe9fd6851e5334fe920f2187cf0 Signed-off-by: Amir Zeidner <amirzei@mellanox.com>
2020-04-02dpdk: VM VHOST tests with rxq>1 failingSteven Luong1-0/+1
DPDK recently added a check in the virtio driver to make sure that rxmode->mq_mode == ETH_MQ_RX_NONE. We were passing ETH_MQ_RX_RSS and the device initialization was not accepted. The reason for the change in DPDK was that there is no controls (algorithm, redirection table, hash function). So they thought ETH_MQ_RX_NONE was the best choice for the value of mq_mode. Type: fix Ticket: VPP-1853 Signed-off-by: Steven Luong <sluong@cisco.com> Change-Id: Ifa0fc4206cedc56a851f94f6434a2a7500bbd419
2020-03-27dpdk: enable DPDK iAVF PMDChenmin Sun1-0/+18
This patch adds support for the DPDK iAVF PMD Type: feature Signed-off-by: Chenmin Sun <chenmin.sun@intel.com> Change-Id: I7bb0f621774e4c55b9b7309462e6591ce1b88fb6
2020-02-20dpdk: rx checksum offloadFlorin Coras1-0/+8
Type: improvement Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: I5a3e3a41dcc60c0d9b291e51bb112e7701f73050
2020-02-14dpdk: TSO does not work for Cisco VICSteven Luong1-0/+11
While TSO is supported for Intel NIC, Cisco VIC does not work. The problem is due to txmode offloads is not properly set for the Cisco VIC when enable-tcp-udp-checksum is configured. Type: fix Ticket: VPP-1838 Signed-off-by: Steven Luong <sluong@cisco.com> Change-Id: I72c41db9b327ed8d08ef70d74e8cc6206d4a102f
2020-02-05dpdk: use port_id as interface name suffix for representorsHaggai Eran1-1/+7
Type: feature Representor devices include a port ID as part of their switch_info struct, and it is helpful to use that in the interface name. Signed-off-by: Haggai Eran <haggai.eran@gmail.com> Change-Id: Id24627e7daf857f8b0e8ace2f592c098678081c7
2020-01-30misc: deprecate dpdk hqosDamjan Marion1-77/+0
Not in functional state for a long time ... Type: refactor Change-Id: I2cc1525a6d49518cbc94faf6afbf0d2d0d515f56 Signed-off-by: Damjan Marion <damarion@cisco.com>
2019-12-17dpdk: add devargs supportChenmin Sun1-12/+24
Type: feature This patch adds the devargs support for dpdk device The devargs are used as hardware-specific init args for dpdk devices please refer to the nic guides under $(DPDK_DIR)/doc/guides/nics/$(NIC_DRIVER).rst Signed-off-by: Chenmin Sun <chenmin.sun@intel.com> Change-Id: Id380d04720090bb66afe5ce09d664e5e248b8eb9
2019-12-04gso: remove the interface countMohsin Kazmi1-2/+0
Type: refactor Change-Id: I51405b9d09fb6fb03d08569369fdd4e11c647908 Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
2019-11-19dpdk: fix non-NULL terminated stringBenoît Ganne1-1/+1
Type: fix Change-Id: Ic221cd4fcad89aece71239ed96152bf0311f3286 Signed-off-by: Benoît Ganne <bganne@cisco.com>
2019-11-14dpdk: Enable bnxt PMDAndy Gospodarek1-0/+14
This adds support to compile the bnxt PMD that supports Broadcom's 10/25/40/50/100/200 Gbps NICs. Tested with modified DPDK driver on x86_64 and aarch64 targets that is pending upstream acceptance, but should compile just fine today. Type: feature Signed-off-by: Andy Gospodarek <gospo@broadcom.com> Change-Id: I735a991c4cae4fa77e5605094facea54b781a1db
2019-11-01dpdk: fix tso not properly check the 'enable-tcp-udp-checksum' option issueChenmin Sun1-16/+15
Type: fix Fix tso did not properly check the 'enable-tcp-udp-checksum' option issue Add description of 'tso' and 'enable-tcp-udp-checksum' in startup.conf Signed-off-by: Chenmin Sun <chenmin.sun@intel.com> Change-Id: Id659067a9fa9e1db6c3f8dc533a2e90351b86831
2019-10-30dpdk: use local loggerPaul Vinciguerra1-5/+5
Type: fix Change-Id: I44922f70aef6a3c53f0f56c6d0656502c8fd69b2 Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
2019-09-12dpdk: fix null-termination of stringsElias Rudberg1-0/+3
Fix problem with some strings not being null-terminated, by using the vec_terminate_c_string macro in two places. The problem was found using AddressSanitizer. (Also make sure indentation is OK for those changes.) Ticket: VPP-1772 Type: fix Signed-off-by: Elias Rudberg <elias.rudberg@bahnhof.net> Change-Id: Ib7826e3c322e58b649e2d7f6053786da618a5e9e
2019-08-30dpdk: enable checksum offload for Intel SRIOV NIC driversJohn Lo1-0/+8
Type: fix Signed-off-by: John Lo <loj@cisco.com> Change-Id: I3ee59106ba45164a4ee3788bf4dcf5bf4c2dc1c2
2019-08-21dpdk: bump DPDK version to 19.08Damjan Marion1-1/+1
Type: feature Change-Id: I16b8cdf0b6af6715a5f01ad84365a8c8a1b76237 Signed-off-by: Damjan Marion <damarion@cisco.com>
2019-08-19dpdk: add TSO support in dpdk plugin.Chenmin Sun1-0/+30
Type: feature You can enable tso in starup.conf like this: dev 0000:86:00.0{ tso on } TSO is disabled by default. Change-Id: Ifdbaf5322f768c384aa54e532d7bf45e810ca01c Signed-off-by: Chenmin Sun <chenmin.sun@intel.com>
2019-08-19dpdk: QAT devices update, add c4xxx and xeon d15xxJim Thompson1-1/+2
Type: feature Change-Id: I21f8f4563f5545a684b2666f7410847e0f7bc403 Signed-off-by: Jim Thompson <jim@netgate.com>
2019-07-26dpdk: fix vlan strippingNeale Ranns1-11/+15
Type: fix Fixes: ce3e971 Change-Id: I30bbeced2f5ae7613e65546f2b9b41e2fb514208 Signed-off-by: Damjan Marion <damarion@cisco.com>
2019-05-31Update vnet hardware flags if link state changesDave Barach1-1/+9
Explains a variety of hard-to-diagnose problems with certain Atom and Denverton NIC types. I finally tripped over a highly-repeatable failure: home gateway use-case bitten by refusal to negotiate a DHCP lease for the trunk port. The dhcp client won't send pkts unless VNET_HW_INTERFACE_FLAG_LINK_UP is set on the tx hw interface: /* Interface(s) down? */ if ((hw->flags & VNET_HW_INTERFACE_FLAG_LINK_UP) == 0) return; Change-Id: I17ef2ba7b39078555fa27d2d874a60c67e1530ee Signed-off-by: Dave Barach <dave@barachs.net>
2019-05-31bonding: add support for numa awarenessZhiyong Yang1-0/+1
This patch enables bonding numa awareness on multi-socket server working in active-backeup mode. The VPP adds capability for automatically preferring slave with local numa node in order to reduces the load on the QPI-bus and improve system overall performance in multi-socket use cases. Users doesn't need to add any extra operation as usual. Change-Id: Iec267375fc399a9a0c0a7dca649fadb994d36671 Signed-off-by: Zhiyong Yang <zhiyong.yang@intel.com>
2019-05-30dpdk: remove bonding codeDamjan Marion1-123/+1
We have native implementation and we should not maintain both.... Change-Id: Ic09ebffda52cdc733b3cfeff06690e0d3cc08084 Signed-off-by: Damjan Marion <damarion@cisco.com>
2019-05-27dpdk: vlan strip config does not take effect in default deviceChenmin Sun1-0/+6
copy vlan strip config from default device Change-Id: I4ad1c159bad964fd1900b5ae4960b7014dd9f9b1 Signed-off-by: Chenmin Sun <chenmin.sun@intel.com>
2019-05-16init / exit function orderingDave Barach1-5/+2
The vlib init function subsystem now supports a mix of procedural and formally-specified ordering constraints. We should eliminate procedural knowledge wherever possible. The following schemes are *roughly* equivalent: static clib_error_t *init_runs_first (vlib_main_t *vm) { clib_error_t *error; ... do some stuff... if ((error = vlib_call_init_function (init_runs_next))) return error; ... } VLIB_INIT_FUNCTION (init_runs_first); and static clib_error_t *init_runs_first (vlib_main_t *vm) { ... do some stuff... } VLIB_INIT_FUNCTION (init_runs_first) = { .runs_before = VLIB_INITS("init_runs_next"), }; The first form will [most likely] call "init_runs_next" on the spot. The second form means that "init_runs_first" runs before "init_runs_next," possibly much earlier in the sequence. Please DO NOT construct sets of init functions where A before B actually means A *right before* B. It's not necessary - simply combine A and B - and it leads to hugely annoying debugging exercises when trying to switch from ad-hoc procedural ordering constraints to formal ordering constraints. Change-Id: I5e4353503bf43b4acb11a45fb33c79a5ade8426c Signed-off-by: Dave Barach <dave@barachs.net>
2019-04-24dpdk: fix interface namingFlorin Coras1-1/+1
Change-Id: Ia092a93a7ac0cbf9338f9d4a5db8b94b23549a13 Signed-off-by: Florin Coras <fcoras@cisco.com>
2019-04-24dpdk: get a rid of "Invalid port_id=" log messageDamjan Marion1-3/+5
Change-Id: I65e7188c6893acca67455ff37f2dfbd0bedd5c09 Signed-off-by: Damjan Marion <damarion@cisco.com>
2019-04-17Default nums of RX/TX descriptors changed to 512 for 2M page on DVNZhiyong Yang1-1/+63
As DVN has fewer DTLB entries supported for 2M page, default numbers of RX/TX descriptors are changed to 512 if nums of RX/TX descriptors are not specified by VPP users. Change-Id: I076493b802b15d12750a5b49d1554da4d19ad460 Signed-off-by: Zhiyong Yang <zhiyong.yang@intel.com>
2019-04-16Add direct packets to specific flow action in dpdk flowSimon Zhang1-0/+1
Change-Id: I48cd8052f9509efdf13f64ab279edb66a2d4a0a9 Signed-off-by: Simon Zhang <yuwei1.zhang@intel.com>
2019-03-22dpdk: do not enable VLAN stripping on Cisco VIC adapters by defaultHyong Youb Kim1-11/+22
With the following local patch, VIC adapters remove default vlan tags from ingress packets. So, it is no longer necessary to enable VLAN stripping by default. This change also allows VLAN sub interfaces to work with VIC adapters. patches/dpdk_19.02/0001-net-enic-untag-default-vlan-by-default.patch Change-Id: I2e7d62c62120c351c27d827d90de4a8335efa044 Signed-off-by: Hyong Youb Kim <hyonkim@cisco.com>
2019-03-14dpdk: Add E810 family supportChenminSun1-0/+1
Change-Id: Id5b30d7a394551844a79b3d222d2d26194d033df Signed-off-by: ChenminSun <chenmin.sun@intel.com>
2019-03-13Add the SRIOV variant PCI Device ID of the Cisco VICJay Lubomirski1-1/+2
Change-Id: I572cbba817275d85c200a4b09a63f4650075f638 Signed-off-by: Jay Lubomirski <jlubomir@cisco.com>
2019-03-12dpdk: pass log-level configuration to EALStephen Hemminger1-6/+0
The log-level dpdk config value should be transparently forwarded to DPDK via EAL argument. Since DPDK now supports naming log-levels, VPP no longer needs to parse and call rte_set_loglevel(). This was the other part of the DPDK log-level change. It must have got missed during my initial checkin. Without it passing dynamic log-level values like are silently ignored. Fixes: 6ca6ac6c887e ("dpdk: support passing log-level") Change-Id: I732cec5f638c9924e3ffb04c4753f957e3633d64 Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
2019-02-19dpdk: update Cisco VIC port typeHyong Youb Kim1-4/+1
Recent VIC models can support 25, 50, and 100Gbps links. Use the helper (port_type_from_link_speed) to set the port type as it supports all possible link speeds. Change-Id: I748d8ac716a6393d116a9db8a599151c70a9000a Signed-off-by: Hyong Youb Kim <hyonkim@cisco.com>
2019-02-02Disable hqos part deuxDave Barach1-0/+2
Change-Id: Ieab56e0a20696b8cc97f783f08f10a94a83644eb Signed-off-by: Dave Barach <dave@barachs.net>
2019-02-02dpdk: bump to dpdk 19.02Damjan Marion1-13/+0
HQoS requires fixes to work with dpdk 19.02 so code is disabled and pending deprecation unless active maintainer is found. Change-Id: I3569c4287b6dfdd2c29e02375eb53bf01fa6ae84 Signed-off-by: Damjan Marion <damarion@cisco.com>
2019-01-30buffers: major cleanup and improvementsDamjan Marion1-91/+3
This patch introduces following changes: - deprecated free lists which are not used and not compatible with external buffer managers (i.e. DPDK) - introduces native support for per-numa buffer pools - significantly improves performance of buffer alloc and free Change-Id: I4a8e723ae47056717afd6cac0efe87cb731b5be7 Signed-off-by: Damjan Marion <damarion@cisco.com>
2019-01-20dpdk: add buffer.hDamjan Marion1-0/+1
Change-Id: I998658ad7860b23425444e218ce2e1ec655b885a Signed-off-by: Damjan Marion <damarion@cisco.com>
2019-01-20buffers: don't init metadata, as it is already initializedDamjan Marion1-4/+1
Change-Id: Ia083050389853c25b069f0f8286d50d3f4aef527 Signed-off-by: Damjan Marion <damarion@cisco.com>
2018-12-22dpdk: switch to in-memory mode, deprecate use of socket-memDamjan Marion1-112/+25
Change-Id: I3896bf9d71dc300520c53dbe3c2fd8fcd1470881 Signed-off-by: Damjan Marion <damarion@cisco.com>
2018-12-19vlib: support Hyper-v/Azure VMBusStephen Hemminger1-0/+32
This patch adds support for VMBus to the VPP infrastructure. Since the only device that matters is the netvsc Poll Mode Driver in DPDK, the infrastructure is much simpler than PCI. Change-Id: Ie96c897ad9c426716c2398e4528688ce2217419b Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
2018-12-19dpdk plugin: blacklist PCI devices by typeDave Barach1-1/+44
Change-Id: I89695c1ad47131ed830f35c677937ce12025a40d Signed-off-by: Dave Barach <dave@barachs.net>