summaryrefslogtreecommitdiffstats
path: root/src/plugins/vmxnet3
AgeCommit message (Collapse)AuthorFilesLines
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>
2019-01-15vmxnet3: add numa support and link speedSteven4-13/+23
Allocate physmem on the same numa set link speed cap vmxnet3 support version to 3 if the device supports higher version Change-Id: Id47dd83b0da53e623fd6cf3ad010e58158b1ab15 Signed-off-by: Steven <sluong@cisco.com>
2018-12-17vmxnet3: support clear hardware interface countersSteven3-20/+60
Add clear hardware interface counters callback for vmxnet3 device. We take a snap shot of the statistics in the callback. For the show hardware command, we display the delta between the current statistics and the last snapshot. Change-Id: Ie1389d2141f519300f427fe6ff2fdf97fd9e9378 Signed-off-by: Steven <sluong@cisco.com>
2018-11-13vlib rename vlib_frame_args(...) to vlib_frame_scalar_args(..)Damjan Marion1-1/+1
Typically we have scalar_size == 0, so it doesn't matter but vlib_frame_args was providing pointer to scalar frame data, not vector data. To avoid future confusion function is renamed to vlib_frame_scalar_args(...) Change-Id: I48b75523b46d487feea24f3f3cb10c528dde516f Signed-off-by: Damjan Marion <damarion@cisco.com>
2018-11-07vmxnet3: reduce calling vmxnet3_reg_write_inlineSteven3-8/+18
In output.c, we buffer the descriptors and call vmxnet3_reg_write_inline once outside the loop. This change improves the performance dramatically. When refilling the ring, there is no need to inform the device unless explicitly specified by the device (ctrl.update_prod == 1) Change-Id: I7031d58bff0d249e913d14236d416c91eb6ab94a Signed-off-by: Steven <sluong@cisco.com>
2018-10-27vmxnet3: add logging support to the control plane [VPP-1470]Steven4-17/+87
There are different flavors of vmxnet3 device, esxi server, vm fusion, vmware workstation, and vmware player, that we need to communicate with. Each of them also has different versions. We really need the control plane logging to debug when things don't work as expected. Change-Id: I53c23cf10958bfbc06abb1c252d368003563cd04 Signed-off-by: Steven <sluong@cisco.com>
2018-10-26vmxnet3: enable promiscuous modeSteven1-1/+1
Some L2 traffic requires promiscuous mode enable on the interface Change-Id: Icbb2792aaf0d9d1c51373e46ae5049ff0d986863 Signed-off-by: Steven <sluong@cisco.com>
2018-10-23Numa-aware, growable physical memory allocator (pmalloc)Damjan Marion2-51/+28
Change-Id: Ic4c46bc733afae8bf0d8146623ed15633928de30 Signed-off-by: Damjan Marion <damarion@cisco.com>
2018-10-23c11 safe string handling supportDave Barach4-12/+12
Change-Id: Ied34720ca5a6e6e717eea4e86003e854031b6eab Signed-off-by: Dave Barach <dave@barachs.net>
2018-10-22vlib: pci improvementsDamjan Marion2-15/+16
- logging - pass vlib_main_t to all APIs - open vfio container only when needed Change-Id: I897e53e0af3f91c3a99f0c827401d1c0ec2e478a Signed-off-by: Damjan Marion <damarion@cisco.com>
2018-10-22vlib: introduce vlib_buffer_get_{pa,va,current_va,current_pa} inlinesDamjan Marion2-7/+5
Change-Id: I0b42ac6b05bc9910904a97924ea4bebc84507d4d Signed-off-by: Damjan Marion <damarion@cisco.com>
2018-10-16vmxnet3: show vmxnet3 with filtering capability [VPP-1452]Steven3-12/+234
show vmxnet3 desc may display 5000 lines of output since it has 5 tables. Each table may have 1000 entries. It would not be very useful to debug problem. We need filtering capability for the subject show command. We need to be able to display the descriptor table per interface, per interface per table, and per interface per table per slot. The latter is the most useful. tested the following valid combinations show vmxnet3 show vmxnet3 desc show vmxnet3 vmxnet3-0/13/0/0 show vmxnet3 vmxnet3-0/13/0/0 desc show vmxnet3 vmxnet3-0/13/0/0 rx-comp show vmxnet3 vmxnet3-0/13/0/0 rx-comp 1 show vmxnet3 vmxnet3-0/13/0/0 tx-comp show vmxnet3 vmxnet3-0/13/0/0 tx-comp 1 show vmxnet3 vmxnet3-0/13/0/0 rx-desc-0 show vmxnet3 vmxnet3-0/13/0/0 rx-desc-0 1 show vmxnet3 vmxnet3-0/13/0/0 rx-desc-1 show vmxnet3 vmxnet3-0/13/0/0 rx-desc-1 1 show vmxnet3 vmxnet3-0/13/0/0 tx-desc show vmxnet3 vmxnet3-0/13/0/0 tx-desc 1 negative tests and command is rejected show vmxnet3 abc show vmxnet3 desc abc show vmxnet3 vmxnet3-0/13/0/0 abc show vmxnet3 vmxnet3-0/13/0/0 desc abc show vmxnet3 vmxnet3-0/13/0/0 rx-comp abc show vmxnet3 vmxnet3-0/13/0/0 rx-comp 1 abc Change-Id: I0ff233413496e58236f8fb4a94e493494c20c5cb Signed-off-by: Steven <sluong@cisco.com>
2018-10-16vmxnet3: vmxnet3_test_plugin.so: undefined symbol: format_vlib_pci_addr ↵Steven1-1/+9
[VPP-1456] When using vpp_api_test, there is an undefined symbol error for format_vlib_pci_addr when vmxnet3_test_plugin.so is loaded. The cause is due to vlib not included in vpp_api_test. Remove the reference for vlib.so in vmxnet3_test. Change-Id: I37c00dfe2f843d99ad6c4fc7af6ed10bac4c2df8 Signed-off-by: Steven <sluong@cisco.com> (cherry picked from commit 3d29e83112a349b7d27ef792463f246b18115d3e)
2018-10-10vmxnet3: better error handlingSteven2-20/+42
try harder on output - if there is no descriptor space available, try to free up some and check again. make sure we free the buffer if error is encoutered on input. Change-Id: I41a45213e29de71935afe707889e515037cd081f Signed-off-by: Steven <sluong@cisco.com>
2018-10-03vmxnet3: coverity woeSteven2-12/+12
Coverity complains that hb might be null when !prev_b0 is true. It may be right, but not likely. To make the code more explicit when it parses a complete packet, set got_packet = 1 and test got_packet instead of prev_b0 which is somewhat obscure. Use vlib_buffer_free_one rather than vlib_buffer_free_no_next in output.c which takes care of chain buffers. Change-Id: I6e0587605fdc622c3f55fedd74c474666631ed91 Signed-off-by: Steven <sluong@cisco.com>