aboutsummaryrefslogtreecommitdiff
path: root/sys/dev/virtio/network
Commit message (Collapse)AuthorAgeFilesLines
...
* Convert to if_foreach_llmaddr() KPI.Gleb Smirnoff2019-10-211-41/+38
| | | | Notes: svn path=/head/; revision=353802
* tap: add support for virtio-net offloadsVincenzo Maffione2019-10-181-0/+293
| | | | | | | | | | | | | | | | | | | | | | | | This patch is part of an effort to make bhyve networking (in particular TCP) faster. The key strategy to enhance TCP throughput is to let the whole packet datapath work with TSO/LRO packets (up to 64KB each), so that the per-packet overhead is amortized over a large number of bytes. This capability is supported in the guest by means of the vtnet(4) driver, which is able to handle TSO/LRO packets leveraging the virtio-net header (see struct virtio_net_hdr and struct virtio_net_hdr_mrg_rxbuf). A bhyve VM exchanges packets with the host through a network backend, which can be vale(4) or if_tap(4). While vale(4) supports TSO/LRO packets, if_tap(4) does not. This patch extends if_tap(4) with the ability to understand the virtio-net header, so that a tapX interface can process TSO/LRO packets. A couple of ioctl commands have been added to configure and probe the virtio-net header. Once the virtio-net header is set, the tapX interface acquires all the IFCAP capabilities necessary for TSO/LRO. Reviewed by: kevans Differential Revision: https://reviews.freebsd.org/D21263 Notes: svn path=/head/; revision=353741
* Split out a more generic debugnet(4) from netdump(4)Conrad Meyer2019-10-171-12/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Debugnet is a simplistic and specialized panic- or debug-time reliable datagram transport. It can drive a single connection at a time and is currently unidirectional (debug/panic machine transmit to remote server only). It is mostly a verbatim code lift from netdump(4). Netdump(4) remains the only consumer (until the rest of this patch series lands). The INET-specific logic has been extracted somewhat more thoroughly than previously in netdump(4), into debugnet_inet.c. UDP-layer logic and up, as much as possible as is protocol-independent, remains in debugnet.c. The separation is not perfect and future improvement is welcome. Supporting INET6 is a long-term goal. Much of the diff is "gratuitous" renaming from 'netdump_' or 'nd_' to 'debugnet_' or 'dn_' -- sorry. I thought keeping the netdump name on the generic module would be more confusing than the refactoring. The only functional change here is the mbuf allocation / tracking. Instead of initiating solely on netdump-configured interface(s) at dumpon(8) configuration time, we watch for any debugnet-enabled NIC for link activation and query it for mbuf parameters at that time. If they exceed the existing high-water mark allocation, we re-allocate and track the new high-water mark. Otherwise, we leave the pre-panic mbuf allocation alone. In a future patch in this series, this will allow initiating netdump from panic ddb(4) without pre-panic configuration. No other functional change intended. Reviewed by: markj (earlier version) Some discussion with: emaste, jhb Objection from: marius Differential Revision: https://reviews.freebsd.org/D21421 Notes: svn path=/head/; revision=353685
* virtio(4): Add PNP match metadata for virtio devicesConrad Meyer2019-06-041-7/+5
| | | | | | | | | | | | | | Register MODULE_PNP_INFO for virtio devices using the newbus PNP information provided by the previous commit. Matching can be quite simple; existing probe routines only matched on bus (implicit) and device_type. The same matching criteria are retained exactly, but is now also available to devmatch(8). Reviewed by: bryanv, markj; imp (earlier version) Differential Revision: https://reviews.freebsd.org/D20407 Notes: svn path=/head/; revision=348599
* Remove non-functional SCTP checksum offload support for virtio.Michael Tuexen2019-05-072-11/+2
| | | | | | | | | | | | | | | | | | | | | | Checksum offloading for SCTP is not currently specified for virtio. If the hypervisor announces checksum offloading support, it means TCP and UDP checksum offload. If an SCTP packet is sent and the host announced checksum offload support, the hypervisor inserts the IP checksum (16-bit) at the correct offset, but this is not the right checksum, which is a CRC32c. This results in all outgoing packets having the wrong checksum and therefore breaking SCTP based communications. This patch removes SCTP checksum offloading support from the virtio network interface. Thanks to Felix Weinrank for making me aware of the issue. Reviewed by: bryanv@ MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D20147 Notes: svn path=/head/; revision=347233
* vtnet: fix typo in vtnet_free_taskqueuesVincenzo Maffione2019-01-291-1/+1
| | | | | | | | | | | | Because of a typo, the code was mistakenly resetting the vtnrx_vq pointer rather than vtntx_tq. Reviewed by: bryanv MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D19015 Notes: svn path=/head/; revision=343552
* vtnet: fix netmap supportVincenzo Maffione2018-11-142-34/+42
| | | | | | | | | | | | | | | | | | | | | | | | | | | | netmap(4) support for vtnet(4) was incomplete and had multiple bugs. This commit fixes those bugs to bring netmap on vtnet in a functional state. Changelist: - handle errors returned by virtqueue_enqueue() properly (they were previously ignored) - make sure netmap XOR rest of the kernel access each virtqueue. - compute the number of netmap slots for TX and RX separately, according to whether indirect descriptors are used or not for a given virtqueue. - make sure sglist are freed according to their type (mbufs or netmap buffers) - add support for mulitiqueue and netmap host (aka sw) rings. - intercept VQ interrupts directly instead of intercepting them in txq_eof and rxq_eof. This simplifies the code and makes it easier to make sure taskqueues are not running for a VQ while it is in netmap mode. - implement vntet_netmap_config() to cope with changes in the number of queues. Reviewed by: bryanv Approved by: gnn (mentor) MFC after: 3 days Sponsored by: Sunny Valley Networks Differential Revision: https://reviews.freebsd.org/D17916 Notes: svn path=/head/; revision=340436
* ifnet: Replace if_addr_lock rwlock with epoch + mutexMatt Macy2018-05-181-3/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Run on LLNW canaries and tested by pho@ gallatin: Using a 14-core, 28-HTT single socket E5-2697 v3 with a 40GbE MLX5 based ConnectX 4-LX NIC, I see an almost 12% improvement in received packet rate, and a larger improvement in bytes delivered all the way to userspace. When the host receiving 64 streams of netperf -H $DUT -t UDP_STREAM -- -m 1, I see, using nstat -I mce0 1 before the patch: InMpps OMpps InGbs OGbs err TCP Est %CPU syscalls csw irq GBfree 4.98 0.00 4.42 0.00 4235592 33 83.80 4720653 2149771 1235 247.32 4.73 0.00 4.20 0.00 4025260 33 82.99 4724900 2139833 1204 247.32 4.72 0.00 4.20 0.00 4035252 33 82.14 4719162 2132023 1264 247.32 4.71 0.00 4.21 0.00 4073206 33 83.68 4744973 2123317 1347 247.32 4.72 0.00 4.21 0.00 4061118 33 80.82 4713615 2188091 1490 247.32 4.72 0.00 4.21 0.00 4051675 33 85.29 4727399 2109011 1205 247.32 4.73 0.00 4.21 0.00 4039056 33 84.65 4724735 2102603 1053 247.32 After the patch InMpps OMpps InGbs OGbs err TCP Est %CPU syscalls csw irq GBfree 5.43 0.00 4.20 0.00 3313143 33 84.96 5434214 1900162 2656 245.51 5.43 0.00 4.20 0.00 3308527 33 85.24 5439695 1809382 2521 245.51 5.42 0.00 4.19 0.00 3316778 33 87.54 5416028 1805835 2256 245.51 5.42 0.00 4.19 0.00 3317673 33 90.44 5426044 1763056 2332 245.51 5.42 0.00 4.19 0.00 3314839 33 88.11 5435732 1792218 2499 245.52 5.44 0.00 4.19 0.00 3293228 33 91.84 5426301 1668597 2121 245.52 Similarly, netperf reports 230Mb/s before the patch, and 270Mb/s after the patch Reviewed by: gallatin Sponsored by: Limelight Networks Differential Revision: https://reviews.freebsd.org/D15366 Notes: svn path=/head/; revision=333813
* Add netdump support to vtnet(4).Mark Johnston2018-05-061-5/+76
| | | | | | | | | | | | Tested with bhyve. Reviewed by: bryanv, julian MFC after: 1 month Sponsored by: Dell EMC Isilon Differential Revision: https://reviews.freebsd.org/D15261 Notes: svn path=/head/; revision=333290
* Revert r327828, r327949, r327953, r328016-r328026, r328041:Pedro F. Giffuni2018-01-211-4/+3
| | | | | | | | | | | | | | | | | | Uses of mallocarray(9). The use of mallocarray(9) has rocketed the required swap to build FreeBSD. This is likely caused by the allocation size attributes which put extra pressure on the compiler. Given that most of these checks are superfluous we have to choose better where to use mallocarray(9). We still have more uses of mallocarray(9) but hopefully this is enough to bring swap usage to a reasonable level. Reported by: wosch PR: 225197 Notes: svn path=/head/; revision=328218
* dev: make some use of mallocarray(9).Pedro F. Giffuni2018-01-131-3/+4
| | | | | | | | | | | | | | Focus on code where we are doing multiplications within malloc(9). None of these is likely to overflow, however the change is still useful as some static checkers can benefit from the allocation attributes we use for mallocarray. This initial sweep only covers malloc(9) calls with M_NOWAIT. No good reason but I started doing the changes before r327796 and at that time it was convenient to make sure the sorrounding code could handle NULL values. Notes: svn path=/head/; revision=327949
* sys/dev: further adoption of SPDX licensing ID tags.Pedro F. Giffuni2017-11-272-0/+4
| | | | | | | | | | | | | | | Mainly focus on files that use BSD 2-Clause license, however the tool I was using misidentified many licenses so this was mostly a manual - error prone - task. The Software Package Data Exchange (SPDX) group provides a specification to make it easier for automated tools to detect and summarize well known opensource licenses. We are gradually adopting the specification, noting that the tags are considered only advisory and do not, in any way, superceed or replace the license texts. Notes: svn path=/head/; revision=326255
* sys/dev: further adoption of SPDX licensing ID tags.Pedro F. Giffuni2017-11-201-0/+2
| | | | | | | | | | | | | | | | | Mainly focus on files that use BSD 3-Clause license. The Software Package Data Exchange (SPDX) group provides a specification to make it easier for automated tools to detect and summarize well known opensource licenses. We are gradually adopting the specification, noting that the tags are considered only advisory and do not, in any way, superceed or replace the license texts. Special thanks to Wind River for providing access to "The Duke of Highlander" tool: an older (2014) run over FreeBSD tree was useful as a starting point. Notes: svn path=/head/; revision=326022
* vtnet: Support jumbo frames without TSO/GSOKristof Provost2017-07-291-1/+1
| | | | | | | | | | | | | | | | | | | Currently in Virtio driver without TSO/GSO features enabled, the max scatter gather segments for the TX path can be 4, which limits the support for 9K JUMBO frames. 9K JUMBO frames results in more than 4 scatter gather segments and virtio driver fails to send the frame down to host OS. With TSO/GSO feature enabled max scatter gather segments can be 64, then 9K JUMBO frames are fine, this is making virtio driver to support JUMBO frames only with TSO/GSO. Increasing the VTNET_MIN_TX_SEGS which is the case for non TSO/GSO to 32 to support upto 64K JUMBO frames to Host. Submitted by: Lohith Bellad <lohithbsd@gmail.com> Reviewed by: adrian Differential Revision: https://reviews.freebsd.org/D8803 Notes: svn path=/head/; revision=321679
* vtnet: don't update VLAN filter when parent is not runningPhilip Paeps2017-02-131-0/+1
| | | | | | | | | | Submitted by: Gerrie Roos <groos -at- xiplink -dot- com> Reviewed by: gnn Sponsored by: XipLink, Inc. Differential Revision: https://reviews.freebsd.org/D9573 Notes: svn path=/head/; revision=313711
* Fix vtnet hang with max_virtqueue_pairs > VTNET_MAX_QUEUE_PAIRSSteven Hartland2016-08-112-24/+38
| | | | | | | | | | | | | | | | | | | | | Correctly limit npairs passed to vtnet_ctrl_mq_cmd. This ensures that VQ_ALLOC_INFO_INIT is called with the correct value, preventing the system from hanging when max_virtqueue_pairs > VTNET_MAX_QUEUE_PAIRS. Add new sysctl requested_vq_pairs which allow the user to configure the requested number of virtqueue pairs. The actual value will still take into account the system limits. Also missing sysctls for the current tunables so their values can be seen. PR: 207446 Reported by: Andy Carrel MFC after: 3 days Relnotes: Yes Sponsored by: Multiplay Notes: svn path=/head/; revision=303971
* vtnet: fix panic on unloadKristof Provost2016-05-141-8/+9
| | | | | | | | | | | | | | | Since r276367 added the virtio_mmio support vtnet_modevent() gets called twice. This resulted in a memory leak during load and a panic on unload. Count the loads so we only initialise once (just like cxgbe(4)), and only clean up in the final unload. PR: 209428 Submitted by: novel@FreeBSD.org MFC after: 1 week Notes: svn path=/head/; revision=299725
* Lower the compiler warning: unused-but-set-variable.Marcelo Araujo2015-09-031-4/+0
| | | | | | | | Approved by: bapt (mentor) Differential Revision: D3556 Notes: svn path=/head/; revision=287423
* add netmap dependency when compiled as a moduleLuigi Rizzo2015-07-101-0/+3
| | | | Notes: svn path=/head/; revision=285351
* Fix panic when adding vtnet interfaces to a bridgeKristof Provost2015-06-131-2/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | vtnet interfaces are always in promiscuous mode (at least if the VIRTIO_NET_F_CTRL_RX feature is not negotiated with the host). if_promisc() on a vtnet interface returned ENOTSUP although it has IFF_PROMISC set. This confused the bridge code. Instead we now accept all enable/disable promiscuous commands (and always keep IFF_PROMISC set). There are also two issues with the if_bridge error handling. If if_promisc() fails it uses bridge_delete_member() to clean up. This tries to disable promiscuous mode on the interface. That runs into an assert, because promiscuous mode was never set in the first place. (That's the panic reported in PR 200210.) We can only unset promiscuous mode if the interface actually is promiscuous. This goes against the reference counting done by if_promisc(), but only the first/last if_promic() calls can actually fail, so this is safe. A second issue is a double free of bif. It's already freed by bridge_delete_member(). PR: 200210 Differential Revision: https://reviews.freebsd.org/D2804 Reviewed by: philip (mentor) Notes: svn path=/head/; revision=284348
* Fix typo when deregistering the VLAN unconfig event handlerBryan Venteicher2015-06-131-1/+1
| | | | | | | | Submitted by: Masao Uebayashi <uebayasi@tombiinc.com> MFC after: 3 days Notes: svn path=/head/; revision=284342
* Don't free mbufs when stopping an interface in netmap mode.John Baldwin2015-04-291-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | Currently if you ifconfig down a vtnet interface while it is being used via netmap, the kernel panics due to trying to treat the cookie values in the virtio rings as mbufs to be freed. When netmap is enabled, these cookie values are pointers to something else. Note that other netmap-aware drivers don't seem to need this as they store the mbuf pointers in the software rings that mirror the hardware descriptor rings, and since netmap doesn't touch those, the software state always has NULL mbuf pointers causing the loops to free mbufs to not do anything. However, vtnet reuses the same state area for both netmap and non-netmap mode, so it needs to explicitly avoid looking at the rings and treating the cookie values as mbufs if netmap is enabled. Differential Revision: https://reviews.freebsd.org/D2348 Reviewed by: adrian, bryanv, luigi MFC after: 1 week Sponsored by: Norse Corp, Inc. Notes: svn path=/head/; revision=282241
* Add softc flag for when the indirect descriptor feature was negotiatedBryan Venteicher2015-01-012-2/+5
| | | | | | | MFC after: 2 weeks Notes: svn path=/head/; revision=276491
* Use the appropriate IPv4 or IPv6 TSO HW assist flagBryan Venteicher2015-01-011-2/+2
| | | | | | | MFC after: 2 weeks Notes: svn path=/head/; revision=276489
* Attach vtnet to virtio_mmio. Qemu provides this as an option with AArch64.Andrew Turner2014-12-291-0/+2
| | | | | | | Sponsored by: The FreeBSD Foundation Notes: svn path=/head/; revision=276367
* 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
* Enable LRO by default when available on vtnet interfacesBryan Venteicher2014-11-091-7/+6
| | | | | | | | | | | | | The prior change to not enable LRO by default has confused several people. The configurations where LRO is problematic is not the typical use case for VirtIO, and due to other issues, this often requires checksum offloading to be disabled anyways. PR: 185864 MFC after: 2 weeks Notes: svn path=/head/; revision=274325
* - Provide if_get_counter() method for vtnet(4).Gleb Smirnoff2014-09-181-62/+57
| | | | | | | | | | | | - Do not accumulate statistics on every tick. - Accumulate statistics in vtnet_setup_stat_sysctl() and in vtnet_get_counter(). Sponsored by: Netflix Sponsored by: Nginx, Inc. Notes: svn path=/head/; revision=271799
* Use define from if_var.h to access a field inside struct if_data,Gleb Smirnoff2014-08-301-1/+1
| | | | | | | | | that resides in struct ifnet. Sponsored by: Nginx, Inc. Notes: svn path=/head/; revision=270856
* Update to the current version of netmap.Luigi Rizzo2014-08-161-0/+37
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Mostly bugfixes or features developed in the past 6 months, so this is a 10.1 candidate. Basically no user API changes (some bugfixes in sys/net/netmap_user.h). In detail: 1. netmap support for virtio-net, including in netmap mode. Under bhyve and with a netmap backend [2] we reach over 1Mpps with standard APIs (e.g. libpcap), and 5-8 Mpps in netmap mode. 2. (kernel) add support for multiple memory allocators, so we can better partition physical and virtual interfaces giving access to separate users. The most visible effect is one additional argument to the various kernel functions to compute buffer addresses. All netmap-supported drivers are affected, but changes are mechanical and trivial 3. (kernel) simplify the prototype for *txsync() and *rxsync() driver methods. All netmap drivers affected, changes mostly mechanical. 4. add support for netmap-monitor ports. Think of it as a mirroring port on a physical switch: a netmap monitor port replicates traffic present on the main port. Restrictions apply. Drive carefully. 5. if_lem.c: support for various paravirtualization features, experimental and disabled by default. Most of these are described in our ANCS'13 paper [1]. Paravirtualized support in netmap mode is new, and beats the numbers in the paper by a large factor (under qemu-kvm, we measured gues-host throughput up to 10-12 Mpps). A lot of refactoring and additional documentation in the files in sys/dev/netmap, but apart from #2 and #3 above, almost nothing of this stuff is visible to other kernel parts. Example programs in tools/tools/netmap have been updated with bugfixes and to support more of the existing features. This is meant to go into 10.1 so we plan an MFC before the Aug.22 deadline. A lot of this code has been contributed by my colleagues at UNIPI, including Giuseppe Lettieri, Vincenzo Maffione, Stefano Garzarella. MFC after: 3 days. Notes: svn path=/head/; revision=270063
* Rework when the Tx queue completion interrupt is enabledBryan Venteicher2014-07-102-65/+155
| | | | | | | | | | | | | | | The Tx interrupt is now kept disabled in the common case, only enabled when the number of free descriptors in the queue falls below a threshold. Transmitted frames are cleared from the VQ before subsequent transmit, or in the watchdog timer. This was a very big performance improvement for an experimental Netmap bhyve backend. MFC after: 1 month Notes: svn path=/head/; revision=268481
* Force two byte alignment for all control message headersBryan Venteicher2014-06-161-5/+5
| | | | | | | | | | | | | The header structure consists of two 1-byte elements, but it must always be describable by a single SG entry. Note for consistency, specify the alignment everywhere, even if the structure has the appropriate natural alignment since it contains a uint16_t. Obtained from: DragonFlyBSD MFC after: 1 week Notes: svn path=/head/; revision=267524
* Make the feature negotiation code easier to followBryan Venteicher2014-06-161-22/+23
| | | | | | | MFC after: 1 week Notes: svn path=/head/; revision=267523
* - Remove two write-only local variablesBryan Venteicher2014-06-162-5/+0
| | | | | | | | | - Remove unused element in the vtnet_rxq structure MFC after: 1 week Notes: svn path=/head/; revision=267520
* make sure ifp->if_transmit returns 0 if a buffer is enqueued.Luigi Rizzo2014-06-041-2/+1
| | | | | | | | | | | | | | | | | A similar fix should be applied to vmxnet, ixgbe, igb, i40e. (some of them previously reported by Michael Tuexen) Drivers using if_transmit are correct, and so are most of the other drivers that reassing if_transmit. Among other things, this bug causes panics when using netmap emulation on top of generic drivers. Approved by: bryanv MFC after: 3 days Notes: svn path=/head/; revision=267065
* Since 32-bit if_baudrate isn't enough to describe a baud rate of a 10 GbitGleb Smirnoff2014-03-131-1/+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
* Use m_defrag() instead of m_collapse() to compact a long mbuf chainBryan Venteicher2014-02-022-14/+16
| | | | | | | | This should be an infrequent occurrence, so remove the per-queue counters in favor of just global counters in the softc. Notes: svn path=/head/; revision=261395
* Do not place the sglist used for Rx/Tx on the stackBryan Venteicher2014-02-022-38/+65
| | | | | | | | | | | | | | | | | | The sglist segment array has grown to a bit over 512 bytes (on 64-bit system) which is more than ideally should be put on the stack. Instead allocate an appropriately sized sglist and hang it off each Rx/Tx queue structure. Bump the maximum number of Tx segments to 64 to make it unlikely we'll have defragment an mbuf chain. Our previous count was rounded up to this value since it is the next power of two, so effective memory usage should not change. Also only allocate the maximum number of Tx segments if TSO was negotiated. Notes: svn path=/head/; revision=261394
* Check for a full virtqueue in the multiqueue transmit pathBryan Venteicher2014-01-251-0/+6
| | | | | | | | With most hosts, we'll negotiate indirect descriptors, so all we need is one available descriptor to transmit a frame. Notes: svn path=/head/; revision=261168
* Avoid queue unlock followed by relock when the enable interrupt race is lostBryan Venteicher2014-01-251-5/+7
| | | | | | | | This already happens infrequently, and the hold time is still bounded since we defer to a taskqueue after a few tries. Notes: svn path=/head/; revision=261167
* Move duplicated transmit start code into a single functionBryan Venteicher2014-01-251-23/+22
| | | | Notes: svn path=/head/; revision=261166
* Remove stray spaceBryan Venteicher2014-01-251-1/+1
| | | | Notes: svn path=/head/; revision=261164
* Also include the mbuf's csum_flags in an assert messageBryan Venteicher2014-01-251-1/+2
| | | | Notes: svn path=/head/; revision=261151
* Read and write the MAC address in the config space byte by byteBryan Venteicher2014-01-251-5/+11
| | | | Notes: svn path=/head/; revision=261150
* 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 hold the vtnet Rx queue lock when calling up into the stackBryan Venteicher2013-10-051-2/+6
| | | | | | | | | This matches other similar drivers and avoids various LOR warnings. Approved by: re (marius) Notes: svn path=/head/; revision=256066
* Complete any pending Tx frames before attempting the next transmitBryan Venteicher2013-09-032-0/+10
| | | | | | | | | Also complete pending frames in the watchdog function when the EVENT_IDX feature was negotiated just in case the completion interrupt was postponed. Notes: svn path=/head/; revision=255167
* Fix build with gccEitan Adler2013-09-011-1/+1
| | | | | | | | Reported by: Michael Butler <imb@protected-networks.net> Reviewed by: jilles Notes: svn path=/head/; revision=255131
* Import multiqueue VirtIO net driver from my user/bryanv/vtnetmq branchBryan Venteicher2013-09-012-1326/+2540
| | | | | | | | | This is a significant rewrite of much of the previous driver; lots of misc. cleanup was also performed, and support for a few other minor features was also added. Notes: svn path=/head/; revision=255112