summaryrefslogtreecommitdiffstats
path: root/src/plugins/dpdk/device/init.c
AgeCommit message (Collapse)AuthorFilesLines
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>
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>