Changeset View
Changeset View
Standalone View
Standalone View
sys/dev/ixl/if_ixl.c
Show First 20 Lines • Show All 43 Lines • ▼ Show 20 Lines | |||||
#include "ixl_pf_iov.h" | #include "ixl_pf_iov.h" | ||||
#endif | #endif | ||||
/********************************************************************* | /********************************************************************* | ||||
* Driver version | * Driver version | ||||
*********************************************************************/ | *********************************************************************/ | ||||
#define IXL_DRIVER_VERSION_MAJOR 2 | #define IXL_DRIVER_VERSION_MAJOR 2 | ||||
#define IXL_DRIVER_VERSION_MINOR 3 | #define IXL_DRIVER_VERSION_MINOR 3 | ||||
#define IXL_DRIVER_VERSION_BUILD 2 | #define IXL_DRIVER_VERSION_BUILD 3 | ||||
#define IXL_DRIVER_VERSION_STRING \ | #define IXL_DRIVER_VERSION_STRING \ | ||||
__XSTRING(IXL_DRIVER_VERSION_MAJOR) "." \ | __XSTRING(IXL_DRIVER_VERSION_MAJOR) "." \ | ||||
__XSTRING(IXL_DRIVER_VERSION_MINOR) "." \ | __XSTRING(IXL_DRIVER_VERSION_MINOR) "." \ | ||||
__XSTRING(IXL_DRIVER_VERSION_BUILD) "-k" | __XSTRING(IXL_DRIVER_VERSION_BUILD) "-k" | ||||
/********************************************************************* | /********************************************************************* | ||||
* PCI Device ID Table | * PCI Device ID Table | ||||
▲ Show 20 Lines • Show All 1,654 Lines • ▼ Show 20 Lines | if ((vtag == 0) || (vtag > 4095)) /* Invalid */ | ||||
return; | return; | ||||
--vsi->num_vlans; | --vsi->num_vlans; | ||||
bit_clear(vsi->vlans_map, vtag); | bit_clear(vsi->vlans_map, vtag); | ||||
if ((if_getcapenable(ifp) & IFCAP_VLAN_HWFILTER) == 0) | if ((if_getcapenable(ifp) & IFCAP_VLAN_HWFILTER) == 0) | ||||
return; | return; | ||||
if (vsi->num_vlans < IXL_MAX_VLAN_FILTERS) | /* One filter is used for untagged frames */ | ||||
if (vsi->num_vlans < IXL_MAX_VLAN_FILTERS - 1) | |||||
ixl_del_filter(vsi, hw->mac.addr, vtag); | ixl_del_filter(vsi, hw->mac.addr, vtag); | ||||
else if (vsi->num_vlans == IXL_MAX_VLAN_FILTERS) { | else if (vsi->num_vlans == IXL_MAX_VLAN_FILTERS - 1) { | ||||
ixl_del_filter(vsi, hw->mac.addr, IXL_VLAN_ANY); | ixl_del_filter(vsi, hw->mac.addr, IXL_VLAN_ANY); | ||||
ixl_add_vlan_filters(vsi, hw->mac.addr); | ixl_add_vlan_filters(vsi, hw->mac.addr); | ||||
} | } | ||||
} | } | ||||
static uint64_t | static uint64_t | ||||
ixl_if_get_counter(if_ctx_t ctx, ift_counter cnt) | ixl_if_get_counter(if_ctx_t ctx, ift_counter cnt) | ||||
{ | { | ||||
▲ Show 20 Lines • Show All 181 Lines • Show Last 20 Lines |