Changeset View
Changeset View
Standalone View
Standalone View
head/sys/dev/ixgbe/if_ixv.c
Show All 29 Lines | /****************************************************************************** | ||||
POSSIBILITY OF SUCH DAMAGE. | POSSIBILITY OF SUCH DAMAGE. | ||||
******************************************************************************/ | ******************************************************************************/ | ||||
/*$FreeBSD$*/ | /*$FreeBSD$*/ | ||||
#include "opt_inet.h" | #include "opt_inet.h" | ||||
#include "opt_inet6.h" | #include "opt_inet6.h" | ||||
#include "opt_rss.h" | |||||
#include "ixgbe.h" | #include "ixgbe.h" | ||||
#include "ifdi_if.h" | #include "ifdi_if.h" | ||||
#include <net/netmap.h> | #include <net/netmap.h> | ||||
#include <dev/netmap/netmap_kern.h> | #include <dev/netmap/netmap_kern.h> | ||||
/************************************************************************ | /************************************************************************ | ||||
▲ Show 20 Lines • Show All 1,403 Lines • ▼ Show 20 Lines | if (ifp->if_capenable & IFCAP_NETMAP) { | ||||
IXGBE_WRITE_REG(hw, IXGBE_VFRDT(rxr->me), t); | IXGBE_WRITE_REG(hw, IXGBE_VFRDT(rxr->me), t); | ||||
} else | } else | ||||
#endif /* DEV_NETMAP */ | #endif /* DEV_NETMAP */ | ||||
IXGBE_WRITE_REG(hw, IXGBE_VFRDT(rxr->me), | IXGBE_WRITE_REG(hw, IXGBE_VFRDT(rxr->me), | ||||
scctx->isc_nrxd[0] - 1); | scctx->isc_nrxd[0] - 1); | ||||
} | } | ||||
/* | |||||
* Do not touch RSS and RETA settings for older hardware | |||||
* as those are shared among PF and all VF. | |||||
*/ | |||||
if (adapter->hw.mac.type >= ixgbe_mac_X550_vf) | |||||
ixv_initialize_rss_mapping(adapter); | ixv_initialize_rss_mapping(adapter); | ||||
} /* ixv_initialize_receive_units */ | } /* ixv_initialize_receive_units */ | ||||
/************************************************************************ | /************************************************************************ | ||||
* ixv_setup_vlan_support | * ixv_setup_vlan_support | ||||
************************************************************************/ | ************************************************************************/ | ||||
static void | static void | ||||
ixv_setup_vlan_support(if_ctx_t ctx) | ixv_setup_vlan_support(if_ctx_t ctx) | ||||
{ | { | ||||
▲ Show 20 Lines • Show All 418 Lines • ▼ Show 20 Lines | |||||
/************************************************************************ | /************************************************************************ | ||||
* ixv_init_device_features | * ixv_init_device_features | ||||
************************************************************************/ | ************************************************************************/ | ||||
static void | static void | ||||
ixv_init_device_features(struct adapter *adapter) | ixv_init_device_features(struct adapter *adapter) | ||||
{ | { | ||||
adapter->feat_cap = IXGBE_FEATURE_NETMAP | adapter->feat_cap = IXGBE_FEATURE_NETMAP | ||||
| IXGBE_FEATURE_VF | | IXGBE_FEATURE_VF | ||||
| IXGBE_FEATURE_RSS | |||||
| IXGBE_FEATURE_LEGACY_TX; | | IXGBE_FEATURE_LEGACY_TX; | ||||
/* A tad short on feature flags for VFs, atm. */ | /* A tad short on feature flags for VFs, atm. */ | ||||
switch (adapter->hw.mac.type) { | switch (adapter->hw.mac.type) { | ||||
case ixgbe_mac_82599_vf: | case ixgbe_mac_82599_vf: | ||||
break; | break; | ||||
case ixgbe_mac_X540_vf: | case ixgbe_mac_X540_vf: | ||||
break; | break; | ||||
case ixgbe_mac_X550_vf: | case ixgbe_mac_X550_vf: | ||||
case ixgbe_mac_X550EM_x_vf: | case ixgbe_mac_X550EM_x_vf: | ||||
case ixgbe_mac_X550EM_a_vf: | case ixgbe_mac_X550EM_a_vf: | ||||
adapter->feat_cap |= IXGBE_FEATURE_NEEDS_CTXD; | adapter->feat_cap |= IXGBE_FEATURE_NEEDS_CTXD; | ||||
adapter->feat_cap |= IXGBE_FEATURE_RSS; | |||||
break; | break; | ||||
default: | default: | ||||
break; | break; | ||||
} | } | ||||
/* Enabled by default... */ | /* Enabled by default... */ | ||||
/* Is a virtual function (VF) */ | /* Is a virtual function (VF) */ | ||||
if (adapter->feat_cap & IXGBE_FEATURE_VF) | if (adapter->feat_cap & IXGBE_FEATURE_VF) | ||||
Show All 12 Lines |