sfxge(4): add Medford2 support to FILTER module
Submitted by: Andy Moreton <amoreton at solarflare.com> Sponsored by: Solarflare Communications, Inc. Differential Revision: https://reviews.freebsd.org/D18146
This commit is contained in:
parent
5095efd4f5
commit
d6f0fbb15b
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=341024
@ -34,7 +34,7 @@ __FBSDID("$FreeBSD$");
|
||||
#include "efx.h"
|
||||
#include "efx_impl.h"
|
||||
|
||||
#if EFSYS_OPT_HUNTINGTON || EFSYS_OPT_MEDFORD
|
||||
#if EFSYS_OPT_HUNTINGTON || EFSYS_OPT_MEDFORD || EFSYS_OPT_MEDFORD2
|
||||
|
||||
#if EFSYS_OPT_FILTER
|
||||
|
||||
@ -122,7 +122,8 @@ ef10_filter_init(
|
||||
ef10_filter_table_t *eftp;
|
||||
|
||||
EFSYS_ASSERT(enp->en_family == EFX_FAMILY_HUNTINGTON ||
|
||||
enp->en_family == EFX_FAMILY_MEDFORD);
|
||||
enp->en_family == EFX_FAMILY_MEDFORD ||
|
||||
enp->en_family == EFX_FAMILY_MEDFORD2);
|
||||
|
||||
#define MATCH_MASK(match) (EFX_MASK32(match) << EFX_LOW_BIT(match))
|
||||
EFX_STATIC_ASSERT(EFX_FILTER_MATCH_REM_HOST ==
|
||||
@ -177,7 +178,8 @@ ef10_filter_fini(
|
||||
__in efx_nic_t *enp)
|
||||
{
|
||||
EFSYS_ASSERT(enp->en_family == EFX_FAMILY_HUNTINGTON ||
|
||||
enp->en_family == EFX_FAMILY_MEDFORD);
|
||||
enp->en_family == EFX_FAMILY_MEDFORD ||
|
||||
enp->en_family == EFX_FAMILY_MEDFORD2);
|
||||
|
||||
if (enp->en_filter.ef_ef10_filter_table != NULL) {
|
||||
EFSYS_KMEM_FREE(enp->en_esip, sizeof (ef10_filter_table_t),
|
||||
@ -522,7 +524,8 @@ ef10_filter_restore(
|
||||
efx_rc_t rc;
|
||||
|
||||
EFSYS_ASSERT(enp->en_family == EFX_FAMILY_HUNTINGTON ||
|
||||
enp->en_family == EFX_FAMILY_MEDFORD);
|
||||
enp->en_family == EFX_FAMILY_MEDFORD ||
|
||||
enp->en_family == EFX_FAMILY_MEDFORD2);
|
||||
|
||||
for (tbl_id = 0; tbl_id < EFX_EF10_FILTER_TBL_ROWS; tbl_id++) {
|
||||
|
||||
@ -597,7 +600,8 @@ ef10_filter_add_internal(
|
||||
boolean_t locked = B_FALSE;
|
||||
|
||||
EFSYS_ASSERT(enp->en_family == EFX_FAMILY_HUNTINGTON ||
|
||||
enp->en_family == EFX_FAMILY_MEDFORD);
|
||||
enp->en_family == EFX_FAMILY_MEDFORD ||
|
||||
enp->en_family == EFX_FAMILY_MEDFORD2);
|
||||
|
||||
hash = ef10_filter_hash(spec);
|
||||
|
||||
@ -869,7 +873,8 @@ ef10_filter_delete(
|
||||
boolean_t locked = B_FALSE;
|
||||
|
||||
EFSYS_ASSERT(enp->en_family == EFX_FAMILY_HUNTINGTON ||
|
||||
enp->en_family == EFX_FAMILY_MEDFORD);
|
||||
enp->en_family == EFX_FAMILY_MEDFORD ||
|
||||
enp->en_family == EFX_FAMILY_MEDFORD2);
|
||||
|
||||
hash = ef10_filter_hash(spec);
|
||||
|
||||
@ -1663,4 +1668,4 @@ ef10_filter_default_rxq_clear(
|
||||
|
||||
#endif /* EFSYS_OPT_FILTER */
|
||||
|
||||
#endif /* EFSYS_OPT_HUNTINGTON || EFSYS_OPT_MEDFORD */
|
||||
#endif /* EFSYS_OPT_HUNTINGTON || EFSYS_OPT_MEDFORD || EFSYS_OPT_MEDFORD2 */
|
||||
|
@ -85,7 +85,7 @@ static const efx_filter_ops_t __efx_filter_siena_ops = {
|
||||
};
|
||||
#endif /* EFSYS_OPT_SIENA */
|
||||
|
||||
#if EFSYS_OPT_HUNTINGTON || EFSYS_OPT_MEDFORD
|
||||
#if EFSYS_OPT_HUNTINGTON || EFSYS_OPT_MEDFORD || EFSYS_OPT_MEDFORD2
|
||||
static const efx_filter_ops_t __efx_filter_ef10_ops = {
|
||||
ef10_filter_init, /* efo_init */
|
||||
ef10_filter_fini, /* efo_fini */
|
||||
@ -95,7 +95,7 @@ static const efx_filter_ops_t __efx_filter_ef10_ops = {
|
||||
ef10_filter_supported_filters, /* efo_supported_filters */
|
||||
ef10_filter_reconfigure, /* efo_reconfigure */
|
||||
};
|
||||
#endif /* EFSYS_OPT_HUNTINGTON || EFSYS_OPT_MEDFORD */
|
||||
#endif /* EFSYS_OPT_HUNTINGTON || EFSYS_OPT_MEDFORD || EFSYS_OPT_MEDFORD2 */
|
||||
|
||||
__checkReturn efx_rc_t
|
||||
efx_filter_insert(
|
||||
@ -174,6 +174,12 @@ efx_filter_init(
|
||||
break;
|
||||
#endif /* EFSYS_OPT_MEDFORD */
|
||||
|
||||
#if EFSYS_OPT_MEDFORD2
|
||||
case EFX_FAMILY_MEDFORD2:
|
||||
efop = &__efx_filter_ef10_ops;
|
||||
break;
|
||||
#endif /* EFSYS_OPT_MEDFORD2 */
|
||||
|
||||
default:
|
||||
EFSYS_ASSERT(0);
|
||||
rc = ENOTSUP;
|
||||
|
Loading…
Reference in New Issue
Block a user