Changeset View
Changeset View
Standalone View
Standalone View
sys/dev/hyperv/netvsc/hv_netvsc_drv_freebsd.c
Show First 20 Lines • Show All 107 Lines • ▼ Show 20 Lines | |||||
#include <sys/types.h> | #include <sys/types.h> | ||||
#include <machine/atomic.h> | #include <machine/atomic.h> | ||||
#include <machine/intr_machdep.h> | #include <machine/intr_machdep.h> | ||||
#include <machine/in_cksum.h> | #include <machine/in_cksum.h> | ||||
#include <dev/hyperv/include/hyperv.h> | #include <dev/hyperv/include/hyperv.h> | ||||
#include <dev/hyperv/vmbus/hv_vmbus_priv.h> | |||||
#include "hv_net_vsc.h" | #include "hv_net_vsc.h" | ||||
#include "hv_rndis.h" | #include "hv_rndis.h" | ||||
#include "hv_rndis_filter.h" | #include "hv_rndis_filter.h" | ||||
/* Short for Hyper-V network interface */ | /* Short for Hyper-V network interface */ | ||||
#define NETVSC_DEVNAME "hn" | #define NETVSC_DEVNAME "hn" | ||||
▲ Show 20 Lines • Show All 350 Lines • ▼ Show 20 Lines | if_printf(ifp, "TSO: %u/%u/%u\n", ifp->if_hw_tsomax, | ||||
ifp->if_hw_tsomaxsegcount, ifp->if_hw_tsomaxsegsize); | ifp->if_hw_tsomaxsegcount, ifp->if_hw_tsomaxsegsize); | ||||
#endif | #endif | ||||
sc->hn_tx_chimney_max = sc->net_dev->send_section_size; | sc->hn_tx_chimney_max = sc->net_dev->send_section_size; | ||||
hn_set_tx_chimney_size(sc, sc->hn_tx_chimney_max); | hn_set_tx_chimney_size(sc, sc->hn_tx_chimney_max); | ||||
if (hn_tx_chimney_size > 0 && | if (hn_tx_chimney_size > 0 && | ||||
hn_tx_chimney_size < sc->hn_tx_chimney_max) | hn_tx_chimney_size < sc->hn_tx_chimney_max) | ||||
hn_set_tx_chimney_size(sc, hn_tx_chimney_size); | hn_set_tx_chimney_size(sc, hn_tx_chimney_size); | ||||
ring_buffer_stat(device_get_sysctl_ctx(dev), | |||||
device_get_name(dev), device_get_unit(dev), | |||||
device_ctx->channel); | |||||
return (0); | return (0); | ||||
failed: | failed: | ||||
hn_destroy_tx_data(sc); | hn_destroy_tx_data(sc); | ||||
if (ifp != NULL) | if (ifp != NULL) | ||||
if_free(ifp); | if_free(ifp); | ||||
return (error); | return (error); | ||||
} | } | ||||
▲ Show 20 Lines • Show All 2,003 Lines • Show Last 20 Lines |