aboutsummaryrefslogtreecommitdiff
path: root/sys/dev/vmware
Commit message (Collapse)AuthorAgeFilesLines
* Start process of removing the use of the deprecated "M_FLOWID" flagHans Petter Selasky2014-12-011-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | from the FreeBSD network code. The flag is still kept around in the "sys/mbuf.h" header file, but does no longer have any users. Instead the "m_pkthdr.rsstype" field in the mbuf structure is now used to decide the meaning of the "m_pkthdr.flowid" field. To modify the "m_pkthdr.rsstype" field please use the existing "M_HASHTYPE_XXX" macros as defined in the "sys/mbuf.h" header file. This patch introduces new behaviour in the transmit direction. Previously network drivers checked if "M_FLOWID" was set in "m_flags" before using the "m_pkthdr.flowid" field. This check has now now been replaced by checking if "M_HASHTYPE_GET(m)" is different from "M_HASHTYPE_NONE". In the future more hashtypes will be added, for example hashtypes for hardware dedicated flows. "M_HASHTYPE_OPAQUE" indicates that the "m_pkthdr.flowid" value is valid and has no particular type. This change removes the need for an "if" statement in TCP transmit code checking for the presence of a valid flowid value. The "if" statement mentioned above is now a direct variable assignment which is then later checked by the respective network drivers like before. Additional notes: - The SCTP code changes will be committed as a separate patch. - Removal of the "M_FLOWID" flag will also be done separately. - The FreeBSD version has been bumped. MFC after: 1 month Sponsored by: Mellanox Technologies Notes: svn path=/head/; revision=275358
* Provide vmxnet3_get_counter() to return counters that are not collected,Gleb Smirnoff2014-09-251-59/+36
| | | | | | | but taken from hardware. Notes: svn path=/head/; revision=272099
* Improve transmit sending offload, TSO, algorithm in general.Hans Petter Selasky2014-09-222-3/+3
| | | | | | | | | | | | | | | | | | | | The current TSO limitation feature only takes the total number of bytes in an mbuf chain into account and does not limit by the number of mbufs in a chain. Some kinds of hardware is limited by two factors. One is the fragment length and the second is the fragment count. Both of these limits need to be taken into account when doing TSO. Else some kinds of hardware might have to drop completely valid mbuf chains because they cannot loaded into the given hardware's DMA engine. The new way of doing TSO limitation has been made backwards compatible as input from other FreeBSD developers and will use defaults for values not set. Reviewed by: adrian, rmacklem Sponsored by: Mellanox Technologies MFC after: 1 week Notes: svn path=/head/; revision=271946
* Revert r271504. A new patch to solve this issue will be made.Hans Petter Selasky2014-09-132-7/+4
| | | | | | | Suggested by: adrian @ Notes: svn path=/head/; revision=271551
* Improve transmit sending offload, TSO, algorithm in general.Hans Petter Selasky2014-09-132-4/+7
| | | | | | | | | | | | | | | | | | | The current TSO limitation feature only takes the total number of bytes in an mbuf chain into account and does not limit by the number of mbufs in a chain. Some kinds of hardware is limited by two factors. One is the fragment length and the second is the fragment count. Both of these limits need to be taken into account when doing TSO. Else some kinds of hardware might have to drop completely valid mbuf chains because they cannot loaded into the given hardware's DMA engine. The new way of doing TSO limitation has been made backwards compatible as input from other FreeBSD developers and will use defaults for values not set. MFC after: 1 week Sponsored by: Mellanox Technologies Notes: svn path=/head/; revision=271504
* Remove some write only variablesBryan Venteicher2014-07-021-6/+0
| | | | | | | MFC after: 3 days Notes: svn path=/head/; revision=268196
* Give each interrupt a descriptive name when using MSIXBryan Venteicher2014-06-291-0/+5
| | | | | | | MFC after: 3 days Notes: svn path=/head/; revision=268012
* Increment the pending packets more aggressively for TSOBryan Venteicher2014-06-201-3/+3
| | | | | | | | | | | | | Assume the number of description used is reasonable value to increment this otherwise opaque field by. While here, reduce a minor difference between the legacy and multiqueue transmit paths. MFC after: 1 week Notes: svn path=/head/; revision=267663
* Handle multiple calls to rxq_eof for single packet completionBryan Venteicher2014-06-202-2/+18
| | | | | | | | | | | | | This requires the VMware vmxnet3 device to flip the start of packet descriptor's generation before the rest of the packet's descriptors have been loaded into the Rx ring. I've never observed this behavior, and it seems to make the most sense not to do it this way. But it is not a lot of work for the driver to handle this situation just in case. MFC after: 1 week Notes: svn path=/head/; revision=267662
* Remove an unnecessary kick of the host at the end of transmittingBryan Venteicher2014-06-201-21/+2
| | | | | | | MFC after: 1 week Notes: svn path=/head/; revision=267661
* Fix GCC compile warning: Variable(s) can be used uninitialized.Hans Petter Selasky2014-06-191-2/+4
| | | | Notes: svn path=/head/; revision=267632
* Don't check the dma map address for a static DMA mapping against NULLBryan Venteicher2014-06-141-1/+1
| | | | | | | | | to determine if the mapping is valid. Submitted by: jhb Notes: svn path=/head/; revision=267488
* Fix TSO support on VMware FusionBryan Venteicher2014-06-091-9/+45
| | | | | | | | | | | | | | | | | | Apparently for VMware Fusion (and presumably VMware Workstation/Player since the PR states TSO is broken there too, but I cannot test), the TCP header pseudo checksum calculated should only include the protocol (IPPROTO_TCP) value, not also the lengths as the stack does instead. VMware ESXi seems to ignore whatever value is in the TCP header checksum, and it is a bit surprising there is a different behavior between the VMware products. And it is unfortunate that on ESXi we are forced to do this extra bit of work. PR: kern/185849 MFC after: 3 days Notes: svn path=/head/; revision=267253
* Remove an unnecessary variable reassignmentBryan Venteicher2014-06-091-1/+1
| | | | | | | | | | And it would be bad if 'm' was different from '*m0' at this point, since we've already populated the SG list. MFC after: 3 days Notes: svn path=/head/; revision=267252
* make sure if_transmit returns 0 if the mbuf is enqueued.Luigi Rizzo2014-06-061-2/+1
| | | | | | | | | | ixgbe/ixv.c still needs a similar fix but it takes a little more restructuring of the code. MFC after: 3 days Notes: svn path=/head/; revision=267187
* Add Tx/Rx multiqueue support to vmx(4)Bryan Venteicher2014-03-173-92/+707
| | | | | | | | | | | | | | As a prerequisite for multiple queues, the guest must have MSIX enabled. Unfortunately, to work around device passthrough bugs, FreeBSD disables MSIX when running as a VMWare guest due to the hw.pci.honor_msi_blacklist tunable; this tunable must be disabled for multiple queues. Also included is various minor changes from the projects/vmxnet branch. MFC after: 1 month Notes: svn path=/head/; revision=263259
* Since 32-bit if_baudrate isn't enough to describe a baud rate of a 10 GbitGleb Smirnoff2014-03-131-5/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | interface, in the r241616 a crutch was provided. It didn't work well, and finally we decided that it is time to break ABI and simply make if_baudrate a 64-bit value. Meanwhile, the entire struct if_data was reviewed. o Remove the if_baudrate_pf crutch. o Make all fields of struct if_data fixed machine independent size. The notion of data (packet counters, etc) are by no means MD. And it is a bug that on amd64 we've got a 64-bit counters, while on i386 32-bit, which at modern speeds overflow within a second. This also removes quite a lot of COMPAT_FREEBSD32 code. o Give 16 bit for the ifi_datalen field. This field was provided to make future changes to if_data less ABI breaking. Unfortunately the 8 bit size of it had effectively limited sizeof if_data to 256 bytes. o Give 32 bits to ifi_mtu and ifi_metric. o Give 64 bits to the rest of fields, since they are counters. __FreeBSD_version bumped. Discussed with: emax Sponsored by: Netflix Sponsored by: Nginx, Inc. Notes: svn path=/head/; revision=263102
* Include necessary headers that now are available due to pollutionGleb Smirnoff2013-10-281-0/+1
| | | | | | | | | | via if_var.h. Sponsored by: Netflix Sponsored by: Nginx, Inc. Notes: svn path=/head/; revision=257241
* The r48589 promised to remove implicit inclusion of if_var.h soon. PrepareGleb Smirnoff2013-10-261-0/+1
| | | | | | | | | | | to this event, adding if_var.h to files that do need it. Also, include all includes that now are included due to implicit pollution via if_var.h Sponsored by: Netflix Sponsored by: Nginx, Inc. Notes: svn path=/head/; revision=257176
* Do not provide a hint of the guest's OS versionBryan Venteicher2013-10-112-12/+1
| | | | | | | | | | | The calculation can overflow if __FreeBSD_version is big enough, and it does not appear to be required. Reported by: grehan Approved by: re (gjb) Notes: svn path=/head/; revision=256308
* Use correct type for the vmx vlan filter tableBryan Venteicher2013-09-081-1/+1
| | | | | | | Approved by: re (glebius, gjb) Notes: svn path=/head/; revision=255400
* Few more minor if_vmx tweaksBryan Venteicher2013-08-302-24/+72
| | | | | | | | | | - Allow the Rx/Tx queue sizes to be configured by tunables - Bail out earlier if the Tx queue unlikely has enough free descriptors to hold the frame - Cleanup some of the offloading capabilities handling Notes: svn path=/head/; revision=255055
* Couple minor if_vmx tweaksBryan Venteicher2013-08-272-30/+32
| | | | | | | | | | | | | | | - Use queue size fields from the Tx/Rx queues in various places instead of (currently the same values) from the softc. - Fix potential crash in detach if the attached failed to alloc queue memory. - Move the VMXNET3_MAX_RX_SEGS define to a better spot. - Tweak frame size calculation w.r.t. ETHER_ALIGN. This could be tweaked some more, or removed since it probably doesn't matter much for x86 (and the x86 class of machines this driver will be used on). Notes: svn path=/head/; revision=254950
* Add vmx(4), a VMware VMXNET3 ethernet driver ported from OpenBSDBryan Venteicher2013-08-233-0/+3940
Notes: svn path=/head/; revision=254738