summaryrefslogtreecommitdiffstats
path: root/sys/dev/hyperv/netvsc/hv_net_vsc.h
diff options
context:
space:
mode:
authorsephe <sephe@FreeBSD.org>2016-02-24 01:30:50 +0000
committersephe <sephe@FreeBSD.org>2016-02-24 01:30:50 +0000
commit63b2f3db69ed14038164268fb5c942d5f7a3d8b4 (patch)
treedb6c17ce357be96a5512942c378ee8d278bc7990 /sys/dev/hyperv/netvsc/hv_net_vsc.h
parent257e82612c2ce6368f8fbbfa099f699c85f3a718 (diff)
downloadFreeBSD-src-63b2f3db69ed14038164268fb5c942d5f7a3d8b4.zip
FreeBSD-src-63b2f3db69ed14038164268fb5c942d5f7a3d8b4.tar.gz
MFC [Hyper-V]: r294553, r294700
r294553 hyperv/vmbus: Lookup channel through id table Vmbus event handler will need to find the channel by its relative id, when software interrupt for event happens. The original lookup searches the channel list, which is not very efficient. We now create a table indexed by the channel relative id to speed up the channel lookup. Submitted by: Hongjiang Zhang <honzhan microsoft com> Reviewed by: delphij, adrain, sephe, Dexuan Cui <decui microsoft com> Approved by: adrian (mentor) Sponsored by: Microsoft OSTC Differential Revision: https://reviews.freebsd.org/D4802 ------------- r294700 hyperv/hn: Partly rework transmission path - Avoid unnecessary malloc/free on transmission path. - busdma(9)-fy transmission path. - Properly handle IFF_DRV_OACTIVE. This should fix the network stalls reported by many. - Properly setup TSO parameters. - Properly handle bpf(4) tapping. This 5 times the performance during TCP sending test, when there is one bpf(4) attached. - Allow size of chimney sending be tuned on a running system. Default value still needs more test to determine. Reviewed by: adrian, delphij Approved by: adrian (mentor) Sponsored by: Microsoft OSTC Differential Revision: https://reviews.freebsd.org/D4972 Approved by: re (marius) Sponsored by: Microsoft OSTC
Diffstat (limited to 'sys/dev/hyperv/netvsc/hv_net_vsc.h')
-rw-r--r--sys/dev/hyperv/netvsc/hv_net_vsc.h26
1 files changed, 25 insertions, 1 deletions
diff --git a/sys/dev/hyperv/netvsc/hv_net_vsc.h b/sys/dev/hyperv/netvsc/hv_net_vsc.h
index 4e63b94..e684cc5 100644
--- a/sys/dev/hyperv/netvsc/hv_net_vsc.h
+++ b/sys/dev/hyperv/netvsc/hv_net_vsc.h
@@ -38,12 +38,16 @@
#ifndef __HV_NET_VSC_H__
#define __HV_NET_VSC_H__
-#include <sys/types.h>
#include <sys/param.h>
#include <sys/lock.h>
#include <sys/malloc.h>
+#include <sys/queue.h>
#include <sys/sx.h>
+#include <machine/bus.h>
+#include <sys/bus.h>
+#include <sys/bus_dma.h>
+
#include <netinet/in.h>
#include <netinet/tcp_lro.h>
@@ -984,6 +988,9 @@ typedef struct {
hv_bool_uint8_t link_state;
} netvsc_device_info;
+struct hn_txdesc;
+SLIST_HEAD(hn_txdesc_list, hn_txdesc);
+
/*
* Device-specific softc structure
*/
@@ -1002,6 +1009,18 @@ typedef struct hn_softc {
struct hv_device *hn_dev_obj;
netvsc_dev *net_dev;
+ int hn_txdesc_cnt;
+ struct hn_txdesc *hn_txdesc;
+ bus_dma_tag_t hn_tx_data_dtag;
+ bus_dma_tag_t hn_tx_rndis_dtag;
+ int hn_tx_chimney_size;
+ int hn_tx_chimney_max;
+
+ struct mtx hn_txlist_spin;
+ struct hn_txdesc_list hn_txlist;
+ int hn_txdesc_avail;
+ int hn_txeof;
+
struct lro_ctrl hn_lro;
int hn_lro_hiwat;
@@ -1013,6 +1032,11 @@ typedef struct hn_softc {
u_long hn_csum_trusted;
u_long hn_lro_tried;
u_long hn_small_pkts;
+ u_long hn_no_txdescs;
+ u_long hn_send_failed;
+ u_long hn_txdma_failed;
+ u_long hn_tx_collapsed;
+ u_long hn_tx_chimney;
} hn_softc_t;
OpenPOWER on IntegriCloud