summaryrefslogtreecommitdiffstats
path: root/src/plugins/dpdk/device/init.c
AgeCommit message (Collapse)AuthorFilesLines
2021-09-16dpdk: add support for outer udp and ipv4 checksumsMohsin Kazmi1-9/+34
Type: improvement Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com> Change-Id: I10141033030342881298d70742fa5bdea402b4c9
2021-09-08dpdk: fix coverityMohammed Hawari1-0/+2
Coverity does not seem happy about exotic control flows in switch/case statements Change-Id: Ie006190058f811aacf85125ebc58330d9c53510f Signed-off-by: Mohammed Hawari <mohammed@hawari.fr> Type: fix Fixes: 0b42ac565b970c186a9ad734f980b440f56fb25b
2021-09-07dpdk: lro supportMohammed Hawari1-1/+26
Change-Id: Ifa09dcdfd567ac3c2afab4bd3bd468260f766e1d Signed-off-by: Mohammed Hawari <mohammed@hawari.fr> Type: improvement
2021-07-27vppinfra: introduce CLIB_CACHE_PREFETCH_BYTESDamjan Marion1-2/+0
Type: improvement Change-Id: Ic07010f11ef303f5213a33b0faf24aaedb62f110 Signed-off-by: Damjan Marion <damarion@cisco.com>
2021-07-15dpdk: enable RX interrupts for the virtio driverRobert Shearman1-0/+8
Type: improvement Request use of RX interrupts for virtio if the system will support it, which is done by applying the same check as in the virtio driver, namely whether multiple interrupts are supported. This allows the use of RX adaptive/interrupt mode instead of just polling, which is useful in virtualised environments where functionality may be more important than performance and so using polling mode is wasteful. Signed-off-by: Robert Shearman <robertshearman@gmail.com> Change-Id: I29527b6f04b0b1d0c9f9424751b2bd252ed10505
2021-06-22dpdk: enable igc devicesMatthew Smith1-0/+1
Type: improvement Set port type and supported flow actions on 2.5G Intel NICs which are managed by the igc PMD. Change-Id: Id144eaa158e24a3f10effb6b517d1c62fba0d2e8 Signed-off-by: Matthew Smith <mgsmith@netgate.com>
2021-05-26dpdk: fix missing symbolFan Zhang1-4/+8
Type: fix This patch fixes the missing symbol of dpdk_plugin.so when creating symmetric key. The solution is to add dependency of libssl to dpdk cryptodev and disable cryptodev engine when libssl is not presented. Signed-off-by: Fan Zhang <roy.fan.zhang@intel.com> Change-Id: I30aa6e3e3af1faefa82883bad613e1d82235a2ec
2021-05-25dpdk: disable DPDK iAVF interrupt supportMohammed Hawari1-2/+3
Change-Id: I665d9d11fcdd9af33e38972a74e51ce3085f3e55 Signed-off-by: Mohammed Hawari <mohammed@hawari.fr> Type: fix
2021-05-04dpdk: allow configuration of max-simd-bitwidthRay Kinsella1-2/+29
Enable configuration of DPDK's max-simd-bitwidth through the startup.conf Type: improvement Change-Id: I455148714ffc7caa257931526f310dbefd7ab01c Signed-off-by: Ray Kinsella <mdr@ashroe.eu>
2021-04-14dpdk: add RSS capability flag to iavf PMD in dpdk_pluginChenmin Sun1-4/+4
Type: fix Signed-off-by: Chenmin Sun <chenmin.sun@intel.com> Change-Id: I215b660a466e0579918e49de543163fd28f95c22
2021-03-26vlib: introduce vlib_get_elog_main()Damjan Marion1-5/+2
Type: improvement Change-Id: I73383eb15186021cd6527d112da8443a0082f129 Signed-off-by: Damjan Marion <damarion@cisco.com>
2021-03-19interface: add capabilities flagsMohsin Kazmi1-7/+11
Type: improvement This patch adds flags to represent the modern NICs capabilities. Change-Id: I96d38d9ab7eac55974d72795cd100d8337168e1e Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
2021-03-18dpdk: don't mask interrupts for some driversMohammed Hawari1-5/+8
It is well known that for some NICs, masking interrupts results in delaying desc writebacks, which breaks poll mode. This fix introduces an "int-unmaskable" dpdk device flag to identify such devices (typically Intel FVL). For such devices, interrupts are masked by a call to file_update(...,UNIX_FILE_UPDATE_DELETE) instead of rte_eth_dev_rx_intr_disable (...) Change-Id: Ifbc701aebe8572319b7aae19382bd683a47fc3cf Type: fix Fixes: 19ff0c3699342b512c03362b3815df684a661f49 Signed-off-by: Mohammed Hawari <mohammed@hawari.fr>
2021-03-15dpdk: implement interrupt modeMohammed Hawari1-1/+5
Change-Id: I6ababc99ecf559327a4370914580c98d32680175 Type: feature Signed-off-by: Mohammed Hawari <mohammed@hawari.fr>
2021-03-04dpdk: enable AVX-512 on ICLRay Kinsella1-0/+5
Enable DPDK AVX-512 Vector PMDs on Intel Icelake Type: improvement Signed-off-by: Ray Kinsella <mdr@ashroe.eu> Signed-off-by: Radu Nicolau <radu.nicolau@intel.com> Change-Id: Ie5d5bf54ccaa65c1d053d56a2f2973fe8625193b
2021-02-12dpdk: use whole vmbus address as hash key for devconfVladimir Ratnikov1-19/+20
u32[0] is not enough unique for some platforms like azure where several devices(not only network) can have almost the same addresses and this can cause collisions. Change hash to mhash type for vmbus devices with key of whole 16 bytes of vmbus address. Type: improvement Signed-off-by: Vladimir Ratnikov <vratnikov@netgate.com> Change-Id: Ic6c6a657ae29f45beddd0c69d8e785e702349460
2021-01-21interface: rx queue infra rework, part oneDamjan Marion1-6/+15
Type: improvement Change-Id: I4008cadfd5141f921afbdc09a3ebcd1dcf88eb29 Signed-off-by: Damjan Marion <damarion@cisco.com>
2021-01-21dpdk: terminate device devargs stringMatthew Smith1-1/+2
Type: fix When a device is whitelisted with devargs arguments specified, the string that is generated and added to conf->eal_init_args is not explicitly terminated with 0. If the formatted string takes up all of the memory allocated to the vector which stores it and it is used later as a string in a format() or printf() call, any nonzero characters stored in memory at the address immediately following the memory allocated for the vector will be erroneously appended to the string. Terminate the string with 0 to ensure that this does not happen. Change-Id: I20a78d994daad93bf5aecab5c03d705022e882ec Signed-off-by: Matthew Smith <mgsmith@netgate.com>
2021-01-11dpdk: allow configure individual VMBUS devicesVladimir Ratnikov1-47/+187
now startup.conf supports confuguration for VMBUS devices as for PCI devices for whitelisting/blacklisting dpdk { dev fa5a6e7a-cf3a-4b98-9569-addb479b84bc } with sub-configuration as for PCI devices dpdk { blacklist fa5a6e7a-cf3a-4b98-9569-addb479b84bc } where fa5a6e7a-cf3a-4b98-9569-addb479b84bc - example of UUID struct vlib_vmbus_addr_t changed to union with UUID described fields Added device_config_index_by_vmbus_addr blacklist_by_vmbus_addr to enumerate available device configs hash_key is as_u32[0] field(last 4 bytes of UUID) Lost of precision against full UUID, but 2^32 is enough to handle all the devices available Added is_blacklisted check while creating vnet devices in order to supress creation of dev if it's blacklisted Type: feature Signed-off-by: Vladimir Ratnikov <vratnikov@netgate.com> Change-Id: Id82611e54fed082190e488c7e5fbe14ecbe5b2ab
2020-12-14misc: refactor clib_bitmap_foreach macroDamjan Marion1-4/+4
Type: refactor Change-Id: I077110e1a422722e20aa546a6f3224c06ab0cde5 Signed-off-by: Damjan Marion <damarion@cisco.com>
2020-12-14misc: move to new pool_foreach macrosDamjan Marion1-2/+2
Type: refactor Change-Id: Ie67dc579e88132ddb1ee4a34cb69f96920101772 Signed-off-by: Damjan Marion <damarion@cisco.com>
2020-12-11dpdk: bump to dpdk 20.11Fan Zhang1-2/+2
Type: feature This patch bumps DPDK to 20.11. In addtion a few changes are made: - Changed dynamic rx offload flag display. - Updated deprecating options. Signed-off-by: Fan Zhang <roy.fan.zhang@intel.com> Change-Id: I6e4399d551a7eb8e1a9fc9ef6e39e74266450ad4
2020-11-24dpdk: fix eal in nohugtlb modeNathan Skrzypczak1-16/+22
When running with `dpdk { no-hugetlb }` dont try to allocate hugepages and remove --in-memory as this seems to be rejected by DPDK Type: fix Change-Id: I02c56ade0b4e706b3f76331745e2af64bb62f6e0 Signed-off-by: Nathan Skrzypczak <nathan.skrzypczak@gmail.com>
2020-11-19dpdk: Telemetry thread is off by default.Dmitry Vakrhushev1-0/+8
Currently thread with telemetry is enabled by default, to prevent to use resources, thread should be off. The thread can be switch on back using additional option in the dpdk's stanza. dpdk { telemetry } Type: feature Change-Id: I1c25e8ee99f31dd01dc372f54e77e81a5bb67126 Signed-off-by: Dmitry Vakrhushev <dmitry@netgate.com>
2020-10-21vlib: print logs to stderr if interactive or nosyslog setDamjan Marion1-3/+9
If VPP is started in interactive mode, instead of sending logs to syslog server we print them directly to stderr. Output is colorized, but that can be turned off with unix { nocolor } Type: improvement Change-Id: I9a0f0803e4cba2849a6efa0b6a86b9614ed33ced Signed-off-by: Damjan Marion <damarion@cisco.com>
2020-10-02dpdk: split PCI blacklist rte_eal args from startup.confVladimir Ratnikov1-2/+3
Type: fix Fixes: ed04407829728c5d258b6600155edabd5198d971 Signed-off-by: Vladimir Ratnikov <vratnikov@netgate.com> Change-Id: I5aebcba7b97db758310042fd446328ee8f691641
2020-09-11dpdk: fix coverity defect #214232, #182930Chenmin Sun1-1/+1
Type: fix Signed-off-by: Chenmin Sun <chenmin.sun@intel.com> Change-Id: Ie328834159687cdb4314c37d36697f2fb9081fbd
2020-09-09interface: support configuring RSS steering queuesChenmin Sun1-33/+49
This patch adds the RSS steering queues set interface, and it's implementation in DPDK device: /* Interface to set rss queues of the interface */ typedef clib_error_t *(vnet_interface_rss_queues_set_t) (struct vnet_main_t * vnm, struct vnet_hw_interface_t * hi, clib_bitmap_t *bitmap); This patch also introduces a command line to set the RSS queues: set interface rss queues <interface> <list <queue-list>> To display the rss queues, use "show hardware-interfaces" Below is the example to configure rss queues for interface Gig0: vpp# set interface rss queues Gig0 list 0,2,4-7 vpp# show hardware-interfaces brief Name Idx Link Hardware VirtualFunctionEthernet18/1/0 1 down VirtualFunctionEthernet18/1/0 Link speed: unknown RSS queues: 0 2 4 5 6 7 local0 0 down local0 Link speed: unknown vpp# Users can also configure the rss queues on a dpdk interface in startup.conf: dpdk { dev 0000:18:01.0 { rss-queues 0,2,5-7 } } Type: feature Signed-off-by: Chenmin Sun <chenmin.sun@intel.com> Change-Id: I1835595a1c54016a84eabee9fd62ce137935385d
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>