Changeset View
Changeset View
Standalone View
Standalone View
head/sys/dev/sfxge/common/efx_filter.c
Show First 20 Lines • Show All 146 Lines • ▼ Show 20 Lines | fail1: | ||||
__checkReturn efx_rc_t | __checkReturn efx_rc_t | ||||
efx_filter_init( | efx_filter_init( | ||||
__in efx_nic_t *enp) | __in efx_nic_t *enp) | ||||
{ | { | ||||
const efx_filter_ops_t *efop; | const efx_filter_ops_t *efop; | ||||
efx_rc_t rc; | efx_rc_t rc; | ||||
/* Check that efx_filter_spec_t is 64 bytes. */ | |||||
EFX_STATIC_ASSERT(sizeof (efx_filter_spec_t) == 64); | |||||
EFSYS_ASSERT3U(enp->en_magic, ==, EFX_NIC_MAGIC); | EFSYS_ASSERT3U(enp->en_magic, ==, EFX_NIC_MAGIC); | ||||
EFSYS_ASSERT3U(enp->en_mod_flags, &, EFX_MOD_PROBE); | EFSYS_ASSERT3U(enp->en_mod_flags, &, EFX_MOD_PROBE); | ||||
EFSYS_ASSERT(!(enp->en_mod_flags & EFX_MOD_FILTER)); | EFSYS_ASSERT(!(enp->en_mod_flags & EFX_MOD_FILTER)); | ||||
switch (enp->en_family) { | switch (enp->en_family) { | ||||
#if EFSYS_OPT_SIENA | #if EFSYS_OPT_SIENA | ||||
case EFX_FAMILY_SIENA: | case EFX_FAMILY_SIENA: | ||||
efop = &__efx_filter_siena_ops; | efop = &__efx_filter_siena_ops; | ||||
▲ Show 20 Lines • Show All 219 Lines • ▼ Show 20 Lines | |||||
* Specify matching otherwise-unmatched unicast in a filter specification | * Specify matching otherwise-unmatched unicast in a filter specification | ||||
*/ | */ | ||||
__checkReturn efx_rc_t | __checkReturn efx_rc_t | ||||
efx_filter_spec_set_uc_def( | efx_filter_spec_set_uc_def( | ||||
__inout efx_filter_spec_t *spec) | __inout efx_filter_spec_t *spec) | ||||
{ | { | ||||
EFSYS_ASSERT3P(spec, !=, NULL); | EFSYS_ASSERT3P(spec, !=, NULL); | ||||
spec->efs_match_flags |= EFX_FILTER_MATCH_LOC_MAC_IG; | spec->efs_match_flags |= EFX_FILTER_MATCH_UNKNOWN_UCAST_DST; | ||||
return (0); | return (0); | ||||
} | } | ||||
/* | /* | ||||
* Specify matching otherwise-unmatched multicast in a filter specification | * Specify matching otherwise-unmatched multicast in a filter specification | ||||
*/ | */ | ||||
__checkReturn efx_rc_t | __checkReturn efx_rc_t | ||||
efx_filter_spec_set_mc_def( | efx_filter_spec_set_mc_def( | ||||
__inout efx_filter_spec_t *spec) | __inout efx_filter_spec_t *spec) | ||||
{ | { | ||||
EFSYS_ASSERT3P(spec, !=, NULL); | EFSYS_ASSERT3P(spec, !=, NULL); | ||||
spec->efs_match_flags |= EFX_FILTER_MATCH_LOC_MAC_IG; | spec->efs_match_flags |= EFX_FILTER_MATCH_UNKNOWN_MCAST_DST; | ||||
spec->efs_loc_mac[0] = 1; | |||||
return (0); | return (0); | ||||
} | } | ||||
#if EFSYS_OPT_SIENA | #if EFSYS_OPT_SIENA | ||||
/* | /* | ||||
▲ Show 20 Lines • Show All 990 Lines • Show Last 20 Lines |