Changeset View
Changeset View
Standalone View
Standalone View
sys/dev/ixgbe/legacy_if_ixv.c
- This file was copied from sys/dev/ixgbe/if_ixv.c.
Show All 34 Lines | |||||
#ifndef IXGBE_STANDALONE_BUILD | #ifndef IXGBE_STANDALONE_BUILD | ||||
#include "opt_inet.h" | #include "opt_inet.h" | ||||
#include "opt_inet6.h" | #include "opt_inet6.h" | ||||
#endif | #endif | ||||
#include "ixgbe.h" | #include "ixgbe.h" | ||||
#include <net/netmap.h> | |||||
#include <dev/netmap/netmap_kern.h> | |||||
/********************************************************************* | /********************************************************************* | ||||
* Driver version | * Driver version | ||||
*********************************************************************/ | *********************************************************************/ | ||||
char ixv_driver_version[] = "1.4.6-k"; | char ixv_driver_version[] = "1.4.6-k"; | ||||
/********************************************************************* | /********************************************************************* | ||||
* PCI Device ID Table | * PCI Device ID Table | ||||
* | * | ||||
▲ Show 20 Lines • Show All 76 Lines • ▼ Show 20 Lines | |||||
static void ixv_handle_mbx(void *, int); | static void ixv_handle_mbx(void *, int); | ||||
#ifdef DEV_NETMAP | #ifdef DEV_NETMAP | ||||
/* | /* | ||||
* This is defined in <dev/netmap/ixgbe_netmap.h>, which is included by | * This is defined in <dev/netmap/ixgbe_netmap.h>, which is included by | ||||
* if_ix.c. | * if_ix.c. | ||||
*/ | */ | ||||
extern void ixgbe_netmap_attach(struct adapter *adapter); | extern void ixgbe_netmap_attach(struct adapter *adapter); | ||||
#include <net/netmap.h> | |||||
#include <sys/selinfo.h> | |||||
#include <dev/netmap/netmap_kern.h> | |||||
#endif /* DEV_NETMAP */ | #endif /* DEV_NETMAP */ | ||||
/********************************************************************* | /********************************************************************* | ||||
* FreeBSD Device Interface Entry Points | * FreeBSD Device Interface Entry Points | ||||
*********************************************************************/ | *********************************************************************/ | ||||
static device_method_t ixv_methods[] = { | static device_method_t ixv_methods[] = { | ||||
/* Device interface */ | /* Device interface */ | ||||
▲ Show 20 Lines • Show All 678 Lines • ▼ Show 20 Lines | |||||
#endif | #endif | ||||
IXGBE_TX_UNLOCK(txr); | IXGBE_TX_UNLOCK(txr); | ||||
if (more) { | if (more) { | ||||
taskqueue_enqueue(que->tq, &que->que_task); | taskqueue_enqueue(que->tq, &que->que_task); | ||||
return; | return; | ||||
} | } | ||||
} | } | ||||
/* Reenable this interrupt */ | /* Re-enable this interrupt */ | ||||
ixv_enable_queue(adapter, que->msix); | ixv_enable_queue(adapter, que->msix); | ||||
return; | return; | ||||
} | } | ||||
/********************************************************************* | /********************************************************************* | ||||
* | * | ||||
* MSI Queue Interrupt Service routine | * MSI Queue Interrupt Service routine | ||||
* | * | ||||
▲ Show 20 Lines • Show All 76 Lines • ▼ Show 20 Lines | newitr |= newitr << 16; | ||||
txr->bytes = 0; | txr->bytes = 0; | ||||
txr->packets = 0; | txr->packets = 0; | ||||
rxr->bytes = 0; | rxr->bytes = 0; | ||||
rxr->packets = 0; | rxr->packets = 0; | ||||
no_calc: | no_calc: | ||||
if (more) | if (more) | ||||
taskqueue_enqueue(que->tq, &que->que_task); | taskqueue_enqueue(que->tq, &que->que_task); | ||||
else /* Reenable this interrupt */ | else /* Re-enable this interrupt */ | ||||
ixv_enable_queue(adapter, que->msix); | ixv_enable_queue(adapter, que->msix); | ||||
return; | return; | ||||
} | } | ||||
static void | static void | ||||
ixv_msix_mbx(void *arg) | ixv_msix_mbx(void *arg) | ||||
{ | { | ||||
struct adapter *adapter = arg; | struct adapter *adapter = arg; | ||||
▲ Show 20 Lines • Show All 1,270 Lines • Show Last 20 Lines |