aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/vmxnet3
AgeCommit message (Collapse)AuthorFilesLines
2023-10-14feature: remove unused codeDamjan Marion1-2/+2
Type: improvement Change-Id: If775b1d145e462346de562a3c893f302e8c7b814 Signed-off-by: Damjan Marion <damarion@cisco.com>
2023-01-11pci: add option to force uio bindingBenoît Ganne3-7/+18
Type: improvement Change-Id: Ifea4badd58f7e2b5e792d7506f6747851a08587f Signed-off-by: Benoît Ganne <bganne@cisco.com>
2022-05-17interface: fix overflow of link speed.Anton Nikolaev1-4/+6
Type: fix There were several places where mbps were converted to kbps for link_speed, but often drivers of devices set link speed to unknown (0xFFFFFFFF) on initialization, so there was multiplication of link_speed equal 0xFFFFFFFF(UINT32_MAX) by 1000, this provides overflow of unsigned int, and as result link_speed was equal 4295 Gbps, but actually link_speed is unknown. Signed-off-by: Anton Nikolaev <anikolaev@netgate.com> Change-Id: Ib462ed6ed685654af4687041e115bfb74e640f13
2022-04-04vppinfra: make _vec_len() read-onlyDamjan Marion1-2/+2
Use of _vec_len() to set vector length breaks address sanitizer. Users should use vec_set_len(), vec_inc_len(), vec_dec_len () instead. Type: improvement Change-Id: I441ae948771eb21c23a61f3ff9163bdad74a2cb8 Signed-off-by: Damjan Marion <damarion@cisco.com>
2022-02-15tcp: Do not include the tcp_packet.h file in the ip4_packet.hNeale Ranns1-0/+1
Type: refactor IP4 does not depend on TCP (it's the other way around). This upside down dependency leads to some nasty circular includes when trying to use ip46_address.h in interface.h Signed-off-by: Neale Ranns <neale@graphiant.com> Change-Id: I4a1bd21543b08b9c1cf1e5563da738414734a878
2022-01-10interface: refactor interface capabilities code, part 2Damjan Marion1-6/+8
Type: improvement Signed-off-by: Damjan Marion <damarion@cisco.com> Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com> Change-Id: Ie595e69af8657b0ee18a84ac71c5d433108d9ef8
2022-01-07vmxnet3: memory leak on parsing bad CLI commandSteven Luong1-3/+5
When parsing bad "create interface vmxnet3" command, we should call unformat_free prior to return Type: fix Fixes: df7f8e8cffcc43531f7daeda44d436b60e538141 Signed-off-by: Steven Luong <sluong@cisco.com> Change-Id: I2663894c6cb8066ca2abb1c56f0ca46d0fef19f7
2022-01-07ethernet: new interface registration functionDamjan Marion1-10/+7
Prep for supporting multiple callbacks, optional args, etc. Type: improvement Change-Id: I96244c098712e8213374678623f12527b0e7f387 Signed-off-by: Damjan Marion <damarion@cisco.com>
2022-01-05interface: refactor interface capabilities codeDamjan Marion1-4/+3
Make it shorter to type, easier to debug, make adding callbacks in future simpler. Type: improvement Change-Id: I6cdd6375e36da23bd452a7c7273ff42789e94433 Signed-off-by: Damjan Marion <damarion@cisco.com>
2021-12-03api: refactor to use REPLY_MSG_ID_BASE #defineKlement Sekera1-5/+4
REPLY_MSG_ID_BASE is the standard way to define reply message id base, so this refactor makes all the files use that. This is a preparation patch for future safety add-ons which rely on REPLY_MACRO* parameters to be preprocessor tokens identifying the message instead, Type: refactor Signed-off-by: Klement Sekera <ksekera@cisco.com> Change-Id: Ibe3e056a3d9326d08af45bbcb25588b11e870141
2021-10-13docs: convert plugins doc md->rstNathan Skrzypczak2-64/+86
Type: improvement Change-Id: I7e821cce1feae229e1be4baeed249b9cca658135 Signed-off-by: Nathan Skrzypczak <nathan.skrzypczak@gmail.com>
2021-10-01devices: add support for pseudo header checksumMohsin Kazmi1-8/+0
Type: improvement Linux uses pseudo header checksum when checksum of l4 is offloaded. This patch adds similar support in virtual interfaces. Change-Id: I6a94d1104e59356f95057e7c122e3be9cd8659a3 Signed-off-by: Aloys Augustin <aloaugus@cisco.com> Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
2021-09-27misc: api move continuedFlorin Coras1-1/+1
Move control ping and change dependencies from vpe.api_types to memclnt.api_types Type: refactor Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: I9f8bc442e28738c48d64d1f6794082c8c4f5725b
2021-08-31vmxnet3: set RX interrupt pending only when neededSteven Luong3-6/+59
When an RX thread handles more than one RX queue and has a mix of queues in interrupt mode and polling mode, the RX input routine is naturally in polling mode. In that case, there is no need to set RX interrupt pending when descriptor is available in the queue for interrupt mode. Type: fix Signed-off-by: Steven Luong <sluong@cisco.com> Change-Id: Iedbe57941eca3152c0e8ab9096cc81f315e0a915
2021-08-20vlib: add format_vnet_buffer_no_chainBenoît Ganne1-1/+1
- add format_vnet_buffer and format_vnet_buffer_no_chain to mirror format_vlib_buffer and format_vlib_buffer_no_chain - format_vnet_buffer used to be the "no chain" version, replace all of its current use with the corresponding format_vnet_buffer_no_chain - add a function to dump vnet buffer details from gdb Type: improvement Change-Id: I143ce845f80e7ef937ea33a557b6e3b5988c5b8f Signed-off-by: Benoît Ganne <bganne@cisco.com>
2021-07-01vmxnet3: support manual thread assignment to tx queueSteven Luong3-18/+26
Thread assignment to tx queue has always been automatic and there was no way to modify it. With this patch, it is now possible to use the cli "set interface tx-queue" to change the thread assignment to tx queue for vmxnet3 interface, thanks to the new tx infra. Type: feature Signed-off-by: Steven Luong <sluong@cisco.com> Change-Id: I1544e3557f70251d4bd423cc3d9f28ee1d44db4a
2021-05-06vlib: fix the offload flags sizeMohsin Kazmi1-1/+1
Type: fix Change-Id: I433fe3799975fe3ba00fa30226f6e8dae34e88fc Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
2021-05-01vlib: refactor trajectory trace debug featureBenoît Ganne1-1/+0
trajectory trace has been broken for a while because we used to save the buffer trajectory in a vector pointed to in opaque2. This does not work well when opaque2 is copied (eg. because of a clone) as 2 buffers end up sharing the same vector. This dedicates a full cacheline in the buffer metadata instead when trajectory is compiled in. No dynamic allocation, no sharing, no tears. Type: refactor Change-Id: I6a028ca1b48d38f393a36979e5e452c2dd48ad3f Signed-off-by: Benoît Ganne <bganne@cisco.com>
2021-03-19interface: add capabilities flagsMohsin Kazmi1-3/+6
Type: improvement This patch adds flags to represent the modern NICs capabilities. Change-Id: I96d38d9ab7eac55974d72795cd100d8337168e1e Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
2021-02-15vlib: refactor checksum offload supportMohsin Kazmi1-9/+12
Type: refactor This patch refactors the offload flags in vlib_buffer_t. There are two main reasons behind this refactoring. First, offload flags are insufficient to represent outer and inner headers offloads. Second, room for these flags in first cacheline of vlib_buffer_t is also limited. This patch introduces a generic offload flag in first cacheline. And detailed offload flags in 2nd cacheline of the structure for performance optimization. Change-Id: Icc363a142fb9208ec7113ab5bbfc8230181f6004 Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
2021-01-21interface: rx queue infra rework, part oneDamjan Marion3-26/+27
Type: improvement Change-Id: I4008cadfd5141f921afbdc09a3ebcd1dcf88eb29 Signed-off-by: Damjan Marion <damarion@cisco.com>
2020-12-14misc: move to new pool_foreach macrosDamjan Marion3-11/+10
Type: refactor Change-Id: Ie67dc579e88132ddb1ee4a34cb69f96920101772 Signed-off-by: Damjan Marion <damarion@cisco.com>
2020-11-09vlib: fix trace number accountingBenoît Ganne1-11/+12
When using classifier to filter traces, not all packets will be traced. In that case, we should only count traced packets. Type: fix Change-Id: I87d1e217b580ebff8c6ade7860eb43950420ae78 Signed-off-by: Benoît Ganne <bganne@cisco.com>
2020-10-24vmxnet3: vmxnet3_dump is brokenSteven Luong1-0/+3
control ping id was not set Fixes: gerrit 22396 / I009e806997461ad790f125d6359993862e1c5e5d Type: fix Signed-off-by: Steven Luong <sluong@cisco.com> Change-Id: I6e96533f150da4bd0e651b5572345246623ae0ad
2020-10-24vmxnet3: add sw_if_index filter to vmxnet3 interface dumpSteven Luong3-1/+178
Introduce a replacement API for vmxnet3_dump which supports interface filter. Type: improvement Signed-off-by: Steven Luong <sluong@cisco.com> Change-Id: I76074db2aa34b397ce570a2019c43e042a9c7838
2020-10-08interface: shorten vnet_hw_if_rx_modeDamjan Marion1-2/+2
This is part of bigger refactor. Type: refactor Change-Id: I6fc2c0a1e2d217a70952901bcf775b8485bd3c20 Signed-off-by: Damjan Marion <damarion@cisco.com>
2020-09-16vmxnet3: gso fixesSteven Luong4-13/+29
outbound: wrong header len computation gso size and header length need to be set in the first segment of the chain inbound: EOP may have zero length descriptor to terminate the chain missing endian conversion for ethertype Type: fix Signed-off-by: Steven Luong <sluong@cisco.com> Change-Id: Iaa003c0e9af3ead4df6c6c0d5772a179d2ff15c4
2020-08-24vmxnet3: enhance debug CLI error handlingSteven Luong2-2/+18
- Display the interface name upon successfully creating the interface. - Don't go silent when error occurs. Be explicit about it. Type: improvement Signed-off-by: Steven Luong <sluong@cisco.com> Change-Id: Ie4fdaf323f8b3833ad4a7af3872290141204aba8
2020-01-06vmxnet3: add FEATURE.yamlSteven Luong1-0/+9
Type: docs Signed-off-by: Steven Luong <sluong@cisco.com> Change-Id: I8b0432a3a384dc2431fcb0b4e7c3f0cfb1713d8e
2019-12-07vmxnet3: use explicit types in apiOle Troan3-9/+12
Type: fix Signed-off-by: Ole Troan <ot@cisco.com> Change-Id: I2e699fc812c45f88e359f0f7231f372955e70149
2019-12-04gso: remove the interface countMohsin Kazmi1-4/+0
Type: refactor Change-Id: I51405b9d09fb6fb03d08569369fdd4e11c647908 Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
2019-10-31vlib: only dump 1st buffer in chain by defaultBenoît Ganne1-1/+1
Several nodes include buffers in their traces, but only the 1st. When formatting the trace we must not try to iterate through all chained buffers. Default to display only the 1st buffer. Type: fix Change-Id: Ib3c668bbf4ab70ae68eba2ac402c7b7329825b70 Signed-off-by: Benoît Ganne <bganne@cisco.com>
2019-09-30vmxnet3: remove api boilerplateOle Troan6-309/+10
Type: refactor Signed-off-by: Ole Troan <ot@cisco.com> Change-Id: I009e806997461ad790f125d6359993862e1c5e5d
2019-09-24vlib: add flag to explicitelly mark nodes which can init per-node packet traceDamjan Marion1-0/+1
Type: feature Change-Id: I913f08383ee1c24d610c3d2aac07cef402570e2c Signed-off-by: Damjan Marion <damarion@cisco.com>
2019-09-02vmxnet3: interface rx counter not increment correctlySteven Luong1-1/+1
vlib_increment_combined_counter takes sw_if_index, not hw_if_index. Using hw_if_index may work as long as there is no subinterface created to cause hw_if_index and sw_if_index to differ. Type: fix Signed-off-by: Steven Luong <sluong@cisco.com> Change-Id: If50412dc1e84c4f1f5b977b58d0e1aeb5ab8ebe6
2019-08-30vmxnet3: per interface gso supportSteven Luong8-37/+26
gso option for vmxnet3 is per VPP process currently. There is no reason why we cannot provide per interface gso support. Type: feature Signed-off-by: Steven Luong <sluong@cisco.com> Change-Id: Ife962b52221191050dedd18252b859880ccd7599
2019-08-20vppapigen: remove support for legacy typedefsPaul Vinciguerra1-2/+2
vppapigen has remapped legacy to typedefs behind the scenes for some time now. - update .api files to use new style typedefs. - issue error on 'typeonly define' in .api files - remove unneeded macros redefining vl_noop_handler Type: refactor Change-Id: I7a8c4a6dafacee6a131f95cd0e9b03a8c60dea8b Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
2019-08-02vmxnet3: don't bypass ethernet_inputSteven Luong2-15/+6
Queue everything to ethernet_input to not break pcap rx trace. Fix a minor typo in vmxnet3_api.c Type: fix Signed-off-by: Steven Luong <sluong@cisco.com> Change-Id: I7df7b3e20b525e3d6f7421c8e213b6541cdd15b6
2019-07-23api: binary api cleanupDave Barach2-4/+6
Multiple API message handlers call vnet_get_sup_hw_interface(...) without checking the inbound sw_if_index. This can cause a pool_elt_at_index ASSERT in a debug image, and major disorder in a production image. Given that a number of places are coded as follows, add an "api_visible_or_null" variant of vnet_get_sup_hw_interface, which returns NULL given an invalid sw_if_index, or a hidden sw interface: - hw = vnet_get_sup_hw_interface (vnm, sw_if_index); + hw = vnet_get_sup_hw_interface_api_visible_or_null (vnm, sw_if_index); if (hw == NULL || memif_device_class.index != hw->dev_class_index) return clib_error_return (0, "not a memif interface"); Rename two existing xxx_safe functions -> xxx_or_null to make it obvious what they return. Type: fix Change-Id: I29996e8d0768fd9e0c5495bd91ff8bedcf2c5697 Signed-off-by: Dave Barach <dave@barachs.net>
2019-07-09vat: unload unused vat pluginsDave Barach1-4/+5
If the corresponding vpp plugin is absent, return a non-zero clib_error_t * from vat_plugin_register ("xxx plugin not loaded"). The vat plugin calls dlclose on the vat plugin, and it disappears. Depending on the plugin configuration, this can reduce the vpp virtual size by several gigabytes. Added a VAT_PLUGIN(<plugin-name>) macro to vat_helper_macros, clean up boilerplate vat_plugin_register() implementations. Fixed a number of non-standard vat_plugin_register methods. Type: refactor Change-Id: Iac908e5af7d5497c78d6aa9c3c51cdae08374045 Signed-off-by: Dave Barach <dave@barachs.net>
2019-06-26vmxnet3: custom dump and debug cli fixSteven Luong3-27/+84
Add missing custom dump for vmxnet3_create, vmxnet3_delete, and vmxnet3_dump. Fix vmxnet3_create debug cli which may not parse all parameters correctly due to passing address of u16 to unformat(). The fix is to use a u32 local variable to receive the correct value from unformat(). Type: fix Change-Id: I04251c9ed0ab397ed4b1b5843a73880aec98b9f6 Signed-off-by: Steven Luong <sluong@cisco.com>
2019-05-21vmxnet3: gso_l4_hdr_sz is not set correctlySteven Luong1-16/+24
vnet_buffer2 -> gso_l4_hdr_sz is not set correctly because vnet_buffer->l4_hdr_offset is not set yet at the top. Move the code to set vnet_buffer->gso_l4_hdr_sz further down. Change-Id: I0110e4687572bb93cb593d7d4d14a3d5083af13a Signed-off-by: Steven Luong <sluong@cisco.com>
2019-05-03plugins: clean up plugin descriptionsDave Wallace1-1/+1
- Make plugin descriptions more consistent so the output of "show plugin" can be used in the wiki. Change-Id: I4c6feb11e7dcc5a4cf0848eed37f1d3b035c7dda Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
2019-04-19Doxygen cleanup.Dave Wallace1-1/+1
- Add subpages definitions in appropriate section (User or Dev docs) for doc files (*.rst, *.md) that being listed at the top level of the generated doc page. - Generate and add API list to RELEASE doc. - Fix list_api_changes script to use HEAD as the endtag so it doesn't need to be changed every release. Change-Id: Iace7b6433359c6b96869cb1db01facbbcb0ac1e6 Signed-off-by: Dave Wallace <dwallacelf@gmail.com> (cherry picked from commit 11ee93f6abfaddf5bbd56cf0858c0c6ea0384b65)
2019-03-18vmxnet3: auto bind supportSteven Luong7-23/+63
For creating the vmxnet3 interface, add the bind option to automatically bind the pci to vfio-pci module which removes the need for manual bind. Manual bind still works, should people prefer to go that route. Change-Id: Ife75926f8755d754a08dd0ecff0f1de326ad5ba1 Signed-off-by: Steven Luong <sluong@cisco.com>
2019-02-26vmxnet3: RSS supportSteven Luong7-81/+229
Configurable up to 16 RX queues per interface. Default is 1. Change-Id: If9e2beffeb7e7dc8c2264b4db902132b2fea02c1 Signed-off-by: Steven Luong <sluong@cisco.com>
2019-02-26vmxnet3: lro/tso and rx checksumSteven Luong6-45/+283
Add lro/tso and rx checksum support. lro/tso is configured via startup.conf vmxnet3 { lro } It is disable by default due to not all versions of ESXi supports it. Change-Id: Icf224ff528884ecd9e655b4fcf4481194e8c5a63 Signed-off-by: Steven Luong <sluong@cisco.com>
2019-02-09buffers: fix typoDamjan Marion1-3/+3
Change-Id: I4e836244409c98739a13092ee252542a2c5fe259 Signed-off-by: Damjan Marion <damarion@cisco.com>
2019-02-06buffers: make buffer data size configurable from startup configDamjan Marion1-2/+3
Example: buffers { default data-size 1536 } Change-Id: I5b4436850ca18025c9fdcfc7ed648c2c2732d660 Signed-off-by: Damjan Marion <damarion@cisco.com>
2019-02-02vmxnet3: multiple TX queues supportSteven Luong9-182/+296
Add num-tx-queues to the vmxnet3 create CLI/API. Default is 1. Max is min (8, the number of cores assigned to VPP). Change-Id: I7e0a659a82d01c719665c228dd8a71e3288a2895 Signed-off-by: Steven Luong <sluong@cisco.com>